PDA

View Full Version : How to negate and replace the Wonder Effects



Dol Guldur
07-06-2005, 00:37
Modding Resource Header

Title: How to negate and replace the Wonder Effects, formerly Wonder Effect Negation & Replacement

Posted by: Dol Guldur

Modding area: Campaigns (Wonders)
Required programmes: Notepad (or other text editor)

Optional Tools: Guide: The Complete EDB Guide (WIP) (https://forums.totalwar.org/vb/showthread.php?t=50439)
Summary: This tutorial demonstrates an ingenious method of modding individual Wonder effects by adding counteracting bonuses to the core buildings in those provinces. Some experience of modding export_descr_buildings is of use.



NEGATING AND REPLACING WONDER EFFECTS

by Dol Guldur



Newbie modders are forever asking to change the effects of Wonders and more experienced modders are forever informing them they are hardcoded.

They are quite right, but there are some inventive ways to work around such obstacles. The most basic of these ways I have outlined below.

Let's take an example:

Mausoleum at Harlicarnassus (reduces building construction time of all building types by 20%)

The modder decides that in his mod the Mausoleum does not have any such effect, rather it provides a 20% health bonus to all the owning faction's settlements.

We must, then, negate the effect and add another.

The Wonder effect, in building effect terms, is:

construction_time_bonus_military bonus 20
construction_time_bonus_defensive bonus 20
construction_time_bonus_religious bonus 20
construction_time_bonus_other bonus 20

The replacement effect, again in building effect terms, is:

population_health_bonus bonus 4

(for more source information on this please read The Complete EDB Guide for Rome:Total War (https://forums.totalwar.org/vb/showthread.php?t=50037))

Now, here is how to implement the negation and replacement, step by step:

1. Open up your descr_regions.txt file (in your campaign folder) and add the hidden resource of "mausoleum" to the Wonder's region (Lycia in this case).

2. Open up your EDB file and add "mausoleum" to the hidden resource declarations line near the top of the file before the building trees begin

3. Add the following to each of the five levels of the core_buildings (the first building tree in the EDB file). Place it just after the Capability block of each, on th eline beneath that block's closing bracket...


faction_capability
{
construction_time_bonus_military bonus -20 requires hidden_resource mausoleum
construction_time_bonus_defensive bonus -20 requires hidden_resource mausoleum
construction_time_bonus_religious bonus -20 requires hidden_resource mausoleum
construction_time_bonus_other bonus -20 requires hidden_resource mausoleum
population_health_bonus bonus 4 requires hidden_resource mausoleum
}

All building effects in a faction_capability block will be applied faction-wide (like most of the effects of Wonders). The first 4 lines above negate the original effect of the Mausoleum, the last line adds the new effect.

Every settlement level must have a core_building, so every settlement is covered by putting this code in all the levels. The requirement of the hidden resource limits the effects from activating until the core building in Lycia is captured which is synonymous with the Wonder itself being captured.

4. Edit the Wonder's text description to reflect the new effects. The file you need to alter is: landmarks.txt (text folder in the data folder). Be sure, if nothing else is altered, you change the text under the {mausoleum_effects} tag.

5. delete the map.rwm file!

Of course, you cannot negate all of the different Wonders' effects, but the more astute among you will see that there is a lot more you can do with the above than I have said, but this will suffice for most people's needs.

Should you wish to discuss this tutorial more please do so on the EDB discussion thread at: https://forums.totalwar.org/vb/showthread.php?p=828635#post828635


Dol Guldur is a member of The Fourth Age: Total War mod.

Barbarossa82
12-04-2006, 17:41
This is clever.
I don't suppose you happen to know if there are equivalents to other wonder abilities that could be put into export_descr_buildings? Because I would absolutely love to figure out the code that is causing the Great Pyramids to remove the culture penalty from egyptians. Could it be something like

faction_capability
{
remove_culure_penalty { egyptian, }
}


?

Dol Guldur
12-04-2006, 18:27
I think that effect is hardcoded I'm afraid.

Barbarossa82
12-04-2006, 21:04
Ah, that's a shame. Thanks for your help and the guide anyway.

Makanyane
09-15-2007, 12:51
Note: If you are using wonders in BI they do not generate their previous (RTW) hard-coded effects. So effects do not need negating but they certainly do need replacing! See this thread
https://forums.totalwar.org/vb/showthread.php?t=55809
for discussion.