Jump to content

Self-made rules.ini editor, some questions


colt

Recommended Posts

Hi,

I am rookie to this forum and RA2 mod. I created a self-made RA2 rules.ini editor on my github: 

coltlv1994/RulesChanged: A Red Alert 2 rule file modifier (github.com)

Well, currently it could read and save RA2 rule file, rules.ini; I do have plan to extend its support on RA2:YR, but I have encountered severe problem. After I save the file, new rules.ini, and put it into RA2 folder, the game will hit IE(internal error) after skirmish loading.

I know that not everyone is interested into looking at codes and that's OK. I will briefly explain what the program does:

1. Read from existing rules.ini file;

2. For [InfantryTypes], [VehicleTypes], [AircraftTypes], [BuildingTypes], [SuperWeaponTypes] and [Warheads], the six fields with list like "1=AMCV", I will put them into a list and read every attributes from [AMCV], [NAPOWR], etc.

3. For [OverlayTypes]. [Countries], [SmudgeTypes], [Aminations], [VoxelAmims], [Particles], [ParticleSystems], [AIGenerals] and [VariableNames], they and their subfields will be put into a separate list, nothing changes to these lines.

4. All other fields like [General], [105mm] will be treated as the subfields in [Building/Vehicle/Aircraft/etc.Types].

5. Write the data back; first write lines in step 3, then lines in step 2, then lines in step 4.

 

Differences between original and saved file:

i. Obviously, the tags will NOT be in original order.

ii. The list under tags in step 2, will NOT be in original order.

iii. While the list of step 3 will be in EXACT THE SAME order of original file, however, their subfields, like [BOXES01] and [BOXES02], will NOT be in original order.

iv. All tags in step 4 will not follow the original order.

v. All attributes, like Primary or Name, in step 2, 3 and 4, will NOT be in original order.

vi. Some empty subfields like [CR1], will be removed from save file.

 

 

Since I got IE, I guess there must be something wrong in the program. You can refer to the output file and original rules.ini file (extracted from RA2 1.006) on github. (interestingly I cannot upload them here)

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...