Mod Component Requests Thread

Civil war scenarios have been considered multiple times, but most times the response was something along "would not be fun if it happened to the player". Is also hard to balance IMHO.
A very simple form, with once city seceding from a Civ can be found here.

Your example #2 could be done with some more values in the XML files, I think.
 
Hello, I have some little requests, I hope you people don't mind.

One thing I tried to do (but failed miserably) was to make the top-screen message box wider. The same with the tech bar (see screenshot below). Does anyone know how to do it? (I play at a 1366x768 resolution by the way)
Spoiler :


The other thing I wanted to do is add a new speed: a "Marathon x2" speed, that is, 3000 turns. I copied some code (I don't remember which file) of the Marathon speed, doubled most numbers and I got the speed in game, but in the victory screen it said "1600 turns left" (yes, 1600, not 1500) instead of the 3000 I wanted. I deleted the code afterwards. Can anyone help me with that as well?

Thanks in advance :)
 
The other thing I wanted to do is add a new speed: a "Marathon x2" speed, that is, 3000 turns. I copied some code (I don't remember which file) of the Marathon speed, doubled most numbers and I got the speed in game, but in the victory screen it said "1600 turns left" (yes, 1600, not 1500) instead of the 3000 I wanted. I deleted the code afterwards. Can anyone help me with that as well?

Thanks in advance :)

If you used a scenario, then it be that this time was set in the scenario file itself.
 
I found out what was wrong, I messed up while scaling some values. So yay!, I have a 3000 turns speed, thanks :)
 
I have a request for a new commerce slider, 'Military' that as the higher the slider goes, the higher the percentage per turn that an event triggers. The events that I want to include are similar to the promotions for all units event in BTS.

The goal is that higher military spending increases the chance of units being built with various promotions. 0% spending is equal to 0% promotion chance, 100% spending is equal to 50% chance. I also want to prevent the events triggering every turn and limit it to a minimum of 10 turns. I can struggle through the events in XML, but I have no idea how to code the slider percentage. Any helpers?
 
Sorry if this question has been asked before:

Does anyone know if Rhye's and Fall of Civilization (my favorite mod :D) can be modified, or if a modification already exists, to allow for the incorporation of a Tech era limit - I really do not enjoy playing in the modern era that much and like to keep my games in the Rennaissance.

Thanks.
 
Hello,

I wanted to create my own civilization, but I have a problem with my UB. I see it in the civilopedia with the button I defined and the bonus I add, but when I want to build it the game stop and gives me an error.

I just copied/pasted the XML files from the BTS folder, and add the following lines :

