Modder's Guide to A New Dawn

Ok, i'll dig that out!

I'll try to remember too. I think either there was an obscure xml file that controls it (possibly one of the global defines?) or it was something that could be controlled from the SDK/DLL.
 
To say it all, i've tried three ways to fix that:
- Editing "Assets/art/Interface/citybar/citybar.nif" (in the fpk) but each time i open it with nifscope and i save it the progress bar get in front of the circle (which indicate city level). I'm pretty sure it don't reside there as there are only markers to tell where the text should be centered, no box or whatever.
- Editing the bug file which adds the label "productiontext" but i've figured out it's about the main screen and not the city billboard.
- Editing the DLL but i've only found functions that define the string and not the graphical space.

However, as you've increased the billboard width, i might have missed something. I've tried to look at the logs but no luck.

The idea this box is hardcoded crossed my mind, because the game don't use font rendering by default.
 
So I tried create a module as part of a planned modmod modifying the Civ4CultureLevelInfo.xml to change wonders limit but I'm doing something wrong, because the play test showed nothing is changed regarding culture level. Ihave no idea what's wrong :confused:

Here's a piece of the code:

Spoiler :
<CultureLevelInfo>
<Type>CULTURELEVEL_LEGENDARY</Type>
<bForceOverwite>1</bForceOverwrite>
<Description>TXT_KEY_CULTURELEVEL_LEGENDARY</Description>
<iCityDefenseModifier>50</iCityDefenseModifier>
<SpeedThresholds>
<SpeedThreshold>
<GameSpeedType>GAMESPEED_ETERNITY</GameSpeedType>
<iThreshold>720000</iThreshold>
</SpeedThreshold>
<SpeedThreshold>
<GameSpeedType>GAMESPEED_SNAIL</GameSpeedType>
<iThreshold>600000</iThreshold>
</SpeedThreshold>
<SpeedThreshold>
<GameSpeedType>GAMESPEED_MARATHON</GameSpeedType>
<iThreshold>480000</iThreshold>
</SpeedThreshold>
<SpeedThreshold>
<GameSpeedType>GAMESPEED_EPIC</GameSpeedType>
<iThreshold>360000</iThreshold>
</SpeedThreshold>
<SpeedThreshold>
<GameSpeedType>GAMESPEED_NORMAL</GameSpeedType>
<iThreshold>240000</iThreshold>
</SpeedThreshold>
<SpeedThreshold>
<GameSpeedType>GAMESPEED_QUICK</GameSpeedType>
<iThreshold>180000</iThreshold>
</SpeedThreshold>
<SpeedThreshold>
<GameSpeedType>GAMESPEED_BLITZ</GameSpeedType>
<iThreshold>120000</iThreshold>
</SpeedThreshold>
</SpeedThresholds>
<iCityRadius>3</iCityRadius>
<iMaxWorldWonders>6</iMaxWorldWonders>
<iMaxTeamWonders>9</iMaxTeamWonders>
<iMaxNationalWonders>6</iMaxNationalWonders>
<iMaxNationalWondersOCC>8</iMaxNationalWondersOCC>
</CultureLevelInfo>


The module is loaded for sure, because I see my changes regarding the buildings I made.

Can someone give me some hint what I did wrong? :confused:

Module also atached.
 

Attachments

  • War on Earth.zip
    22.8 KB · Views: 150
Well, my initial guess was that something in the SDK was storing or caching the old value. But a quick look at the CvCity code and I could see it looked up the XML value directly and didn't store anything for the wonder limit.

My next guess is that someone implemented the culture level tags incorrectly, so that modules could not overwrite the values. There is specific code for every tag that allows modules to reset the regular XML values, and if it is forgotten, modules can not overwrite the values correctly. I checked and indeed, that code is missing. I will add it to the SDK in the next revision I upload, probably later tonight.

Hopefully that will fix the problem.
 
A very great thanx for it. Thank you :)

