gallick-gunner
Recruit
Hello. We don't have a suggestion section for modding related issues so I'm posting this here. I'm working on a mod currently and I'm amazed by the amount of hardcoded values I've found. This makes it very hard to mod since we don't have much flexibility and we have to patch the whole function by copying all the code, resolving references by passing in long arguments or fetching private fields/methods through reflection just to change that value. There are constants defined in classes which are essentially dead variables since the devs don't use it. Why would you do that. I know it's EA, but it's gonna hurt you in the longer run and it's hurting us modders that want to mod the game in it's current state and not after it gets released.
For example, Imagine a basic mod that tones down the skill range from 300 to 150. If you have a
Similar is the case for perks. While you have every information stored inside the perk, the level limit for the final perks above which you get x% bonuses like "Every skill level above 250 gets you 2% bonus" are hardcoded elsewhere wherever that perk is getting used. If you can add another constant inside the perk class, this reduces the work for you (incase you decide to change things later on) and the modders.
In short, please use constants/variables defined inside classes instead of hardcoded values or local variables in functions.
Thanks.
For example, Imagine a basic mod that tones down the skill range from 300 to 150. If you have a
maxSkillLevel
constant in a class and use it everywhere, then I'd only have to change that. Any other place which requires certain values like 250/275/225 in calculations, you could calculate those by modifying that constant so that If I change that constant alone I wouldn't have to swim through a sea of code to look for other changes I have to do. That's good code design. It saves everyone the hassle to change code at 20 different places when you can manage by changing in 1 place.Similar is the case for perks. While you have every information stored inside the perk, the level limit for the final perks above which you get x% bonuses like "Every skill level above 250 gets you 2% bonus" are hardcoded elsewhere wherever that perk is getting used. If you can add another constant inside the perk class, this reduces the work for you (incase you decide to change things later on) and the modders.
In short, please use constants/variables defined inside classes instead of hardcoded values or local variables in functions.
Thanks.