Research was speeded up in master due to wrong research code in rules.ini #4075
Comments
NoQ commented I also wonder where do we have {research, power, production} points of the modules stored. There aren't any signs of them in structure.ini. |
crab_ commented Replying to Warzone2100/old-trac-import#4075 (comment:1):
see structures.ini |
Per changed blocking which not transferred by tractive |
Per changed blockedby which not transferred by tractive |
Per commented IIRC modules now do a hard-coded improvement to the underlying structure. No time to check now, though, so might be wrong. |
NoQ commented
|
NoQ changed _comment0 which not transferred by tractive |
crab_ commented Replying to Warzone2100/old-trac-import#4075 (comment:4):
i found function in hard-code:
no modules = 100% of factory.productionPoints in 3.1.0 we were able to set factory module production points in structurefunctions.txt :( |
Per commented Yes, this is a regression in mod-ability, which I noted in the forum post in which I announced the change to the new upgrade format. Unfortunately, it is a bit hard to change, and I do not really know what would be a good way to deal with it. IIRC the researchPointers for the research module is a mistake, it has no effect, and it should be removed to avoid confusion. Can we adjust some of the parameters that we can change to simulate 3.1 behaviour? |
crab_ commented Replying to Warzone2100/old-trac-import#4075 (comment:7):
Replying to Warzone2100/old-trac-import#4075 (comment:7):
yes, i think best place to adjust is rules.js Replying to Warzone2100/old-trac-import#4075 (comment:7):
all results of research can be stored in one object in json format so i can make patch with conversion research hints to json and i can write set of functions (i can make all except hardcoded stuff with modules) Another variant - store in research results "select query" for affected stuff |
Per changed _comment0 which not transferred by tractive |
Per commented That was what I was afraid of. I was really asking more in terms of how modules in general should be treated in the data. They have always been rather hard-coded (more now than before, but always very much so). Should they be real buildings, or just modifications to existing buildings? The existing and previous code pretty much does both, perhaps treating it more as a building upgrade now than before. I think the very concept of modules is very poorly thought out, not having much purpose, and ideally should be retired. But I have no idea how to do that without causing a lot of messes. |
crab_ commented Replying to Warzone2100/old-trac-import#4075 (comment:10):
Concept of upgrades is strongest motivation to play the game over and over. We need make complete and integrity system of building upgrades (modules). So i think making modules to work simply as 200% of building power is Wrong Way. Each module can be considered as individual element in list of structures. There is one problem with modules - they are are mandatory. Player who do not built modules eventually lose game. But this problem can be solved by adjusting stats. |
Per commented How about we just make modules replace the original building entirely? I think that would make the code simpler, and give more options at the same time. |
crab_ commented Replying to Warzone2100/old-trac-import#4075 (comment:12):
I'm agree. But we need keep separate models of modules and base buldings to be able to show blueprints. |
klasskill commented Replying to Warzone2100/old-trac-import#4075 (comment:9):
I have noticed this has not been replied to in 22 months, does that mean it is going to stay as it is now? |
Cyp <cyp@...> changed status from |
Cyp <cyp@...> changed owner from `` to |
Cyp <cyp@...> changed resolution from `` to |
Cyp <cyp@...> committed [01] In Warzone2100/warzone2100@01c2ea9:
|
Cyp commented Replying to Warzone2100/old-trac-import#4075 (comment:14):
No, eventually things get fixed. |
keyword_research
resolution_fixed
type_bug
| by crab_Steps to reproduce:
This is happend because in master version research upgrades now also increase power of research module.
In version 3.1.0 only power of research facility become upgraded.
3.1.0 formula = lab_power + lab_powerupgrade + lab_module_power
master formula = lab_power + lab_powerupgrade + lab_module_power*upgrade
Lets see code in rules.ini.
This code makes upgrade applied for both research facility and research module.
eventResearched(research, structure, player)
else if (['ResearchPoints', 'ProductionPoints', 'PowerPoints', 'RepairPoints', 'RearmPoints'].indexOf(s[0]) >= 0)
{
for (var i in Upgrades[player].Building)
{
if (Stats.Building[i][s[0]] > 0) // only applies if building has this stat already
{
Upgrades[player].Building[i][s[0]] += Math.ceil(Stats.Building[i][s[0]] * s[1] / 100);
//debug(" upgraded " + i + " to " + Upgrades[player].Building[i][s[0]] + " by " + Math.ceil(Stats.Building[i][s[0]] * s[1] / 100));
}
}
}
This code increases research points for
Issue migrated from trac:4075 at 2022-04-16 11:34:42 -0700
The text was updated successfully, but these errors were encountered: