Adding Power Plant

Tanrim

Chieftain
Joined
Jul 13, 2006
Messages
11
I can't find anything to help me with this so here goes. I want to add a clean power plant that can be built in any city attached to the fusion tech. Basically a Fusion Plant, with the same look as the Nuclear plant (since I am clueless how to add looks too) but can't quite seem to figure this out.

I was thinking of copying the nuclear plant but there is two problems I see with that. For one if I just copied the plant it would have a meltdown chance too, right? Kinda pointless then. Second, I don't really see how the nuclear plant gives power in the xml file since all 3 fields are 0. The Power, DirtyPower, and AreaCleanPower. Hydro uses the first for power, coal the second, and the three gorges for the third. Nuclear doesn't use any though so how does it even give power?

Lastly, is there a way to cut down or remove the chance of meltdown with the nuclear plant? Been looking through the xmls for a while and can't find anything that gives a meltdown chance. Sorry for the long winded post but I'm a bit lost here, all these xmls make things a little convluted. Thanks for reading.
 
Tanrim said:
I can't find anything to help me with this so here goes. I want to add a clean power plant that can be built in any city attached to the fusion tech. Basically a Fusion Plant, with the same look as the Nuclear plant (since I am clueless how to add looks too) but can't quite seem to figure this out.

I was thinking of copying the nuclear plant but there is two problems I see with that. For one if I just copied the plant it would have a meltdown chance too, right? Kinda pointless then. Second, I don't really see how the nuclear plant gives power in the xml file since all 3 fields are 0. The Power, DirtyPower, and AreaCleanPower. Hydro uses the first for power, coal the second, and the three gorges for the third.

well you could copy the hydroplant...reassign values, prereqtechs, button images and therefore you get a "power" plant but with out the nuclear plant negative stuff :mischief:

I know it's not ideal but it would avoid all the nuke issues

Tanrim said:
Nuclear doesn't use any though so how does it even give power?

im not sure but it could be a python/sdk script instead of XML...

(I havent checked on this...because I think a solar/hydro plant alternative for power is enough for me... :) )

Tanrim said:
Lastly, is there a way to cut down or remove the chance of meltdown with the nuclear plant? Been looking through the xmls for a while and can't find anything that gives a meltdown chance. Sorry for the long winded post but I'm a bit lost here, all these xmls make things a little convluted. Thanks for reading.


im not sure ... but there is this entry in the GlobalDefines.xml:

<Define>
<DefineName>NUKE_FALLOUT_PROB</DefineName>
<iDefineIntVal>50</iDefineIntVal>
</Define>


Im not sure if that's the correct tagline since 50 seems like a high integer for "a small probability of a nuke meltdown" although the value maybe set up differently than the other taglines I know about....


or this could only be related to fallout when a nuke weapon is deployed...:confused:


the meltdown could be another tagline I missed... or an SDK/python script...

since I avoid SDK/python like the plague (messing with it too much will stop MP from working correctly :mad: )

I cant help you on that front....but others should be able too :p


hope that helps ;)
 
Yeah, think I might have to just copy the hydroplant and make changes. I don't know why but nuclear does seem to be, in part atleast, coded so not much I can do about that. The stuff in GlobalDefines.xml seems to deal with nukes though the plant might use the fallout value when it blows, who knows.

I'm still using version 1.09, I think, of the game as I just got it a week ago and have been too busy playing. :D I probably need to look into updating soon. Was the solar plant added? Didn't see anything about that. Hydro isn't an option very often or at all like in my last game. I had a 1/3 of the continent and not a single river.

Hopefully I can figure out something. I'd rather not have to rely on coal and apart from that a new plant would be nice just to have more, since some of the later stuff seems lacking. I would have liked to do solar and add it with plastics but that is far beyond me at the moment. Thanks.
 
Tanrim said:
Yeah, think I might have to just copy the hydroplant and make changes. I don't know why but nuclear does seem to be, in part atleast, coded so not much I can do about that. The stuff in GlobalDefines.xml seems to deal with nukes though the plant might use the fallout value when it blows, who knows.

Well you can test it out... by changing the nuke prob to 0 and then nuke a city to see if any :nuke: fallout:nuke: occurs :D

Tanrim said:
I'm still using version 1.09, I think, of the game as I just got it a week ago and have been too busy playing. :D I probably need to look into updating soon. Was the solar plant added? Didn't see anything about that..

the solar plant was added by the modder here:goodjob:
(not in the 1.62 Patch)

although you might want to update because some of the mods are updated to work with 1.62 patch...however adding that building probably is not affected by patch...:rolleyes:

Tanrim said:
Hydro isn't an option very often or at all like in my last game. I had a 1/3 of the continent and not a single river.

you could always change the prereqtech to make it come out earlier :lol:

Tanrim said:
Hopefully I can figure out something. I'd rather not have to rely on coal and apart from that a new plant would be nice just to have more, since some of the later stuff seems lacking. I would have liked to do solar and add it with plastics but that is far beyond me at the moment. Thanks.

well like I said previously copy the hydro but make sure you change the tagline where it doesnt need water for power and call it something else...

(maybe solar power :crazyeye: )


Hope that helps ;)
 
Someone made a solor plant here? Can't find anything for the life of me except one in a big mod that I really don't want to mess with. I'm going to see if I can get a plant using the hydro stuff working now I think.

After this current game I'd like something. I can't believe not a single river close to 15+ cities. I'll look into updating after I'm done with the games I'm playing now. Can just build ICBM's in one so I'm going to try the fallout thing and see what happens. Should be interesting. Anyways, time to figure out all the stuff I need to change to get a plant to work. Thanks a lot.

Edit: <iNukeExplosionRand>1000</iNukeExplosionRand> in CIV4BuildingsInfos.xml is what gives that chance of the plant blowing up, apparently. According to the civ4 wiki it says that "Chance that a nuclear power plant will randomly blow up (default 1 in 1000)" I either totally missed this before or passed it off as having to do with damage from ICBM's but I can't find a entry that uses that value other than the nuclear plant. I guess setting that to 0 would make it so it never blows up and setting it higher would lower the chance even more.

Now all I need to do is figure out how to make another plant from the nuclear stuff, which is going to be a lot harder than I first thought considering all the xmls involved. I'd still like to make a solor plant earlier too but that would be even more involved so maybe later.
 
well here is the sample for the building for solar plant in the CIV4BuildingInfos.xml:
*remember you can change values (pretechs) and remove requirements (building requirements) to meet your needs! :D
special thanks to fitchn and his CivMore Mod (that created the solar plant) found here:

http://forums.civfanatics.com/showthread.php?t=163596


Spoiler :

