Best way to craft a dummy technology

LeeS

Imperator
Joined
Jul 23, 2013
Messages
7,241
Location
Illinois, USA
Would like some advice on best method to structure a 'dummy' technology so that is won't urp up the tech display. If it still will show in the civilopedia that is not so much of an issue, I just want to avoid ugly in the tech-tree pop-up.

I intend via lua to give the dummy tech when the player enters an era, so I might end with one dummy tech for each era. And I intend to use the tech to unlock a building (later perhaps a series of buildings) that will only be buildable within a certain era or certain specific couple of eras. Later the building will be replaced using the ReplacementBuildingClass column in buildings when a later-era dummy tech is given.

So I am thinking I will end with a specific dummy tech for:
Classical Era
Medieval Era
Renaissance Era
Industrial Era
Modern Era
Postmodern Era

There are other issues related to the use of ReplacementBuildingClass and having 'stringed' trees-of-replacement, but I am pretty confident I can solve those with lua and the PlayerCanConstruct hook.

Just not sure how other people have gone about creating dummy techs so they don't make crap in the tech tree.
 
Just not sure how other people have gone about creating dummy techs so they don't make crap in the tech tree.

I experimented with making a dummy tech for my Makai mod, for a decision which allowed them to build a new improvement. For that, I just hid it below the tech window (GridY 12) and set <Disable> to be true. So far, it's at least done its job and hasn't caused any issues, although I haven't finished playtesting. (The current version of the mod I have posted hasn't been updated with this code.)
 
Same as Bouncymischa : I use <Disable>, if needed the disabled tech can be used as prereq for another tech.
In one of my mod the disabled tech is granted when a certain condition is met and this opens the way to the researchable tech.
All my disabled techs are set in the futur era and in the far right of the tech tree, but you can put it in any era you wish, you will just have a red, unresearchable tech in your tech tree.
 
I can live with it being ugly in the far right in the future era. I just want to avoid ugly and confusing in the 'normal' area of the tech tree. Thanks. I'll start experimenting around with it a little later today. May be back with more questions (advice seeking) if I encounter eeew...ick !

Or if I make some newby mistake and cannot figure it out. :)
 
I must not be doing something right. This:
Code:
<GameData>
	<Technologies>
		<Row>
			<Type>TECH_ERA_CLASSICAL</Type>
			<!--	<Cost>-1</Cost>	-->
			<Description>TXT_KEY_TECH_ERA_CLASSICAL_TITLE</Description>
			<Era>ERA_FUTURE</Era>
			<GridX>17</GridX>
			<GridY>12</GridY>
			<!--	<PortraitIndex>10</PortraitIndex>
			<IconAtlas>TECH_ATLAS_2</IconAtlas>	-->
			<Disable>true</Disable>
		</Row>
	</Technologies>
	<Language_en_US>
		<Row Tag="TXT_KEY_TECH_ERA_CLASSICAL_TITLE">
			<Text>Classical Era</Text>
		</Row>
	</Language_en_US>
</GameData>
Results in this:
Spoiler Tech Tree Hash :

Spoiler IGE display :

I've played around with different set-ups of the <GridX> and <GridY>, different settings of <Cost>, both -1 and 'real' values (and as shown tried commenting it out), and also tried both specifying and not specifying <PortraitIndex> and <IconAtlas>. Nothing so far has changed the effect on the tech tree UI.
 
That's so weird! I suspect defining it as ERA_FUTURE but not having a suitably far X value can cause problems, but in your example it should work fine?

This is what I used for my dummy tech:

Code:
<GameData>
	<Technologies>
		<Row>
			<Type>TECH_MAKAI_TECH_I</Type>
			<Cost>13500</Cost>
			<Description>TXT_KEY_TECH_MAKAI_TECH_I_TITLE</Description>
			<Civilopedia>TXT_KEY_TECH_MAKAI_TECH_I_DESC</Civilopedia>
			<Help>TXT_KEY_TECH_MAKAI_TECH_I_HELP</Help>
			<Era>ERA_CLASSICAL</Era>
			<GridX>4</GridX>
			<GridY>12</GridY>
			<Quote>TXT_KEY_TECH_MAKAI_TECH_I_QUOTE</Quote>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>TH_MAKAI_CIV_COLOR_ATLAS</IconAtlas>
			<Disable>true</Disable>
		</Row>
	</Technologies>
