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

RFC Realism

Discussion in 'Rhye's and Fall Modmods' started by The Turk, Jul 28, 2010.

  1. The Turk

    The Turk Deity

    Joined:
    Jun 25, 2008
    Messages:
    2,189
    Gender:
    Male
    Location:
    Canada
    Rhye's and Fall Realism




    Welcome to this new modification of RFC which I hope, will fill in the parts of World History that have been left out. But please take note that, this mod IS NOT about having a historical deterministic game, but rather, it should add a new dimension to playing RFC, by adding new re-spawns, new units, new Leaders, new cities and hopefully much more. This mod should give the player a generally more historical friendly game, without restricting the player at all to the trends of history.

    And please, if you have any suggestions or comments, feel free to post on this thread. In fact your ideas would be most helpful:)

    Features:

    Alpha v0.1
    Spoiler :
    • Remove Persia from the Ottoman War map, I want to make sure that all of Persia looks undesirable for the Ottomans to expand into, currently they waste too many resources taking over Persia, and not enough taking over North Africa and Europe
    • Have the Ottomans spawn with 3 Muslim Imams
    • Have Mali spawn with 2 Muslim Imams
    • Make Baghdad spawn in 760 AD, in the spot right between the Tigris and Euphrates river. And have it flip to the Arabs
    • Have the Persian respawn in 1500 AD, and have there name be changed to, "The Safavid Dynasty". Also add Shah Abbas as the ruler of the Safavid Dynasty.
    • Use VD v9.2 Units
    • Add more cities to Europe, (recreated Justinian's Empire)
    • Add the Crusades, as a special event (thanks to Baldyr)
    • Add Christian Missionaries to European Civilizations
    • Add Christian Missionaries to the "Explorer's Event"
    • Change the Spawn Zones for certain civilizations
    • Respawn of Carthage in 711AD, as the Moors of Al-Andalus
    • Respawn India in 1520AD as a Muslim Empire (the Mughals)
    • Changed the Arab UP to delete pre-existing religions in any conquered city



    Releases:

    Development has been currently stopped

    Credits:
    Baldyr- Co-Worker on this mod, without his modding skills, this mod wouldn't have started, and of course his PyScenario, which is what this mod is based on.
    Embryodead - Helped me with numerous things, such as getting the Shah Abbas LH to work, and just inspiring me with his SoI mod
    Rhye - Maker of Rhye's and Fall of Civilization
    Lone Wolf - For VD Units which I used
    Onedreamer - For helping me get the VD units working
    GreySaber - For creating the Inquisitor unit
    Kochman - For being my favorite critic ;)
     
  2. The Turk

    The Turk Deity

    Joined:
    Jun 25, 2008
    Messages:
    2,189
    Gender:
    Male
    Location:
    Canada
    I have decided to add this section, since a lot of you were afraid that this was just a modification for the Ottomans, well I can admittedly tell you, that although it started off as one, it has definitely grown into something much larger in scope, and I hope all of you can relate to this. Listed here are some future plans, some of which might not be implemented, but these are plans I hope I can do.

    Future Plans:
    1. Move the English spawn date to 1066, spawn them in Rouen (Northern France), help them invade England
    2. Implement Embryodead's Epic/Marathon mod, to slow down the game
    3. Implement the Crusades
    4. Respawn Egypt as the Ayyubids
    5. Change China's capital to Chang'an, and later on respawn back to Beijing
    6. Have a Tamrelane, like invasion from the steppes of Samarkand and Merv

    And much more ;)
     
  3. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Here is the first part of you mod, then. I made a sample 10 minute PyScenario script (it took about double that time to test it - its that easy use!) for you. But lets just take it in good order.

    First, download and install the current version of the PyScenario application.

    Then, open the Scenario.py file that you just installed as part of PyScenario. (Use Notepad or any other text editor.) Replace the contents with this script:
    Code:
    #Scenario name: Rhye's and Fall Realism, by The Turk
    
    from PyScenario import Trigger
    from Consts import *
    
    # spawn Baghdad (AI only)
    Trigger(iArabia).check().year(762).valid().city(77,40,"Baghdad").garrison()
    Trigger().year(762).valid().city(77,40,"Baghdad").garrison()
    
    # spawn Muslim missionaries
    Trigger(iTurkey).turn(249).units(70,43,iIslamicMissionary,3)
    Trigger(iMali).turn(220).units(53,31,iIslamicMissionary,2)
    
    # re-spawn Persia - with missionaries
    Trigger(iPersia).check(bDead=True).year(1501).units(82,39,iIslamicMissionary,3).target((79,37),(85,44)).flip(bMinorsOnly=False).garrison().stability(40)
    Save the Scenario module (as it is also referred to) as Scenario.py and be sure to use encoding UTF-8 - just to avoid any issues with text formats.

    Now you need to test this properly, as I have only checked that the Triggers fire at the dates. (I actually know how to change the game turn during game-play, so it helps with testing these scripts. ;))

    Now for the interesting part, as you are free to do what you will with your PyScanario script. :D I've hidden the tutorial below since this gets slightly technical and is really off-topic.
    Spoiler :
    Ok, lets take it from the top:
    Code:
    #Scenario name: Rhye's and Fall Realism, by The Turk
    This is a comment line as indicated by the # sign. It does absolutely nothing but is included for informative purposes only. I'll skip the rest of these commented lines as they are self-explanatory.
    Code:
    from PyScenario import Trigger
    from Consts import *
    These are Python commands - import statements. The first one enables you to use PyScenario Triggers (see below) and the second one fetches Rhye's constant variables from the Consts.py file (referred to as the Consts module in the following text). You should probably open up this too with a text editor to see what it contains, because I'll be using some of the constants in my Triggers. (You can use the actual numerical values also, at the variable is only pointing to that value.)
    Code:
    # spawn Baghdad (AI only)
    Trigger(iArabia).check().year(762).valid().city(77,40,"Baghdad").garrison()
    Trigger().year(762).valid().city(77,40,"Baghdad").garrison()
    Now its getting a bit hairy, so please try to follow:

    The two lines above are "Triggers". A Trigger consists of different settings and "Conditions" and "Actions". If all the Conditions pass, then all the Actions are fired. This is the principle.

    If we start with Trigger(iArabia) it means that the "target player" (or Civ) of the entire Trigger is the Arabian Civ. The value iArabia is a constant found the the Consts module (see above).

    The Trigger "method" check() is a Condition and it is used to limit Triggers to AI Civs only and alive Civs only. (These settings can be changed individually though.) Here we are using it to prevent the human Arabia player from spawning the city.

    The next Condition is year() and the value inside the parenthesis is the the actual game year. This means that the Condition will only pass on the game turn that corresponds the this date.

    Next we use the valid() Condition to make sure the spawn tile (see below) is "valid" - that there are no cities or enemy units blocking the spawn. (Because then things could get a bit unreliable.) There are many ways of customizing this Condition but since we only use the default values we don't have to enter any "arguments" or values.

    Now we move on to the Actions and the main one is city(). This will spawn a city at the specified coordinates. If you change the values 77 and 40 you can also change the location of the spawn. The third argument is the city name and as its a "string value" it must be expressed within quotations.

    The last method is the garrison() Action and it will spawn 2 defensive units on the target tile. In this Trigger the target tile was defined by the city() Action, so this will also be the coordinates for the unit spawn. Unfortunately the default defensive units early on are mostly Warrior units, so you might wanna change this to a specified unit type instead. You do this by changing the eType argument to another value:
    Code:
    garrison(eType=iLongbowman)
    (The iLongbowman constant is found in the Consts module and the unit's indexed value is 60. This is also a valid value. To change the number of units you use iNum=.)

    The next Trigger is almost identical to the first one, but there are some differences. It is included as a backup if the first one doesn't fire - and it won't if the Arabs are controlled by the human player. In that case there will be another spawn. Since I haven't specified a target player in the Trigger() constructor, the application will choose a random minor Civ instead. (You could specify this yourself, though. You can find the values for all Civs in the Consts module.)

    There is no check() Condition either, as there is no target player to check. :rolleyes:
    Code:
    # spawn Muslim missionaries
    Trigger(iTurkey).turn(249).units(70,43,iIslamicMissionary,3)
    Trigger(iMali).turn(220).units(53,31,iIslamicMissionary,2)
    These Triggers are similar and you can probably figure out some of what they do. The turn() Condition is similar to the year() Condition I used earlier. (There are more settings available though.) Instead of the garrison() method we use the units() method to spawn the units. Its actually quite similar to the city() method as the first to arguments are the map tile coordinates, and the third one is the unit type. I found both the coordinates and the iIslamicMissionary variable in - you guessed it - the Consts module. The last argument is the number of units, and you can easily edit this yourself.
    Code:
    # re-spawn Persia - with missionaries
    Trigger(iPersia).check(bDead=True).year(1501).units(82,39,iIslamicMissionary,3).target((79,37),(85,44)).flip(bMinorsOnly=False).garrison().stability(40)
    This last Trigger actually achieves two things, but this is due to a "glitch" in the game. First I use some methods described in earlier Triggers to spawn missionaries for the Persian Civ. The interesting part - the glitch - is that when you spawn something for a dead civ - and we can by setting the bDead argument to the value "True" in the check() Condition - then that Civ is immediately resurrected! :eek:

    The second part of this Trigger begins with the target() method which can be a bit tough to grasp at first. But it contains a pair of map tile coordinates (both in the form a "tuple") defining a rectangular map area. The first tile is the lower left corner of the area, and the second tile is the upper right corner. (I found these coordinates in the Consts module and they correspond to the Persian "Core Area".) You can of course change these coordinates to whatever area you want!

    The actual flipping of cities is done with the flip() Action. Since we defined an entire map area (above) every city within this area will flip. I guessed that you also wanted human controlled cities to flip, so I changed the bMinorsOnly argument to a non-default value ("False"). The garrison() Action spawns units in all Persian cities in the defined area, and lastly the stability() Action adds 40 stability points to the target player (defined as Persia) - in case they originally collapsed due to instability.

    A full-length tutorial and a API (reference) for all Trigger methods are available in the main PyScenario thread. Refer to this documentation as your first aid - and ask for help once you fail to find the information you need.

    edit: It could be noted that you can use PyScenario to add things like culture, religions and buildings to cities. As an example, Baghdad could spawn with Islam, a Granary and a Market and 50 culture points... Also, spawned units can receive XP or pre-set promotions, like City Garrison... Its all explained in the documentation. :D
     
  4. The Immortal

    The Immortal Forever Young

    Joined:
    Jul 23, 2010
    Messages:
    55
    Location:
    The Abyss
    Sounds interesting!
     
  5. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    This is a "more realistic RFC". What's realistic about it? All I see is you making changes to have the Muslim world more to what you want it to be.
    What other changes are planned?
     
  6. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Perhaps "historically accurate" or "predictable" would be more accurate...

    I think that the idea is to add more stuff later. I first got the impression (when discussed in another thread) that this was going to be a scenario about the Ottomans, but obviously there is no such limitation on the content.
     
  7. onedreamer

    onedreamer Dragon

    Joined:
    Oct 21, 2004
    Messages:
    6,580
    Location:
    Torino - Italia
    I dare say all the features introduced so far... including graphics.
     
  8. The Turk

    The Turk Deity

    Joined:
    Jun 25, 2008
    Messages:
    2,189
    Gender:
    Male
    Location:
    Canada
    Ah Kochman,

    I was expecting you to find this thread sooner or later, but I'm quite surprised you got to me THIS quickly. I think this goes to show that opposites actually do attract ;). You must really like debating with me, or else you wouldn't have taken the time to write to me like you just did :D
    And yes I thank you for that, as I am honored to have you comment on my FIRST mod!

    And yes Baldyr is correct, at first it might have seemed that all I wanted to do was prevent Turkey from taking over Persia (well thats how it started off), but thanks to Baldyr, I've learnt how to do so much, and I've been inserting cities, and currently I'm trying to move around resources (a bit harder than I imagined), but I will give all of you a proper historical RFC. I hope that when you play my Alpha v0.1, you will feel that history is taking shape around you, and that you yourself has the power, to shape the events that are taken place, whether it be the Norman invasion of England or even fighting off the hordes of Tamerlane's horse archers, I hope this gives you the chance to shape the world.

    @ The Immortal and onedreamer

    Thank you for your encouragement, I am currently adding many more cities to the 600AD start, I hope that game will start looking, more like a collapsed Western Empire and a revitalized Eastern Roman Empire.

    And onedreamer, I will add your name to my list of credits, because I hope to add in the VD units, which you took time into making it happen.

    And most of all, my hat goes off for Baldyr, who day in and day out, has answered my ceaselessness questions:p

    Now I have to go and redo the first post, as I have enlarged the scope of the first release!
     
  9. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    This isn't an easy fix, just so you know. You need to change the date in the DLL file, which also means recompiling it.
    There are two issues with this: Firstly you need to recompile the DLL for RFC Marathon (see above) and secondly there currently is not support for PyScenario in this mod.
    This is my next project, so you can just copy-paste my PyScenario script when I'm done and do whatever changes you need.
    This should be fairly easy.
    You do this in the Consts.py file. The moved capital can be achieved with PyScenario.
    You can spawn the units with PyScenario. I'd suggest giving them some useful promotions also.
     
  10. kochman

    kochman Deity

    Joined:
    Jun 8, 2009
    Messages:
    10,818
    @The Turk, someone has to keep you honest here ;)

    I like the idea of the Normans... will you also include their southern empire? The two were not really connected of course, in an official manner at least, but the southern empire was a bright and shining star until it basically got bred out of the equation.

    And, Venice?

    I am sure we don't want this to become just an alternate RFCEurope, but I was just wondering... I mean, they were a republic for 1000 years!

    AND, will Byzantines be a playable civ? I always disliked how they weren't (and was glad that "TDK" modded a scenario where you could use them in RFC).
     
  11. The Turk

    The Turk Deity

    Joined:
    Jun 25, 2008
    Messages:
    2,189
    Gender:
    Male
    Location:
    Canada
    Wow Wow Wow, Kochman, I'm still a modder in practice, I've just learnt how to spawn cities and units (thanks to Baldyr), so making Byzantium fullely playable is another thing, but maybe in the (far) future;). Not even the Persian Safavids are currently playable!

    As for the Normans, yes I want to make them a faction of there own, in which they would spawn as the English, but start in Rouen, Northern France (Year of spawn TBA). Great Britain will be broken up into Londinium, Ebaracum (York), and Edinburgh, and perhaps another city, and hopefully this will allow the Vikings to descend on England and pillage and burn all they want, before 1066 when a large "Norman" army will spawn in England, capture London, and it will flip to become their capital, leaving Rouen, later to be taken by the French (and perhaps the start of a conflict between the two countries:mischief:)

    Venice I have found is a bit tricker to implement, and yes I have thought long and hard about it, I thought about making the "Romans" the Venetians, and they would have Venice a city on the Dalmatian coast, and Crete, but I realized that, that would be pretty hard to do, but once again, we'll see in the future.

    For now, thanks to Baldyr, everyone can expect the Crusades to be implemented, a re spawning Islamic Egypt and (hopefully) the implementation of Embryodead's Marathon mod, but I have to talk to Baldyr about that.
     
  12. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    About RFC Marathon and PyScenario:

    PyScenario should have to be rewritten in some parts, and also tested, before any such merge can be released. If I don't adopt it as the default RFC version for beta-testing - and I might since it seems somewhat finished, finally - then it would probably be a good while before it would make sense to do it at all...

    But in the long run it will of course be possible to use these two "mods" together. :D
     
  13. Alexius08

    Alexius08 Emperor

    Joined:
    May 28, 2010
    Messages:
    1,105
    When dead civs respawn, do they get enough techs to help them against their advanced neighbors?
     
  14. The Turk

    The Turk Deity

    Joined:
    Jun 25, 2008
    Messages:
    2,189
    Gender:
    Male
    Location:
    Canada
    Yes they do. Currently only Persia and India respawn, (I will later add a respawn of the Ayyubid Egyptians and the Carthaginians (as Al-Andalus), who will control half of Iberia). Currently Mughal India and Safavid Persia will/should be on par with their gunpowder Muslim relative the Ottoman Empire, so we won't be seeing a weak Persia or India, but hopefully one that can assert its independence.
     
  15. Alexius08

    Alexius08 Emperor

    Joined:
    May 28, 2010
    Messages:
    1,105
    Good. That also means we can respawn Ethiopia in 1270 without being invaded by Arab camel archers or native Impis. If there's only a way to let AI Ethiopia attempt doing the remaining two UHVs (the first one is hopelessly lost).

    BTW: I'm trying to get AI Arabia to attempt recreating the Ummayad Caliphate with the script below:

    Spoiler :
    Code:
    Trigger(iPersia).startup(bLateStart=True).check().year(620).label("ArabPersianWars").treaty(eArabia, bPeace=False, bOverride=True)
    Trigger(iArabia).check().year(620).units(78,40,eType=70,iNum=4) #for conquering Tisfun
    Trigger(iArabia).check().year(620).units(68,36,eType=70,iNum=2) #Arab conquest of Alexandria, after Cairo flips
    Trigger(iArabia).check().year(630).units(81,38,eType=70,iNum=2) #Shiraz
    Trigger(iArabia).check().year(640).units(83,44,eType=70,iNum=2) #Merv, Persia conquered by Arabs
    Trigger(iArabia).check().year(640).units(65,36,eType=70,iNum=2) #Benghazi
    Trigger(iArabia).check().year(660).units(61,37,eType=70,iNum=2) #Tripoli
    I made Tisfun (Babylonian spawn point/site of future Baghdad), Sirajis, Sana'a and Merv Persian on my 600 AD start. Hopefully, AI Arabia would use the conveniently-placed camel archers to its advantage. They have no problems on capturing Jerusalem, but they refuse to capture other Byzantine cities.


    Can we also add the Hundred Years' War to keep France from getting conquistadors? They keep getting them even after removing sailing from their starting techs.
     
  16. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Two things, if you don't mind me butting in:
    Code:
    Trigger(iPersia).startup(bLateStart=True).check().year(620).label("ArabPersianWars").treaty([COLOR="Red"]eArabia[/COLOR], bPeace=False, bOverride=True)
    The marked argument is clearly wrong, it should probably be eRival=iArabia.

    Also, its possible to spawn units on different tiles with the same Trigger with the units() method. Like:
    Code:
    Trigger(iArabia).check().year(620).units(78,40,70,4).units(68,36,70,2)
    It conserves computing resources to have less Triggers. But your setup isn't wrong or anything.
     

Share This Page