<BuildingInfo>
<BuildingClass>BUILDINGCLASS_SOLAR_PLANT</BuildingClass>
<Type>BUILDING_SOLAR_PLANT</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>TXT_KEY_BUILDING_SOLAR_PLANT</Description>
<Civilopedia>TXT_KEY_BUILDING_SOLAR_PLANT_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_SOLAR_PLANT_STRATEGY</Strategy>
<Advisor>ADVISOR_ECONOMY</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_NO_BUILDING</ArtDefineTag>
<MovieDefineTag>NONE</MovieDefineTag>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<GlobalReligionCommerce>NONE</GlobalReligionCommerce>
<VictoryPrereq>NONE</VictoryPrereq>
<FreeStartEra>NONE</FreeStartEra>
<MaxStartEra>NONE</MaxStartEra>
<ObsoleteTech>NONE</ObsoleteTech>
<PrereqTech>TECH_COMPOSITES</PrereqTech>
<TechTypes/>
<Bonus>NONE</Bonus>
<PrereqBonuses/>
<ProductionTraits/>
<PowerBonus>NONE</PowerBonus>
<FreeBonus>NONE</FreeBonus>
<iNumFreeBonuses>0</iNumFreeBonuses>
<FreeBuilding>NONE</FreeBuilding>
<FreePromotion>NONE</FreePromotion>
<CivicOption>NONE</CivicOption>
<GreatPeopleUnitClass>NONE</GreatPeopleUnitClass>
<iGreatPeopleRateChange>0</iGreatPeopleRateChange>
<bTeamShare>0</bTeamShare>
<bWater>0</bWater>
<bRiver>0</bRiver>
<bPower>1</bPower>
<bDirtyPower>0</bDirtyPower>
<bAreaCleanPower>0</bAreaCleanPower>
<bDiploVote>0</bDiploVote>
<bForceTeamVoteEligible>0</bForceTeamVoteEligible>
<bCapital>0</bCapital>
<bGovernmentCenter>0</bGovernmentCenter>
<bGoldenAge>0</bGoldenAge>
<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>350</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iMinAreaSize>-1</iMinAreaSize>
<iConquestProb>66</iConquestProb>
<iCitiesPrereq>0</iCitiesPrereq>
<iTeamsPrereq>0</iTeamsPrereq>
<iLevelPrereq>0</iLevelPrereq>
<iMinLatitude>0</iMinLatitude>
<iMaxLatitude>60</iMaxLatitude>
<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
<iGlobalGreatPeopleRateModifier>0</iGlobalGreatPeopleRateModifier>
<iAnarchyModifier>0</iAnarchyModifier>
<iGlobalHurryModifier>0</iGlobalHurryModifier>
<iExperience>0</iExperience>
<iGlobalExperience>0</iGlobalExperience>
<iFoodKept>0</iFoodKept>
<iAirlift>0</iAirlift>
<iAirModifier>0</iAirModifier>
<iNukeModifier>0</iNukeModifier>
<iNukeExplosionRand>0</iNukeExplosionRand>
<iFreeSpecialist>0</iFreeSpecialist>
<iAreaFreeSpecialist>0</iAreaFreeSpecialist>
<iGlobalFreeSpecialist>0</iGlobalFreeSpecialist>
<iMaintenanceModifier>0</iMaintenanceModifier>
<iWarWearinessModifier>0</iWarWearinessModifier>
<iGlobalWarWearinessModifier>0</iGlobalWarWearinessModifier>
<iHealRateChange>0</iHealRateChange>
<iHealth>0</iHealth>
<iAreaHealth>0</iAreaHealth>
<iGlobalHealth>0</iGlobalHealth>
<iHappiness>0</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>
<iGlobalPopulationChange>0</iGlobalPopulationChange>
<iFreeTechs>0</iFreeTechs>
<iDefense>0</iDefense>
<iAllCityDefense>0</iAllCityDefense>
<iAsset>0</iAsset>
<iPower>0</iPower>
<fVisibilityPriority>1.0</fVisibilityPriority>
<SeaPlotYieldChanges/>
<GlobalSeaPlotYieldChanges/>
<YieldChanges/>
<CommerceChanges/>
<ObsoleteSafeCommerceChanges/>
<CommerceChangeDoubleTimes/>
<CommerceModifiers/>
<GlobalCommerceModifiers/>
<SpecialistExtraCommerces/>
<StateReligionCommerces/>
<CommerceHappinesses/>
<ReligionChanges/>
<SpecialistCounts/>
<FreeSpecialistCounts/>
<CommerceFlexibles/>
<CommerceChangeOriginalOwners/>
<ConstructSound>AS2D_BUILD_PLANTHYDRO</ConstructSound>
<BonusHealthChanges/>
<BonusHappinessChanges/>
<BonusProductionModifiers/>
<UnitCombatFreeExperiences/>
<DomainFreeExperiences/>
<DomainProductionModifiers/>
<BuildingHappinessChanges/>
<PrereqBuildingClasses/>
<BuildingClassNeededs>
<BuildingClassNeeded>
<BuildingClassType>BUILDINGCLASS_FACTORY</BuildingClassType>
<bNeededInCity>1</bNeededInCity>
</BuildingClassNeeded>
</BuildingClassNeededs>
<SpecialistYieldChanges/>
<BonusYieldModifiers/>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_PRODUCTION</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
</Flavors>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
</BuildingInfo>



and the info needed in the CIV4BuildingClassInfos.xml:

Spoiler :


<BuildingClassInfo>
<Type>BUILDINGCLASS_SOLAR_PLANT</Type>
<Description>TXT_KEY_BUILDING_SOLAR_PLANT</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iExtraPlayerInstances>0</iExtraPlayerInstances>
<bNoLimit>0</bNoLimit>
<DefaultBuilding>BUILDING_SOLAR_PLANT</DefaultBuilding>
<VictoryThresholds/>
</BuildingClassInfo>


