~Repeating Script Templates

If you liked this item, please rate it up on Steam Workshop page.

Author: kuyan-judith

Last revision: 4 Jun, 2023 at 01:05 UTC (2)

File size: 9.89 MB

On Steam Workshop

Description:

Since this mod was running into RAM limits, I’ve disabled the features I didn’t personally plan on using. If any other modders have specific features they want me to re-enable, please let me know.

***

Wish you could iterate over technologies, buildings, or policies?

Unfortunately, that’s not possible, but hopefully this will let you do something close.

Contains a bunch of inline scripts, scripted effects, and scripted triggers for repeatedly invoking arbitrary other inline scripts, scripted effects, and scripted triggers; examples include "for_each_technology_society"/"foreach/technology/society" and "for_each_policy_category"/"foreach/policy_category"; each provides a range of parameters; for example, the various for_each_technology scripts provide the parameters "tech", "icon", "category", "tier", "cost", "rare", "dangerous", and "background".

All parameters are always input into inline scripts. For scripted triggers and effects, however, most parameters need to be enabled by entering the parameter "enable_parameter_<parameter name> = yes".

To exclude overwritten objects, all scripts used with this module should also use the "not_overwritten_trigger" parameter.

To manually change the properties for certain parameters, I suggest using set_global_flag and has_global_flag; for example, if you want an effect to work differently for unity than for other resources, you could set the global flag "unity_is_unity" then check for the global flag "$resource$_is_unity"

Stuff from other mods will be omitten unless a compatbility module for those mods is also used. Currently there are compatibility modules for:

but now I’ve written a script for it, generating additional compatibility modules should be easy; just ask.

Download
Revisions:

Old revisions of this mod are available below. Click the link to download.