• Civilization 7 has been announced. For more info please check the forum here .

Alternative Timelines

No you don't, you want to have a blank tech and if a gameoption is ON the blank tech is replaced with the real tech.

Basically, yeah. You'd define a replacement tech for each of the ones you want to disable under a given game option that sets the definitions for those techs, under that option, to one that makes them pretty much identical to the one we use to cordon off promotions with. In the way you expressed it, that would probably work even better, making the tech actually active if the game option is ON.

It'd use the 'replacement' method AIAndy and I (I'll refer to myself in this rather loosely since my draft was pretty much entirely redesigned by the aforementioned better programmer) worked out and have applied to ls612's trait option and SGT Slick's Gamespeed option. The same mechanism may be utilized to generate a very effective alternative timelines gameoption by roping off the techs unless that option is on as explained in the last paragraph. Yeah, it'd take about 17+ new tech entries to do that but no biggy.
 
At the moment there are in Alt_Timelines - Atompunk, Biopunk, Clockpunk, Cyberpunk, Dieselpunk and Steampunk. In Custom_Religions there are Andean, Asatru, Bahai, Canaanism, Druid, Jainism, Mesopotamian, Mormon, Scientology, Shaman, Shinto, Sikh, Tengri, Voodoo and Yoruba). For a total of 22.
 
No you don't, you want to have a blank tech and if a gameoption is ON the blank tech is replaced with the real tech.

Thats one think i never had a grasp on, how to do blank/placeholder techs, i know FfH2 has a few of them.
 
Might as well throw in the wild animal domestications that never occured in real life either.
 
They all use techs which are not dead end. (reminder: We are just talking about not having the dead end tech appear if the optional mod has been turned off.:))

But we could also optionalize the buildings he's talking about on the same option - they wouldn't be by default turned off like those that rely on the techs we're turning off with the option but they could be turned off individually.
 
They can already can be - you just turn them off in MLF. Which is why I was asking if it was possible to call a python screen before the XML was loaded. If it is they we just have that Python turn on/off the various real modules. It would also mean we could do a much better game options screen and even allow full options when you "Play Now".
 
I don't think it would be possible... that loading sequence is part of the exe. You'd have to make an exe of our own that then, once assigning new values to the MLFs would run the exe. I'm not capable of that but maybe someone else is. That would make it possible to work with MLFs for more players I suppose. I really doubt most players would ever dip into manipulating files in any way shape or form. For me, before learning to mod, just FINDING the game files was a challenge that gave me a headache. This is why I have such a strong bias against making anything optional based on modularity. It's not player friendly at all.
 
I don't think it would be possible... that loading sequence is part of the exe. You'd have to make an exe of our own that then, once assigning new values to the MLFs would run the exe. I'm not capable of that but maybe someone else is. That would make it possible to work with MLFs for more players I suppose. I really doubt most players would ever dip into manipulating files in any way shape or form. For me, before learning to mod, just FINDING the game files was a challenge that gave me a headache. This is why I have such a strong bias against making anything optional based on modularity. It's not player friendly at all.

As I said there was one, I thing it was a script or something that called the screen then did its thing then ran the Civ exe with all the stuff set right. Having one would mean that we would not be restricted to one column of disjoint yes/no options. We could have the MLF stuff and all the number type options we currently have in the A_New_Dawn_GlobalDefines and others. You would be able to adjust the spawn rate of animals and the display level all without having to edit any files. Instead of a one dimensional list we would have a two dimensional screen where we could display the options and globals in a meaningful way.

I dislike the replacement options system because to me it looks overly complex and a maintenance nightmare as it increases the chances of bugs happening because adjustments are not made to all the replacements when they should.

The current system we use has problems because some people are not using it correctly. Basically only optional stuff should be in the modules folders. Luckily this includes new stuff people are working on. Once it is working it should be moved into the core if it is not going to remain an option.
 
The Replacement System is not really complicated.

The Blank Tech
Code:
		<TechInfo>
			<Type>TECH_CLOCKPUNK</Type>
			<Description>TXT_KEY_TECH_CLOCKPUNK</Description>
			<Civilopedia>TXT_KEY_TECH_CLOCKPUNK_PEDIA</Civilopedia>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<iAIWeight>0</iAIWeight>
			<iAITradeModifier>0</iAITradeModifier>
			<iCost>-1</iCost>
			<iAdvancedStartCost>-1</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<Era>ERA_MEDIEVAL</Era>
			<bRepeat>0</bRepeat>
			<bTrade>0</bTrade>
			<bDisable>1</bDisable>
			<bGoodyTech>0</bGoodyTech>
			<iGridX>-1</iGridX>
			<iGridY>-1</iGridY>
			<Sound>AS2D_TECH_GENERIC</Sound>
			<Button>Art/Interface/Buttons/TechTree/clockpunk.dds</Button>
		</TechInfo>