remember to edit the Art defines and dds files for thumb pics... and text XML files to get the proper display! :mischief:

also if you want to make a alt nuclear plant I think this tagline makes it so that you need/use it

<PowerBonus>BONUS_URANIUM</PowerBonus>


anyway that should get you started ;)


PS Thanks for the Meltdown Tagline tip... I probably forgot to review that too!
(I dont use it but now I know how to mod if I want to in the future!)
 
I've done editing of all the files it seems like I need to 2 in buildings and 2 in text I think and the Fusion Plant seems to be working fine. Don't seem to be able to see it though, don't know why. It's basically the nuclear plant modified. Own desc. and stuff but I kept the nuclear art tag. Don't see it in the city but that might just be a problem with the world builder as that's how I've tested it so far. Thinking of making it a world or national wonder though to be like a second three gorges, it would be balanced by the fusion tech and cost, I guess.

Anyway, thanks for the help. Working now more or less. Since you gave me a good start point I'll look into the solar plant soon after I update too. Though I have no idea how to work with art files.

On a side note I thought I'll try a little test and in the game I started to test the plant I gave everyone a few nukes and put a barb city in the middle of the map (one continent), want to guess what happened? They launched all their nukes at the city in one turn. :nuke: Global warming was turning 2-3 tiles into desert just in my area after that. You'd think they would be nuclear winter after that but oh well... ahem, thanks!
 
i've also done a fusion plant. it don't needs any ressources, but can only be built 2 times per civ/team.
heres my code:

