Great General modmod - spawn your own

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
 
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.
 
okay..
and btw,
what does the 'same version' mean?
The PyScenario version?
What's if the version gone different?
 
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.
 
Not quite, but say after building 15 units of a certain type you receive a GG, which you could throw into your stack (presumably) meant for a war of aggression.

depending on how much you want to put weight into a certain era or segment, it could be 25 units of a certain type, like gunpowder for france, mechanized for germany, naval for britain, and so on and so forth.

this keeps a production-heavy civ like germany from being able to spam GG's. at least not until industrialism, coal, oil & panzers.

I'd like to have something like that, but I really don't know how to program it.
Someone could help me, please ? :religion:
 
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?
 
I'd like to have something like that, but I really don't know how to program it.
Someone could help me, please ? :religion:
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
 
It's one unit type per civilization, some required number and then some historical Great General, right?

Yes.

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?)

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.
 
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...).
 
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...).

Thank you !
 
You guys can totally figure this one out yourselves! :goodjob:
 
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.)
 
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
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.
 
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?
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:
 
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
 
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? ;)
 
Trigger().player(7).heads(20,29).units(-1,121).once()
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!
 
Top Bottom