How to get the resource UI in the armory buy menu to update?

SamdamanSamdaman USA Join Date: 2015-12-07 Member: 209802Members
I am doing mods that change the res cost of certain things, I can change the res cost of things but I noticed that the GUI in-game does not update.

For example: I change the res cost of a grenade from 3 res to 6 res BUT when I open the marine armory in-game it still displays that the grenade costs 3 res.

What file in ns2 contains the code that lets me change what the GUI shows in terms of an items res cost?

Comments

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    Does it take 6 res to buy the grenade? If so then there is a problem somewhere else. I am willing to guess that what you are doing isn't being loaded.
  • SamdamanSamdaman USA Join Date: 2015-12-07 Member: 209802Members
    Yeah it takes 6 res to buy it in-game
  • SamdamanSamdaman USA Join Date: 2015-12-07 Member: 209802Members
    I basically changed the res cost in balance.lua and the res cost in the UI does not match the balance.lua values
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    That is very strange
  • SamdamanSamdaman USA Join Date: 2015-12-07 Member: 209802Members
    I know! I've spent so many hours just flipping through files trying to find where balance.lua hooks into a UI code that shows res cost.
  • SamdamanSamdaman USA Join Date: 2015-12-07 Member: 209802Members
    Oh shit, I think I found the issue out. I forgot to send the same files I modified to my clients...

    For anyone that comes across this, you gotta make a mod that has the same changes that you can send to clients through the workshop.
  • SamdamanSamdaman USA Join Date: 2015-12-07 Member: 209802Members
    Thanks for your help Samus!
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    So you will want to look up kTechDataCostKey
    This is what is determined for the cost of the techId.
    These are set in Balance.lua
    I don't see why the cost is not updating.

    I tested this locally by changing the cost in my dev build, which would be the equivalent of changing it in the vanilla ns2 files, and it worked for me.
Sign In or Register to comment.