You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alice_command_units_condition_4;Is enabled in game rules
1807
1807
free_trade_di;Free trade agreement
1808
1808
free_trade_offer;$actor$ is offering a free trade agreement,allowing us to trade tariff-free for $years$ years
1809
1809
alice_original_war_participant_not_in_war;?Y$NATION$?W is no longer in the war
@@ -1834,10 +1834,15 @@ alice_gamerule_fog_of_war;Fog of war
1834
1834
alice_gamerule_fog_of_war_desc;Specifies whether to enable fog of war (FoW) to obscure vision of neutral/enemy provinces&units
1835
1835
alice_gamerule_fog_of_war_opt_disabled;Fog of war is OFF
1836
1836
alice_gamerule_fog_of_war_opt_enabled;Fog of war is ON
1837
+
alice_gamerule_fog_of_war_opt_disabled_for_observer; Fog of war is OFF for observer
1837
1838
alice_gamerule_auto_concession_peace;Auto-peace when conceding wargoals
1838
1839
alice_gamerule_auto_concession_peace_desc;Specifies whether a conceding peacedeal (ie one side surrenders to ALL added wargoals,or 100 warscore) will always be accepted no matter what
1839
1840
alice_gamerule_auto_concession_peace_opt_cannot_reject;Conceding peace offers cannot be rejected
1840
1841
alice_gamerule_auto_concession_peace_opt_can_reject;Conceding peace offers can be rejected
1842
+
alice_gamerule_command_units;Command AI puppet units while at war
alice_gamerule_command_units_desc;Specifies whether AI puppet units may be commanded by the player at war
1841
1846
alice_savegame_incompatible_warning;?RThis savegame is from a diffrent scenario than the currently loaded one. The save may be buggy,fail to load or crash the game.?W
1842
1847
alice_show_all_saves_text;Show all saves
1843
1848
alice_show_all_saves_tooltip;Toggle showing all saves (even potentially incompatible ones) in the save list
@@ -1878,7 +1883,7 @@ amsg_embargod;The nation has been embargoed
1878
1883
save_name_label;File name (blank = auto)
1879
1884
save_warning_tooltip;A file with this name already exists
Copy file name to clipboardExpand all lines: docs/extensions.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -574,9 +574,10 @@ These relate to occupations
574
574
These relate to gamerules
575
575
576
576
-`alice_can_goto_war_against_spherelord_default_setting = 1.0f` - Sets the default setting for the hardcoded gamerule deciding whether a sphereling can goto war against its spherelord. Can be either 1 (which means they can declare war against spherelord), or 0 (which means they cannot). Default is 1
577
-
-`alice_allow_partial_retreat_default_setting = 0.0f` - Sets the default setting for the hardcoded gamerule deciding whether armies can partial-retreat from battles. 1.0 means it is enabled, while 0 means it is disabled.
577
+
-`alice_allow_partial_retreat_default_setting = 0.0f` - Sets the default setting for the hardcoded gamerule deciding whether armies can partial-retreat from battles. 1.0 means it is enabled, 0 means it is disabled, and 2.0 it is disabled only for the observer tag
578
578
-`alice_fog_of_war_default_setting = 1.0f` - Sets the default setting for the hardcoded gamerule deciding whether fog og war is on or off. 1.0 means fog of war is on, where 0.0 means it is off.
579
579
-`alice_auto_concession_peace_default_setting = 1.0f` - Sets the default setting for the hardcoded gamerule deciding whether a peacedeal will be force-accepted if it is conceding all wargoals (or if the peacedeal concedes 100 warscore or higher). 1.0 means forced-peaces are disabled, where 0.0 means they are enabled.
580
+
-`alice_command_units_default_setting = 0.0f` - Decides whether AI puppets' units can be commanded by players while at war. A value of 0.0f means it is disabled, while a value of 1.0f means it is enabled
580
581
581
582
### Support for reforms based on party issues
582
583
@@ -841,23 +842,14 @@ scripted_gamerule = {
841
842
name = "test_gamerule"
842
843
option = {
843
844
name = "test__gameruleopt_1"
844
-
on_select = {
845
-
set_global_flag = rule_1
846
-
}
847
-
on_deselect = {
848
-
clr_global_flag = rule_1
849
-
}
845
+
on_select = "opt1_on_select"
846
+
on_deselect = "opt1_on_deselect"
850
847
}
851
848
option = {
852
849
name = "test__gameruleopt_2"
853
850
default_option = yes
854
-
on_select = {
855
-
set_global_flag = rule_2
856
-
}
857
-
on_deselect = {
858
-
clr_global_flag = rule_2
859
-
}
860
-
}
851
+
on_select = "opt2_on_select"
852
+
on_deselect = "opt2_on_deselect"
861
853
862
854
}
863
855
```
@@ -869,7 +861,8 @@ Each gamerule may have one or more options. Each option also has a mandatory `na
869
861
870
862
Next there is the `default_option` member. This simply signals which of the options is selected by default on a new save.
871
863
872
-
Lastly, there is the `on_select` and `on_deselect` members. These describe a scripted effect to run when said option is either selected or deselected respectively. In the example above it will set a global flag when enabled, and clear that same flag when disabled.
864
+
Lastly, there is the `on_select` and `on_deselect` members. These describe the name of a lua function which should be run when the corrosponding option is selected/deselected. The function should start with the "alice" prefix take a single parameter, which is the numeric ID of the gamerule which was changed.
865
+
Eg. in the previous example, if `"test_gameruleopt_2"` was selected, the function named `alice.opt2_on_select` would be run.
873
866
874
867
You can also check the state of a gamerule directly in a trigger, with the following trigger:
875
868
@@ -880,6 +873,7 @@ check_gamerule = {
880
873
}_
881
874
```
882
875
Here, it evaluates if the gamerule with name `test_gamerule` is set to the option with the name `test_gameruleopt_1`.
876
+
The gamerule can also be checked in lua code, by calling `GAMERULE.check_gamerule_option_by_name` or `GAMERULE.check_gamerule_option_by_id`.
883
877
884
878
There are also some hardcoded gamerules which interact with base gameplay directly which is not present in the gamerules.txt file. These can also have their selected option checked with `check_gamerule` trigger. Below is a list of names of the hardcoded gamerules and their options:
885
879
@@ -898,3 +892,7 @@ There are also some hardcoded gamerules which interact with base gameplay direct
898
892
-`alice_gamerule_auto_concession_peace`: Name of gamerule for enabling/disabling auto peacing in cases of the enemy conceding all wargoals
899
893
- `alice_gamerule_auto_concession_peace_opt_cannot_reject`: Option for the auto-peace being enabled
900
894
- `alice_gamerule_auto_concession_peace_opt_can_reject`: Option for the auto-peace being disabled
895
+
896
+
-`alice_gamerule_command_units`: Name of gamerule for enabling/disabling commanding AI puppets' troops in wars
897
+
-`alice_gamerule_command_units_opt_disabled`: Option for it being disabled
898
+
-`alice_gamerule_command_units_opt_disabled`: Option for it being enabled
Copy file name to clipboardExpand all lines: docs/features/out-of-battle.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,3 +35,13 @@
35
35
36
36
# US18 Ships repairs
37
37
38
+
# US101 Sieges and Occupations
39
+
40
+
| AC1 | Forts are built once with construction cost of some goods comparable to an extra factory level. |
41
+
| AC2 | Forts reduce siege speed by alice_fort_siege_slowdown factor (0.75 by default) per level. |
42
+
| AC3 | Forts increase hostile siege attrition by state.defines.alice_fort_siege_attrition_per_level per level (0.35 by default). |
43
+
| AC4 | Forts moderately impact victory points score of a province (+1 per fort level). |
44
+
| AC5 | Engineers reduce the effective fort level. Number of engineers required to reduce by 1 level depends on the sieging army size. At least state.defines.engineer_unit_ratio required (0.1 by default) |
45
+
| AC6 | Recon units increase occupation speed of any province. At least state.defines.recon_unit_ratio is required (0.1 by default) |
46
+
| AC7 | Nation sieges its owned provinces 25% faster. |
47
+
| AC8 | Nation sieges its core provinces 10% faster. |
0 commit comments