Code:
<BuildingInfo>
			<BuildingClass>BM_BUILDINGCLASS_FUSION_PLANT</BuildingClass>
			<Type>BM_BUILDING_FUSION_PLANT</Type>
			<SpecialBuildingType>NONE</SpecialBuildingType>
			<Description>TXT_KEY_BM_BUILDING_FUSION_PLANT</Description>
			<Civilopedia>TXT_KEY_BM_BUILDING_FUSION_PLANT_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BM_BUILDING_FUSION_PLANT_STRATEGY</Strategy>
			<Advisor>ADVISOR_ECONOMY</Advisor>
			<ArtDefineTag>ART_DEF_BM_BUILDING_FUSION_PLANT</ArtDefineTag>
			<MovieDefineTag>NONE</MovieDefineTag>
			<HolyCity>NONE</HolyCity>
			<ReligionType>NONE</ReligionType>
			<StateReligion>NONE</StateReligion>
			<PrereqReligion>NONE</PrereqReligion>
			<GlobalReligionCommerce>NONE</GlobalReligionCommerce>
			<VictoryPrereq>NONE</VictoryPrereq>
			<FreeStartEra>NONE</FreeStartEra>
			<MaxStartEra>NONE</MaxStartEra>
			<ObsoleteTech>NONE</ObsoleteTech>
			<PrereqTech>TECH_FUSION</PrereqTech>
			<TechTypes/>
			<Bonus>NONE</Bonus>
			<PrereqBonuses/>
			<ProductionTraits/>
			<PowerBonus>NONE</PowerBonus>
			<FreeBonus>NONE</FreeBonus>
			<iNumFreeBonuses>0</iNumFreeBonuses>
			<FreeBuilding>NONE</FreeBuilding>
			<FreePromotion>NONE</FreePromotion>
			<CivicOption>NONE</CivicOption>
			<GreatPeopleUnitClass>NONE</GreatPeopleUnitClass>
			<iGreatPeopleRateChange>0</iGreatPeopleRateChange>
			<bTeamShare>0</bTeamShare>
			<bWater>0</bWater>
			<bRiver>0</bRiver>
			<bPower>0</bPower>
			<bDirtyPower>0</bDirtyPower>
			<bAreaCleanPower>1</bAreaCleanPower>
			<bDiploVote>0</bDiploVote>
			<bForceTeamVoteEligible>0</bForceTeamVoteEligible>
			<bCapital>0</bCapital>
			<bGovernmentCenter>0</bGovernmentCenter>
			<bGoldenAge>0</bGoldenAge>
			<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>2800</iCost>
			<iHurryCostModifier>0</iHurryCostModifier>
			<iMinAreaSize>-1</iMinAreaSize>
			<iConquestProb>66</iConquestProb>
			<iCitiesPrereq>0</iCitiesPrereq>
			<iTeamsPrereq>0</iTeamsPrereq>
			<iLevelPrereq>0</iLevelPrereq>
			<iMinLatitude>0</iMinLatitude>
			<iMaxLatitude>90</iMaxLatitude>
			<iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
			<iGlobalGreatPeopleRateModifier>0</iGlobalGreatPeopleRateModifier>
			<iAnarchyModifier>0</iAnarchyModifier>
			<iGlobalHurryModifier>0</iGlobalHurryModifier>
			<iExperience>0</iExperience>
			<iGlobalExperience>0</iGlobalExperience>
			<iFoodKept>0</iFoodKept>
			<iAirlift>0</iAirlift>
			<iAirModifier>0</iAirModifier>
			<iNukeModifier>0</iNukeModifier>
			<iNukeExplosionRand>0</iNukeExplosionRand>
			<iFreeSpecialist>0</iFreeSpecialist>
			<iAreaFreeSpecialist>0</iAreaFreeSpecialist>
			<iGlobalFreeSpecialist>0</iGlobalFreeSpecialist>
			<iMaintenanceModifier>0</iMaintenanceModifier>
			<iWarWearinessModifier>0</iWarWearinessModifier>
			<iGlobalWarWearinessModifier>0</iGlobalWarWearinessModifier>
			<iHealRateChange>0</iHealRateChange>
			<iHealth>+2</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>
			<iGlobalPopulationChange>0</iGlobalPopulationChange>
			<iFreeTechs>0</iFreeTechs>
			<iDefense>0</iDefense>
			<iAllCityDefense>0</iAllCityDefense>
			<iAsset>0</iAsset>
			<iPower>0</iPower>
			<fVisibilityPriority>1.0</fVisibilityPriority>
			<SeaPlotYieldChanges/>
			<GlobalSeaPlotYieldChanges/>
			<YieldChanges/>
			<CommerceChanges/>
			<ObsoleteSafeCommerceChanges/>
			<CommerceChangeDoubleTimes/>
			<CommerceModifiers/>
			<GlobalCommerceModifiers/>
			<SpecialistExtraCommerces/>
			<StateReligionCommerces/>
			<CommerceHappinesses/>
			<ReligionChanges/>
			<SpecialistCounts/>
			<FreeSpecialistCounts/>
			<CommerceFlexibles/>
			<CommerceChangeOriginalOwners/>
			<ConstructSound>AS2D_BUILD_PLANTNUCLEAR</ConstructSound>
			<BonusHealthChanges/>
			<BonusHappinessChanges/>
			<BonusProductionModifiers/>
			<UnitCombatFreeExperiences/>
			<DomainFreeExperiences/>
			<DomainProductionModifiers/>
			<BuildingHappinessChanges/>
			<PrereqBuildingClasses/>
			<BuildingClassNeededs>
				<BuildingClassNeeded>
					<BuildingClassType>BM_BUILDINGCLASS_NANOFACTORY</BuildingClassType>
					<bNeededInCity>1</bNeededInCity>
				</BuildingClassNeeded>
			</BuildingClassNeededs>
			<SpecialistYieldChanges/>
			<BonusYieldModifiers/>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_PRODUCTION</FlavorType>
					<iFlavor>10</iFlavor>
				</Flavor>
			</Flavors>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
		</BuildingInfo>

if you want that a added building is shown on the worldmap in the city, you have to modify the CIV4CityLSystem.xml. you just have to copy something that is similar in size like the building you added.
/edit: i mean similar in size of the 3D-modell.
 
Nice plant kinda what I was thinking of doing with mine too.

Edit: Wow, I'm dumb. It crashed because I forgot a closing tag. Working good now and I can see it in the city. May need a little tweaking yet but it's good. Thanks a lot.
 
Back
Top Bottom