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

Introducing: PyScenario - easy-to-use scenario event scripting for RFC

Discussion in 'Rhye's and Fall Modmods' started by Baldyr, May 16, 2010.

  1. BenZL43

    BenZL43 Physician - still can't spell this correctly.

    Joined:
    Sep 25, 2010
    Messages:
    3,198
    Gender:
    Male
    Location:
    Indonesia
    Great news!
     
  2. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Spoiler :

    Is this still a priority of any sorts?
     
  3. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Ok, so I've compiled a to-do list of sorts.

    It seems that there are some custom methods floating around since the last release. These seem to be an augmented units() method which will spawn units in the capital city of the Target Player if no Map Target is specified within the Trigger. I believe that this functionality needs to be added to other methods also. Which ones? Or do we add a new capital() method instead?

    There is also a modified tech() method which can be restricted with a bFirst parameter. Did anyone ever test that one?

    And finally we have a brand new rebirth() method that grants Golden Ages. Has it been tested?

    Does the current version of PyScenario work properly with the latest version of RFC Epic/Marathon? I don't believe I ever tested it myself...

    There seem to be a couple of bugs reported: The buildings() method needs to check for a valid city before spawning any buildings. And the built() method needs to also work if there is no Target Player for the Trigger. Anything else?

    New additions on my agenda right now is dynamic mod folder detection that allow mod-modders to use a non-standard mod folder, a civilization() method making it possible to change the Civilization attribute of players, signs/landmarks for map tiles, and some sort of killer parameter to the captured() method. Possibly the iX and iY parameters of city() will be optional, but I'm not sure about this yet.
     
  4. BenZL43

    BenZL43 Physician - still can't spell this correctly.

    Joined:
    Sep 25, 2010
    Messages:
    3,198
    Gender:
    Male
    Location:
    Indonesia
    capital() change the civ's capital? Nice!
     
  5. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Nope, the original suggestion was that capital() would set the Target Tile to the Target Player's capital. I'm not so sure however; I think that simply omitting a Target Tile while supplying a Target Player should always set the Target Tile to the capital. The question is what methods other than units() would benefit from this setup?

    You can change the capital by building a Palace on a city with buildings(). Come to think of it, national wonders (like Palace) should probably not be replicated in several cities, so the original instance should be erased first. I'm taking a note of this.
     
  6. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    I'm updating PyScenario as we speak and will hopefully be through with all the testing and debugging this weekend.

    Since I'm restricting spawning wonders (national and world) that have already been built by the target player, I've introduced a capital() method for moving the Palace. It of course removes the old instance, so that you don't end up with multiple palaces. :rolleyes:

    I just realized that I probably need to restrict wonders globally, so that you can't spawn multiple world wonders in the game. Thoughts? Or should world wonders be moved to a new location by default? Or should we replace the capital() method with a generic move() method that allows you to move wonders (like the Palace)?
     
  7. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Ok, looking at this stuff again makes me think that I will never be able to add the civilization() method into the application properly, since the dynamic Civ names are, still, hard-coded into the DLL. :p
     
  8. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    I change the answer to: YES! :D
     
  9. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    The documentation on the first page has been updated to reflect the new (final?) version, which is now up. I'd appreciate if the community could test things throughly within the next week or so, because after that it will be difficult for me to fix any issues. :p
     
  10. Linkman226

    Linkman226 #anarchy

    Joined:
    Sep 14, 2007
    Messages:
    2,493
    I'm fairly confident that you can still add a method to change civ names because the DLL names will get overwritten by the python.

    I may be wrong though.
     
  11. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Unless embryodead changed something in the last release, the names are automatically reverted on a turn-to-turn basis. In the testing I did for the civilization() method I couldn't affect the Civ name nor the flag. This isn't the same that it isn't possible to do with Python. I only know that it wasn't possible before, and I simply gave up this time around. :p
     
  12. Linkman226

    Linkman226 #anarchy

    Joined:
    Sep 14, 2007
    Messages:
    2,493
    Not the flag either? That isn't controlled in the DLL....
     
  13. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Yeah, I have no idea what was going on there. I did manage to change the flag before... Well, I simply gave up on this idea.
     
  14. Leoreth

    Leoreth 古典部の会員 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,712
    Gender:
    Male
    Location:
    Kamiyama
    If you like, I could easily compile a DLL for you that has the dynamic naming disabled.
     
  15. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Thanks, man. But the application is called "PyScenario" and it will never ship with a custom DLL file. Because its a pure Python thing.

    If embryodead releases a new version of RFC:E/M with the changes in place, then I might include it in a (hypothetical) future release.
     
  16. Leoreth

    Leoreth 古典部の会員 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    32,712
    Gender:
    Male
    Location:
    Kamiyama
    I thought you might say that :D

    On the other hand, wouldn't it be possible to store the current user-specified (i.e. Python controlled) civ name somewhere and update immediately after the DLL updates? It's some overhead but might be worthwhile because I imagine this is an aspect many people might like to influence.
     
  17. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    I honestly don't know, at this point. :dunno:

    And yes, it would have been a nice touch to end development with this functionality in place.
     
  18. G-Max

    G-Max Chieftain

    Joined:
    May 20, 2006
    Messages:
    2,556
    Has this been fixed?

    Aren't we up to 1.22 now?
     

Share This Page