EDIT:
Maybe I should post this one to the bugs thread or other...

Would it be possible to display somehow in the city screen how many WWs and NWs a city can build in its actual conditions (culture level + buildings bonus)? If it's not a big work of course.
 
45°38'N-13°47'E;13696148 said:
I guess I was responsible for that but I didn't know about modular loading.

The code says Jooyo. Not sure if that means it was from him directly, or merged.

Would it be possible to display somehow in the city screen how many WWs and NWs a city can build in its actual conditions (culture level + buildings bonus)? If it's not a big work of course.

Sure.
 
Sogroon, I am hoping the changes in Rev 889 fix the issue you were having with modular XML. If not, let me know and I can dig in further.
 
Sogroon, I am hoping the changes in Rev 889 fix the issue you were having with modular XML. If not, let me know and I can dig in further.

A great THX for it. :)
Will try it later.
 
Sogroon, I am hoping the changes in Rev 889 fix the issue you were having with modular XML. If not, let me know and I can dig in further.

Now it works as intended. THX :)
 
I have a question regarding... I don't know how to call it... alerts when I build unit or building. When my city finish construction there's this alert on top of screen (for example "Rome has finished barracks"). And there's small sign with barracks icon next to my city which constructed it. Since it has to be added in mod (I do not recall such thing in vanilla BTS) I'd like to ask you how to turn it off. I play singleplayer only with popups at the beginning of the turn. So I know perfectly what I built and where, I do not need second confirmation. Actually it can be quite annoying when I built a lot of things in my cities in specific turn, because then I'm flooded with such alerts (all with this sound played...) which can come one after another for quite a some time...

