IMPORTANT! PyScenario is only supported for the RFC Epic/Marathon mod-mod. Plans to port it to the official version of Rhye's and Fall of Civilization or to other mods are suspended.
Also note that PyScenario scripts for Beta v1 are no longer supported! See the FAQ section of the documentation for how to run old scripts with the new version. There is no up-to-date change log or no guide for converting old scripts.
Download the current Beta version via the link below! No new versions are currently planned, but please report any bugs or other errors anyway in this thread!
Questions & Answers
What is PyScenario?
It is a set of Python code that enables non-programmers to script complex scenario events. Learn more in the main thread - full documentation with examples and tutorial included.
Can anyone - even a non-programmer - help out with testing?
Sure, but you're required to use the built-in debugging features in CivIV! Read more here. Any knowledge of Python or experience with CivIV modding is helpful, but not required.
So I think I found a bug, what should I do?
Post your findings in this thread! Note that comments like "my script isn't working" or "the application is broken" is not valid feedback. Follow these guidelines when submitting bug reports:
Also note that PyScenario scripts for Beta v1 are no longer supported! See the FAQ section of the documentation for how to run old scripts with the new version. There is no up-to-date change log or no guide for converting old scripts.
Download the current Beta version via the link below! No new versions are currently planned, but please report any bugs or other errors anyway in this thread!
Current version (2011-09-03): Beta 2.2 for Beyond the Sword v3.19 and RFC Epic/Marathon v1.22.
Changes:
Spoiler :v2.2:
It is no longer possible to spawn wonders that are already built with the buildings() Action.
The units() Action now also works without any map target and will instead spawn the units in the capital.
The tech() Condition has been augmented with another setting.
The terrain() and erase() Actions include settings for adding/removing sign labels on the map.
v2.1:
Triggers are now automatically rebuilt when Python is reloaded.
Trigger looping has been prevented, so that a Trigger can't cause itself to fire once more.
Storing Triggers for save games has been integrated with the RFC mod making the process more streamlined.
A Trigger causing a Python exception will be automatically disabled.
The convert() Action takes a couple of new settings.
New additions:
Spoiler :v2.2:
PyScenario can now be used with mod-mods which have their own mod folder, as the working folder is dynamically detected.
The new rebirth() Action grants Golden Ages.
v2.1:
The new area() and random() methods are used for global Trigger settings.
The new Condition is present() and the new Actions are strike(), commerce(), reset(), respawn() and civics().
Known issues:
Spoiler :n/a
Corrected issues:
Spoiler :v2.1:
An invalid Scenario module results in no Triggers being initialized.
Missing code added to the units() Trigger method.
Questions & Answers
What is PyScenario?
It is a set of Python code that enables non-programmers to script complex scenario events. Learn more in the main thread - full documentation with examples and tutorial included.
Can anyone - even a non-programmer - help out with testing?
Sure, but you're required to use the built-in debugging features in CivIV! Read more here. Any knowledge of Python or experience with CivIV modding is helpful, but not required.
So I think I found a bug, what should I do?
Post your findings in this thread! Note that comments like "my script isn't working" or "the application is broken" is not valid feedback. Follow these guidelines when submitting bug reports:
- Make sure you are using the current version of PyScenario before submitting a bug report. If in doubt, download the latest version.
- Include the line of code that isn't working for you - or better yet - include your entire script!
- Be sure to include the full traceback (text) on any Python exception (error-message)! If you can't figure out how to debug, then you're not qualified to be a beta tester!
- Do your best to describe what you intended to do, how you went by doing this - and what exactly the result was.
- Post a screen caption or a save if possible. (On a PC system, hit the Print Screen button and the image will end up in your \My Documents\My Games\Beyond the Sword\ScreenShots\ folder. Auto-saves are found in \My Documents\My Games\Beyond the Sword\Save\single\auto\.)