need help reading .ini file

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

Re: need help reading .ini file

Post by Per »

Yes, names.txt should slowly be phased out of existence. Patches to add names to .ini files that are missing them, and removing unused names from names.txt would be most welcome.
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 »

crab_ wrote:Hello.
I can turn names of cyborgs from names.txt into templates.ini, if someone will write codes it in hardcode :)
First step is to make patch for ini files and attach it to ticket in track. If you want to do it do it or I can do it.
Per wrote:Yes, names.txt should slowly be phased out of existence. Patches to add names to .ini files that are missing them, and removing unused names from names.txt would be most welcome.
I make pull request with little phase :) After move of templates I will make some hand clean.

*.po files has a lot of entries to names (#: data/base/messages/strings/names.txt:783) may be we should delete this comments?
http://addons.wz2100.net/ developer
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: need help reading .ini file

Post by cybersphinx »

Duha wrote:*.po files has a lot of entries to names (#: data/base/messages/strings/names.txt:783) may be we should delete this comments?
Those will be automatically removed once the files get refreshed for master/3.2.
We want information... information... information.
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 »

Per wrote:Yes, names.txt should slowly be phased out of existence. Patches to add names to .ini files that are missing them, and removing unused names from names.txt would be most welcome.
Do you plan to accept pull request with remove default values? https://github.com/Warzone2100/warzone2100/pull/44
Spoiler:
http://addons.wz2100.net/ developer
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per »

I think that has already been merged as part of https://github.com/Warzone2100/warzone2100/pull/43 ?

You should squash and clean your pull requests, I think. Or post changes as a patch on the bug tracker. When a pull request says "Cjkjvfnby wants to merge 45 commits into Warzone2100:master", I become rather hesitant to merge 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 »

Per wrote:I think that has already been merged as part of https://github.com/Warzone2100/warzone2100/pull/43 ?
Not this is another part.
You should squash and clean your pull requests, I think. Or post changes as a patch on the bug tracker. When a pull request says "Cjkjvfnby wants to merge 45 commits into Warzone2100:master", I become rather hesitant to merge it...
Pull request are pretty if they are just from master. After merging into it updates from master they are became a mess. Only 21 commit of pull request belongs to this branch other are taken from master.

Please reject github pull request. I have done track ticket #4100
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 »

I think about sorting ini files.

two phases of sorting:
1. sort by ID (ZNULL* first others by abc).
2. sort keys in same order as they described in header.

reason:
1. little improvement of readability
2. my tools for work with ini files does not support order. Adding new field convert patch to real mess.

I create patch with moving names to templates (ini files only) (#4106)
Ticket with removing default values is still waiting (#4100)

PS. Looks like ticket where per is author broken for me:
{9} Commits per author
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 »

How did pie files resolved for mods?
base + modpies or base + mp + modpies?
http://addons.wz2100.net/ developer
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: need help reading .ini file

Post by NoQ »

There's single physfs instance, which first gets populated from base, then, if we are playing skirmish or multiplayer, mp gets written over it. Whatever files are present after that are used.

There's nothing special about PIE files in this process.
crab_
Trained
Trained
Posts: 349
Joined: 29 Jul 2013, 18:09

Re: need help reading .ini file

Post by crab_ »

Hello.
What you think about idea: add 'description' field to each component in game?
This description can be shown in unit design screen :)
Warzone2100 Guide - http://betaguide.wz2100.net/
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 »

crab_ wrote:Hello.
What you think about idea: add 'description' field to each component in game?
This description can be shown in unit design screen :)
It is possible to make description based on component type.
http://addons.wz2100.net/ developer
Post Reply