And the Replacement would look like this
Code:
		<TechInfo>
			<Type>TECH_CLOCKPUNK</Type>
			<ReplacementID>TECH_CLOCKPUNK</ReplacementID>
			<Description>TXT_KEY_TECH_CLOCKPUNK</Description>
			<Civilopedia>TXT_KEY_TECH_CLOCKPUNK_PEDIA</Civilopedia>
			<Help />
			<Strategy>TXT_KEY_TECH_CLOCKWORKS_STRATEGY</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<iAIWeight>0</iAIWeight>
			<iAITradeModifier>0</iAITradeModifier>
			<iCost>1300</iCost>
			<iAdvancedStartCost>100</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<Era>ERA_MEDIEVAL</Era>
			<FirstFreeUnitClass>NONE</FirstFreeUnitClass>
			<iFeatureProductionModifier>0</iFeatureProductionModifier>
			<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
			<iTradeRoutes>0</iTradeRoutes>
			<iHealth>0</iHealth>
			<iHappiness>0</iHappiness>
			<iFirstFreeTechs>0</iFirstFreeTechs>
			<iAsset>24</iAsset>
			<iPower>8</iPower>
			<bRepeat>0</bRepeat>
			<bTrade>1</bTrade>
			<bDisable>0</bDisable>
			<bGoodyTech>0</bGoodyTech>
			<bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
			<bMapCentering>0</bMapCentering>
			<bMapVisible>0</bMapVisible>
			<bMapTrading>0</bMapTrading>
			<bTechTrading>0</bTechTrading>
			<bGoldTrading>0</bGoldTrading>
			<bOpenBordersTrading>0</bOpenBordersTrading>
			<bDefensivePactTrading>0</bDefensivePactTrading>
			<bPermanentAllianceTrading>0</bPermanentAllianceTrading>
			<bVassalTrading>0</bVassalTrading>
			<bBridgeBuilding>0</bBridgeBuilding>
			<bIrrigation>0</bIrrigation>
			<bIgnoreIrrigation>0</bIgnoreIrrigation>
			<bWaterWork>0</bWaterWork>
			<iGridX>50</iGridX>
			<iGridY>3</iGridY>
			<DomainExtraMoves />
			<CommerceFlexible />
			<TerrainTrades />
			<bRiverTrade>0</bRiverTrade>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_MILITARY</FlavorType>
					<iFlavor>6</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_PRODUCTION</FlavorType>
					<iFlavor>10</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_GOLD</FlavorType>
					<iFlavor>2</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_SCIENCE</FlavorType>
					<iFlavor>4</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_GROWTH</FlavorType>
					<iFlavor>5</iFlavor>
				</Flavor>
			</Flavors>
			<OrPreReqs>
				<PrereqTech>TECH_CHIVALRY</PrereqTech>
			</OrPreReqs>
			<AndPreReqs>
				<PrereqTech>TECH_OPTICS</PrereqTech>
				<PrereqTech>TECH_CLOCKWORKS</PrereqTech>
			</AndPreReqs>
			<Quote>TXT_KEY_TECH_CLOCKPUNK_QUOTE</Quote>
			<Sound>AS2D_TECH_GENERIC</Sound>
			<SoundMP />
			<Button>Art/Interface/Buttons/TechTree/clockpunk.dds</Button>
			<ReplacementCondition>
				<Has>
					<GOMType>GOM_OPTION</GOMType>
					<ID>GAMEOPTION_ALT_TIMELINES</ID>
				</Has>
			</ReplacementCondition>
		</TechInfo>

One possible change to make it easier to use could be automatic creation of the blank Tech by the dll.
 
It would be better and simpler if it worked like WoC and only the changes were in the replacement. Having everything in each replacement is just asking for trouble down the line.
 
Thanks, no hurry it should probably be for the v35 anyway. It would make the improvement upgrade much less worrying for me since the improvement definition may get over 100 lines and the upgrade or not is just two of those lines.
 
Long story short...

Whether it is the tech tree or pedia, both are simply python screens.
Since both are just python screens, you can define what you want to display/hide...

If I can even adjust my tech tree to allow users to decide which era of techs to display/hide, I don't see why you cannot adjust codes to prevent techs from showing up depending on game options.

No need of replacement tech whatever
 
But you are talking to C programmers. They have to do it the hard way:mischief:

besides which we currently use MLF to control what is in or out not game options. Do we really want 22 new game options?
 
Who cares about the c programmers :D
The tech advisor screen is coded in python.
Whatever is coded there determines what is shown in the screen.
I can code it to display a video of pigs flying if I want.

So digging into the xml, creating dummy techs blah blah blah is ultimately a waste of time when eventually it is the python that decides what is displayed
 
Top Bottom