So - in short - (I hope you know what I'm talking about exactly) how can I turn it off?
 
I know what your talking about, I used to have that, now I don't.

At a guess, its don't show replace buildings, or an option like that.

I'll get back on what I can find. List is on right of screen.

I only get the sound and a list of builds. I don't get the long list of builds + icons I used to get.

*Edit* I tried a couple of things, nothing seemed to bring it back, so ???
 
Any building with <iEspionageDefense> above zero will get Helps Thwart Rival Spies in its game text.

Aha! THX

One more: there is a iLandmarkHappiness code in first post. What is a "landmark"? :confused:
 
Aha! THX

One more: there is a iLandmarkHappiness code in first post. What is a "landmark"? :confused:

Landmarks only exist if you turn on the "personalized map" game option, which generates random names for locations on the game map. Landmarks are certain types of locations for that option.
 
I am working on a new module for some time by now and have a few questions about the XML in CivicInfos. If someone could explain how do they work I'd be thankful.

<iRevIdxLocal>
<iRevIdxNational>
What's the difference between local and national rebelliousness? I mean it's clear when applied to a building, but in a civic?

<iRevIdxDistanceModifier>
This seems mostly clear: Penalty grows with distance, right?
Does it also true about a bonus? Does that also increase?
Is it only affected by the capital, or other government centers too?

<iRevIdxHolyCityGood>
<iRevIdxHolyCityBad>
Bonus for owning your state religions holy city and penalty if it's owned by a civ with a different state religion, right? Is it neutral, when holy city is owned by someone with the same state religion?

<iRevIdxSwitchTo>
Seems clear: One time bonus/penalty.

But the following ones are rather mysterious for me:
<fRevIdxNationalityMod>
<fRevIdxBadReligionMod>
<fRevIdxGoodReligionMod>
<fRevViolentMod>
<iRevReligiousFreedom>
<iRevLaborFreedom>
<iRevEnvironmentalProtection>
<iRevDemocracyLevel>
<bCommunism>
<bFreeSpeech>
<bCanDoElection>

What do these do? :confused:
 
I am working on a new module for some time by now and have a few questions about the XML in CivicInfos. If someone could explain how do they work I'd be thankful.

<iRevIdxLocal>
<iRevIdxNational>
What's the difference between local and national rebelliousness? I mean it's clear when applied to a building, but in a civic?

<iRevIdxDistanceModifier>
This seems mostly clear: Penalty grows with distance, right?
Does it also true about a bonus? Does that also increase?
Is it only affected by the capital, or other government centers too?

<iRevIdxHolyCityGood>
<iRevIdxHolyCityBad>
Bonus for owning your state religions holy city and penalty if it's owned by a civ with a different state religion, right? Is it neutral, when holy city is owned by someone with the same state religion?

<iRevIdxSwitchTo>
Seems clear: One time bonus/penalty.

But the following ones are rather mysterious for me:
<fRevIdxNationalityMod>
<fRevIdxBadReligionMod>
<fRevIdxGoodReligionMod>
<fRevViolentMod>
<iRevReligiousFreedom>
<iRevLaborFreedom>
<iRevEnvironmentalProtection>
<iRevDemocracyLevel>
<bCommunism>
<bFreeSpeech>
<bCanDoElection>

What do these do? :confused:

Local rebelliousness affects all citizens in cities, National rebelliousness affects cities with foreigners. It is short for Nationality.

DistianceModifier is a percentage multiplier (so 50 = 1.5 x base), and increases the distance from capital revolution index penalty. Government centers (like the forbidden palace) do not affect the distance calculation, but do affect the penalty (decreases it by half). To be clear - a city with a forbidden palace has 1/2 the distance penalty as normal. A city next to the city with the forbidden palace has the base distance penalty to the capital city, not forbidden palace city.

With the holy city stuff, you are dead on. It does check to see if another player owns the holy city, and you get no penalty (neutral) if they have the same religion as you.

fRevIdxNationalityMod is a floating point modifier for the nationality index. Later in development, the RevMod developers decided they liked floats better than integers for percentages. So here you would put 1.5 as a value, and it would increase the nationality index affect by 1.5 x base.

Good / Bad religion should be clear, given the above.

Violent mod affects the chances revolutions will be violent (vs peaceful asking you to resign, or chance civics, etc).

Religious Freedom controls how much non-state religion rev indexes hurt you. More religious freedom, less non-state religions hurt you.

Labor Freedom determines the likelihood you will get a request for emancipation or civic request to a more free civic (say, away from Slavery)

Environmental Protection is the same as above, but regarding the environment. To be fair though, I have never seen this sort of option appear in any gameplay.

Democracy Level tells the revolutions mod how close the civic is to offering universal suffrage. 10 = universal suffrage. 0 = no enfranchisement. Influences how revolutionaries react to revolts.

bCommunism marks the civic as being communistic, and may cause communistic revolutionaries to demand to switch to that civic. Rare.

bFreeSpeech marks the civic as allowing freedom of speech, which may cause democratic revolutionaries to demand to switch to that civic. Rare.

bCanDoElection marks the civic as allowing elections, and if you are running this civic, revolutionaries may trigger an election where if you lose, you cede power.

Control-F in the Revolution.py file reveals much more details if you are curious.
 
[...]
DistianceModifier is a percentage multiplier (so 50 = 1.5 x base), and increases the distance from capital revolution index penalty. Government centers (like the forbidden palace) do not affect the distance calculation, but do affect the penalty (decreases it by half).

To be clear - a city with a forbidden palace has 1/2 the distance penalty as normal. A city next to the city with the forbidden palace has the base distance penalty to the capital city, not forbidden palace city.
[...]

That's definitely not how I thought the revindex worked.
Would it be possible to make it affect cities near the government centers as well? (Similarly to how 45° just fixed the unhappiness from distance issue)
 
That's definitely not how I thought the revindex worked.
Would it be possible to make it affect cities near the government centers as well? (Similarly to how 45° just fixed the unhappiness from distance issue)

Probably. I believe it works the way it does mostly because there is not an easy way to find the distance to nearest government center, whereas there is an easy way to find the distance to the capital city.
 
Top Bottom