Orbis Mod Modmoder's Thread

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
Opera suggested there should be an Orbis Modders thread, so here it is.


I'm having a problem that seems really easy but I'm totally stumped. I don't know if my problem is Orbis related or not. In short, I can't seem to add a non-unique unit that is buildable by any civ. I can successfully add a new "unique unit". In fact, I can add my "unique" unit to every civ in CivilizationInfos.xml. This works, but then if I mouse-over the unit (in tech tree or pedia) I get a long list of "Unique unit for Bannor", "Unique unit for Balseraph", etc., which is un-elegant.

Here's an example of what I just tried. I copied entries for UNITcLASS_ADEPT (UnitclassInfos.xml) and UNIT_ADEPT (UnitInfos.xml) and pasted these at the end of their respective files. In UnitClassInfos, I changed exactly 2 things, type and Default unit. So here is the whole entree:

Code:
		<UnitClassInfo>
			<Type>UNITCLASS_TEST</Type>
			<Description>TXT_KEY_UNIT_ADEPT</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<iInstanceCostModifier>0</iInstanceCostModifier>
			<bUnique>1</bUnique>
			<DefaultUnit>UNIT_TEST</DefaultUnit>
		</UnitClassInfo>

Then I changed exactly 2 things in UnitInfos. I'm only showing the begining but this really is all that I changed:

Code:
        <UnitInfo>
            <Class>UNITCLASS_TEST</Class>
            <Type>UNIT_TEST</Type>

OK. Now when I start the game, I have 2 "adepts" in the civilopedia. This is expected because I did not change text fields. So, to the best of my understanding, these 2 units should be identical in every respect. They are idenical in every respect EXCEPT that one has the words "Cannot be built by any civilization" (just above the "build air node", "build body not", etc. text) and the other does not. Also, there is only one "adept" image in the tech tree at Arcane Knowledge. So why is my unit unbuildable (and the other buildable) when they should be identical?

OK. Now I go to CivilizationInfos.xml and add my unit to Bannor and Malakim, using this:
Code:
                <Unit>
                    <UnitClassType>UNITCLASS_TEST</UnitClassType>
                    <UnitType>UNIT_TEST</UnitType>
                </Unit>
Then I start a game as Bannor. Now I have two "adepts" that I can build with Arcane Knowledge. If I mouse over the second one, I see the text "Unique unit for Bannor" \newline "Unique unit for Malakim".

Same exact results with warrior.

What am I missing?
 
Oops! Never mind. It is the <bUnique>1</bUnique> tag. Either a gremlin put that in after I copied UnitClassInfo, or I'm loosing my mind...
 
Oops! Never mind. It is the <bUnique>1</bUnique> tag. Either a gremlin put that in after I copied UnitClassInfo, or I'm loosing my mind...

1 it is modder
2 thank you
3 you copied it from an adept which is not a unique unit
4 it is losing not loosing
 
civ_king,

1. Fixed
2. thank you
3. I think I copied something else that was unique (and only imagined it was an adept)
4. I'll let that one go
 
Opera suggested there should be an Orbis Modders thread, so here it is.
I have decided to start a new thread, as I need to have some space to list all the major code changes I have added to Orbis files, i.e. explaining new tags.
Also, I need to explain a few things and need the first post for that ;)
The list is only half done, but here is the thread. Ask all your modding questions there
 
I would like to take credit for motivating Ahwaric's new thread...

Can someone tell me how to edit the title of this thread (to indicate obsolete)?
 
Top Bottom