Difference between revisions of "Battle Terrain"
Jaskrendix (talk | contribs) |
Sanglorian (talk | contribs) |
||
| (11 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Battle backgrounds are an important component during the fight. | Battle backgrounds are an important component during the fight. | ||
== Proposed Tag Field == | |||
add a field ''tag'' to the JSONs to simplify bonus/malus and other mechanics | |||
== File JSON == | == File JSON == | ||
| Line 11: | Line 15: | ||
* "island_front": "gfx/ui/combat/grass_island.png", | * "island_front": "gfx/ui/combat/grass_island.png", | ||
* "background": "gfx/ui/combat/grass_background.png", | * "background": "gfx/ui/combat/grass_background.png", | ||
the subcategory "battle_graphics" > "hud" | the subcategory "battle_graphics" > "hud" | ||
* "hud_player": "gfx/ui/combat/hp_player_nohp.png", | * "hud_player": "gfx/ui/combat/hp_player_nohp.png", -> '''Pairagrin Symbol lv 3''' | ||
* "hud_opponent": "gfx/ui/combat/hp_opponent_nohp.png", | * "hud_opponent": "gfx/ui/combat/hp_opponent_nohp.png", -> '''Aardorn Symbol lv 3''' | ||
* "tray_player": "gfx/ui/combat/player_party_tray.png", | * "tray_player": "gfx/ui/combat/player_party_tray.png", | ||
* "tray_opponent": "gfx/ui/combat/opponent_party_tray.png" | * "tray_opponent": "gfx/ui/combat/opponent_party_tray.png" | ||
the subcategory "battle_graphics" > "icons": this manages the small tuxeball icons | the subcategory "battle_graphics" > "icons": this manages the small tuxeball icons below the hud (see image below). | ||
* "icon_alive": "gfx/ui/icons/party/party_icon01.png", | * "icon_alive": "gfx/ui/icons/party/party_icon01.png", | ||
* "icon_status": "gfx/ui/icons/party/party_icon02.png", | * "icon_status": "gfx/ui/icons/party/party_icon02.png", | ||
| Line 22: | Line 26: | ||
* "icon_empty": "gfx/ui/icons/party/party_empty.png" | * "icon_empty": "gfx/ui/icons/party/party_empty.png" | ||
[[File:Battle_screen.png | [[File:Battle_screen.png]] | ||
Here is an example of what an environment file might look like: | Here is an example of what an environment file might look like: | ||
| Line 56: | Line 60: | ||
=== Dynamic background === | === Dynamic background === | ||
It changes depending the time. Night | It changes depending the time. | ||
Day: | |||
<properties> | |||
<property name="act1" value="set_variable environment:grass"/> | |||
<property name="cond1" value="not variable_set stage_of_day:night"/> | |||
<property name="cond2" value="not variable_set environment:grass"/> | |||
</properties> | |||
Night: | |||
<properties> | |||
<property name="act1" value="set_variable environment:night_grass"/> | |||
<property name="cond1" value="is variable_set stage_of_day:night"/> | |||
<property name="cond2" value="not variable_set environment:night_grass"/> | |||
</properties> | |||
You need to replace '''grass''' and '''night_grass'''. | |||
=== Fixed background === | === Fixed background === | ||
It doesn't change. | It doesn't change. | ||
<properties> | |||
<property name="act1" value="set_variable environment:interior"/> | |||
<property name="cond1" value="not variable_set environment:interior"/> | |||
</properties> | |||
== Arid Background - "arid" == | == Arid Background - "arid" == | ||
| Line 99: | Line 115: | ||
== Interior Background - "interior" == | == Interior Background - "interior" == | ||
[[File:Battle bg03.png]] - [[File: | [[File:Battle bg03.png]] - [[File:Cobble front island.png]] - [[File:Cobble front island.png]] | ||
== Night Arid Background - "night_arid" == | == Night Arid Background - "night_arid" == | ||
| Line 120: | Line 136: | ||
== Night Grass Background - "night_grass" == | == Night Grass Background - "night_grass" == | ||
[[File:Night grass background.png]] - [[File: | [[File:Night grass background.png]] - [[File:Night grass island front.png]] - [[File:Night grass island front.png]] | ||
== Night Ocean Background - "night_ocean" == | == Night Ocean Background - "night_ocean" == | ||
| Line 126: | Line 142: | ||
== Night Plain Background - "night_plain" == | == Night Plain Background - "night_plain" == | ||
[[File:Night plain background.png]] - [[File: | [[File:Night plain background.png]] - [[File:Night grass island front.png]] - [[File:Night grass island front.png]] | ||
== Night Sea Background - "night_sea" == | == Night Sea Background - "night_sea" == | ||
| Line 135: | Line 151: | ||
== Night Valley Background - "night_valley" == | == Night Valley Background - "night_valley" == | ||
[[File:Night valley background.png]] - [[File: | [[File:Night valley background.png]] - [[File:Night grass island front.png]] - [[File:Night grass island front.png]] | ||
== Ocean Background - "ocean" == | == Ocean Background - "ocean" == | ||
| Line 141: | Line 157: | ||
== Plain Background - "plain" == | == Plain Background - "plain" == | ||
[[File:Plain background.png]] - [[File: | [[File:Plain background.png]] - [[File:Night grass island front.png]] - [[File:Night grass island front.png]] | ||
== Sea Background - "sea" == | == Sea Background - "sea" == | ||
| Line 190: | Line 206: | ||
[[File:Ice front island.png]] - [[File:Ice back island.png]] | [[File:Ice front island.png]] - [[File:Ice back island.png]] | ||
[[File:Rain front island.png]] - [[File:Rain back island.png]] | [[File:Rain front island.png]] - [[File:Rain back island.png]] | ||
[[File:Paper front island.png]] - [[File:Paper back island.png]] | |||
Latest revision as of 13:41, 11 May 2026
Battle backgrounds are an important component during the fight.
Proposed Tag Field[edit | edit source]
add a field tag to the JSONs to simplify bonus/malus and other mechanics
File JSON[edit | edit source]
Battle Terrains in Tuxemon can be created by adding a JSON file to the mods/tuxemon/db/environment directory.
- "slug": "grass",
- "battle_music": "music_battle_loop",
the category: "battle_graphics": this is the main category which contains hud and icons and it manages the islands (terrain below the monsters) as well as the background. You can see many examples below (islands and backgrounds).
- "island_back": "gfx/ui/combat/grass_island.png",
- "island_front": "gfx/ui/combat/grass_island.png",
- "background": "gfx/ui/combat/grass_background.png",
the subcategory "battle_graphics" > "hud"
- "hud_player": "gfx/ui/combat/hp_player_nohp.png", -> Pairagrin Symbol lv 3
- "hud_opponent": "gfx/ui/combat/hp_opponent_nohp.png", -> Aardorn Symbol lv 3
- "tray_player": "gfx/ui/combat/player_party_tray.png",
- "tray_opponent": "gfx/ui/combat/opponent_party_tray.png"
the subcategory "battle_graphics" > "icons": this manages the small tuxeball icons below the hud (see image below).
- "icon_alive": "gfx/ui/icons/party/party_icon01.png",
- "icon_status": "gfx/ui/icons/party/party_icon02.png",
- "icon_faint": "gfx/ui/icons/party/party_icon03.png",
- "icon_empty": "gfx/ui/icons/party/party_empty.png"
Here is an example of what an environment file might look like:
`mods/tuxemon/db/environment/grass.json`
json
{
"slug": "grass",
"battle_graphics": {
"island_back": "gfx/ui/combat/grass_island.png",
"island_front": "gfx/ui/combat/grass_island.png",
"background": "gfx/ui/combat/grass_background.png",
"hud": {
"hud_player": "gfx/ui/combat/hp_player_nohp.png",
"hud_opponent": "gfx/ui/combat/hp_opponent_nohp.png",
"tray_player": "gfx/ui/combat/player_party_tray.png",
"tray_opponent": "gfx/ui/combat/opponent_party_tray.png"
},
"icons": {
"icon_alive": "gfx/ui/icons/party/party_icon01.png",
"icon_status": "gfx/ui/icons/party/party_icon02.png",
"icon_faint": "gfx/ui/icons/party/party_icon03.png",
"icon_empty": "gfx/ui/icons/party/party_empty.png"
}
},
"battle_music": "music_battle_loop"
}
Set background[edit | edit source]
How do I set up the battle terrain? It depends on your "taste".
Dynamic background[edit | edit source]
It changes depending the time. Day:
<properties> <property name="act1" value="set_variable environment:grass"/> <property name="cond1" value="not variable_set stage_of_day:night"/> <property name="cond2" value="not variable_set environment:grass"/> </properties>
Night:
<properties> <property name="act1" value="set_variable environment:night_grass"/> <property name="cond1" value="is variable_set stage_of_day:night"/> <property name="cond2" value="not variable_set environment:night_grass"/> </properties>
You need to replace grass and night_grass.
Fixed background[edit | edit source]
It doesn't change.
<properties> <property name="act1" value="set_variable environment:interior"/> <property name="cond1" value="not variable_set environment:interior"/> </properties>



































































