1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

The Extended WorldBuilder

Discussion in 'Rhye's and Fall - Dawn of Civilization' started by merijn_v1, Nov 5, 2017.

  1. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,633
    Location:
    The city of the original vlaai
    As you might have noticed, DoC uses a different worldbuilder than vanilla BTS. The base of the worldbuilder is the marvelous Platybuilder, which greatly improves the utility of the worldbuilder by adding a lot of new functions. The worldbuilder of DoC has some new functions, which are mostly related to features unique to DoC.

    Even with the new functions, the worldbuilder is not complete. If you have suggestion how to improve the worldbuilder, please let us know. Maybe you can think of features we didn’t think of ourselves. Or you have an idea how an existing features can be improved which improves the usability of the feature. Feel free to ask question about the worldbuilder if you have them.


    When I think of the worldbuilder, I think it has 3 main purposes. The first is the one most players use, which is editing/customizing the current game. This can be moving/placing/deleting units, editing cities etc. I think the worldbuilder should give the player the option to change as much as he desires so he can customize the game to their own preferences.

    The second purpose of the worldbuilder is to monitor game progress. Many open the worldbuilder when a civ spawns to see the current state of the world. It is quite common that people open the WB when they just have spawned to see the current state of the world. From a player perspective, monitoring the game does not get much further, but from a modders perspective, a lot more can be monitored with the worldbuilder. The worldbuilder can be used to see what impact a change has to the game. This is the main reason why I included the StoredData editor. This allows the modders to easily view the current variables in the StoredData, which can help tuning certain functions.

    The third purpose of the worldbuilder is to help developing the mod itself. A clear example of this are the export functions for the stabilitymaps etc. Changes can be made on the map itself, just like you can place improvements with the WB. The export converts the changes to python code which can directly be copy-pasted into the correct python files.

    New features:
    GameInfo Screen:

    - Ability to enable/disable secondary civs
    - Ability to DoC specific game options (like no stability, no plague etc.)
    - Ability to change certain DoC elements (like turns to next congress)

    Player Mode:
    - Starting plot resembles spawn plot defined in Areas.py
    - Ability to change civ-specific modifiers in PlayerData screen

    Map Mode:
    - New option to select all tiles in a certain region when using the large brush
    - Moving/Duplicating cities use the CNM name for the new location, if available

    3 New Modes:

    StoredData Editor Screen
    RFC DoC has many variables storing all kinds of information about a certain game. Examples include the stability of each civ, the amount of turns until next congress and the progress of certain UHV. This editor allows the player to view and edit most variables in the StoredData.

    The reason I created this screen/editor has 2 main purposes. The first one is to monitor a game. The effect of changes can be observed by monitoring certain variables in the StoredData. The second reason is to allow the player to make changes to the StoredData. One could give himself a boost towards the UHV, or changes the stability value. The editor also allows UHV to be set to achieved.

    DoC Maps Editor Mode
    The DoC Maps Editor allows the player to change several map values in the game. One can use them to customize their own game, for example by enlarging the core area of a civ. Another benefit of the editor is that is can export the current map values to an external file. This makes it a lot easier to change the base maps for each civ.

    When in the DoC Maps Editor mode, one can also view the cnm (city name map) of the tile the mouse is hovering on of the selected civ. And depending on the selected map type, it will show the value of that tile.

    There are 6 different map types, which are: Flipzone maps, Core maps, Settlervalue maps, Warvalue maps, Religionmap and Regionmap.

    MoveMap Mode
    This mode allows to copy a large portion of the map and move it towards another part of the map. The main reason is for map development. It has not much use in during a game.
     
  2. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,633
    Location:
    The city of the original vlaai
    Guide how to use the worldbuilder functions

    StoredData editor
    The StoredData is more or less a memory function of the game. Many elements of DoC make use of informations stored in the StoredData. That makes changing the StoredData a delicate business. Be caustious if you change variables.
    Normally, the StoredData is saved upon saving the game and loaded when you load the game. There is a button called "create backup" which saves the current state of the StoredData. If you use the "restore backup" button, it will reset the StoredData to that point. Saving the StoredData with the "create backup" does not save the StoredData permenantly. Loading a savefile will restore the StoredData to the one saved in the savefile. They will become permanent once you save the savegame.

    The editor has 2 modes: The GlobalData mode and PlayerData mode. A dropdown box in the left enables you to switch between modes. In the GlobalData mode, global variables can be edited. These variables constist mostly of variables that affect the game (like the amount of turns until next congress), but it also includes the UHV counters. In the PlayerData mode, variables related to a specific civ can be edited, like stability parameters.
    A second dropdown box allows you to select a player. If you are in PlayerData mode, it determines of civ you can see and edit the variables. In the GlobalData mode, it allows certain variables to change to that civ. (For example which civ discovered the new world first)

    The editor is able to change 3 types of variables, which are booleans, integers and list containing booleans or integers.
    Booleans are in the first column of the top table. The values can be changed value by clicking on them.
    Integers are in the second and third column of the top table. The values can be changed by clicking on them. In the topleft of the screen are 2 dropdown boxes. One determines if you add or substract a number to the current values and the other one determines how much you increase or decrease the value.
    Lists are in the bottom left table. You can select the list you want to edit by clicking on it. Once selected, all elements of that list will be placed in the bottom right table. Then you can edit the variables similar to changing booleans and integers.

    DoC Maps Editor
    Flipzone
    In this mode, you can add/remove tiles to/from a civs flipzone. Left-click to add tiles to the core and right click to remove them from the core.

    Legend:
    - Pink: Flipzone
    - Red: AI only extra flipzone
    - Cyan: Spawn plot
    - Dark Green: Extra plots (currently only used for Canada)

    Remarks:
    - Changes are not applied to the current game. It currently only has use for exporting. (or viewing the flipzone)
    - Exported code should be applied in Areas.py
    - Extra plots cannot be changed in the editor

    Spoiler Example :
    Below the an example of an exported flipzone of Egypt. (I added some additional tile to the east) To apply this to Areas.py, you have to do the following:
    1. Open Areas.py
    2. Search for the word after the #
    3. Find the entry of the civ and replace the current entry with the exported one
    4. If the civ does not have an entry in that list, you can add the exported one to the list

    Code:
    # dRebirthArea
    iEgypt : ((66, 30),    (71, 36)),
    
    # dRebirthAreaExceptions
    iEgypt : [(71, 30), (71, 31), (71, 34), (71, 35), (71, 36)],


    Core map
    In this mode, you can add/remove tiles to/from a civs core. Left-click to add tiles to the core and right click to remove them from the core.

    Legend:
    - Cyan: Core area
    - Green: Historical area (settlervalue 90+)
    - Yellow: Contested area (historical area in a foreign core)
    - Red: Foreign core
    - Light Purple: Area the AI is forbidden to settle
    (Only the cyan core area can be changed in this mode)

    Remarks:
    - Changes are applied to the current game
    - The export format is similar to flipzone maps
    - Exported maps should be applied in Areas.py

    Settler map
    In this mode, you can change the settlervalue of tiles. Left click sets the tiles to the value defined in the dropdown box. Right click resets the tiles to the default value (20). The higher the value, the more likely the AI will settle on that tile.

    Legend:
    - Cyan: Core area
    - Green: Historical area (settlervalue 90+)
    - Yellow: Contested area (historical area in a foreign core)
    - Red: Foreign core
    - Light Purple: Area the AI is forbidden to settle (settlervalue = 3)


    Remarks:
    - Changes are applied to the current game
    - The export format are maps with a value for each tile
    - The maps should be applied to SettlerMaps.py
    - The core area overlay overrules the settlermap. No matter what the settlervalue is, it will show up as core if it is a core tile.
    - The list of preset values is defined in Consts.py. If you want to add more values to that list, search for "lPresetValues" in const.py and add new values to the list.

    War map
    In this mode, you can change the warvalue of tiles. Left click sets the tiles to the value defined in the dropdown box. Right click resets the tiles to the default value (0). The higher the value, the more likely the AI try to capture that tile.


    Legend: (the number between brackets is the warvalue of that tile)
    Red (2)
    Orange (4)
    Yellow (6)
    Light Green (8)
    Dark Green (10)
    Blue (12+, used very rarely)


    Remarks:
    - Changes are applied to the current game
    - The export format are maps with a value for each tile
    - The maps should be applied to WarMaps.py
    - In general, core tiles have a warvalue of 10

    Religion map
    In this mode, you can change the religious value of a tile. Left click sets the tiles to the value defined in the dropdown box. Right click resets the tiles to the default value (None).

    Legend:
    - Cyan: Core area
    - Green: Historical area
    - Yellow: Periphery
    - Orange: Minority

    Remarks:
    - Changes are applied to the current game
    - There are no seperate maps for the religion maps, therefore the religion maps can not be exported. Instead of having a map that has a value for each tile, the code determines the value of that tile by looking in which region that tile is and determines what value belongs to that region.
    - The editor is able to set the value of each individual tile.

    Region map
    In this mode, you can define to which region that tile belong. Left click sets the tile to the selected region in the dropdown box. Right click sets the region to "no region".

    Remarks:
    - Changes are applied to the current game
    - The export format are maps with a value for each tile
    - Maps should be applied to RegionMap.py

    Tips and tricks
    - The reset button resets all tiles to the values defined the the python. You can reset the maps of all civs at once by holding the alt-key when clicking the button.
    - When exporting, the code detects if you there are changes made. If there are no changes made, it will not export the map. You can force a map to be exported by holding the shift key when clicking the export button. (This does not work for the flipzone editor)
    - You can export the maps of all civs at once by holding the alt-key when clicking the export button. Even if maps of civs that didn't change are exported.

    -The maps of Colombia, Iran and Mexico can be changed by selecting Maya, Persia and Aztecs respectively and the Reborn buttons is clicked.
    - The maps (settler, core, war) of some civs change upon certain events, like the core switchting to Carthage for Phoenicia. All civs that can do this have a reborn button. Clicking this button switches the maps. Be aware that you copy-paste the maps to the right location in the corresponding file when you edit the reborn maps. (Maya, Persia and Aztecs also have a reborn button, but that will change the maps or Colombia, Iran and Mexico)
    - The Export folder in the main DoC folder contain examples of already exported files.

    MoveMap Mode

    It can be quite tedious to move large portions of maps at once. Moving all tiles individually in the WB takes forever and editing the scenario file is difficult if you don't know what you are doing. This mode tries to help with that.

    - Select the size of the area you want to move
    - Select what you want to do with the area you are about to move
    - Select the area you want to move
    - Select the target area you want to move the previously selected area to

    Remarks
    - Unlike the large brush of the other modes in the WB, there is no limit in the brush size of this mode
    - It does not move units and cities
    - It only moves rivers that are directly south or east of the selected tiles. (So river tiles on the left and top border of the selected source area are not moved)
    - Moving water tiles can result in strange graphical representations. Saving the game and reloading fixes this.
     
    Last edited: Dec 9, 2017
    need my speed, ales_ and 1SDAN like this.
  3. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,437
    Gender:
    Male
    Location:
    Leblanc
    Good idea to make a central thread for all the changes you made to the world builder.
     
    1SDAN likes this.
  4. h0spitall3rz

    h0spitall3rz Grand Vizier of Your Mind

    Joined:
    Aug 2, 2015
    Messages:
    420
    Gender:
    Male
    Location:
    Hanseong, Great Korean Empire
    I think this thread should be stickied. :)
     
    1SDAN likes this.
  5. ales_

    ales_ Heir

    Joined:
    Apr 10, 2012
    Messages:
    5,639
    Gender:
    Male
    Location:
    Toulouse, France
    Maybe not stickied, but linked in the Forum Thread Index.
     
    1SDAN likes this.

Share This Page