how more techs in ancient era?

Armarius

Chieftain
Joined
Oct 2, 2010
Messages
16
hi

i make a new tech tree for my mod and i have a problem with the era limit on techs.

i let the 1st row (0) of the ancient era clear (where is the legend) and set the first techs in the second row (row 1). then in the row #3. all these techs are marked up with <Era>ERA_ANCIENT</Era> and shown right.

but then i set my next tech:

Code:
<Technologies>
		<Row>
			<Type>TECH_FR_POLYTHEISM</Type>
			<Cost>35</Cost>
			<Description>TXT_KEY_TECH_FR_POLYTHEISM_TITLE</Description>
			<Civilopedia>TXT_KEY_TECH_FR_POLYTHEISM_DESC</Civilopedia>
			<Help>TXT_KEY_TECH_FR_POLYTHEISM_HELP</Help>
			[COLOR="SeaGreen"]<Era>ERA_ANCIENT</Era>[/COLOR]
			<Trade>true</Trade>
			<GoodyTech>true</GoodyTech>
			[COLOR="Red"]<GridX>3</GridX>[/COLOR]
			[COLOR="Red"]<GridY>0</GridY>[/COLOR]
			<Quote>TXT_KEY_TECH_FR_POLYTHEISM_QUOTE</Quote>
			<PortraitIndex>0</PortraitIndex>
			<IconAtlas>TECH_ATLAS_1</IconAtlas>
			<AudioIntro>AS2D_TECH_POLYTHEISM</AudioIntro>
			<AudioIntroHeader>AS2D_HEADING_TECH_POLYTHEISM</AudioIntroHeader>
		</Row>
	</Technologies>

and i see this tech in the Classic era?

where i can change the number of rows per era? its possible? someone can help?
 
The era boundaries are drawn by TechTree.lua. It'll adjust to the changes you make without any problems, except for one rule:

You CANNOT have any column (GridX values) that mixes techs from one era with techs from another era.

Other than that, it'll adjust itself automatically. There's no explicit setting of the number of columns in the various eras. If you're adding an entirely new era, say, a futuristic mod that adds new techs beyond the existing modern era, then there's one small edit you have to make to that Lua file, but if you're just shifting around the techs then it shouldn't cause a problem.
 
ok, thank you Spatzimaus

i took a look in the lua and i found my problem in this stupid lua-routine:

Code:
-- find the range of columns that each era takes
	for tech in GameInfo.Technologies() do
		local eraID = GameInfo.Eras[tech.Era].ID;
		if not eraColumns[eraID] then
			eraColumns[eraID] = { minGridX = tech.GridX; maxGridX = tech.GridX; researched = false; };
		else
			if tech.GridX < eraColumns[eraID].minGridX then
				eraColumns[eraID].minGridX = tech.GridX;
			end
			if tech.GridX > eraColumns[eraID].maxGridX then
				eraColumns[eraID].maxGridX = tech.GridX;
			end
		end
	end

the first column must have a tech. and each era panel dont start with a new index.
when is set the last techs of the ancient era at <GridX>3</GridX>, then start at <GridX>4</GridX> the classical era.
when i have finsh my techtree and i want add a new tech in ancient era at <GridX>4</GridX>, then i have edit all the follow techs. thats stupid i think.
 
Back
Top Bottom