Quick Modding Questions Thread

@ DanielUA: that's about it. What will be missing will ... :hammer2: ... soon enough! :D
 
You don't "debug a Worldbuilder file". Worldbuilder is mainly Python, works fine enough and should show what you have available in your mod. Edit: you probably mean *.CivBeyondSwordWBSave file but anyway, there is no tool to help you: it's test-crash-change and try again.

You can be "defeated" because certain xml tags are missing in the mod or because there are some inconsistencies in the scenario file or contradictions between the xml and the scenario. I suppose you have Python exceptions enabled? Any error messages that can help you? If it's a C++ error crashing a scenario at the start, it would crash any other game started with it.

It's an RFC modmod and I haven't gotten useful answers in that forum, I do have Python exceptions turned on, and I have gotten no useful error messages.
 
I just started modding. Im creating new buildings with success.

Im attempting to create a couple of National Wonders, but I cannot find in the buildinginfo's where it denotes that "x" building can only be built once.

How do I turn a building into a National Wonder? And of this matter, how do I denote a World Wonder building? The "teamshare>1<" line seemed to have something to do with it, however when I manipulated it I did not get the expected results and noticed no change in Civopedia.

Knights Arena, +4 exp to mounted, baby!
 
Nevermind, I found it!!! I am too good at this modding stuff, and by that I mean at least non-******ed.
 
How do I change the commerce yield of base terrains?

I simply want to change coast gold yield to -1 gold, and the same thing for the ocean yield. The terrain folder doesnt have what Im looking for.
 
\Beyond the Sword\Assets\xml\Terrain\CIV4TerrainInfos.xml

it's in there

