Ares data classes are reinitialized when the later INI files contain their relevant sections

Bug #896065 reported by DCoder DCoder
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
Fix Released
High
Unassigned

Bug Description

As was noted in issue #199 and other places, it appears that Ares data objects lose their custom values and get reinitialized from scratch when read from an auxiliary INI file (gamemode/map).

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

Can anyone go and make a list of what object types get reset? I know Superweapons did, and from #1443 it seems the General data also does... what else messes up? This shouldn't be hard to test, as it appears simply adding the section (like [GAYARD]) would mess up BuildingTypes, for example.

@Alex, should he choose to dig into this: all I can find right now is that InitializeConstants is called twice, but I don't see any INI reader functions called in between, so that should not mess anything up...

Revision history for this message
Chanterier (speederyr) wrote :

Well, BuildingTypes get reset as well, since I wanted to modify NACNST which had custom spy effects set (modify in a mission) and it was gone in that mission.

Revision history for this message
AlexB (alexander-b) wrote :

Reminder:
Parsing InfiltrateCustom in BuildingTypeExt skips reading the other specific tags conditionally. But it checks whether the struct Valueable exists and not whether its value is true.

I'll not change this for the moment. It should not cause the problems reported by Speeder. (I couldn't verify them; I made NACNST spyable in rulesmd.ini and added a non-empty section in mpfreeforallmd.ini. NACNST did not loose its SpyEffect customizations. Didn't test overriding NACNST in maps.)

Revision history for this message
AlexB (alexander-b) wrote :

It seems it is not enough if there is the section header only. Additional loading can be triggered if there is at least one value in that section, for example updating UIName=.

The Multi Engineer bug was caused by a hook that kept a copy of the EngineerCaptureLevel in synch with the original value, but it used the constant 1.0 as default instead of the previously parsed value.

Revision history for this message
Bug Importer (bug-importer) wrote :

Code related to this issue has just been checked in!
Author: AlexB
Location: trunk, r974
Commit contains DLL: Yes
Revision comment:
Related to issue #1443, related to issue #1453: MultiEngineer should work now even if [General] has been defined in a game mode INI or map file without restating EngineerCaptureLevel.
Related to issue #1389: Manual updated to mention EMP defaults for SpySats and factories.
SVN: http://svn.renegadeprojects.com/Ares/974

Revision history for this message
Graion Dilach (graiondilach) wrote :

Tested on r973, redefining Strength and GuardRange on Infantry and VehicleTypes didn't reset their Ares flags.

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

exemple of how this can be tested?

Revision history for this message
cranium (cranium) wrote :

probably by editing values using mode.ini's, map editing, or #includes.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

It's unlikely that this is an actual problem given that nobody's complained about it for a long time. Unless someone finds a real glitch, I'll close this on Saturday.

What the glitch will look like:
Specify Ares values in rules.
Add/change some YR (non-Ares) settings of the same object in gamemode/map without restating Ares values.
Ares settings from the rules are not applied.

Revision history for this message
YR M0ddEr (yr-m0dder) wrote :

I made some tests, this bug didn't show up in my tests. Its to hard to find bugs related to this. As time pass by people will(or not) report stuff related to this.

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

Closing as promised.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.