FOv4 Loader Techtree Issue

I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
posted on April 20th, 2016, 8:22 pm
I was working with XML techtrees in v4 and found a problem. My techfile0 in techlvl.odf is now standard.xml instead of tech1.tt, but the game continues to load the TT file when starting a match instead of the XML unless I go into the advanced settings and pick it from the list. I assumed that one of the H files was specifying tech1.tt as the default techtree, but I can't find any references to it outside of techlvl.odf, and that no longer references any TT format file. I have techlvl.odf placed in /odf/system, like FO has it. Does anyone have any ideas about what's causing this or how to fix it?

EDIT: Found this line in the Guide. Unfortunately, while it seems to be in effect, I can't overwrite it properly in RTS_CFG.h after appending
Code: Select all
#define TECHTREE_DEFAULT_FILE "standard.xml";

to the end of the file.

EDIT2: Some more experimenting has shown that FO4's techlvl.odf is superseding the mod's techlvl.odf and FO4's techtrees are superseding the mod's techtrees. For instance, FO4's techlvl.odf is currently set as:
Code: Select all
techfile0 = "tech1.xml"
techfile1 = "freetech.xml"

while the mod's techlvl.odf is:
Code: Select all
techfile0 = "standard.xml"
techfile1 = "standard-half.xml"
techfile2 = "standard-double.xml"
techfile3 = "preup.xml"
techfile4 = "preup-half.xml"
techfile5 = "preup-double.xml"

As such, tech1.xml and freetech.xml are being loaded instead of standard.xml and standard-half.xml, however, the later lines are loaded properly. Additionally, even when naming the mod's techtree files tech1.xml and freetech.xml, they are not overwriting FO4's techtree files. Deleting FO4's customized techlvl.odf does not fix the problem, but simply has the one from the FPQ archive be what overwrites the mod's techlvl.odf. Deleting FO4's customized techlvl.odf and creating a new ODF.fpq in the mod's folder with the proper techlvl.odf does not fix the problem, either. Moving the ODF out of the ODF folder and into the Addon folder also does not cause an override.

In short, any techfileX lines defined by FO4 are overriding the mod's techfileX lines and FO4 techtree files (both tt and xml) are overriding mod techtree files of the same name. Can anyone think of a way to fix this short of dumping enough files over to make the mod work with Standalone=1? Has anyone ever had this problem before?
posted on April 22nd, 2016, 2:47 pm
I think you may be the first person (or at least one of a very small number) to attempt any modding on the V4 engine :P
posted on April 22nd, 2016, 6:09 pm
A few people did some work ahead of me, like TUN. Mostly, I'm perplexed that the override is working in the wrong direction, but only for files related to the techtree.

EDIT: Nevermind. It turns out that there's a typo somewhere in my shiny new XML techtree. Now I have to sift through 599 lines of code to find it. :crybaby:
posted on April 23rd, 2016, 9:37 pm
599 lines of code to find it

Have a fun day :D Hope you find it after looking at 599
posted on April 23rd, 2016, 11:58 pm
I did find it, actually! Two typos and one entry that I forgot to add, bringing it up to 631 lines. Well, technically that one entry was four entries, but they were all for the same thing, more or less.

So that people know for the future, I highly recommend structuring your XML techtrees like so:
Code: Select all
<techtree>
<include file="federation.xml"/>
<include file="romulan.xml"/>
<include file="klingon.xml"/>
<include file="borg.xml"/>
<include file="dominion.xml"/>
</techtree>


Then the faction techtree files also begin and end with the techtree tag, just like the main file. This modular layout is partially so that it's organized and easier to find things, but also so that you can create new techtrees fast. For instance, the project I'm working on has faction modules, but also modules for unit caps so that you can easily pick double caps, half caps, etc. in the game setup. It also means that I can edit one faction module and the changes will migrate to all techtrees that reference it, rather than having to make the same changes to half a dozen files like with the old TT format.
Reply

Who is online

Users browsing this forum: No registered users and 1 guest