While reading this, https://github.com/greenheartgames/gdt-modAPI/wiki/Advanced-Modding , I have reached the part where I am able to change a function or anything else regarding the game. I would like to ask: Am I able to modify code instead of adding new? I’m sure this can happen, but I would like to know if I should study other parts of the code first to make sure. I’m aiming to modify the sales.SellGame function, in the part where MMO maintenance cost is calculated.
That’s why I asked :P. Unless we make a check in that statement which alters the other. I gotta wait until someone else comes too. Thanks for your help!
The stuff that’s happening in that if statement is fairly basic. If you don’t want that it gets executed just set game.nextMaintenance to 0, but I think that would be an odd decision.
If you just want to add your own logic when there’s maintenance on a game, you don’t need to change the original method.
Just hijack it, execute the original method, then add your own logic based on game.nextMaintenance.
Anyway, if you can describe what you are after I can probably give you a better tip.
I’m trying to reduce the maintenance cost of MMOs. I tried what you said in another function, General.getMonthlyCosts (if I’m right). Excecuted the original, and set the cost value to zero, and almost re-added the same function to test it.