need help reading .ini file

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

Re: need help reading .ini file

Post by Per » 26 Oct 2013, 20:04

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 » 27 Oct 2013, 01:58

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: 1693
Joined: 01 Sep 2006, 19:17

Re: need help reading .ini file

Post by cybersphinx » 27 Oct 2013, 02:22

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 » 29 Oct 2013, 22:32

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: 3777
Joined: 03 Aug 2006, 19:39

Re: need help reading .ini file

Post by Per » 29 Oct 2013, 23:38

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 » 30 Oct 2013, 09:00

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 » 11 Nov 2013, 01:46

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 » 13 Nov 2013, 00:51

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 » 13 Nov 2013, 19:26

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_ » 21 Nov 2013, 14:53

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 » 27 Nov 2013, 11:43

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