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

Great General modmod - spawn your own

Discussion in 'Rhye's and Fall Modmods' started by Baldyr, Jul 3, 2010.

  1. BenZL43

    BenZL43 Physician - still can't spell this correctly.

    Joined:
    Sep 25, 2010
    Messages:
    3,198
    Gender:
    Male
    Location:
    Indonesia
    Can this modmod compiled into the Desertification and the Russian modmod to create a 'Ultimate' PyScenario modmod? Or there's something I gotta update or what?

    Thanks
     
  2. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Any PyScenario script can be merged with any other, as long as they are written for the same version of the application. With that said, the import lines and such (comments) of course only need to appear once, but doubling up on those basically does nothing.
     
  3. BenZL43

    BenZL43 Physician - still can't spell this correctly.

    Joined:
    Sep 25, 2010
    Messages:
    3,198
    Gender:
    Male
    Location:
    Indonesia
    okay..
    and btw,
    what does the 'same version' mean?
    The PyScenario version?
    What's if the version gone different?
     
  4. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Yeah, PyScenario version. Look at the top of the PyScenario.py file for each mod.

    If version vary then one of the scripts needs to be updated... You need to know PyScenario in order to update an old script to the current (beta) version.
     
  5. Bocator

    Bocator Chieftain

    Joined:
    May 30, 2011
    Messages:
    57
    Location:
    France, Île-de-France.
    I'd like to have something like that, but I really don't know how to program it.
    Someone could help me, please ? :religion:
     
  6. srpt

    srpt Deist

    Joined:
    May 10, 2010
    Messages:
    2,025
    Location:
    Toronto
    I've added 4 religions to my mod for a total of 11 and everything is working fine except that all the religions not yet founded are founded on turn 6 of every game by civs that don't have the techs for them. the mod is xml and graphics only so far. can anyone suggest why this might be happening? would a debug dll tell me what was happening?
     
  7. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    That request sounds like a bit of a tall order. Like a new game rule, but I suppose it could be scripted in Python. If someone prompts med about this at a later date I could actually look into it. (It's one unit type per civilization, some required number and then some historical Great General, right? This actually sounds like a Quest type "random" event to me - build this many units of that type and get this unit for free, right?)

    edit: I actually think that this can be done with PyScenario. The API and documentation is readily available... start scripting people! :D
     
  8. Bocator

    Bocator Chieftain

    Joined:
    May 30, 2011
    Messages:
    57
    Location:
    France, Île-de-France.
    Yes.

    Not exactly. I thought when we can train a unique unit (when we have the tech, like Cho-Ku-Nu for Chinese, Musketeer for French, ...) we have the quest which appears and ask units for the Great General.

    I try to learn with your post how to use Python but I don't speak very well english so it's not easy. :mischief:

    I just want an exemple for a civ (if i'ts not too much ask) and I can do the rest by myself.

    Thanks. :bowdown:

    edit: or maybe could the quest appears when a civ is in a new era ? Of course if a quest is not achieved in her era she will be failed.
     
  9. LuKo

    LuKo The Royal Guard

    Joined:
    Aug 28, 2006
    Messages:
    1,501
    Location:
    Poland
    Grab PyScenario (http://forums.civfanatics.com/showthread.php?t=364719) and try something like:

    Trigger().player(7).heads(20,29).units(-1,121).once()

    (no name for event; if a civ is Rome (7th civ); if a civ got 20 Praetorians (29th unit); it gets a Great General (unit no. 121); event fires once).

    I'm not sure where the GG is going to spawn but the event should work nevertheless (I don't want to make it spawn in Rome because it may cause reduce area where units are count to Rome itself). Try it and make it better. GL&HF (If you need numbers of units, etc. check http://civ4bug.sourceforge.net/PythonAPI/index.html , if you need numbers of civs- it's different in RFC- Egypt is 0 and it's in appearing order so Greece is 4, Persia 5, Carthage 6, Rome 7...).
     
  10. Bocator

    Bocator Chieftain

    Joined:
    May 30, 2011
    Messages:
    57
    Location:
    France, Île-de-France.
    Thank you !
     
  11. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    You guys can totally figure this one out yourselves! :goodjob:
     
  12. LuKo

    LuKo The Royal Guard

    Joined:
    Aug 28, 2006
    Messages:
    1,501
    Location:
    Poland
    You should write a guide how properly use different areas in one trigger because as far as I remember it varies between commands :) BTW: When you are going back home?
     
  13. Kawzmo191

    Kawzmo191 Warlord

    Joined:
    Jun 4, 2010
    Messages:
    163
    Location:
    Houston, Texas, U.S
    Haha, an idea of mine has seemed to take root!

    Credit to Baldyr for simplifying it to Unique Units only, since by their nature they reflect the golden era of that civ's military prowess. If someone can point me in the direction of a Python tutorial........... I have nothing to do for two weeks until I move as it is. Might as well give back :p

    Also maybe I could start working on my Relatively Level-Headed RFC: E/M modmod, which would be something like a 1500 A.D start with all of the speed mods that SoI has. That mod runs smoooooooove! It'd need it, because I was thinking of having all the dead-on-arrival civs respawn on set dates, with reworked dynamic names and name-maps where needed (Italian for Rome, Appropriate local Arabic for Carthage, like Egypt, Arab name map for Babylon, etc. etc.)
     
  14. Bocator

    Bocator Chieftain

    Joined:
    May 30, 2011
    Messages:
    57
    Location:
    France, Île-de-France.
  15. LuKo

    LuKo The Royal Guard

    Joined:
    Aug 28, 2006
    Messages:
    1,501
    Location:
    Poland
    Bottom left window, Type List, Unit Types.

    But you can find them as well in RFC files (Const.py?).
     
  16. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Do you mean a PyScenario tutorial or a Python tutorial? Look in my signature for the latter. LuKo already posted the link to the PyScenario documentation, which includes a tutorial.
     
  17. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    There are many things I should do. :D

    Please describe exactly what is unclear in the current documentation.

    And I'm at home right now, but I'm about to put my PC in storage once more... I should be able to move back into my newly redecorated home in some weeks time or so. But I don't quite know when I will have time to commit to modding and development and such. :p

    As long as there are still PyScenario users out there, then there is also hope for yet another update. :king:
     
  18. LuKo

    LuKo The Royal Guard

    Joined:
    Aug 28, 2006
    Messages:
    1,501
    Location:
    Poland
    Where the GG will spawn in the trigger I've posted? What commands I can join in one trigger to not mess things up (do spawning location in units() collide with area(), tiles(), etc? Which do not?). And I know the best about things the one should do- I've got an exam tomorrow. I have to check forums, clean my room, make something to eat, visit friends... :p
     
  19. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    Ok, I see your point. I don't have the code nor the documentation in front of me now, but basically one trigger can have one target plot and one target area. If you define several different ones in one trigger, then the last one defined will be the valid one - for the entire trigger.

    What happens if you spawn a unit without any target tile or area? Damned if I know! (I might actually look it up quickly. :p) Test it? ;)
     
  20. Baldyr

    Baldyr "Hit It"

    Joined:
    Dec 5, 2009
    Messages:
    5,530
    Location:
    Sweden
    This Trigger seems to be "valid" but not do anything because the first argument in the units() method should be a tuple and not a integer/None. But, I guess it would make sense if a None value would always pick the player's capital as the target plot, not? Please remind me of this feature once I get back into development on PyScenario!
     

Share This Page