Modder's Guide to A New Dawn

A question about the "Realistic Timescale" research option.
How does it work? I mean how do you define what is the " right " date of a tech?
-Each tech individually?
-Column by column?
-Something else?

What happens if I add some more techs in a module? I am planning a stone age modmod, just to slightly expand the ancient era.
 
I've scaled erainfo XML a long time ago. Each era should last more or less the same number of turns, plus I've left some turns at the end for future era (10 turns at Blitz, scaled for gamespeed). Hence at 2/7 of the game turns you should always be around 300-500 AD, at 5/7 of the game length in terms of turns you should be around 1940 AD, which is when classical and industrial era should end respectively, and so on. RT simply checks if the tech you're researching is appropriate for the year (Era) you're currently in, helping you if the tech you're researching is an old one, slowing you down if you are researching a more advanced tech.
Adding a couple of techs shouldn't make any difference. Adding an entire era is another problem anyway.
 
There is a "bug" about how modules work.
A modular file can change (almost) any value of (almost) anything, but cannot erase a value.
For example:

If I want to edit Stonehenge by a modul:

I can change
PHP:
<FreeBuilding>BUILDINGCLASS_STANDING_STONE</FreeBuilding>
to
PHP:
<FreeBuilding>BUILDINGCLASS_SOMETHING_ELSE</FreeBuilding>
So the Stonehenge give a free Something else building.

But I cannot erase it by
PHP:
<FreeBuilding>NONE</FreeBuilding>
it will still give a free Standing stone.

Also:
PHP:
			<bMapCentering>1</bMapCentering>
cannot be changed by
PHP:
			<bMapCentering>0</bMapCentering>
It will still center the map.

So my problem is that I have several modmod ideas, which includes some "value nullifying". I don't want to edit the main files and I cannot do it the modular way either.

So my question/wish is if this mechanic could be fixed/changed so the game would recognize >0< and >NONE< too? (If it's not a big trouble for the devs to do and if it is possible at all.)
Or if there is some other trick I don't know about, please let me know.

Thanx
 
Sogroon, this is known, and was fixed years ago. You have to use bForceOverwrite in a module entry. So at the top of a building entry, add <bForceOverwite>1</bForceOverwrite>. It completely clears any previously loaded values and replaces them with the module values.

Edit: bForceOverwrite was originally coded by Xienwolf and some brief discussion here: http://forums.civfanatics.com/showthread.php?t=372840
 
@Sogroon: Don't you think there is a way to force audio values override with that trick ? I mean, to use moremusic without altering default files.
 
@Sogroon: Don't you think there is a way to force audio values override with that trick ? I mean, to use moremusic without altering default files.

I dunno. I read that it's not possible. Maybe Afforess knows a way, but I don't.
 
@Sogroon: Don't you think there is a way to force audio values override with that trick ? I mean, to use moremusic without altering default files.

Are you talking about the XML files in the /audio xml folder, or the references to audio entries in other XML (buildings, units, etc)? Because the /audio XML can not be made modular due to limitations in the game engine.
 
Because the /audio XML can not be made modular due to limitations in the game engine.
I was refering to these as Sogroon develops a modules which adds new music to the game. It needs to replace default audio xml because of this.
 
Is there any other xml type than audio that cannot be injected ?
 
I have rewritten the WocInstaller.jar for audio xml in C++ (no java dependency). Here's the tool for anyone to try. Just extract in Assets/Modules/ and execute, it will look for audio files in Modules/ and will inject these in Assets/XML/Audio.

This tool will replace woc on the repository when mod support will be entirely done.
 
I'll continue the mod support discussion from Sogroon's addons here.
I've came to the idea that modmods should have a describing file that could be used later.
The file is named "modInfo.xml" and is put at the root of the modmod Modules/ folder. Here's an example for MegaCivPack current version.

Code:
<?xml version="1.0"?>
<root>
    <name>Mega. Civ. Pack</name>
    <version>1.3.5</version>
    <extrafiles>
    <!-- Add here all the files located outsite the mod Modules/ folder which are part of the mod. This will allow mod uninstallation. The parameter "default" should be set to 1 if the listed file replace a default mod file (= can't remove it without causing bug). Set it to 0 if this is safe to remove it. -->
        <file default="0">Assets/MCP0.FPK</file>
        <file default="1">Assets/Python/Revolution/Gameready/DynamicCivNames.py</file>
        <file default="0">Assets/XML/Text/MCP_BUILDINGS.xml</file>
        <file default="0">Assets/XML/Text/MCP_BUILDINGS_PEDIA.xml</file>
        <file default="0">Assets/XML/Text/MCP_CITIES.xml</file>
        <file default="0">Assets/XML/Text/MCP_CIVILIZATIONS.xml</file>
        <file default="0">Assets/XML/Text/MCP_CIVILIZATIONS_PEDIA.xml</file>
        <file default="0">Assets/XML/Text/MCP_DIPLOMACY.xml</file>
        <file default="0">Assets/XML/Text/MCP_LEADERS.xml</file>
        <file default="0">Assets/XML/Text/MCP_LEADERS_PEDIA.xml</file>
        <file default="0">Assets/XML/Text/MCP_MISC.xml</file>
        <file default="0">Assets/XML/Text/MCP_UNITS.xml</file>
        <file default="0">Assets/XML/Text/MCP_UNITS_PEDIA.xml</file>
    </extrafiles>
</root>

It contains basic infos (name, version) and, more important, a list of files located outside the Modules/ folder. This will allow the updater to know which files to preserve during the update (the mod folder inside Modules/ is automatically preserved).

The parameter "default" will allow for future mod uninstallation handling. If the modfile replace a default file, set it to 1, so when the mod will be uninstalled, this file will be downloaded again. If set to 0, that mean the file is only modmod related, so it should be removed safely.

If there is no modInfo.xml in the modmod folder or if there is no file listed in modInfo.xml, any file outside Modules/ folder not listed here will be removed on update.
 
I have a dilemna about default file replaced by mods:
- Should the updater avoid to update them, risking to generate bugs by having not updated file version ?
- or Should the updater try to overwrite the modmod file by the upstream version when a new update is released ?
 
@team:
Since i've enabled direct font rendering on city billboards for non-default languages (allow the font not to depend on GameFonts.tga), there is an invisible box which cut city name text and production text left and right.
After trying to reduce the font size, i've figured out that this box has exactly the size of the default city box size (from BTS). The billboard was enlarged in Rise of Mankind and i can't figure out how it was done.

Is there someone that knows where the parameters that control the billboard width are located ?
 
I think this might have been done on RoM, before Afforess.
 
I am pretty sure I enlarged it, but it was probably in 2009 or 2010. I don't remember how, but I bet it is in the svn somewhere.
 
Ok, i'll dig that out!
 
Top Bottom