Script effects creates tables of effects from the game's script_docs.
Parameters
| Parameter | Description | Required | Default |
|---|---|---|---|
| category | Selects a table category, valid options are:
|
optional | regular |
| scope | Limits effects to ones relevant to the scope Valid scopes are most game objects, such as pop or character |
optional | all scopes |
| noCollapse | If set to anything, prevents table from starting collapsed | optional | none |
Examples
{{Script effects|scope=treaty}} results in
| Effect | Description | Example | Scopes | Targets |
|---|---|---|---|---|
| withdraw | Withdraws a country from a treaty | scope:treaty = {
withdraw = {
country = <country scope> # must be valid and must be bound by the treaty
}
}
|
treaty |
{{Script effects|category=log}} results in
| Effect | Description | Example |
|---|---|---|
| debug_log | Log a string to the debug log when this effect executes | debug_log = message the message can be a localization string with ROOT, SCOPE and PREV available |
| debug_log_scopes | Log the current scope to the debug log when this effect executes | debug_log_scopes = yes # log full scope info debug_log_scopes = no # log only current scope |
| error_log | Log a string to the error log when this effect executes | error_log = message the message can be a localization string with ROOT, SCOPE and PREV available |
| random_log_scopes | Log the current scope to the random log when this effect executes. | Only use temporarily for debugging purposes as it can introduce localized strings into the random log. random_log_scopes = yes # log full scope info random_log_scopes = no # log only current scope |