need help reading .ini file

For code related discussions and questions
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3775
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per » 29 Apr 2013, 15:51

Yes. You'll have to make that dict from looking at the new 'results' lines in the new research.ini file, I'm afraid. The values have changed.

Or you could read the source at https://github.com/perim/warzone2100/bl ... .cpp#L4021 (used through https://github.com/perim/warzone2100/bl ... es.js#L303) :)

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: need help reading .ini file

Post by Duha » 29 Apr 2013, 19:12

Per wrote:Yes. You'll have to make that dict from looking at the new 'results' lines in the new research.ini file, I'm afraid. The values have changed.

Or you could read the source at https://github.com/perim/warzone2100/bl ... .cpp#L4021 (used through https://github.com/perim/warzone2100/bl ... es.js#L303) :)
I think I got algoritm of converting.

Are all researches in base use same functions?

Errors in you ini:
Spoiler:
http://addons.wz2100.net/ developer

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3775
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per » 29 Apr 2013, 21:17

Duha wrote:Are all researches in base use same functions?
I don't know.
Duha wrote: Errors in you ini:
Spoiler:
The first and third differences are deliberate - the ECM stuff is all new and I changed it a bit now that I know how... Also, there are many other functions in functions.txt that have no counterpart in the research list - they are just left unused for some reason or another. The second is a copy/paste error - thanks for finding it!

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: need help reading .ini file

Post by Duha » 29 Apr 2013, 22:32

Per wrote:
Duha wrote:Are all researches in base use same functions?
I don't know.

ээээ. Ok, I will try to do something :)
http://addons.wz2100.net/ developer

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3775
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per » 30 Apr 2013, 23:47

Ok, I think my upgrades work is done now. Just waiting for you to port over the campaign data, and I'll merge into master.

Should be fun!

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: need help reading .ini file

Post by Duha » 02 May 2013, 00:31

Per wrote:Ok, I think my upgrades work is done now. Just waiting for you to port over the campaign data, and I'll merge into master.

Should be fun!
I am traveling now. Will be back 12.05
http://addons.wz2100.net/ developer

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3775
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per » 07 May 2013, 08:17

Any chance of getting the upgrades for campaign done soon? :)

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: need help reading .ini file

Post by Duha » 07 May 2013, 22:28

Per wrote:Any chance of getting the upgrades for campaign done soon? :)
Did we finsh with #4005 yet?

First try in Ticket #4010
http://addons.wz2100.net/ developer

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3775
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per » 07 May 2013, 22:50

Duha wrote:Did we finsh with #4005 yet?
I am working on it. Templates code is ... weird.
Duha wrote:First try in Ticket #4010
Thanks! See comments :)

User avatar
NoQ
Special
Special
Posts: 6225
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: need help reading .ini file

Post by NoQ » 12 May 2013, 10:04

As this seems to be over, i'm trying to produce a single easy-to-use script for converting all stats together from csv to ini, for simplifying user-made mods conversion from 3.1 to 3.2. If you guys still have any scripts you used for converting, could you please post them here? (:

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3775
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per » 12 May 2013, 12:00

Remaining work is doing something with limits.txt (not exactly sure what yet), converting .gam to .ini (if I get time), and nuking names.txt (we now have 'names' fields in the ini files instead, but they are currently unused).

I am also considering merging weaponsounds.ini and propulsionsounds.ini into weapons.ini and propulsion.ini, respectively.

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: need help reading .ini file

Post by Duha » 12 May 2013, 21:00

Per wrote:Remaining work is doing something with limits.txt (not exactly sure what yet), converting .gam to .ini (if I get time), and nuking names.txt (we now have 'names' fields in the ini files instead, but they are currently unused).

I am also considering merging weaponsounds.ini and propulsionsounds.ini into weapons.ini and propulsion.ini, respectively.
I made some comments in ticket and github about researches.
My script converts data almost as you done manually for mp. But some diffs in result stops me to convert base. I don`t know how to check if my conversation right.

I will put my scripts in public soon. I think how to merge them in one bundle.

If you describe what need to be converted I will convert it. May be you create some tickets for me?
http://addons.wz2100.net/ developer

User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: need help reading .ini file

Post by Duha » 13 May 2013, 00:49

NoQ wrote:As this seems to be over, i'm trying to produce a single easy-to-use script for converting all stats together from csv to ini, for simplifying user-made mods conversion from 3.1 to 3.2. If you guys still have any scripts you used for converting, could you please post them here? (:
https://github.com/Cjkjvfnby/wz_convertor
It is collection of scripts that used to help Per. Little later I will make some changes to support mod convertation.
http://addons.wz2100.net/ developer

User avatar
NoQ
Special
Special
Posts: 6225
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: need help reading .ini file

Post by NoQ » 18 May 2013, 10:03

Emm. I just noticed that nexus and other campaign-specific structures (such as NX-WallTower-Rail3) were removed from structure.ini during conversion. This may break maps, as there are quite a lot of maps that were having such structures placed (they just look cool).

User avatar
NoQ
Special
Special
Posts: 6225
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: need help reading .ini file

Post by NoQ » 19 May 2013, 16:53

Also, could we bring back researchstruct.txt (to merge into research.ini)? It might not be used much in the base game, but i use it a lot in my wzmini mod ("build bigger lab to research advanced stuff" etc.) Something like

Code: Select all

requiredStructure=CommandCenter,CommandRelayCenter
?

Post Reply