Quick Modding Questions Thread

I have barbed wire upgrade to trench similar to hamlets etc. but it doesnt work. Any idea why? It doesnt even say in the pedia
Code:
<ImprovementInfo>
			<Type>IMPROVEMENT_ENTANGLEMENT</Type>
			<Description>Barbed Wire</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_ENTANGLEMENT_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_IMPROVEMENT_ENTANGLEMENT</ArtDefineTag>
			<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>40</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iFeatureGrowth>0</iFeatureGrowth>
			<iUpgradeTime>10</iUpgradeTime>
			<iAirBombDefense>10</iAirBombDefense>
			<iDefenseModifier>10</iDefenseModifier>
			<iHappiness>0</iHappiness>
			<iPillageGold>0</iPillageGold>
			<bOutsideBorders>0</bOutsideBorders>
			<TerrainMakesValids>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_GRASS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_PLAINS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_DESERT</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_TUNDRA</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_SNOW</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
			</TerrainMakesValids>
			<FeatureMakesValids/>
			<ImprovementPillage/>
			<ImprovementUpgrade>IMPROVEMENT_TRENCH</ImprovementUpgrade>
			<TechYieldChanges/>
			<RouteYieldChanges/>
			<bGraphicalOnly>0</bGraphicalOnly>
		</ImprovementInfo>
		<ImprovementInfo>
			<Type>IMPROVEMENT_TRENCH</Type>
			<Description>Trench</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_TRENCH_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_IMPROVEMENT_TRENCH</ArtDefineTag>
			<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>40</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iFeatureGrowth>0</iFeatureGrowth>
			<iUpgradeTime>15</iUpgradeTime>
			<iAirBombDefense>25</iAirBombDefense>
			<iDefenseModifier>25</iDefenseModifier>
			<iHappiness>0</iHappiness>
			<iPillageGold>0</iPillageGold>
			<bOutsideBorders>0</bOutsideBorders>
			<TerrainMakesValids/>
			<FeatureMakesValids/>
			<ImprovementPillage>IMPROVEMENT_ENTANGLEMENT</ImprovementPillage>
			<ImprovementUpgrade>IMPROVEMENT_PILLBOX</ImprovementUpgrade>
			<TechYieldChanges/>
			<RouteYieldChanges/>
			<bGraphicalOnly>0</bGraphicalOnly>
		</ImprovementInfo>
 
Oh, and while I'm on the subject - where do you alter which corporations are competing and which can be placed side-by-side?
 
Doesn't say what? That it upgrades? But both improvements appear in the pedia, correct? And can you build both with your workers?

Edit: That's just determined by the resources, nothing more. Same resource = competing.

It doesnt say that it upgrades. They both appear. You can't build the trench of course, just like you cant build hamlet, you can only get it by building cottage and it improved
 
Excuse me but does anyone know where the button atlas is for religions and technologies? Or should I make individual .dds files and put them in? If this is the case, would I need alpha's enabled for the religion buttons? Because on the diplomacy screen and Civilopedia there is obviously no colored background from the religion icons.
 
Turns into barbed wire. ITs in a series of four barbed wire-->trench-->pillbox-->bunker system

Trench and pillbox turn into barbed wire on pillage, bunker system to pillbox. Tried them all and all worked like xml

:hmm: can you try to give the trench some yields, just for testing?

Excuse me but does anyone know where the button atlas is for religions and technologies? Or should I make individual .dds files and put them in? If this is the case, would I need alpha's enabled for the religion buttons? Because on the diplomacy screen and Civilopedia there is obviously no colored background from the religion icons.

Single buttons sure work, and yes Alpha is needed.
No idea if there's an Atlas, but the single files can be found in the packed .fpk, under Art\Interface\Buttons\religions
 
If you don't mind I have a question, in case you don't mind I'll skip the wait and add it here.

Is it possible to setup a Cultural flip scenario?
What I mean is lets say Paris is the only French city on the map and it is surrounded by other countries which are all appling cultural pressure on Paris.

The object is for France to survive for a set amount of TIME and has just enough defenders to protect itself but not enough to push outward to do anything about the situation. So this is a stalemate situation that will end in Paris submitting in a Cultural flip if something isn't done fast.

Now to add more players. across the map are friends of France that can provide help but I want to add the No Raze option to complicate things.

These friends can attack these cities but it doesn't slow the cultural aspect of what is happening, these friends can produce a Great Artist and gift it to Paris so Paris can build a Great Portrait which will surge Paris' cultural border outward.

So the game is won by flipping Paris or Paris assimulating those cities around it.

Is it possible to build something like this?

I mentioned above that friends of Paris can build Great Artists but so can (lets call the other cities Spain for example), Frances' allies have the disadvantage of a great distance but Paris' Culture is very strong equaling it all out.
I believe it is possible, but will require extensive Python programming.
 
How hard is it to insert and replace units? I was just thinking, I would love my normal BTS CivIV if I could just change a few things, stats and models and such. I've never done anything like it though, so I wouldn't know where to begin.

I essentially would like to add a pre-dreadnaught stage (instead of Ironclads) for all nations, and then replace standard models for Germany with German hardware in the WWII era part or the game. I imagine replacing models is a lot easier than adding something new entirely.

Ironclad= Brandenburg model
Destroyer= Pocket Battleship model
Battleship= Bismarck model
Fighter= FW 190 model
Bomber= He 111 model