CIV4BuildingInfos.xml :
Spoiler :
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_COLOSSEUM</BuildingClass>
<Type>BUILDING_OCEAN_AQUARIUM</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>TXT_KEY_BUILDING_OCEAN_AQUARIUM</Description>
<Civilopedia>TXT_KEY_BUILDING_OCEAN_AQUARIUM_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_OCEAN_AQUARIUM_STRATEGY</Strategy>
<Advisor>ADVISOR_ECONOMY</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_OCEAN_AQUARIUM</ArtDefineTag>
<MovieDefineTag>NONE</MovieDefineTag>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<bStateReligion>0</bStateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<FoundsCorporation>NONE</FoundsCorporation>
<GlobalReligionCommerce>NONE</GlobalReligionCommerce>
<GlobalCorporationCommerce>NONE</GlobalCorporationCommerce>
<VictoryPrereq>NONE</VictoryPrereq>
<FreeStartEra>NONE</FreeStartEra>
<MaxStartEra>NONE</MaxStartEra>
<ObsoleteTech>NONE</ObsoleteTech>
<PrereqTech>TECH_CONSTRUCTION</PrereqTech>
<TechTypes/>
<Bonus>NONE</Bonus>
<PrereqBonuses/>
<ProductionTraits>
<ProductionTrait>
<ProductionTraitType>TRAIT_CREATIVE</ProductionTraitType>
<iProductionTrait>100</iProductionTrait>
</ProductionTrait>
</ProductionTraits>
<HappinessTraits/>
<NoBonus>NONE</NoBonus>
<PowerBonus>NONE</PowerBonus>
<FreeBonus>NONE</FreeBonus>
<iNumFreeBonuses>0</iNumFreeBonuses>
<FreeBuilding>NONE</FreeBuilding>
<FreePromotion>NONE</FreePromotion>
<CivicOption>NONE</CivicOption>
<GreatPeopleUnitClass>NONE</GreatPeopleUnitClass>
<iGreatPeopleRateChange>0</iGreatPeopleRateChange>
<iHurryAngerModifier>0</iHurryAngerModifier>
<bBorderObstacle>0</bBorderObstacle>
<bTeamShare>0</bTeamShare>
<bWater>0</bWater>
<bRiver>0</bRiver>
<bPower>0</bPower>
<bDirtyPower>0</bDirtyPower>
<bAreaCleanPower>0</bAreaCleanPower>
<DiploVoteType>NONE</DiploVoteType>
<bForceTeamVoteEligible>0</bForceTeamVoteEligible>
<bCapital>0</bCapital>
<bGovernmentCenter>0</bGovernmentCenter>
<bGoldenAge>0</bGoldenAge>
<bAllowsNukes>0</bAllowsNukes>
<bMapCentering>0</bMapCentering>
<bNoUnhappiness>0</bNoUnhappiness>
<bNoUnhealthyPopulation>0</bNoUnhealthyPopulation>
<bBuildingOnlyHealthy>0</bBuildingOnlyHealthy>
<bNeverCapture>0</bNeverCapture>
<bNukeImmune>0</bNukeImmune>
<bPrereqReligion>0</bPrereqReligion>
<bCenterInCity>0</bCenterInCity>
<iAIWeight>0</iAIWeight>
<iCost>80</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>-1</iMinAreaSize>
<iConquestProb>66</iConquestProb>
<iCitiesPrereq>0</iCitiesPrereq>
<iTeamsPrereq>0</iTeamsPrereq>
<iLevelPrereq>0</iLevelPrereq>
<iMinLatitude>0</iMinLatitude>
<iMaxLatitude>90</iMaxLatitude>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
<iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
<iGlobalGreatPeopleRateModifier>0</iGlobalGreatPeopleRateModifier>
<iAnarchyModifier>0</iAnarchyModifier>
<iGoldenAgeModifier>0</iGoldenAgeModifier>
<iGlobalHurryModifier>0</iGlobalHurryModifier>
<iExperience>0</iExperience>
<iGlobalExperience>0</iGlobalExperience>
<iFoodKept>0</iFoodKept>
<iAirlift>0</iAirlift>
<iAirModifier>0</iAirModifier>
<iAirUnitCapacity>0</iAirUnitCapacity>
<iNukeModifier>0</iNukeModifier>
<iNukeExplosionRand>0</iNukeExplosionRand>
<iFreeSpecialist>0</iFreeSpecialist>
<iAreaFreeSpecialist>0</iAreaFreeSpecialist>
<iGlobalFreeSpecialist>0</iGlobalFreeSpecialist>
<iMaintenanceModifier>0</iMaintenanceModifier>
<iWarWearinessModifier>0</iWarWearinessModifier>
<iGlobalWarWearinessModifier>0</iGlobalWarWearinessModifier>
<iEnemyWarWearinessModifier>0</iEnemyWarWearinessModifier>
<iHealRateChange>0</iHealRateChange>
<iHealth>0</iHealth>
<iAreaHealth>0</iAreaHealth>
<iGlobalHealth>0</iGlobalHealth>
<iHappiness>1</iHappiness>
<iAreaHappiness>0</iAreaHappiness>
<iGlobalHappiness>0</iGlobalHappiness>
<iStateReligionHappiness>0</iStateReligionHappiness>
<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
<iMilitaryProductionModifier>0</iMilitaryProductionModifier>
<iSpaceProductionModifier>0</iSpaceProductionModifier>
<iGlobalSpaceProductionModifier>0</iGlobalSpaceProductionModifier>
<iTradeRoutes>0</iTradeRoutes>
<iCoastalTradeRoutes>0</iCoastalTradeRoutes>
<iGlobalTradeRoutes>0</iGlobalTradeRoutes>
<iTradeRouteModifier>0</iTradeRouteModifier>
<iForeignTradeRouteModifier>0</iForeignTradeRouteModifier>
<iGlobalPopulationChange>0</iGlobalPopulationChange>
<iFreeTechs>0</iFreeTechs>
<iDefense>0</iDefense>
<iBombardDefense>0</iBombardDefense>
<iAllCityDefense>0</iAllCityDefense>
<iEspionageDefense>0</iEspionageDefense>
<iAsset>5</iAsset>
<iPower>0</iPower>
<fVisibilityPriority>1.0</fVisibilityPriority>
<SeaPlotYieldChanges/>
<RiverPlotYieldChanges/>
<GlobalSeaPlotYieldChanges/>
<YieldChanges>
<iYield>1</iYield>
<iYield>0</iYield>
<iYield>0</iYield>
</YieldChanges>
<CommerceChanges/>
<ObsoleteSafeCommerceChanges/>
<CommerceChangeDoubleTimes/>
<CommerceModifiers/>
<GlobalCommerceModifiers/>
<SpecialistExtraCommerces/>
<StateReligionCommerces/>
<CommerceHappinesses>
<iCommerce>0</iCommerce>
<iCommerce>0</iCommerce>
<iCommerce>5</iCommerce>
</CommerceHappinesses>
<ReligionChanges/>
<SpecialistCounts/>
<FreeSpecialistCounts/>
<CommerceFlexibles/>
<CommerceChangeOriginalOwners/>
<ConstructSound>AS2D_BUILD_COLOSSEUM</ConstructSound>
<BonusHealthChanges/>
<BonusHappinessChanges>
<BonusHappinessChange>
<BonusType>BONUS_CLAM</BonusType>
<iHappinessChange>1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_CRAB</BonusType>
<iHappinessChange>1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_FISH</BonusType>
<iHappinessChange>1</iHappinessChange>
</BonusHappinessChange>
</BonusHappinessChanges>
<BonusProductionModifiers/>
<UnitCombatFreeExperiences/>
<DomainFreeExperiences/>
<DomainProductionModifiers/>
<BuildingHappinessChanges/>
<PrereqBuildingClasses/>
<BuildingClassNeededs/>
<SpecialistYieldChanges/>
<BonusYieldModifiers/>
<ImprovementFreeSpecialists/>
<Flavors/>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
</BuildingInfo>
CIV4ArtDefines_Building.xml :
Spoiler :
<BuildingArtInfo>
<Type>ART_DEF_BUILDING_OCEAN_AQUARIUM</Type>
<LSystem>LSYSTEM_3x3</LSystem>
<bAnimated>1</bAnimated>
<fScale>1.3</fScale>
<fInterfaceScale>0.4</fInterfaceScale>
<NIF>Art/Buildings/Aquarium/Babylonian_Garden.nif</NIF>
<KFM/>
<Button>,Art/Interface/Buttons/aqua_ico.dds</Button>
</BuildingArtInfo>
 
