Page 1 of 5

need help reading .ini file

Posted: 15 Apr 2013, 06:37
by Ezio
EDIT: i need to know which stats in ini file i nee to link for these

here weapons.ini

Code: Select all

'sacc' => 
'lifetime' => 
'life' => 
'v' => 
'iheight' => 
'type' => 
'mrange' => ,
repair.ini

Code: Select all

'hp' => ,
'build' => ,
'prereq' => ''

Re: need help reading .ini file

Posted: 15 Apr 2013, 08:00
by Per
I don't understand your question.

Re: need help reading .ini file

Posted: 15 Apr 2013, 09:20
by Ezio
Per wrote:I don't understand your question.
my bad haha, stats from left are the one that will be put to guide page, while on right is comes from .ini. but some stats either not entered in ini file or have a different name and it's pretty confusing so i might entered wrong stats from ini file to guide page like 'direction' => simplify($tvals['facePlayer']), which should be 'movement' (i fixed it already).

Re: need help reading .ini file

Posted: 15 Apr 2013, 10:41
by Per
I can tell you what every line in the .ini files is for, but I can't tell you what 'v' in a php script I've never read is...

Re: need help reading .ini file

Posted: 22 Apr 2013, 06:44
by Ezio
Per wrote:I can tell you what every line in the .ini files is for, but I can't tell you what 'v' in a php script I've never read is...
seems those don't do anything, but we have longRange (i use this for long range),longHit (i use this for log accuracy) but we dont have shortRange and shortHit in weapon.ini :hmm:

Re: need help reading .ini file

Posted: 22 Apr 2013, 09:26
by Duha
Per wrote:I can tell you what every line in the .ini files is for, but I can't tell you what 'v' in a php script I've never read is...
Hi Per, if you project still needs converter from txt to ini I can rewrite it in python. I think old one is outdated since we rename/remove some fields and simplify some files.

Re: need help reading .ini file

Posted: 23 Apr 2013, 14:35
by Per
That would be useful. As you can see, we still have a few .txt files remaining. Any help transforming those to .ini would be appreciated.

Re: need help reading .ini file

Posted: 23 Apr 2013, 19:23
by Duha
Per wrote:That would be useful. As you can see, we still have a few .txt files remaining. Any help transforming those to .ini would be appreciated.
Send me PM what to what. Or just do something and send result?

Re: need help reading .ini file

Posted: 23 Apr 2013, 20:43
by Per
Do something and post result in bug tracker.

Re: need help reading .ini file

Posted: 24 Apr 2013, 01:28
by Duha
Per wrote:Do something and post result in bug tracker.
In what format attach it to bugtracker?

First attempt.
https://www.dropbox.com/sh/x1k0kiun93emfpm/k5jxreymAd


I don`t know waht to do with function. Should I merge them to researches?

I don`t know what to do with template.avaliable (for base it has 7, 5 and other values for mp it is yes/no)

May be we should merge assignweapons to templates?

Re: need help reading .ini file

Posted: 24 Apr 2013, 03:23
by Ezio
.......

Re: need help reading .ini file

Posted: 24 Apr 2013, 07:46
by Per
Duha wrote:In what format attach it to bugtracker?
Just attach the .ini files you have made to the bugtracker. Your first attempt looks good. I'd like to see just one change, see below.
Duha wrote: I don`t know waht to do with function. Should I merge them to researches?
Just leave functions.txt to me, I am working on that right now. Its contents will be moved elsewhere.
Duha wrote: I don`t know what to do with template.avaliable (for base it has 7, 5 and other values for mp it is yes/no)
I'll look into it.
Duha wrote:May be we should merge assignweapons to templates?
Yes, please.

Re: need help reading .ini file

Posted: 26 Apr 2013, 01:48
by Duha
Per wrote:
Duha wrote:In what format attach it to bugtracker?
Just attach the .ini files you have made to the bugtracker. Your first attempt looks good. I'd like to see just one change, see below.
http://developer.wz2100.net/ticket/4005

PS. When you changing c++ code to work with ini please leave some comment about fields. default values, limit, list of available choices.

Re: need help reading .ini file

Posted: 29 Apr 2013, 12:51
by Per
Nice work. While you're at it, maybe you can write a script to transform from old functions.txt + new research.ini resultFunctions to even newer functions line in research.ini?

Here is how it looks in upgrades branch: https://github.com/perim/warzone2100/bl ... search.ini
Notice the lines with 'results' keys.

Here is how it looks previously: https://github.com/perim/warzone2100/bl ... search.ini and https://github.com/perim/warzone2100/bl ... ctions.txt (yes, functions.txt is removed entirely in upgrades branch)

I changed the MP research.ini by hand. This was a ton of work, and may have mistakes. If you could write a script to change base and mp automatically, I would be very grateful.

Re: need help reading .ini file

Posted: 29 Apr 2013, 14:09
by Duha
Per wrote:Nice work. While you're at it, maybe you can write a script to transform from old functions.txt + new research.ini resultFunctions to even newer functions line in research.ini?

Here is how it looks in upgrades branch: https://github.com/perim/warzone2100/bl ... search.ini
Notice the lines with 'results' keys.

Here is how it looks previously: https://github.com/perim/warzone2100/bl ... search.ini and https://github.com/perim/warzone2100/bl ... ctions.txt (yes, functions.txt is removed entirely in upgrades branch)

I changed the MP research.ini by hand. This was a ton of work, and may have mistakes. If you could write a script to change base and mp automatically, I would be very grateful.

Am I right?:
Take string "Research Upgrade,Struc-Research-Upgrade02,60" from functions.txt
Find "resultFunctions = Struc-Research-Upgrade02" in research.ini section R-Struc-Research-Upgrade02 and replace it with
result = ResearchPoints:60

Where can I find dict (hash) like:

Code: Select all

{
'Research Upgrade': 'ResearchPoints',
}
We use same values without changes?