Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » All about modding JA2 » Faction Quotes (Adding civilian faction quotes)
Faction Quotes[message #344991] Mon, 11 April 2016 04:01 Go to next message
edmortimer

 
Messages:859
Registered:January 2015
Location: Home Free
How does one go about adding quotes for civilian factions, both new and existing factions. I'm talking about the nameless civilians wandering about Arulco without a profile ID, not the named civilian characters who are in MercProfiles.xml and have a profile ID with corresponding voice files & etc..




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Faction Quotes[message #344993 is a reply to message #344991] Mon, 11 April 2016 08:56 Go to previous messageGo to next message
CVB

 
Messages:136
Registered:September 2014
Location: Berlin
You need an .EDT Editor to modify \Data-AV\Npcdata\CivXX.edt. Blank files for new civgroups can be copied from Data-1.13\Npcdata.
There are two files for each civgroup, one for normal dialogue and one used once the civgroup turns hostile.

XX maps to your civgroups per the following document:
https://ja2svn.mooo.com/source/ja2/trunk/Documents/1.13%20Modding/How%20it%20works/CivGroupNames_ReadMe.txt


Edit: Should you consider to update AV to a current 1.13 release at some time, I would suggest to leave plenty of room in CivGroupNames.xml. Flugente has already added civgroups up to ID thirty-something, IIRC, and I think we can expect some more.
If you assign IDs in the upper ranges you don't have to reallocate every time a new group pops up.


[Updated on: Tue, 12 April 2016 01:08]




Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle
Re: Faction Quotes[message #345000 is a reply to message #344993] Mon, 11 April 2016 16:05 Go to previous messageGo to next message
edmortimer

 
Messages:859
Registered:January 2015
Location: Home Free
Thanks for the info.


As for updating, I'd love to -- but staying current means a lot of re-working and re-designing. When features are added without playtesting or balance testing, it can ruin a modder's creative spirit as well as their mod. Since I've started features have been added that entirely change the playing field in Arulco, necessitating much testing, re-design, re-balancing, and re-working, as well as throwing out a lot of stuff I've done and re-doing it another way.




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Faction Quotes[message #345001 is a reply to message #344993] Mon, 11 April 2016 16:11 Go to previous messageGo to next message
edmortimer

 
Messages:859
Registered:January 2015
Location: Home Free
Quote:

XX maps to your civgroups per the following document:
https://ja2svn.mooo.com/source/ja2/trunk/Documents/1.13 Modding/How it works/CivGroupNames_ReadMe.txt


I get a file not found error trying to get to that link.

EDIT: Never mind -- got there by dissecting the URL.

[Updated on: Mon, 11 April 2016 16:59]





Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Faction Quotes[message #345021 is a reply to message #344993] Tue, 12 April 2016 07:52 Go to previous messageGo to next message
edmortimer

 
Messages:859
Registered:January 2015
Location: Home Free
Quote:
Edit: Should you consider to update AV to a current 1.13 release at some time, I would suggest to leave plenty of room in CivGroupNames.xml. Flugente has already added civgroups up to ID thirty-something, IIRC, and I think we can expect some more.
If you assign IDs in the upper ranges you don't have to reallocate every time a new group pops up.


Well, actually . . . I had already allocated civ groups to 26 . . . been that way for a while . . . just another example of having to rework what's already been done.




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Faction Quotes[message #345025 is a reply to message #345021] Tue, 12 April 2016 12:55 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
That's the cost of 'progress'. Either we hardcode data, resulting in no compatibility problems but also no way for the modder to alter data, or we externalise it, allowing a modder to alter data while being prone to interface (xml, ...) changes. I don't see a third alternative.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Faction Quotes[message #345027 is a reply to message #345025] Tue, 12 April 2016 17:08 Go to previous messageGo to next message
edmortimer

 
Messages:859
Registered:January 2015
Location: Home Free
Quote:
I don't see a third alternative.


Don't get me wrong -- I'm glad things have been externalized, and I encourage you to keep adding features . . . however, a modder 'keeping current' is a frustrating and time-wasting endeavour, especially when the community doesn't playtest new features. A better way of working within the XML files is a third alternative -- meaning having a modder's section within a specific file clearly noted that won't be overwritten by you or other coders as you add new features. Having XML files clearly described in the comments would also be helpful, as well as dead wood being removed from xml files.

The playtesting issue is one big reason I don't 'get current'. If I encounter a bug I'll have to try to replicate it all over again in stock 1.13 in order to get any attention brought to it. There doesn't seem to be anyone playtesting these features -- as you've noted more than once after encountering problems in a feature months after introduction. It's really frustrating when a bug is automatically blamed on the mod and modder simply because nobody has ever tested a feature until the modder came around and tried to use it (like the so-called 'invisible armies' bug -- which the 'fix' (brought to a TEST beta 7609 by Sevenfm) for hasn't been tested yet either, as I've noted some crashing problems with the fix if certain parameters are used in the XML files).




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Faction Quotes[message #345028 is a reply to message #345027] Tue, 12 April 2016 17:46 Go to previous messageGo to next message
silversurfer

 
Messages:2208
Registered:May 2009
edmortimer wrote on Tue, 12 April 2016 16:08

Don't get me wrong -- I'm glad things have been externalized, and I encourage you to keep adding features . . . however, a modder 'keeping current' is a frustrating and time-wasting endeavour, especially when the community doesn't playtest new features. A better way of working within the XML files is a third alternative -- meaning having a modder's section within a specific file clearly noted that won't be overwritten by you or other coders as you add new features. Having XML files clearly described in the comments would also be helpful, as well as dead wood being removed from xml files.

Having a "modders section" inside the files won't work. How big should it be? Modder A says 50 entries and after a while modder B comes and complains because he needs 100 entries. So we reserve 1000 entries per default and hope that it will be enough forever? We'd get bloated files with nothing but dummy entries that would annoy all players trying to find the "real" data. No thanks.

Every modder has to decide for himself if he wants to use a feature or not. If you don't have the time to implement it - just don't do it. Nobody forces you to use new features.

Playtesting has always been an issue. The players usually take the product and play it. If it works, fine - usually no feedback. If it doesn't work they will tell but usually this feedback doesn't help much because it's simply "It doesn't work". No version infos. No savegame. No settings. No description how to reproduce. Nothing.
Those few that code new or modified stuff can't fully test it on their own. The good thing is if they support their modifications afterwards and fix bugs like Flugente does.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Faction Quotes[message #345031 is a reply to message #345028] Tue, 12 April 2016 18:12 Go to previous messageGo to next message
edmortimer

 
Messages:859
Registered:January 2015
Location: Home Free
Quote:
Having a "modders section" inside the files won't work. How big should it be? Modder A says 50 entries and after a while modder B comes and complains because he needs 100 entries. So we reserve 1000 entries per default and hope that it will be enough forever? We'd get bloated files with nothing but dummy entries that would annoy all players trying to find the "real" data. No thanks.


That's not a valid argument against having a modder's section. For example, in the CivGroupNames.xml (which started this thread) there are 254 entries already in the file, nearly 90% not used. There are many files like this. If the last third of the blank entries of each xml were set aside that would be enough for most purposes. For xml files like Items.xml if a notation were included that indicated the range of unused entries that wouldn't be overwritten then there would be no bloat in the stock files.

Quote:
Every modder has to decide for himself if he wants to use a feature or not. If you don't have the time to implement it - just don't do it. Nobody forces you to use new features.


Duh. Nobody says anyone is being forced.




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Faction Quotes[message #345034 is a reply to message #345031] Tue, 12 April 2016 18:31 Go to previous messageGo to next message
silversurfer

 
Messages:2208
Registered:May 2009
edmortimer wrote on Tue, 12 April 2016 17:12
Quote:
Having a "modders section" inside the files won't work. How big should it be? Modder A says 50 entries and after a while modder B comes and complains because he needs 100 entries. So we reserve 1000 entries per default and hope that it will be enough forever? We'd get bloated files with nothing but dummy entries that would annoy all players trying to find the "real" data. No thanks.


That's not a valid argument against having a modder's section. For example, in the CivGroupNames.xml (which started this thread) there are 254 entries already in the file, nearly 90% not used. There are many files like this. If the last third of the blank entries of each xml were set aside that would be enough for most purposes. For xml files like Items.xml if a notation were included that indicated the range of unused entries that wouldn't be overwritten then there would be no bloat in the stock files.

It is a valid argument and there is no reason to dismiss it as invalid. Blocking large chunks of data for "maybe some modder will use that in the future" will only cause unnecessary restrictions. The CivGroupNames.xml is just one file of quite a lot and it has 254 entries because that is the maximum possible for this file. Other files are different in structure and have a different amount of entries used. I certainly won't sit down to modify all of them just so you get your "modders section" that will probably not be used in 90% of the cases.




Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Faction Quotes[message #345036 is a reply to message #345034] Tue, 12 April 2016 18:54 Go to previous messageGo to next message
edmortimer

 
Messages:859
Registered:January 2015
Location: Home Free
Quote:
It is a valid argument and there is no reason to dismiss it as invalid. Blocking large chunks of data for "maybe some modder will use that in the future" will only cause unnecessary restrictions.


Nothing is ever set in stone, or haven't you noticed? I also didn't ask for "blocking large chunks of data".


Quote:
I certainly won't sit down to modify all of them just so you get your "modders section" that will probably not be used in 90% of the cases.


Don't worry. I'm not asking you to. I'm finished. You can rant if you like.




Arulco Vacations Blog

Arulco Vacations Bears Pit Forum


Re: Faction Quotes[message #345038 is a reply to message #345036] Tue, 12 April 2016 19:20 Go to previous messageGo to next message
CVB

 
Messages:136
Registered:September 2014
Location: Berlin
Gentlemen, you can't fight in here! This is the War Room!

Well, basically there are two types of xml files:

Type 1 has a maximum limit of entries, and those files are normally pre-filled with placeholders.
My approach here is to add mod-specific elements from the end on down. E.g. for CivGroupNames.xml, I have moved the one currently existing AR-specific civgroup to Id 254, and the next groups I'm going to add will get 253, 252 etc. Makes it quite easy to merge with the basic 1.13 file whenever that one changes, and I don't have to reassign people, speech and ownership time and again. The only problem with this approach occurs when the file starts to fill up or has gaps all over the place to begin with(like MercProfiles.xml does on both accounts)

Type 2 doesn't have an upper limit (Example: FacilityTypes.xml). Here I add a generous amount of placeholders myself and only then start to add my own entries. Effect as above.

[Updated on: Tue, 12 April 2016 19:23]




Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle
Re: Faction Quotes[message #345039 is a reply to message #345038] Tue, 12 April 2016 19:29 Go to previous messageGo to next message
silversurfer

 
Messages:2208
Registered:May 2009
CVB wrote on Tue, 12 April 2016 18:20

Well, basically there are two types of xml files:

Type 1 has a maximum limit of entries, and those files are normally pre-filled with placeholders.
My approach here is to add mod-specific elements from the end on down. E.g. for CivGroupNames.xml, I have moved the one currently existing AR-specific civgroup to Id 254, and the next groups I'm going to add will get 253, 252 etc. Makes it quite easy to merge with the basic 1.13 file whenever that one changes, and I don't have to reassign people, speech and ownership time and again. The only problem with this approach occurs when the file starts to fill up or has gaps all over the place to begin with(like MercProfiles.xml does on both accounts)

Type 2 doesn't have an upper limit (Example: FacilityTypes.xml). Here I add a generous amount of placeholders myself and only then start to add my own entries. Effect as above.

That approach sounds much better to me.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Faction Quotes[message #345040 is a reply to message #345039] Tue, 12 April 2016 20:49 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
Hmm. Placeholders will only get you so far ('so' meaning 'not very'). A bigger problem are new properties that newer exes require from data. In case of entirely new files that's solved easily by VFS (or the game simply complaining about the missing stuff and refusing to start).

While we often try to make this transition as easy as possible (ideally, not having a new tag shouldn't alter existing game behaviour), this is not always possible. A very recent example are the damage modifiers in /Tabledata/Items/AmmoTypes.xml:
...
<dDamageModifierLife>1.0</dDamageModifierLife>
<dDamageModifierBreath>1.0</dDamageModifierBreath>
<dDamageModifierTank>0.0</dDamageModifierTank>
<dDamageModifierArmouredVehicle>0.0</dDamageModifierArmouredVehicle>
<dDamageModifierCivilianVehicle>1.0</dDamageModifierCivilianVehicle>
<dDamageModifierZombie>1.0</dDamageModifierZombie>
...

As the xml editor does not know them, it deletes them. Thus these values are initialized with 0, which causes guns to do no damage (apart from independent minimum damage). But what is the alternative? If we set some arbitrary default value, this is utterly confusing as well - if not setting a value at all causes the value to be internally set to 1.0f, I'd be slightly confused.
If we say '0 is the default value, whatever that is, the modifier is simply added on top', then this becomes a lot more confusing. Saying 'this tag modifies HP damage dealt' is easier to understand than 'the value of this tag plus hardcoded value modifies HP damage dealt'. Especially as these hardcoded values would have to be different for each tag (otherwise without these tags, a 9mm Ball MP could wreck a tank in one turn).
Another alternative would be to add these new tags, but to only use them if a corresponding ini option is set. With old data, that ini option does not exist, which would solve that problem... but then we'd end up with a lot of new ini options very fast, with each xml tag requiring a special option (or even ini combinations).

What we are severely lacking though, which I think everybody can agree, is that there isn't even a dedicated place where new changes can be announced. The only places where one can be sure to get all the changes are the exe and GameDir svn repositories (I'm not sure how extensively modders use these).

The GameDir Docs folder is hopelessly outdated (and a single file documenting incremental changes in xmls is useless if you don't know how the original xmls worked in the 1st place).

While most changes are announced on this website, this doesn't help you if, say, you're gone for a week and don't see the newest threads, and return once they are buried. The older website at least had that big front page, where you could announce stuff with a higher chance of people noticing it.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Faction Quotes[message #345044 is a reply to message #345040] Tue, 12 April 2016 23:57 Go to previous messageGo to next message
CVB

 
Messages:136
Registered:September 2014
Location: Berlin
True, but at least that approach saves me from reworking all my civgroups or facilities etc whenever "more of the same" elements are added.

With new properties, I think there are several possible problems.
First problem is players combining mismatched 1.13 base releases and older mods. Not much to do about that, except modders to clearly state (here in the forums, in readme files, on a title page in the mod, even in the file name of the download ("modX_for_JA2_113_Rel7609.7z")) the intended base release.

Second, even when a mod is still maintained, the maintainer may not be aware of xml changes made necessary by new features for the reasons you stated. A dedicated front page would surely help. Is the Modding Scene News forum still usable? Haven't seen any announcements there in over a year...
Still, as long as the mod is maintained, normally that situation should sort itself out rather quickly via questions and bug reports in the forum.

Third, and IMHO the biggest problem is the xml editor. A modder might accidentally damage his own mod, and any player trying a small change can and probably will do so as well. Since nobody seems to feel responsible for overall maintenance of that, I see basically two possibilities. Either whoever changes anything in the xml structure is honour-bound to update the editor accordingly, or it gets removed from the download package completely. As it is now, we get a software delivery with an attached self-destruct switch. The editor could still be made available, but as a separate download clearly labeled with the latest release it is compatible with.

And then there is the problem that many tags cannot be correctly interpreted easily without looking into the code or digging through forum threads. All too many xml files are only sparsely commented or not at all.



Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle
Re: Faction Quotes[message #345049 is a reply to message #345044] Wed, 13 April 2016 09:42 Go to previous messageGo to next message
silversurfer

 
Messages:2208
Registered:May 2009
CVB wrote on Tue, 12 April 2016 22:57

Second, even when a mod is still maintained, the maintainer may not be aware of xml changes made necessary by new features for the reasons you stated. A dedicated front page would surely help. Is the Modding Scene News forum still usable? Haven't seen any announcements there in over a year...
Still, as long as the mod is maintained, normally that situation should sort itself out rather quickly via questions and bug reports in the forum.

What helps me is to have a SVN copy of the GameDir on my PC. Whenever I sync that directory I check the change log and compare the files to my Debug GameDir that is still at the previous revision. With that method I see all the changes even if they are not documented in the change log. Then I update my Debug GameDir and decide if there any changes that require an update to the WF maps mod as well.


CVB wrote on Tue, 12 April 2016 22:57

Third, and IMHO the biggest problem is the xml editor. A modder might accidentally damage his own mod, and any player trying a small change can and probably will do so as well. Since nobody seems to feel responsible for overall maintenance of that, I see basically two possibilities. Either whoever changes anything in the xml structure is honour-bound to update the editor accordingly, or it gets removed from the download package completely. As it is now, we get a software delivery with an attached self-destruct switch. The editor could still be made available, but as a separate download clearly labeled with the latest release it is compatible with.

I guess the modders know about the problems with the XML editor. I'm more worried about the players that use it without knowing the problems.
Not every coder can update the XML editor because it is written in a different language (Visual Basic instead of C++).
We could also remove the option to save files and by that turn it into a pure "XML Viewer". This would at least solve the problem of players breaking their files.


CVB wrote on Tue, 12 April 2016 22:57

And then there is the problem that many tags cannot be correctly interpreted easily without looking into the code or digging through forum threads. All too many xml files are only sparsely commented or not at all.

Until recently there haven't been requests for more documentation inside the XML files as far as I remember. That may be because the modders either requested new tags themselves (and therefore know what they do) or they simply read the code. As long as there is no precise request for particular documentation I doubt that the current status will change because nobody will update all files to document all tags.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Faction Quotes[message #345051 is a reply to message #345049] Wed, 13 April 2016 12:57 Go to previous messageGo to next message
CVB

 
Messages:136
Registered:September 2014
Location: Berlin
silversurfer wrote on Wed, 13 April 2016 08:42

What helps me is to have a SVN copy of the GameDir on my PC. Whenever I sync that directory I check the change log and compare the files to my Debug GameDir that is still at the previous revision. With that method I see all the changes even if they are not documented in the change log. Then I update my Debug GameDir and decide if there any changes that require an update to the WF maps mod as well.


So do I since I switched from SCI to SVN updates. Downloading and checking the source directory as well also helps me to slowly understand what's where in the code...


Quote:

I guess the modders know about the problems with the XML editor. I'm more worried about the players that use it without knowing the problems.
Not every coder can update the XML editor because it is written in a different language (Visual Basic instead of C++).
We could also remove the option to save files and by that turn it into a pure "XML Viewer". This would at least solve the problem of players breaking their files.


Well, Flugente just related some adventures with the editor, so I guess it can happen to anybody. But yes, removing the save option would help..


Quote:
Until recently there haven't been requests for more documentation inside the XML files as far as I remember. That may be because the modders either requested new tags themselves (and therefore know what they do) or they simply read the code. As long as there is no precise request for particular documentation I doubt that the current status will change because nobody will update all files to document all tags.


When you start modding in earnest now, there is just so much information to digest at the same time. And when your last implementation experiences are about 15 years in the past (moved to project management since then), sifting through the code can be somewhat tedious.

But to put my money where my mouth is I will add any information I research into comment blocks. Any tips how I should get them committed?



Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle
Re: Faction Quotes[message #345052 is a reply to message #345051] Wed, 13 April 2016 13:14 Go to previous messageGo to next message
Flugente

 
Messages:3165
Registered:April 2009
Location: Germany
I guess the best place for comments on xmls is at the top of the xml itself. That would be in line with those xmls that already have comments in there. As for who will commit, any active coder should do - either send them a pm or up load your patch to a thread for any of them to upload.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Faction Quotes[message #345053 is a reply to message #345052] Wed, 13 April 2016 14:13 Go to previous messageGo to next message
CVB

 
Messages:136
Registered:September 2014
Location: Berlin
Flugente wrote on Wed, 13 April 2016 12:14
I guess the best place for comments on xmls is at the top of the xml itself. That would be in line with those xmls that already have comments in there. As for who will commit, any active coder should do - either send them a pm or up load your patch to a thread for any of them to upload.



Like that?
Toggle Spoiler



Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle
Re: Faction Quotes[message #345055 is a reply to message #345053] Wed, 13 April 2016 17:18 Go to previous messageGo to next message
silversurfer

 
Messages:2208
Registered:May 2009
CVB wrote on Wed, 13 April 2016 13:13

Like that?

Fantastic! Committed in GameDir 2314 along two other fixes to documentation.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Faction Quotes[message #345056 is a reply to message #345055] Wed, 13 April 2016 17:37 Go to previous messageGo to next message
CVB

 
Messages:136
Registered:September 2014
Location: Berlin
You're too fast for me! happy The comment block is still missing the prisonroom tags. Update to follow tonight.



Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle
Re: Faction Quotes[message #345057 is a reply to message #345056] Wed, 13 April 2016 17:54 Go to previous message
silversurfer

 
Messages:2208
Registered:May 2009
You can as well first collect a few changes and hand in the whole bunch later.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Previous Topic: Changing Voice File slots for Merchants
Next Topic: Old JA2 fan, which mods should I try first?
Goto Forum:
  


Current Time: Wed Dec 13 17:03:46 EET 2017

Total time taken to generate the page: 0.01218 seconds