Jump to content

Depleted ore veins


antstubell

Recommended Posts

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...