need detailed civ4techinfos.xml explanation

primordial stew

Emperor
Joined
Sep 1, 2005
Messages
1,219
Location
a puddle
RFRE has 3 eras: chronicles, rise of rome, fall of rome

chronicles is used to setup basic constraints (ie who can build what via which techs are possible).

The gate into the Roman tech tree is "etruscan heritage". According to civinfos Rome starts with this tech. All others start with the gate (tech_pre275bc) into the "timer" tree. In some civIII mods this was the mechanism which provides a race for the player. The Romans had a building which had the "great library" attribute set (owner gets any tech know by >= 2 other civs), so as the AI researched, the Romans would stay up to date due to this sharing.

In civIII there was max and min research times.. which is an open for civIV, but never mind that now. It will be impossible for the AI to build, possibly just through having a massive beaker cost if no better way can be found.

So for a timeline it needs 2 main paths. 1 is the "timer", and the other is the player (RFRE is purely Rome's perspective). The timer is 100% linear, no options at all. Rome's is largely linear, but there are some options available. It seems like all that should be necessary is to OrPreReqs the previous tech, but I'm not getting anything close to this in the game....

eg1)
tech_praetor AND requires tech_civil_engineering and tech_etruscan_heritage. But in the pedia, is comes up with only tech_etrucsan_heritage!

Code:
<OrPreReqs/>
<AndPreReqs>
<PrereqTech>TECH_CIVIL_ENGINEERING</PrereqTech>
<PrereqTech>TECH_ETRUSCAN_HERITAGE</PrereqTech>
</AndPreReqs>

eg2)
For tech_civil_engineering it's OR tech_etrucsan_heritage, but in the pedia it has tech_pre275bc!!!!

I have no idea how it is determining the relationships between the technologies. Note that if tech_pre275bc is put as the last tech in the civ4techinfos.xml file, civIV crashes. Very strange...

The dependencies are all just wrong.. any ideas what is wrong? All the techs show up, and happy/mad/unhealthy/etc.. types show up correctly, it's only the dependencies that are completely wrong. I've no idea why :mad:
 
What you have posted looks correct. You will probably need to post the whole file.

FYI: You may want to consider a cannotResearch block in CvGameInterface.py that doesn't let a particular tech be researched until after a specific in game date.
 
curtadams said:
A single OR always works for me. Are you sure you're changing the right file? (as in, not in the wrong directory)

Yeah, I always check the path in the vim title bar before editing, not making that mistake again! I can add/delete a tech, and it shows up/goes away.

I'm guessing the syntax is somehow corrupt, but there aren't any XML errors popups.
 
Kael said:
What you have posted looks correct. You will probably need to post the whole file.

FYI: You may want to consider a cannotResearch block in CvGameInterface.py that doesn't let a particular tech be researched until after a specific in game date.

Ughhh.. too many dependencies for a single file post! Merge this over TAM 1.95 (1.96 should work too) and rename the mod to "RFRE_TAM1.951".
http://forums.civfanatics.com/uploads/61935/RFRE_XML.zip
http://forums.civfanatics.com/uploads/61935/TAM_Mediterranean_Normal_v1.95.zip

I chopped out xml\text to cut the size down by 50%. It should start wo/ xml errors and give the choice of carthage or rome. Also note that Rome should start with etruscan_heritage (according to the civilopedia), but they don't. It must be researched.. I'm guessing this is related to the general disarray in my tech tree :/


Do you have any other recommendations on what is a good method to implement the sort of tech tree RFRE needs? In civIII there were max/min research time settings. For RFRE Pink used 25/12. Beaker costs were continually tweaked throughout the mod to be 50% or more so that the treasury didn't grow too much.

The AI track is used to obsolete Roman city improvements, and to enable/disable units/buildings for the AI. I suppose if there is some function which enables a tech (for all civs in RFRE's case) this may be the method which replaces the "great library" function available in civIII ;)


In other news..
I use the windowsXP "search" utility. This certainly isn't as good as ggrep, but it works just fine for the xml files. For python ones OTOH, it can't find anything in them. It can find the files just fine, just not any text in them at all?!? Windows just seems wholly inadequate as a mod developement environment..
 
I re-started from the TAM techinfos file. It took all night to re-do most of this, but it is mostly done, and it actually works now :D :D :D

I've no idea what was wrong with the original file that made civIV behave the way it did... I copied and pasted, so the original must have been corrupt (but not visibly, or XML popups) and then the problem was replicated. Some sort of tab issue??

Rome still doesn't start with estuscan_heritage, and carthage doesn't start with pre275bc. So apparently that problem isn't related to this one.
 
Just wondering primordial stew, why don't you, instead of rebuilding the tech tree exactly as it was, eliminate the timers tech tree? Wouldn't it be easier to simply put a line code that says at a given date, say 175AD, this building becomes buildable for the AI, this becomes obsolete for Rome, this unit becomes buildable for the AI and so on. It would eliminate the need for the other civs to do research I believe. But then again, if it is easier your way, do it. I don't know anything about .xml files and coding and I don't know how much you did so far so your the best judge. It's just that since this is civ 4 and almost all is modeable, doing a complete overhaul would be better than trying to recreate RFRE civ 4 style and than doing changes. Just my 2 cents.
 
It was a problem with everything, not just the timers.

Have you tried the "American Revolution" mod in vanilla civIV? There is no research, and it feels very odd.

I don't know what the best approach is, but based on my current understanding (most of the xml, none of the python) this is a workable way, so long as tech sharing, and min/max research duration can be solved.

Though I haven't tried it yet, I think there is a research multiplier by tech age. The AI will be in era_chronicles. In era_chronicles beakers will be multiplied by .000000000001, and civIV should round up, so the AI will produce 1 beaker/turn. The techinfos timer entries will be generated by a perl script which reads the gamespeedinfo file. That is far faster than cut/paste/modify.


For sure there will be some events in python. Obviously all of the revolts, but also bigH. A few random turns after the 2nd punic war begins, bigH will spawn near the Alps. Hasbrudal will be buildable by Carthage like any other hero unit.
 
Sweet!
Well good luck coding all of this. I'll be following your progress.
 
Back
Top Bottom