Fix description and formatting

This commit is contained in:
Gunter Labes 2023-12-05 13:34:43 +01:00 committed by GitHub
parent 2423b2321d
commit 5cb60d7f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,58 +1,64 @@
# Modding World Conquest
This section describes how to make eras/modifications to manipulate World Conquest elements.
This file describes how to make your addon work well together with world conquest.
## How to add an era's units to World Conquest's enemy selection pool
This file describes how to make your addon work well together with world conquest. In particular how to write an era that can be used together with world conquest.
Making an era that works well together with world conquest, is quite easy: just add the `[world_conquest_data]` tag to
your `[multiplayer_side]` tag just as the standard world conquest era does, important: your era may **not** set
`require_era=no` for this to work.
Making an era that works well together with world conquest, is quite easy: just add the `[world_conquest_data]` tag to your `[multiplayer_side]` tag just as the standard world conquest era does, important: your era may not have require_download=no for this to work. Furthermore if your era contains new unit types that are not mainline wesnoth, don't forget to put an additional `[world_conquest_data]` in `[era]` to describe which traits these unit types should get when they are selected as heroes (use this to compensate weaker unit types).
Furthermore if your era contains new unit types don't forget to put an additional `[world_conquest_data]` in `[era]`
to describe which traits these unit types should get when they are selected as heroes (use this to compensate weaker
unit types).
To make an era/modification that also changes the enemy army unit types, make sure to define the `wc2_init_enemy` event and use it to set the enemy_army variable that should contains the pool of 'armies' that the enemies are chosen from:
To make an era/modification that also changes the enemy army unit types, make sure to define the `wc2_init_enemy` event
and use it to set the `wc2_enemy_army` variable that should contain the pool of 'armies' that the enemies are chosen
from:
```ini
[event]
name = "wc2_init_enemy"
[filter_conditional]
[variable]
name="wc2_enemy_army.length"
equals=0
[/variable]
[/filter_conditional]
[set_variables]
name = "wc2_enemy_army"
[literal]
# last digit has to be the total number of factions you want to [group]
factions_available = "1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4"
[group]
# allies will be the factions who should be paired with this one
allies_available="2,3,4"
id = "enemyfaction_id"
recruit= "Orcish Grunt,Orcish Archer,Wolf Rider,Orcish Assassin,Troll Whelp"
[recall]
level2 = "Orcish Ruler, Orcish Slayer,..."
level2 = "Orcish Warlord, Troll Warrior,..."
[/recall]
[commander]
level1 = "Orcish Leader, Orcish Grunt,..."
level2 = "Orcish Ruler, Orcish Slayer,..."
level2 = "Orcish Warlord, Troll Warrior,..."
[/commander]
[leader]
level2 = "Troll"
level3 = "Troll Warrior"
recruit = "Orcish Grunt,Orcish Archer,Troll Whelp"
[/leader]
[leader]
level2 = "Orcish Warrior"
level3 = "Orcish Warlord"
recruit = "Orcish Grunt,Orcish Archer,Wolf Rider,Orcish Assassin"
[/leader]
# add more leader specifics here
[/group]
# make another group and copy-paste the previous one to make more factions
[/literal]
[/set_variables]
name = "wc2_init_enemy"
[filter_conditional]
[variable]
name="wc2_enemy_army.length"
equals=0
[/variable]
[/filter_conditional]
[set_variables]
name = "wc2_enemy_army"
[literal]
# last digit has to be the total number of factions you want to [group]
factions_available = "1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4"
[group]
# allies will be the factions who should be paired with this one
allies_available="2,3,4"
id = "enemyfaction_id"
recruit= "Orcish Grunt,Orcish Archer,Wolf Rider,Orcish Assassin,Troll Whelp"
[recall]
level2 = "Orcish Ruler, Orcish Slayer,..."
level2 = "Orcish Warlord, Troll Warrior,..."
[/recall]
[commander]
level1 = "Orcish Leader, Orcish Grunt,..."
level2 = "Orcish Ruler, Orcish Slayer,..."
level2 = "Orcish Warlord, Troll Warrior,..."
[/commander]
[leader]
level2 = "Troll"
level3 = "Troll Warrior"
recruit = "Orcish Grunt,Orcish Archer,Troll Whelp"
[/leader]
[leader]
level2 = "Orcish Warrior"
level3 = "Orcish Warlord"
recruit = "Orcish Grunt,Orcish Archer,Wolf Rider,Orcish Assassin"
[/leader]
# add more leader specifics here
[/group]
# make another group and copy-paste the previous one to make more factions
[/literal]
[/set_variables]
[/event]
```
@ -72,7 +78,7 @@ Next, continue coding:
# load the World Conquest era-specific Lua Code
[lua]
code = " wesnoth.dofile('campaigns/World_Conquest//lua/era_main.lua') "
code = " wesnoth.dofile('campaigns/World_Conquest/lua/era_main.lua') "
[/lua]
# this defines who the commanders, deserters and heroes
@ -296,7 +302,7 @@ Normally, this is what an entire modifications/era file should look like. Notice
# load the World Conquest era-specific Lua Code
[lua]
code = " wesnoth.dofile('campaigns/World_Conquest//lua/era_main.lua') "
code = " wesnoth.dofile('campaigns/World_Conquest/lua/era_main.lua') "
[/lua]
# this defines who the commanders, deserters and heroes