Difference between revisions of "Battle Terrain"

From Tuxepedia
Jump to navigation Jump to search
 
(32 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.  
== File JSON ==
Battle Terrains in Tuxemon can be created by adding a JSON file to the <code>mods/tuxemon/db/environment</code> 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"
[[File:Battle_screen.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 ==


How do I set up the battle terrain? It depends on your "taste".
How do I set up the battle terrain? It depends on your "taste".


= Dynamic background =  
=== Dynamic background ===  
It changes depending the time. Night and day.
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:


* One called "Environment Day"
  <properties>
* <code>set_variable environment:grass</code>
    <property name="act1" value="set_variable environment:night_grass"/>
* <code>is variable_set daytime:true</code>
    <property name="cond1" value="is variable_set stage_of_day:night"/>
    <property name="cond2" value="not variable_set environment:night_grass"/>
  </properties>


* One called "Environment Night"
You need to replace '''grass''' and '''night_grass'''.
* <code>set_variable environment:night_grass</code>
* <code>is variable_set daytime:false</code>


= Fixed background =  
=== Fixed background ===  
It doesn't change.
It doesn't change.


* <code>set_variable environment:grass</code>
  <properties>
    <property name="act1" value="set_variable environment:interior"/>
    <property name="cond1" value="not variable_set environment:interior"/>
  </properties>
 
== Arid Background - "arid" ==
[[File:Arid background.png]] - [[File:Dried mud front island.png]] - [[File:Dried mud back island.png]]
 
== Beach Background - "beach" ==
[[File:Beach background.png]] - [[File:Sand front island.png]] - [[File:Sand front island.png]]


== Arid Background ==
== Bridge Background - "bridge" ==
[[File:Arid background.png]]
[[File:Bridge background.png]] - [[File:Cobble front island.png]] - [[File:Cobble front island.png]]


== Beach Background ==
== Canyon Background - "canyon" ==
[[File:Beach background.png]]
[[File:Canyon background.png]] - [[File:Dried mud front island.png]] - [[File:Dried mud back island.png]]


== Bridge Background ==
== Cave Background - "cave" ==
[[File:Bridge background.png]]
[[File:Cave background.png]] - [[File:Cave front island.png]] - [[File:Cave front island.png]]


== Canyon Background ==
== Cliff Background - "cliff" ==
[[File:Canyon background.png]]
[[File:Cliff background.png]] - [[File:Grass front island.png]] - [[File:Grass front island.png]]


== Cave Background ==
== Clouds Background - "clouds" ==
[[File:Cave background.png]]
[[File:Clouds background.png]] - [[File:Sky front island.png]] - [[File:Sky back island.png]]


== Cavern Background ==
== Desert Background - "desert" ==
[[File:Cavern background.png]]
[[File:Desert background.png]] - [[File:Sand front island.png]] - [[File:Sand front island.png]]


== Cliff Background ==
== Grass Background - "grass ==
[[File:Cliff background.png]]
[[File:Grass background.png]] - [[File:Grass front island.png]] - [[File:Grass front island.png]]


== Clouds Background ==
== Interior Background - "interior" ==
[[File:Clouds background.png]]
[[File:Battle bg03.png]] - [[File:Paper front island.png]] - [[File:Paper back island.png]]


== Desert Background ==
== Night Arid Background - "night_arid" ==
[[File:Desert background.png]]
[[File:Night arid background.png]] - [[File:Dried mud front island.png]] - [[File:Dried mud back island.png]]


== Forest Background ==
== Night Beach Background - "night_beach" ==
[[File:Forest background.png]]
[[File:Night beach background.png]] - [[File:Water front island.png]] - [[File:Water front island.png]]


== Grass Background ==
== Night Bridge Background - "night_bridge" ==
[[File:Grass background.png]]
[[File:Night bridge background.png]] - [[File:Cobble front island.png]] - [[File:Cobble front island.png]]


== Interior Background ==
== Night Canyon Background - "night_canyon" ==
[[File:Battle bg03.png]]
[[File:Night canyon background.png]] - [[File:Dried mud front island.png]] - [[File:Dried mud back island.png]]


== Night Arid Background ==
== Night Cliff Background - "night_cliff" ==
[[File:Night arid background.png]]
[[File:Night cliff background.png]] - [[File:Grass front island.png]] - [[File:Grass front island.png]]


== Night Beach Background ==
== Night Desert Background - "night_desert" ==
[[File:Night beach background.png]]
[[File:Night desert background.png]] - [[File:Sand front island.png]] - [[File:Sand front island.png]]


== Night Bridge Background ==
== Night Grass Background - "night_grass" ==
[[File:Night bridge background.png]]
[[File:Night grass background.png]] - [[File:Grass front island.png]] - [[File:Grass front island.png]]


== Night Canyon Background ==
== Night Ocean Background - "night_ocean" ==
[[File:Night canyon background.png]]
[[File:Night ocean background.png]] - [[File:Water front island.png]] - [[File:Water front island.png]]


== Night Cliff Background ==
== Night Plain Background - "night_plain" ==
[[File:Night cliff background.png]]
[[File:Night plain background.png]] - [[File:Grass front island.png]] - [[File:Grass front island.png]]


== Night Desert Background ==
== Night Sea Background - "night_sea" ==
[[File:Night desert background.png]]
[[File:Night sea background.png]] - [[File:Water front island.png]] - [[File:Water front island.png]]


== Night Forest Background ==
== Night Snowplain Background - "night_snowplain" ==
[[File:Night forest background.png]]
[[File:Night snowplain background.png]] - [[File:Snow front island.png]] - [[File:Snow front island.png]]


== Night Grass Background ==
== Night Valley Background - "night_valley" ==
[[File:Night grass background.png]]
[[File:Night valley background.png]] - [[File:Grass front island.png]] - [[File:Grass front island.png]]


== Night Ocean Background ==
== Ocean Background - "ocean" ==
[[File:Night ocean background.png]]
[[File:Ocean background.png]] - [[File:Water front island.png]] - [[File:Water front island.png]]


== Night Plain Background ==
== Plain Background - "plain" ==
[[File:Night plain background.png]]
[[File:Plain background.png]] - [[File:Grass front island.png]] - [[File:Grass front island.png]]


== Night Sand Background ==
== Sea Background - "sea" ==
[[File:Night sand background.png]]
[[File:Sea background.png]] - [[File:Water front island.png]] - [[File:Water front island.png]]


== Night Sea Background ==
== Snowplain Background - "snowplain" ==
[[File:Night sea background.png]]
[[File:Snowplain background.png]] - [[File:Snow front island.png]] - [[File:Snow front island.png]]


== Night Snow Background ==
== Stadium Background - "stadium" ==
[[File:Night snow background.png]]
[[File:Stadium background.png]] - [[File:Stadium front island.png]] - [[File:Stadium back island.png]]


== Night Snowplain Background ==
== Sunset Background - "sunset" ==
[[File:Night snowplain background.png]]
[[File:Sunset background.png]] - [[File:Terra front island.png]] - [[File:Terra back island.png]]


== Night Valley Background ==
== Valley Background - "valley" ==
[[File:Night valley background.png]]
[[File:Valley background.png]] - [[File:Greengrass front island.png]] - [[File:Greengrass front island.png]]


== Ocean Background ==
== Unused Terrain ==  
[[File:Ocean background.png]]


== Plain Background ==
=== Cavern Background - "cavern" ===
[[File:Plain background.png]]
[[File:Cavern background.png]] - [[File:Cave front island.png]] - [[File:Cave front island.png]]


== Sand Background ==
=== Forest Background - "forest" ===
[[File:Sand background.png]]
[[File:Forest background.png]] - [[File:Woodland.png]] - [[File:Woodland.png]]


== Sea Background ==
=== Night Forest Background - "night_forest" ===
[[File:Sea background.png]]
[[File:Night forest background.png]] - [[File:Woodland.png]] - [[File:Woodland.png]]


== Snow Background ==
=== Night Sand Background - "night_sand" ===
[[File:Snow background.png]]
[[File:Night sand background.png]] - [[File:Sand front island.png]] - [[File:Sand front island.png]]


== Snowplain Background ==
=== Sand Background - "sand" ===
[[File:Snowplain background.png]]
[[File:Sand background.png]] - [[File:Sand front island.png]] - [[File:Sand front island.png]]


== Stadium Background ==
=== Night Snow Background - "night_snow" ===
[[File:Stadium background.png]]
[[File:Night snow background.png]] - [[File:Snow front island.png]] - [[File:Snow front island.png]]


== Sunset Background ==
=== Snow Background - "snow" ===
[[File:Sunset background.png]]
[[File:Snow background.png]] - [[File:Snow front island.png]] - [[File:Snow front island.png]]


== Underwater Background ==
=== Underwater Background - "underwater" ===
[[File:Underwater background.png]]
[[File:Underwater background.png]] - [[File:Big blue front island.png]] - [[File:Big blue front island.png]]


== Valley Background ==
== Unused Terrain islands ==
[[File:Valley background.png]]
[[File:Warning front island.png]] - [[File:Warning back island.png]]
[[File:Leather front island.png]] - [[File:Leather back island.png]]
[[File:Parque front island.png]] - [[File:Parque back island.png]]
[[File:Ice front island.png]] - [[File:Ice back island.png]]
[[File:Rain front island.png]] - [[File:Rain back island.png]]

Latest revision as of 19:28, 26 January 2024

Battle backgrounds are an important component during the fight.

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"

Battle screen.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>

Arid Background - "arid"[edit | edit source]

Arid background.png - Dried mud front island.png - Dried mud back island.png

Beach Background - "beach"[edit | edit source]

Beach background.png - Sand front island.png - Sand front island.png

Bridge Background - "bridge"[edit | edit source]

Bridge background.png - Cobble front island.png - Cobble front island.png

Canyon Background - "canyon"[edit | edit source]

Canyon background.png - Dried mud front island.png - Dried mud back island.png

Cave Background - "cave"[edit | edit source]

Cave background.png - Cave front island.png - Cave front island.png

Cliff Background - "cliff"[edit | edit source]

Cliff background.png - Grass front island.png - Grass front island.png

Clouds Background - "clouds"[edit | edit source]

Clouds background.png - Sky front island.png - Sky back island.png

Desert Background - "desert"[edit | edit source]

Desert background.png - Sand front island.png - Sand front island.png

Grass Background - "grass[edit | edit source]

Grass background.png - Grass front island.png - Grass front island.png

Interior Background - "interior"[edit | edit source]

Battle bg03.png - Paper front island.png - Paper back island.png

Night Arid Background - "night_arid"[edit | edit source]

Night arid background.png - Dried mud front island.png - Dried mud back island.png

Night Beach Background - "night_beach"[edit | edit source]

Night beach background.png - Water front island.png - Water front island.png

Night Bridge Background - "night_bridge"[edit | edit source]

Night bridge background.png - Cobble front island.png - Cobble front island.png

Night Canyon Background - "night_canyon"[edit | edit source]

Night canyon background.png - Dried mud front island.png - Dried mud back island.png

Night Cliff Background - "night_cliff"[edit | edit source]

Night cliff background.png - Grass front island.png - Grass front island.png

Night Desert Background - "night_desert"[edit | edit source]

Night desert background.png - Sand front island.png - Sand front island.png

Night Grass Background - "night_grass"[edit | edit source]

Night grass background.png - Grass front island.png - Grass front island.png

Night Ocean Background - "night_ocean"[edit | edit source]

Night ocean background.png - Water front island.png - Water front island.png

Night Plain Background - "night_plain"[edit | edit source]

Night plain background.png - Grass front island.png - Grass front island.png

Night Sea Background - "night_sea"[edit | edit source]

Night sea background.png - Water front island.png - Water front island.png

Night Snowplain Background - "night_snowplain"[edit | edit source]

Night snowplain background.png - Snow front island.png - Snow front island.png

Night Valley Background - "night_valley"[edit | edit source]

Night valley background.png - Grass front island.png - Grass front island.png

Ocean Background - "ocean"[edit | edit source]

Ocean background.png - Water front island.png - Water front island.png

Plain Background - "plain"[edit | edit source]

Plain background.png - Grass front island.png - Grass front island.png

Sea Background - "sea"[edit | edit source]

Sea background.png - Water front island.png - Water front island.png

Snowplain Background - "snowplain"[edit | edit source]

Snowplain background.png - Snow front island.png - Snow front island.png

Stadium Background - "stadium"[edit | edit source]

Stadium background.png - Stadium front island.png - Stadium back island.png

Sunset Background - "sunset"[edit | edit source]

Sunset background.png - Terra front island.png - Terra back island.png

Valley Background - "valley"[edit | edit source]

Valley background.png - Greengrass front island.png - Greengrass front island.png

Unused Terrain[edit | edit source]

Cavern Background - "cavern"[edit | edit source]

Cavern background.png - Cave front island.png - Cave front island.png

Forest Background - "forest"[edit | edit source]

Forest background.png - Woodland.png - Woodland.png

Night Forest Background - "night_forest"[edit | edit source]

Night forest background.png - Woodland.png - Woodland.png

Night Sand Background - "night_sand"[edit | edit source]

Night sand background.png - Sand front island.png - Sand front island.png

Sand Background - "sand"[edit | edit source]

Sand background.png - Sand front island.png - Sand front island.png

Night Snow Background - "night_snow"[edit | edit source]

Night snow background.png - Snow front island.png - Snow front island.png

Snow Background - "snow"[edit | edit source]

Snow background.png - Snow front island.png - Snow front island.png

Underwater Background - "underwater"[edit | edit source]

Underwater background.png - Big blue front island.png - Big blue front island.png

Unused Terrain islands[edit | edit source]

Warning front island.png - Warning back island.png Leather front island.png - Leather back island.png Parque front island.png - Parque back island.png Ice front island.png - Ice back island.png Rain front island.png - Rain back island.png