I was wondering if it was possible to limit the number of settlers that are available or the number of cities that can be built? I was just thinking if there is a quick string of code that I could implement into one of the files. If it is more complicated than that, than no worries.

For example in Civ 3 what I did was disable settlers, start with 5 settlers and had the palace spawn a settler every 200 turns. I was wondering if something like this would be possible.

I looked around and found this thread: http://forums.civfanatics.com/showthread.php?t=294200

but it did not work.

I found this thread: http://forums.civfanatics.com/showthread.php?p=7064255

which is way to complicated for me to be able to merge. So if it is at all possible with a quick fix; cool. If not, no problem.

Thanks
 
It would be quite simple to make settlers national units, which means that you could not train any more unless you have fewer than some limit (set in CIV4UnitClassInfos.xml.)

However, that would not take into account the number of cities you have already settled.


Limiting the number of cities shouldn't be that hard though.

I am assuming that you don't want to have to compile a whole new DLL (I know I don't like doing that), so your best bet is probably to use some python callbacks found in Assets/Python/CvGameUtils.py.

I believe that these python call backs should all be active in base Civ IV, and that in BtS they are mostly turned off by default but may be turned on in Assets/XML/PythonCallBackDefines.xml.

(It should be noted that some mods seem to lock certain callbacks as being always on or always off. I think that turning off such callbacks in the DLL rather than checking that xml file makes the game run faster, but it does make things harder for modmoders who don't want to deal with editing and compiling a lot of C++ files.)


The first entry in Assets/XML/PythonCallBackDefines.xml is USE_CANNOT_FOUND_CITY_CALLBACK. If you change this from 0 to 1, then you should be able to use this under Assets/Python/CvGameUtils.py:

Code:
	def cannotFoundCity(self,argsList):
		iPlayer, iPlotX, iPlotY = argsList

		[COLOR="Red"]pPlayer = gc.getPlayer(iPlayer)
		if pPlayer.getNumCities() > 5:
			return True[/COLOR]

		return False
Adding the red portion should block settlers from building cities once their owner already controls 5 of them.


If you change USE_CANNOT_TRAIN_CALLBACK from 0 to 1, then you can use this to stop players from training Settlers when they have too many cities:

Code:
	def cannotTrain(self,argsList):
		pCity = argsList[0]
		eUnit = argsList[1]
		bContinue = argsList[2]
		bTestVisible = argsList[3]
		bIgnoreCost = argsList[4]
		bIgnoreUpgrades = argsList[5]

	[COLOR="Red"]	if eUnit == gc.getInfoTypeForString('UNIT_SETTLER'):
			pPlayer = gc.getPlayer(pCity.getOwner())
			if pPlayer.getNumCities() > 5:
				return True[/COLOR]

		return False
If you don't want to be able to train settlers if already have enough settlers to reach the maximum number of cities, you could make it more like this:
Code:
	def cannotTrain(self,argsList):
		pCity = argsList[0]
		eUnit = argsList[1]
		bContinue = argsList[2]
		bTestVisible = argsList[3]
		bIgnoreCost = argsList[4]
		bIgnoreUpgrades = argsList[5]
[COLOR="Red"]
		if eUnit == gc.getInfoTypeForString('UNIT_SETTLER'):
			pPlayer = gc.getPlayer(pCity.getOwner())
			if pPlayer.getNumCities() [COLOR="DarkOrange"]+ pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_SETTLER'))[/COLOR] > 5:
				return True
[/COLOR]
		return False
 
Thank you for replying.

I can't seem to make it work. I am playing Rise of Mankind: A New Dawn in case that helps.

I copied everything like you said except for changing "UNIT_SETTLER" to "UNITCLASS_SETTLER" since that is what the type is, because of multiple settler units in this mod.

I tried both just in case, as well as going back to editing the original non mod files from Beyond. I test it by loading a game with more than 5 cities and it does not work. I also test it by starting a new game and using the worldbuilder to give me more settlers.

I am not sure what I am doing wrong.

Edit: I used the code on vanilla Bts and it worked, so it must be something with the mod that, is for some reason, not letting it work.

Edit2:
I am getting closer to understanding why its not working thanks to this thread. http://forums.civfanatics.com/showthread.php?t=330233

But I am not understanding everything that they are talking about.

Edit3: My problem was I was putting the code in GameUtils which BUG ignores. I saw that RoMutils was there and added the code to that and now it works and have limited settlers. Thanks for the code and help, I appreciate it. :)
 
