[SDK MODCOMP] Unit Obsolete Tech

Dom Pedro II

Modder For Life
Joined
Apr 3, 2002
Messages
6,811
Location
Exit 16, New Jersey
File (1.46 MB)

Somebody may have done this already, but this basically just adds an obsolete tech option for units... it was needed by GeneralMatt, and thus the Dom provides.

Keep in mind that all units must have this tag in their entries or else you get an ugly and rather cryptic error message (left me scratching my head for a few minutes).
 
File (1.46 MB)

Somebody may have done this already, but this basically just adds an obsolete tech option for units... it was needed by GeneralMatt, and thus the Dom provides.

Keep in mind that all units must have this tag in their entries or else you get an ugly and rather cryptic error message (left me scratching my head for a few minutes).

and what about this:
change
pXML->GetChildXmlValByName(szTextVal, "ObsoleteTech");
to
pXML->GetChildXmlValByName(szTextVal, "ObsoleteTech", "NONE");

in this case, if tag is not exist, default value ("NONE") is used
i am already use this for all my new tags, so i don't need to update very unit/building etc..
or you can check return value for GetChildXmlValByName, when it is false, tag was not found, so you can set this manually
 
You lost me there Mexico, hope that wasn't something I was supposed to catch.:crazyeye:

Anyways, works great Dom! Albeit I have to add the tag to all the new units, but it doesn't actually crash the game if you do not have them (Which is nice).
So now Triremes go obsolete with Engineering!

Thanks again, (and a lot!)
 
You guys just keep turning out SDK and Python modcomps like there's no tomorrow! I only hope this doesn't go obsolete with the Discovery of BtS. ;)
 
Trust me Gaius, as soon as BtS comes out, I am going to be busier than ever incorporating existing SDK changes as well as creating a few more of my own. My Ideology Mod was put on hold, but will soon be making a reappearance.

Aussie_Lurker.
 
I have updated the 5 SDK files modded by Dom Pedro II to BtS 3.19 (enclosed). All changes are marked with DPII (Dom Pedro II).

A bit of warning: I don't know C++! But I wanted it, so since the old files were not compatible, I had the idea to compare the code with the one for the buildings that can be obsoleted by Techs in Vanilla. Copied/pasted, replaced Building by Unit and it works fine! :crazyeye:

Note: I'm unsure about the first change in CvInfos.h but it works as such with the old code so...

Still you will have to download Dom Pedro II's files (especially the CIV4UnitSchema.xml and CIV4GameText_Unit_Obsolete_Tech.xml), follow his instructions, AND COMPILE YOUR OWN DLL! This is for amateur modders like me who want to incorporate this modcomp into their own.

I hope that at least one person will find this useful!

Thank You Dom Pedro II :king:
 

Attachments

Good - I can't live without it anymore! (It's been awhile since I did this in my mod but your question in the main forum made me update/clean these files so that they are ready for easy reference).
 
Back
Top Bottom