Page 4 of 5

Re: need help reading .ini file

Posted: 02 Oct 2013, 22:02
by Duha
hitpoints for features and structures default value is 1
hitpoints for unit components default value is 0

Should default value be the same?

Re: need help reading .ini file

Posted: 03 Oct 2013, 00:42
by Per
Duha wrote:hitpoints for features and structures default value is 1
hitpoints for unit components default value is 0

Should default value be the same?
No. Zero should be legal value for components, but not for the others.

Re: need help reading .ini file

Posted: 03 Oct 2013, 23:14
by Duha
Per wrote:
Duha wrote:hitpoints for features and structures default value is 1
hitpoints for unit components default value is 0

Should default value be the same?
No. Zero should be legal value for components, but not for the others.
1. Some features has hitpoints = 0 (and damagable = 0) Should them be changed to hitpoints = 1 (and we can remove them from ini file because we don`t show default values)?

2. width and breadth in features has default 1 and no other checks
width and breadth in structures has default 0 and must be <= 100

3. we have techCode =major | minor. We can remove this key and set major if has msgName key.

4. Found bug in campaign research: cyborg(VTOL) factory upgrade research do nothing. Looks like tank factory upgrade affects this factories. Should we remove this researches?

Re: need help reading .ini file

Posted: 09 Oct 2013, 01:39
by Duha
I plan to add header in new style for ini files:

Here is an example: https://github.com/Cjkjvfnby/warzone210 ... 83233ee9d3

It looks bad on forum page:
Spoiler:
PS. Still waiting answers for previous questions.

Re: need help reading .ini file

Posted: 10 Oct 2013, 23:30
by Duha
How pie files loader resolve path to pie when loading data/mp/stats:

Is it use same cache as base? (lib\ivis_opengl\imdload.cpp:*modelGet)
What will happens if there is file with same name in base and mp folder? Base will show one pie mp other?
What will happens if there is no file in mp? Base and pie will show same file?

Double pie examples:

Code: Select all

components/bodies/drtrans.pie
components/prop/prsrvtl1.pie
components/prop/prslvtl1.pie
components/weapons/scavmra.pie
What is this means in data\mp\stats\bodypropulsionimd.ini

Code: Select all

[ZNULLBODY]
ZNULLPROP=MIBNKDRL.PIE, MIBNKDRR.PIE
What is *.wrf files?
Some pie models is not used in ini file but mentioned in wrf ("cybitrkt.pie")

And other pie models is not mentioned in whole project: "gnmacan.pie" Should we remove them?

Re: need help reading .ini file

Posted: 14 Oct 2013, 00:03
by Per
Any file in data/mp with the same name as any file in data/base will override the latter file. The files in data/mp take priority.

The .wrf files are a list of files to be loaded into memory (and for scripts, also activated). They are kind of useless, in my opinion, and I have been slowly reducing their usage. PIE files and textures are no longer loaded from wrf files, but loaded as needed.

Informative headers for .ini files would be welcome.

I will try to answer the more detailed questions later.

Re: need help reading .ini file

Posted: 14 Oct 2013, 23:39
by Duha
Per wrote:Any file in data/mp with the same name as any file in data/base will override the latter file. The files in data/mp take priority.
thank you
The .wrf files are a list of files to be loaded into memory (and for scripts, also activated). They are kind of useless, in my opinion, and I have been slowly reducing their usage. PIE files and textures are no longer loaded from wrf files, but loaded as needed.
mp: components/bodies/scbd_run.pie is only one usage in data\mp\anims\scbd_run.ani what for this file used?

Is any other places where pie files is used?
Is it true that if I cant find filename by text search(ignore case) in master this pie is unused?
Informative headers for .ini files would be welcome.
I will make pull request after previous will be closed.

Re: need help reading .ini file

Posted: 15 Oct 2013, 06:28
by NoQ
data\mp\anims\scbd_run.ani
I guess it's scavenger soldier run animation? Probably used by its id in anim.cfg (?)
P.S. there are quite a lot of other unused pie files around, such as this.

Re: need help reading .ini file

Posted: 15 Oct 2013, 10:24
by Duha
NoQ wrote:
data\mp\anims\scbd_run.ani
I guess it's scavenger soldier run animation? Probably used by its id in anim.cfg (?)
P.S. there are quite a lot of other unused pie files around, such as this.
I already has list of pies not used by stats. I am trying to figure out what files is not used at all.

This is information about pie usage in stats
Spoiler:

Re: need help reading .ini file

Posted: 16 Oct 2013, 23:05
by Per
Duha wrote: 4. Found bug in campaign research: cyborg(VTOL) factory upgrade research do nothing. Looks like tank factory upgrade affects this factories. Should we remove this researches?
This is a bug. The campaign research files are missing both techs and tech results. If you grep the research ini files in campaign for "resultFunctions" you will find techs missing their results, and also missing their prerequisites (eg upgrades 01...05 for cyborgs, 01..02 for vtols in cam3).

Edit: Probably due to script side not implementing a way to distinguish between different kinds of buildings for production points upgrades, since MP does not care.

Re: need help reading .ini file

Posted: 17 Oct 2013, 00:23
by Duha
Add some header example for research and stats: https://github.com/Cjkjvfnby/warzone210 ... 6fca852eef

If this style is OK I will proceed with other files.

Re: need help reading .ini file

Posted: 17 Oct 2013, 22:31
by Per
Duha wrote:If this style is OK I will proceed with other files.
Looks good to me.

Re: need help reading .ini file

Posted: 24 Oct 2013, 00:02
by Duha
Per wrote:
Duha wrote:If this style is OK I will proceed with other files.
Looks good to me.
Will add new pull request after finishing with current.

Re: need help reading .ini file

Posted: 26 Oct 2013, 13:01
by crab_
Hello.

What is situation with names.txt?
As far i know "name" field was added to many stat ini-files
I need to know how read names of cyborgs.

May be add "name" field into templates.ini?

I can turn names of cyborgs from names.txt into templates.ini, if someone will write codes it in hardcode :)

Re: need help reading .ini file

Posted: 26 Oct 2013, 15:10
by Duha
crab_ wrote:Hello.

What is situation with names.txt?
As far i know "name" field was added to many stat ini-files
I need to know how read names of cyborgs.

May be add "name" field into templates.ini?

I can turn names of cyborgs from names.txt into templates.ini, if someone will write codes it in hardcode :)
As I understand there was a plan to remove names.txt from 3.2

per: did you need patch that removes all entries of names in names.txt that already present as name = .* in *.ini files?