The BIT3 MODMOD for LoR

Bezurn

Prince
Joined
Nov 23, 2005
Messages
587
I just wanted to make a post on this forum introducing my ideas on how to enhance game play for this wonderful MOD. I'm sure many like it how it is, but I had some ideas and instead of reinventing the wheel I thought I'd take the core of the LoR mod and add some more features that enhance gameplay. I'm doing this just for myself, and I typically play with the following settings.

Noble - Monarch Difficulty
Standard or Large Map (Terra, Fractal, Tectonics, or Perfect World2)
No Tech Trading.
No Tribal Villages.
Start As Minor, Revolutions, Tech Diffusion ect. Barbarian World off on Terra and I add 2-4 more civs or raise the sea level.

After playing LoR for a few months with these settings I've noticed the AI making some mistakes, particularly with the Start as Minors setting. Thus I've tweaked a few things here and there, and then it snowballed into other ideas that I thought would be fun.

Here's the link to my development thread. I'm not quite ready to post all the XML files I've tweaked so far, as there are some changes and polishing I need to do first. Will post and update when I've got my first version ready for anyone to try.

I hope this isn't intruding in your forum too much Phungus. I really enjoy your mod and don't want to steal any of your customers :lol: If it is though I can delete it, just let me know.
 
Mod mods are cool; means people enjoy the mod itself enough to use it as a base, rather then using straight BtS, or one of the many other mods out there to build off of. I fully encourage users to take LoR and run with it, and will help if anyone has any questions; assuming I know the answer (don't PM me though, just post any questions you have wherever it makes sense to post them).

As far as the AI making mistakes when Start as Minors is selected, I know jdog is working on some new logic to get the AI to be more apt to get peace when leaving minor status. Currently I think this is the biggest flaw with start as minors, as the AI is, for some reason, reluctant to have peace even though it's litterally at war with like a half dozen other civs at the same time. Course the human doesn't really come out much better, as the AI is usually even less likely to accept peace from the human player.
 
Thanks Phungus. I had a few questions after doing some brainstorming and seeing what I would have to do to implement the planned features I try to put in. First thing I think I will work on is getting all of the planned improvements to grow, as that is my favorite feature. So I have some questions about how to add XML elements to files, and how to make the game use them.

For starters lets look at the improvement town.

Spoiler :

Code:
<ImprovementInfo>
			<Type>IMPROVEMENT_TOWN</Type>
			<Description>TXT_KEY_IMPROVEMENT_TOWN</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_TOWN_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_IMPROVEMENT_TOWN</ArtDefineTag>
			<YieldChanges>
				<iYieldChange>0</iYieldChange>
				<iYieldChange>0</iYieldChange>
				<iYieldChange>4</iYieldChange>
			</YieldChanges>
			<bActsAsCity>0</bActsAsCity>
			<bHillsMakesValid>0</bHillsMakesValid>
			<bFreshWaterMakesValid>0</bFreshWaterMakesValid>
			<bRiverSideMakesValid>0</bRiverSideMakesValid>
			<bNoFreshWater>0</bNoFreshWater>
			<bRequiresFlatlands>0</bRequiresFlatlands>
			<bRequiresRiverSide>0</bRequiresRiverSide>
			<bRequiresIrrigation>0</bRequiresIrrigation>
			<bCarriesIrrigation>0</bCarriesIrrigation>
			<bRequiresFeature>0</bRequiresFeature>
			<bWater>0</bWater>
			<bGoody>0</bGoody>
			<bPermanent>0</bPermanent>
			<bUseLSystem>1</bUseLSystem>
			<iAdvancedStartCost>-1</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iFeatureGrowth>0</iFeatureGrowth>
			<iUpgradeTime>0</iUpgradeTime>
			<iAirBombDefense>5</iAirBombDefense>
			<iDefenseModifier>0</iDefenseModifier>
[B]			<iHappiness>0</iHappiness>[/B]
[I]to add here -          <ihealth>[/I]
			<iPillageGold>25</iPillageGold>
			<bOutsideBorders>0</bOutsideBorders>
			<TerrainMakesValids/>
			<FeatureMakesValids/>
			<ImprovementPillage>IMPROVEMENT_VILLAGE</ImprovementPillage>
			<ImprovementUpgrade/>
			<TechYieldChanges>
				<TechYieldChange>
					<PrereqTech>TECH_PRINTING_PRESS</PrereqTech>
					<TechYields>
						<iYield>0</iYield>
						<iYield>0</iYield>
						<iYield>1</iYield>
					</TechYields>
				</TechYieldChange>
				<TechYieldChange>
					<PrereqTech>TECH_AI</PrereqTech>
					<TechYields>
						<iYield>0</iYield>
						<iYield>1</iYield>
						<iYield>1</iYield>
					</TechYields>
				</TechYieldChange>
			</TechYieldChanges>
			<RouteYieldChanges/>
			<bGraphicalOnly>0</bGraphicalOnly>
		</ImprovementInfo>

In the XML it has an element for happiness (from forest preserves) but no element for health, which I plan to use for towns, as well as production tiles. So if I go into the terrain schema and setup a ihealth tag right after ihappiness I assume I'll have to go into the SDK or Python to make the city recognize the addition of health. Also towns will produce unhappiness for quite a while during the game, so I think I'll also have to go to the SDK and add that as well. Are my assumptions correct here?

Also I wanted to try and make the XML changes modular, but I am going to be changing a lot of default values in the buildingsinfos.xml and some others perhaps. If I put a a _BuildingsInfos.xml in the modules directory will it override any duplicates entries of buildings that are found in the default buildingsinfos.xml file, or will I have to abandon my plans of making it easier to integrate and just hack up the original files?
 
You are absolutely correct about needing to do SDK work if you add new tags. The dll is how XML values are loaded; you can set up the Schema file fine so that Civ will boot up and load everything all right, but the engine will just skip over the new tags if it isn't told how to read them. SDK modding isn't as hard as it sounds though, but I wol't lie to you, once you start coding you'll spend alot of time bashing your head against the wall trying to figure out what's going wrong alot of the time; it's just part of the process. But fear not, there are some excellent tutorials on the subject here in these forums.

This is how I first learned how to mod the dll, the tutorial is excellent and clean and concise.
An Idiot's guide to the dll

Also you will screw things up, and if you have no experience with coding use this forum often:
Python and SDK forums

No one will write your code for you, but people here are very helpful. Especially Emperor Fool, so definitely ask questions and ask for advice. Just be specific about what you want; starting a thread title like "I need help" isn't going to generate much of a response, whereas something like "SDK: adding health to improvement" is. You might want to start with something easier then adding health to an improvement though, that would be pretty complex. Try cloning a simple tag first; something like copying a straightforward atribute of a promotion to a unit, or something similar, is probably the best thing to start with.
 
Top Bottom