I would like to know about Least Favorite Civics. I know this bit is implemented in the Alpha Centauri mod, but not whether it ever has been made as a module. Does anyone know about whether such a module exists, or how to make it?
 
How about evacuation? So, when an enemy gets too close and you know you can't win, you can "evacuate" your city. This means that it becomes a "ghost city" (looks semitransparent) with no population, but all the buildings. You receive unit "evacuees". So when there is no danger, you can move your evacuees back in, or add their population to another one of your cities. Alternatively, the city gets occupied by enemy settlers, and in that case all the buildings you built get used by the other player. Only settlers can conquer ghost cities. This might add some challenge to the game as you may have to chase the AI evacuees and destroy them, or you could "convince" them to join your civ like workers, but when they move in to a city, they add +2 unhappiness to it.
 
How about evacuation? So, when an enemy gets too close and you know you can't win, you can "evacuate" your city. This means that it becomes a "ghost city" (looks semitransparent) with no population, but all the buildings. You receive unit "evacuees". So when there is no danger, you can move your evacuees back in, or add their population to another one of your cities. Alternatively, the city gets occupied by enemy settlers, and in that case all the buildings you built get used by the other player. Only settlers can conquer ghost cities. This might add some challenge to the game as you may have to chase the AI evacuees and destroy them, or you could "convince" them to join your civ like workers, but when they move in to a city, they add +2 unhappiness to it.

