How to make a unit upgrade to another yet never become obsolete?

euskingc

Chieftain
Joined
Oct 22, 2008
Messages
72
Can a unit be made to upgrade to another yet never become obsolete?
Can this be done via xml somehow that I'm not seeing?

If it isn't possible to do with XML but is via SDK, if someone in the know is willing to walk me through what changes to make and where, I am quite eager to attempt it.
 
A simple XML solution can be achieved based on two game facts
1) the unit will obsolete when all its upgrades have been researched.

2) a unit enabled by "Future Tech", the repeating tech at the end of the tech tree, will never be researched.​
Create a unit that is enabled at Future Tech and have the unit you don't want to obsolete upgrade to it.

I think this will still work if you make the unit Graphical Only which means that the unit wont appear in most places in the pedia.
 
Most interesting... this seems to work exactly the way I want it to... and I might add that your reasoning on the matter is to a degree of finesse and clarity that I doubt I would have figured it out on my own.

A very clever solution.

I had a tech called "never" laying around for other purposes that was disabled and that no one had anyways, so I just set a unit to have that as a prereq.

My only question remaining is this issue of Graphical Only. Where is the tag for this option?

And I express my gratitude also, by the way =)
 
My only question remaining is this issue of Graphical Only. Where is the tag for this option?

It does not come standard on the unit schema but iirc it can be added to the schema and is supported by the dll etc. Now I need to remember how it is done. Are you using the standard unit schema? If so I can update a copy of that and post it here.
 
I am... only issue is everytime I try to download something posted on the forums here it comes out as an attachment.php file that I have no idea what to do with.

If you give me the code itself can I just copy/paste it into the appropriate place in the schema?


This has me wondering, too... how many other xml functions are supported by the dll but are not standard. Do you know off-hand if someone has posted them all up somewhere?


Also for posterity, if anyone else ever comes across this thread with a similar issue, I'll note that if the unresearchable top-tier 'ghost' unit happens to be one you have a civilization excluded from being able to build in the civilizationinfos file, the civ will no longer consider that to be its top-tier unit, and the fix doesn't seem to work for them, but will for other civs that don't have that unit set as unbuildable. Observed this experimenting.
 
You are left clicking on the file name to start the download?

Turns out I uploaded the wrong file anyway. That is what happens when it is past my bed time, sorry about that.

Changes are to add the lines in bold.

Part 1.
Code:
	<ElementType name="bCtrlDownAlt" content="textOnly" dt:type="boolean"/>
	<ElementType name="iHotKeyPriorityAlt" content="textOnly" dt:type="int"/>
	<ElementType name="iOrderPriority" content="textOnly" dt:type="int"/>
[B]	<ElementType name="bGraphicalOnly" content="textOnly" dt:type="boolean"/>
[/B]	<ElementType name="BuildInfo" content="eltOnly">

Part 2.
Code:
		<element type="iLeaderExperience"/>
		<element type="iOrderPriority" minOccurs="0"/>
[B]		<element type="bGraphicalOnly" minOccurs="0"/>
[/B]	</ElementType>
	<ElementType name="UnitInfos" content="eltOnly">
		<element type="UnitInfo" maxOccurs="*"/>
	</ElementType>

I am 90% certain this works but it is a long time since I worked with an unmodded dll.

As far as I know this is the only supported XML element that does not appear in the schema files.
 
You are left clicking on the file name to start the download?

I am indeed...
I do seem to have some faint memory of that working on some machine I was using, somewhere sometime, but it doesn't seem to with this one now.

I am 90% certain this works but it is a long time since I worked with an unmodded dll.

You can now be 100% certain it works, it has removed all references to my top-tier unbuildable unit in the civilopedia except the "upgrades to:" section.
But that will do just fine =)

My thanks again!
 
Top Bottom