Then search for TERRAIN_COAST and find the <Yields> Tag. Change the third <iYield> to the value you want. (The order is :food:, :hammers:, and :commerce:.
 
If you want to give to terrain negative value (-1, -5, -10), terrain will always return you 0. You can't have negative value on world map, but if your terrain is set to -2 it will give you 0 on map, but if you have some improvement on this terrain which give you +3 and your terrain give -2, you will get +1 on world map from this terrain.
 
How do I add +1 movement for roads when a technology is researched? For example, when you finish researching Engineering you receive +1 road movement. I want to add +1 road movement to Steam Power tech.

Thanks.
 
What exactly is entailed in modifying the AI's behavior (such as war propensity, being more pleased or less pleased with a similar religion, etc)? Which file/files should I be looking in? Is there a particular thread on this forum which goes over it?


Thanks.
 
Does anybody know where I can find the mod which adjusts starting locations on random maps to fit in with the civilisation in question - for example, having civs with naval UUs start near the sea, the Aztecs start near the jungle, and so on?
 
Quite a complicated question I think. I'm currently making a mod about the Ancient Middle East, which is probably going to be my biggest project ever.
In my mod I have a new concept: The Pharaoh. Egypt starts with the pharaoh, who has some special abilities, only one pharaoh is allowed in the world (a world unit). However, Egypt could be attacked and conquered by barbarians or enemy nations, so the pharaoh could be destroyed. Therefor I have given the pharaoh the ability to instantly construct "the pharaoh's palace". The pharaoh disappears, but with some python there immediately appears a new pharaoh. The palace is also buildable. However this could be abused by the player or possibly the AI, who could just build many palaces, resulting in many pharaohs... Any idea how to restrict the spawning of a pharaoh when there is no pharaoh currently? Sounds very complicated, doesn't it? Maybe there is just a simple XML solution?
 
You don't seem to be very clear with the concepts of your Pharaoh unit.

Is he a World unit or a National (Egypt only) unit? Strictly speaking, an XML World unit with one instance can only be created once in a game, an XML National unit with one instance can be created several times but can only appear once at a time in the game.

Is your Pharaoh's Palace a prerequisite for a Pharaoh unit? Why is it buildable if a dying Pharaoh automatically creates on? Why could the AI build several Pharaoh's Palaces if it's a limited national building for Egypt?

A contradiction: "The pharaoh disappears, but with some python there immediately appears a new pharaoh." Later you say: "Any idea how to restrict the spawning of a pharaoh when there is no pharaoh currently?"
 
You make it sound more complicated than it should be.
You should just make him a Unique Unit of the Egyptians and a National Unit with only one instance at a time allowed. Make him buildable with the Pharaoh's Palace, which should be the Unique Building version of the Palace for the Egyptians. Give him the ability to build this building and the old Palace should disappear when he does so.
 
I would like for him to remain a world unit, I would like for a movie to play when you build him: http://forums.civfanatics.com/showpost.php?p=12614004&postcount=445.
I would also prefer that other civs are able to build the pharaoh and "claim the title" of pharaoh. When you build or capture a world unit, a message appears, which I will edit to "(leadersname) has become the pharaoh!".
Also, the Pharaoh's Palace should be buidable by other civs, when they control Egypt of course, so you won't see pharaohs in Greece or something. An easy solution would be to require a resource to build the Pharaoh's Palace. Would it work if I place a unique resource underneath a city, maybe something like "Holy Relics of Waset" or something, which would be under Waset (Thebes) of course.
If we can make a movie play, a message appear when the pharaoh is build and we can solve the problem of multiple pharaohs, that would be great.
Also, when the Pharaoh's Palace is built, the palace of Egypt just stays in the former capital (Men-nefer in most cases). Any idea how to solve that?
A contradiction: "The pharaoh disappears, but with some python there immediately appears a new pharaoh." Later you say: "Any idea how to restrict the spawning of a pharaoh when there is no pharaoh currently?"
Oops! You're right! I meant when there IS a pharaoh unit in the world.
Strictly speaking, an XML World unit with one instance can only be created once in a game, an XML National unit with one instance can be created several times but can only appear once at a time in the game.
I used a python code to make another pharaoh disappear the moment the Pharaoh's Palace is built.
This is so confusing I'm actually confused myself...:lol:
Is your Pharaoh's Palace a prerequisite for a Pharaoh unit? Why is it buildable if a dying Pharaoh automatically creates on?
One of the special abilities of the pharaoh is to relocate the capital to another city if the player (or the AI) wants to do that, the pharaoh shoud remain a unit until the game ends. Maybe that's overpowered, but Egypt is quite important in the mod and is supposed to be a major leading nation in the game.
I also plan to have him be able to be settled in the city as the pharaoh, which is supposed to give 5 extra gold, culture and happiness in the city where he is settled.
The gold and culture part isn't difficult, but any idea how to have 5 extra happines when he's settled in a city? Great specialists are also able to be "de-settled" in my mod with python.
Or would it be possible to have him just in the city, but not settled and provide 5 extra gold, culture and happiness?
 
Spoiler :
One of the special abilities of the pharaoh is to relocate the capital to another city if the player (or the AI) wants to do that, the pharaoh shoud remain a unit until the game ends. Maybe that's overpowered, but Egypt is quite important in the mod and is supposed to be a major leading nation in the game.
I also plan to have him be able to be settled in the city as the pharaoh, which is supposed to give 5 extra gold, culture and happiness in the city where he is settled.
The gold and culture part isn't difficult, but any idea how to have 5 extra happines when he's settled in a city? Great specialists are also able to be "de-settled" in my mod with python.
Or would it be possible to have him just in the city, but not settled and provide 5 extra gold, culture and happiness?
Apr 15, 2014 05:47 PM

There is a specialist enhancement mod, that allows specialists to add health and happiness to cities, you should be able to find it in the mod comp section.
This will allow you to make the pharoah a great person specialist.

You should be able to work out the specialist building by looking at the great scientist and founding the academy, not sure how that works... but that would let the pharoah found his palace.

If this is a scenario, where cities are already built, if you want the palace to only be buildable in a certain city (thebes) you could place a prereq building in there, that is required to build pharaohs palace.

The circuitous nature of your design will make it very complicated to do everything, you want to start with pharaoh,
you want the palace to spawn pharoah,
and pharoah to spawn the palace,
and the palace to destroy pharaoh.
You also want pharoah to be able to settle in cities.
You also want the palace to be buildable without pharoah,
but also be restricted in location... How many places do you want to restrict it to, 1 or more?
Is this a scenario with pre-placed cities, or do you found all cities yourself (with ai too)

Basically the answer to these quetions will change how you go about making it all work.

For example, if you want to restrict the palace location to 1 place, then a building prereq is what you want. (if the scenario has a prebuilt city location)

If you want it to be only buildable in a town that was originally founded by egypt, I have some python that should be moddable to do that, by adding a prereq building to every town that egypt founds.

If you use a resource prereq, then when that resource is connected to the trade network, you will be able to build the palace anywhere that is connected to the trade route, potentially even greece.
 
And this doesn't qualify as a "Quick modding question" anymore! :D

I suggest that you open a new thread with your project in progress in the Creation & Customization section.
 
Top Bottom