</GameData>

Not sure if you want to try those values and see if it works?
 
If you set a tech in another Era than it's GridX value you will get a broken tech tree.

If you want to hide the disabled tech try to put it bellow the screen with the GridY value.
 
It was the lack of a <Help> column.
On DarkScythe's advice I had altered the tech name so there was no possibility of a problem with the UI having a code 'string-matching' problem. That however did not change anything.

This causes the trouble:
Spoiler :
Code:
<GameData>
	<Technologies>
		<Row>
			<Type>TECH_ASUDFGWEITUNG</Type>
			<Cost>13500</Cost>
			<Description>TXT_KEY_TECH_ASUDFGWEITUNG_TITLE</Description>
			<Era>ERA_CLASSICAL</Era>
			<GridX>4</GridX>
			<GridY>12</GridY>
			<PortraitIndex>10</PortraitIndex>
			<IconAtlas>TECH_ATLAS_2</IconAtlas>
			<Disable>true</Disable>
			<Civilopedia>TXT_KEY_TECH_ASUDFGWEITUNG_DESC</Civilopedia>
			[COLOR="Red"]<!--	<Help>TXT_KEY_TECH_ASUDFGWEITUNG_HELP</Help>	-->[/COLOR]
			<Quote>TXT_KEY_TECH_ASUDFGWEITUNG_QUOTE</Quote>
		</Row>
	</Technologies>
	<Language_en_US>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_TITLE">
			<Text>Classical Era Dummy</Text>
		</Row>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_DESC">
			<Text>This tech has no function other than to act as an unlocker for other items to be made available in the classical era</Text>
		</Row>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_HELP">
			<Text>This tech is merely an unlocker for certain other game effects and does not have any other direct effect</Text>
		</Row>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_QUOTE">
			<Text>Oh perhaps someday I will have a working dummy tech</Text>
		</Row>
	</Language_en_US>
</GameData>
Wheras this works just fine:
Spoiler :
Code:
<GameData>
	<Technologies>
		<Row>
			<Type>TECH_ASUDFGWEITUNG</Type>
			<Cost>13500</Cost>
			<Description>TXT_KEY_TECH_ASUDFGWEITUNG_TITLE</Description>
			<Era>ERA_CLASSICAL</Era>
			<GridX>4</GridX>
			<GridY>12</GridY>
			<PortraitIndex>10</PortraitIndex>
			<IconAtlas>TECH_ATLAS_2</IconAtlas>
			<Disable>true</Disable>
			<Civilopedia>TXT_KEY_TECH_ASUDFGWEITUNG_DESC</Civilopedia>
			<Help>TXT_KEY_TECH_ASUDFGWEITUNG_HELP</Help>
			<Quote>TXT_KEY_TECH_ASUDFGWEITUNG_QUOTE</Quote>
		</Row>
	</Technologies>
	<Language_en_US>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_TITLE">
			<Text>Classical Era Dummy</Text>
		</Row>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_DESC">
			<Text>This tech has no function other than to act as an unlocker for other items to be made available in the classical era</Text>
		</Row>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_HELP">
			<Text>This tech is merely an unlocker for certain other game effects and does not have any other direct effect</Text>
		</Row>
		<Row Tag="TXT_KEY_TECH_ASUDFGWEITUNG_QUOTE">
			<Text>Oh perhaps someday I will have a working dummy tech</Text>
		</Row>
	</Language_en_US>
</GameData>
Commenting out (and therefore omitting) the <Civilopedia> column resulted in no bad effect. As soon as I commented out the <Help> column to determine the actual minimum requirements for a tech, the UI went crazy again.
 
If you set it as an ancient tech with the X grid reference as -1, it does the trick and doesn't show up on the tech tree. I'm fairly sure you can do the same with a y grid reference as -1 as well, which could suit your other era dummy techs. If not, I think you could set two techs as prerequisites for whatever unit/building/wonder you need it for, so you could have the dummy tech in the ancient era as x=-1 and have the second prerequisite as a tech in that era.
 
Back
Top Bottom