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

Custom-made Scenarios for RFC: the ‘Egypt problem’

Discussion in 'Rhye's and Fall Modmods' started by Charles Martel, Oct 21, 2008.

  1. Charles Martel

    Charles Martel Warlord

    Joined:
    Jun 21, 2007
    Messages:
    244
    It would be nice to play custom-made historical scenarios, in addition to the standard 3000BC and 600AD starts that ship with the game. By ‘scenarios’ I mean, of course, worldbuilder saves, as opposed to game saves. (The main advantage of a WBsave over a game save is that the former allows the player to select a civilization before starting the game, whereas the latter does not.)

    Following up on an idea by MarkyParky (see http://forums.civfanatics.com/showthread.php?t=290103), I have myself tried to design one such scenario. Unfortunately, it turns out that creating playable WBsaves for RFC is not at all straightforward.

    For starters, Egypt has to be made always playable, otherwise some civs’ spawn dates get messed up. The reason for this seems to be an idiosyncrasy in RiseAndFall.py and other related phyton files. The code distinguishes between early (3000BC) and late (600AD) starts on the basis of the following ‘late start condition’:

    if (gc.getPlayer(0).isPlayable()):

    This clause means, I think, ‘if Egypt is playable’ (throughout the code Egypt is assigned the constant value 0) -- if it is, then the code detects an early start; otherwise, it detects a late start. So, if you want to create a scenario that begins, say, in 200AD without a playable Egypt, then the code will mistake this for the 600AD start, and make Arabia and the Vikings spawn right at the beginning.

    Another problem with custom-made WBsaves, is that the ‘the dawn of man’ screen does no longer display the correct number of turns of auto-play. Indeed, whenever the civ is yet to spawn, the entire auto-play mechanism does not work at all. As a consequence, one should begin with playing only civilizations which are already present on the map (and then switch to a later civ, if one wishes so).

    So, my request for Rhye is this: should you be willing to change the code to make it a bit more flexible, please make it so that the mod can better handle custom-made scenarios, so that Egypt no longer has to be playable, and the auto-play/spawn mechanism works correctly even when the start date is set neither to 3000BC nor 600AD.
     
  2. 3Miro

    3Miro Deity

    Joined:
    Apr 23, 2008
    Messages:
    3,480
    Location:
    Knoxville USA
    Rhye's code is very inflexible, hardly a criticism to Rhye, he has spend more than enough time working on this. There are more problems than those with RiseAndFall.py, there are many things coded in the C++. Starting dates for example are more in the C++ than Python.

    Map size is another problem as well as settlersMaps for the AI and stability. So evenif the code is made more "flexible" it would still be virtually impossible to make any significant changes without editing the .dll.
     
  3. Rhye

    Rhye 's and Fall creator

    Joined:
    May 23, 2001
    Messages:
    9,594
    Location:
    Japan / South America
    a few early decisions proved to be dumb now, indeed.
    I have replaced that condition in the MP version, to enable a 3rd start. Take a look at that code. I guess I should export the change to the main version too, I'm just lazy and prefer to concentrate on something else for now.
     
  4. Charles Martel

    Charles Martel Warlord

    Joined:
    Jun 21, 2007
    Messages:
    244
    Thank you for you reply. In the MP version the late start condition does indeed allow for a third start, as follows:

    if (gc.getPlayer(con.iCeltia).getCivilizationType() == 4) ...
    elif (not gc.getPlayer(0).isPlayable()): ...

    This means, I think, that if the minor civ Celtia is replaced by Byzantium, then the code detects a 600AD start, otherwise it detects either a 3000BC or else an 800BC start, depending on whether Egypt is playable or not. Unfortunately, this change is still too ad hoc to allow for custom-made scenarios in the general way I was suggesting. I guess that I will have to live with the fact that simply editing a WBsave will not do: if I want additional historical scenarios for RFC I'll have to change the python files myself. (By the way, I understand that you have other priorities, and am looking forward to the new patch).
     
  5. Rhye

    Rhye 's and Fall creator

    Joined:
    May 23, 2001
    Messages:
    9,594
    Location:
    Japan / South America
    another trick would be to edit an ice in antarctica, adding a hill or a coast or whatever, from the WBS. Then from python you check the plot terrain.
    Still ad hoc, but very effective if you want to tweak playablility of civs freely
     

Share This Page