How do I let other players make bunkers ?

kiwitt

Road to War Modder
Joined
Jan 11, 2006
Messages
5,600
Location
Auckland, NZ (GMT+12)
In the setup map the French build the Maginot Line of Fortresses which is fine, but I would like to have other players be able to build them in cities, albeit it a high cost them. I would like to make the cost prohibitively expensive for most players so that it would take at least a year to build for an average city.

This would allow cities like Warsaw, Leningrad, Moscow and Stalingrad to have defences to withstand attacks for some time. i.e. sieges,

http://en.wikipedia.org/wiki/Battle_of_Warsaw_(1939)
http://en.wikipedia.org/wiki/Battle_at_the_Afsluitdijk
http://en.wikipedia.org/wiki/Siege_of_Leningrad
http://en.wikipedia.org/wiki/Siege_of_Tobruk
http://en.wikipedia.org/wiki/Battle_of_Bataan
http://en.wikipedia.org/wiki/Battle_of_Sevastopol
http://en.wikipedia.org/wiki/Battle_of_Stalingrad

and others.

In addition the German's could build them in coastal cities e.g. the Atlantic Wall.

(see http://en.wikipedia.org/wiki/German_World_War_II_strongholds)

I looked at the option of World Builder and simply add them in where and when I thought they should go, but I would prefer that they were built as and when required later in the game.

Once I can make them buildable, I can customise the cost to reflect a long build time, and the required techs, to minimise their occurrence by the AI.

NOTE: I have already editted the unit texts to say "Fortifications" instead of Maginot Line
 
Hmm, I think that you would have to go into CivilizationInfo.xml and add UNITCLASS_WW2_BUNKER into the list of all the possible units each civ can build. Make sure to add it in the pattern that all the other units are added, with the specific unit underneath.
I'm pretty sure that would work, although I havne't tried it yet. Hope it does though.
also, I've been playing the game with your modifications and I find it absolutely amazing! everything seems balanced pretty well. Keep up the good work!
 
Thanks for you comments. I am enjoying play testing my changes as well.

I have now added the "Maus" Super Heavy Tank.

I'll experiment with that info. Thanks.
 
ooh, a Maus...
That would be awesome! On the other hand, too bad there aren't any Panther graphics in the mod already, those tanks were awesome. Not to mention the best things the Germans fielded in large numbers.
I was just playing a game with your tweaks (and a few of mine, like giving Allies a buffed industrious trait that gave +1 hammer on a tile with 2 or more) and everything seems to be like history! Germans are approaching Stalingrad and Leningrad as the winter creeps down while I (the UK) can only build up on my island for an assault while maintaining air superiority. I almost lost the Battle of Britain too. Great fun!
I've never seen the Germans properly dominate like this before. I just have to hope Dale's tweaks with the naval invasion AI mean alot of Shermans are going to land in North Africa soon...
 
The list in Civ4CivilizationInfos.xml is not a list of buildable units. It's a list of buildable unique units. If you put 'None' as the unit-type under the unit-class in that file, you have said that no unit with UNITCLASS_WW2_BUNKER is buildable, meaning civs can't build them.

Looking at the code (3.17 UE), it seems they have a cost of 125 already. But they aren't buildable in 3.17 UE.

Perhaps it's hardcoded in Python or C++?
 
Perhaps it's hardcoded in Python or C++?

This is what I suspect too. Making the option of building them rather difficult as I can not do coding. I have tried all types setup.

It even says for Acquired Tech 1 = Can build Fortresses, but no such luck

It seems unusual to limit the construction, that way. An edit of the UnitClass file would achieve the same result. As the UnitSchema are limits to the DLL, I can not add any new units only modify existing ones.
 
A search of my 3.19 RTW UE folder, which I just got to work, revealed no trace of "WW2_BUNKER" or "BUNKER" present in any file under the Python folder or the CvGameCoreDLL folder (or their subfolders).

What's more, a full search of the entire RtW folder for "Bunker" revealed the name existed in the following files:

An art folder
CIV4ArtDefines_Building.xml
CIV4ArtDefines_Unit.xml
Six game text files.
CIV4UnitClassInfos.xml
CIV4UnitInfos.xml
Two more art files

Perhaps you could use a scripted event to spawn bunkers in a city using python? Or start fresh with a new UnitInfo and make a new Bunker unit, naming it differently?
 
Good idea ... I'll give that a go.

I will probably have no "Modern Artillery" units in my mini-mod. I'll use this unit class and modify the unitinfos file to change it's parameters to be equivalent to a Bunker i.e. copy the unit Bunker artwork links and call it something like "Fortress" in the Text files. I should also change the costs.

This will add the benefit of giving it ranged combat albeit static.
 
I have now created 3 new units

1) Pill Boxes <- Replacing Anti-Tank
2) Anti-Tank Defences <- Replacing Tank Destroyers
3) City Fortifications <- Replacing Modern Artillery

All these units were not required in my mini-mod so I modified them out.
 
Top Bottom