I would love it if I could change Destroyers so that when you click on One unit, it shows 2 or 3 ships, indicating you are building a small flotilla rather than one ship.

All the stats could be the same, I don't want to change game balance. Is this a huge project beyond a novice, or something I could manage?
Rule 1: This is paramount. NEVER CHANGE THE CORE FILES.

Rule 2: Create a Mod folder with the name of your mod.
Rule 3: Copy the file you would like to be changed to this mod folder

e.g. If the original file is in "assets\XML\units\", copy it to "Mods\My Mod\assets\XML\units\"

Regarding your question about destroyers as a flotilla. This can be done in the mod as described above.

First you need to make the model smaller. This data can be found in XML\Art\CIV4ArtDefines_Unit.xml

After you have copied this file to your mod folder, open it up and then find the section called ART_DEF_UNIT_DESTROYER. You will see a parameter called <scale>. e.g. it may be 0.7. Change this to 0.25, which is about a third the size.

Second you need to edit the XML\Units\CIV4UnitInfos.xml. After making a copy as above, you then need to find the section called UNITCLASS_DESTROYER Look for the subsection <UnitMeshGroups>. In their you'll find 4 parameters you need to change <iGroupSize>, <iMeleeWaveSize>, <iRangeWaveSize> and in a smaller sub-subsection, <iRequired>. Change the numbers in those from 1 to 3.

For a description of all parameters and what they do go here - http://modiki.civfanatics.com/index.php/Main_Page

For tutorials on how to add units to here
http://forums.civfanatics.com/showthread.php?t=139721
http://forums.civfanatics.com/showthread.php?t=176460

More tutorials can be found here
http://forums.civfanatics.com/forumdisplay.php?f=177

This is probably the most important - How to create your own mod
http://forums.civfanatics.com/showthread.php?t=262402

Post any more questions you have in this thread
 
I have ... a very strange bug ... see screenshot spoiler ...

Spoiler :
attachment.php



ALTHOUGH the building "incubator" (UB for the swarm) is entered once in the BuildingInfos.xml and in the CivilizationInfo.xml, it will appear twice in the opening screen ...and I do not know why!


But in the Civilopedia all looks fine...

Spoiler :
attachment.php


If anyone needs the xml-code, i would post them...
 
If I begin a new project is this where I should ask to get the answers I need?

or should I find someone thats familiar with what it is I'm trying to do?

I've seen a set of instructions on how to get started but can not find them today,
I remember your supposed to make a mod folder but beyond that its an old memory :)
 
You can ask just here ;).
In general it's probably the best idea to begin with e.g. this tutorial. How to add stuff is critical for every mod, and if you understand how to add a unit you'll also probably get a good bunch of the other stuff.

For the specific project: :ack: I think kiwitt is dead right. It goes quite a bit away from the normal mechanics, you'll need real programming for that. It's a big task, not a small one.
 
You can ask just here ;).
In general it's probably the best idea to begin with e.g. this tutorial. How to add stuff is critical for every mod, and if you understand how to add a unit you'll also probably get a good bunch of the other stuff.

For the specific project: :ack: I think kiwitt is dead right. It goes quite a bit away from the normal mechanics, you'll need real programming for that. It's a big task, not a small one.

Ok Thanks.

But would loading a saved map and placing the cities where I want them and put Temples in each of the opposing cities accounting for a total of (4) cultural points
per turn while the buildings in Paris creates 3 cppt, over time and depending on what is built in the surroundings cities, the pressure is on, its just a matter of time/turns before you see how its working and Save.

The things I don't know is, do I need a mod folder for this, and how to make it for a multiplayer map for a 4~5 pr pbem scenario and hopefully no downloading required.
Eclipse
 
If you are not changing the core files. No problem there, if you simply edit a world builder file
 
I have ... a very strange bug ... see screenshot spoiler ...

Spoiler :
attachment.php



ALTHOUGH the building "incubator" (UB for the swarm) is entered once in the BuildingInfos.xml and in the CivilizationInfo.xml, it will appear twice in the opening screen ...and I do not know why!


But in the Civilopedia all looks fine...

Spoiler :
attachment.php


If anyone needs the xml-code, i would post them...
 
Hi,

beside the forest preserve I´ve now a jungle and a desert preserve in my mod. I would like to mod the national park so that the free specialist is granted for each forest, jungle or desert preserve. I´ve added some lines in the BuilingInfos.xml.

Code:
<ImprovementFreeSpecialists>
        <ImprovementFreeSpecialist>
          <ImprovementType>IMPROVEMENT_FOREST_PRESERVE</ImprovementType>
          <iFreeSpecialistCount>1</iFreeSpecialistCount>
        </ImprovementFreeSpecialist>
        <ImprovementFreeSpecialist>
          <ImprovementType>IMPROVEMENT_JUNGLE_PRESERVE</ImprovementType>
          <iFreeSpecialistCount>1</iFreeSpecialistCount>
        </ImprovementFreeSpecialist>
        <ImprovementFreeSpecialist>
          <ImprovementType>IMPROVEMENT_DESERT_PRESERVE</ImprovementType>
          <iFreeSpecialistCount>1</iFreeSpecialistCount>
        </ImprovementFreeSpecialist>
</ImprovementFreeSpecialists>

The part with the forest preserve is the original, the jungle and desert preserve are added. But it won´t work. The free specialist is still only granted for forest preserves.

Is there any other place where I have to add something? Thank you for your help.

Alrik
 
Back
Top Bottom