This could also be used for forced migrations. The unhappiness should stop it being too abused, though they should potentially be a national unit because there's only so many people your government can safely evacuate/migrate/look after at a time. If one makes the unhappiness at both ends it'd be very hard to abuse.
 
Is there anyone that would be willing to take up this merge challenge combining these 2 mods in the following way:

Specialist Enhancements: Adds Health and happiness to Specialists

civic specialist yield commerce changes: Allows civics to change the amounts Specialists Produce. (I can't find the thread for this, but I have the files if someone is willing to have a go)

What I would like is to be able to add the ability for civics to change the amount of health and happiness a specialist produces, as well as the yields and commerce.

I have the 2 mods merged in my mod, but I would love this extra flexibility to be added as well!
 
Something I'd like to see in a mod: (if it hasn't already been done)
Advanced siege warfare. The siege warfare in Civ4 is a bit lacking. All you can do in civ4 is surround the city, bombard it to death, and attack. But there were many more ways of sieging a city in the medieval ages.
1. Blockading
Armies would often cut off supplies to a city and slowly starve the people inside.
In-game: I was thinking that some land units outside of cities could have the option that naval units have, to cut off trade to a city.
2. Additional siege projectiles
Catapults in the medieval ages were often loaded with diseased corpses to spread disease inside cities. Maybe there could be an added option to spread 1 :yuck: with a catapult/trebuchet.
3. Siege towers
This has already been done--having a siege tower which has a random chance of destroying the walls in a city. I was thinking it could be expanded so that the siege tower can hold one other unit and at the same time as breaching the walls unload the unit to attack the city. the siege tower could be countered by a building like a moat maybe?
4. Mining
This is the most important one. A swordsman walks up next to a city and then digs for four turns. When he's done digging, there's a random chance the walls are destroyed. This happened alll the time in the middle ages when attackers tunneled underneath castles and set them on fire.
5. Better bombarding
It seems that most of the siege weapons in civ4 have a bombardment option that lowers defenses--but that's not what they were used for, mostly. A lot of siege weapons were used to spread damage/disease and kill the occupants of a city, including artillery of ww2. perhaps this could be made an option.

If anyone knows how to make a mod with those additions, or knows of one that's already been made, please tell me! thanks in advance :goodjob:
 
Top Bottom