antstubell Posted April 11, 2021 Share Posted April 11, 2021 Can somebody point me at how to make an ore vein depleted? I've checked the script and it appears that the hidden property int property ResourceCountCurrent = -1 auto Hidden is the key. Am I wrong? Should I make a new script and make this property available? What should it be set to? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 11, 2021 Share Posted April 11, 2021 Find the following inside the GiveOre function: ; debug.Trace(self + ": ResourceCountCurrent == 0 - depleted" ) self.damageObject(50) getLinkedRef().activate(objSelf) DrScOreOpen.play(self) self.setDestroyed(true) This is what depletes the ore vein once ResourceCountCurrent reaches 0. FYI - ResourceCountCurrent is assigned the value of ResourceCountTotal which varies based upon its assigned value. Link to comment Share on other sites More sharing options...
antstubell Posted April 12, 2021 Author Share Posted April 12, 2021 The two properties I can change are ResourceCount and ResourceCountTotal. I've set them both to 0 but the vein still behaves like a normal 'loaded' vein. I don't know what you're suggesting in your post. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 12, 2021 Share Posted April 12, 2021 Don't change the values of the variables. Its the DamageObject and SetDestroyed lines. Perhaps if you explained in more detail of what you are wanting to achieve. Link to comment Share on other sites More sharing options...
antstubell Posted April 13, 2021 Author Share Posted April 13, 2021 I just did another test. With the values I mentioned set to 0, player strikes vein 3 times and is informed that the vein is depleted. I would like that the player strikes it once and is told 'Vein Depleted'. I realise I can just remove the script from the vein activator and maybe use an OnHit script that gives the message but it would be nice to know if I can do it with the existing script - maybe not. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 13, 2021 Share Posted April 13, 2021 If you are changing the existing script, you'll be making your mod incompatible with mods that do edit that script (i.e. my Random Mining mod). The smarter course would be a custom script for your specific ore veins that you need to do this with. Link to comment Share on other sites More sharing options...
antstubell Posted April 13, 2021 Author Share Posted April 13, 2021 (edited) I was just thinking that, thanks.I went with removing the script from a duplicated vein and just calling it Depleted Vein. Player now cannot mine it and what would be the point anyway. Edited April 13, 2021 by antstubell Link to comment Share on other sites More sharing options...
Recommended Posts