Everything You Wanted to Know About Editing Battle Moon Wars

July 30th, 2008

 

But were too afraid of Takumi to ask.

If you haven’t been paying attention, go ahead and grab the latest pack, fixing a plethora of typos and a few minor gameplay bugs I accidently introduced… mostly for the ‘better’ of the player’s side.
http://bmw.seiha.org/bmw_englishV0_95.zip (you don’t need to run the graphics patch if you have already)

This isn’t going to be a particularly humor filled or interesting entry, mostly just a list of the saliant places in the Battle Moon Wars editing world. I don’t imagine it’ll change too much between Acts 3 and 4 either.

Tools You’ll Need:

YanePack
Matilda
Your favorite image editor (must at least support PNG, sorry MSPaint)
Your favorite text editor

The Basics:

YanePack.exe

Unpacking BMW .dat Files:

    1. Open YanePack.exe
    2. Click on Extract
    3. Select data*.dat 

Repacking BMW .dat Files:

  1. Open YanePack.exe
  2. Click on Pack Folder 
  3. Select data* folder

Note: 
(Data1/3/5/7 are naturally compression packed while 2/4/6/8/8_2 are simply packed, but it doesn’t matter which you use. You don’t even need to repack them if the unpacked folder is in the bmw.exe directory)

The Only Two Buttons You Need in Matilda

 Extracting Images from .yga Files

  1. Open Matilda.exe
  2. Select Import
  3. Select the .Yga file
  4. Select Export
  5. Change "Save Type" to .png

Changing .png Images Back to .yga

  1. Open Matilda.exe
  2. Select Import
  3. Select the .png file
  4. Select Export
  5. Change "Save Type" to .yga

There. That’s all the technical knowledge that you need to open up the files and get at their tasty innards. There are other ways to open YGA files (they’re just multilayered images anyway), but that’s the quickest/easiest I know of that doesn’t require a different OS.

I’ll go ahead and go through each .dat and list the important files for modifying things. There are quite a few files for just defining the engine or graphics or making lists to assign background music and such that I’ll ignore for the most part. I’ll list everything that I changed.

Data1 
Universal character, skill and item definition files

ability_interface.xml
Definitions file for skill names and popup descriptions

chara_growth.xml
Definitions file for stat changes on level-up, sorted by character growth-type

chara_init.xml
Definitions file for all characters and enemies that first appear in Act 1 (Specifics on character definitions below)

chara_init_second.xml
Definitions file for all characters and enemies that first appear in Act 2

chara_init_third.xml
Definitions file for all characters and enemies that first appear in Act 3

face_map.xml
Definitions file assigning character faces to IDs and display names (only used for exp awards)

help_interface.xml
Definitions file for tutorial popups

item_interface.xml
Definitions file for item tool tips

item_name.txt
List defining names to be called for post battle item awards (does not change the item given)

scenario.xml
Definition file for stage names and stage flow (scenario2 isn’t in use at all)

spirits_interface.xml
Definitions file for Spirits popups

weapon_init.xml
Definitions file for all attacks first appearing in Act 1 (Specifics on weapons definitions below)

weapon_init_second.xml
Definitions file for all attacks first appearing in Act 2

weapon_init_third.xml
Definitions file for all attacks first appearing in Act 3

Character Definitions

<character id="PLAYER_TAKUMI">
  <init name="匠"> –deprecated (use face_map.xml) 
   <face id="TAKUMI" /> –define face to be used for battle screens
   <map src="data3\chara\takumi_map.xml" /> –define map sprites
   <demo src="data3\chara\takumi_demo.xml" symbol="data3\chara\takumi_symbol.xml" /> –define defensive/no animation character sprites
   <bgm id="TAKUMI" /> –define BGM (if not set, use opponent’s BGM. IE, most enemies don’t have this set)
   <nature type="STRONG" /> –define Will growth rates (values are WEAK, NORMAL, STRONG, or VERYSTRONG)
   <growth type="FIGHT_VERSATILITY" /> –define level up growth rate (see chara_growth.xml for specific numbers)
   <penalty value="800" /> –define penalty value if character is defeated
   <fund strength="147" magic="110" hit="181" avoid="165" defence="130" skill="150" sp="50" /> –define fundamental stats
   <battle hp="7000" en="190" tough="1700" quick="85" move="5" jump="0" /> –define battle stats
   <weapon id="GEKIKEN" /> –define attacks available
   <weapon id="HADANKEN" /> 
   <weaponcost type="D" /> — define cost of upgrading attacks (A,B,C,D,E,F possible)
   <item num="2" /> –define number of items able to be held
  </init>
  <growth>
   <spirit lv="1" id="HIT" attr="15" /> –define Spirit and level obtained (see spirits_interface.xml to cross reference IDs) and cost of Spirit
   <spirit lv="1" id="EFFORT" attr="15" />
   <spirit lv="12" id="TOUGH" attr="15" />
   <spirit lv="24" id="FIREBALL" attr="35" />
   <spirit lv="27" id="POWER" attr="40" />
   <spirit lv="30" id="AWAKE" attr="55" />
   <skill lv="1" id="SPECTER" attr="1" /> –define Skills and level obtained (see ability_interface.xml to cross reference IDs) and level of the skill
   <skill lv="1" id="FUNDPOWER" attr="1" />
   <skill lv="1" id="MOVE_UP" attr="1" />
   <skill lv="5" id="SPECTER" attr="2" />
   <skill lv="7" id="FUNDPOWER" attr="2" />
   <skill lv="12" id="SPECTER" attr="3" />
   <skill lv="13" id="FUNDPOWER" attr="3" />
   <skill lv="19" id="FUNDPOWER" attr="4" />
   <skill lv="21" id="SPECTER" attr="4" />
   <skill lv="24" id="FUNDPOWER" attr="5" />
   <skill lv="26" id="SPECTER" attr="5" />
   <skill lv="30" id="FUNDPOWER" attr="6" />
   <skill lv="35" id="SPECTER" attr="6" />
   <skill lv="35" id="FUNDPOWER" attr="7" />
   <skill lv="39" id="SPECTER" attr="7" />
   <skill lv="40" id="FUNDPOWER" attr="8" />
   <skill lv="42" id="SPECTER" attr="8" />
   <skill lv="44" id="FUNDPOWER" attr="9" />
  </growth>
 </character>

Weapon Definitions

<weaponinfo id="SCHBEIN_SCHTAIN" name="Schweinstein"> –define ID and displayed name
  <demo src="data7\weapon\schbein_schtain_demo.xml" /> –define graphics file to use
  <kind type="MAGIC" /> –define icon to use (possible values are FIGHT (physical), MAGIC (magical), STATUS (status buff), REFILL (reload), CURE (heal), FIGHT_COND (status affliction using physical), MAGIC_COND (status affliction using magical), FIGHT_COLLAB (combination attack using physical), MAGIC_COLLAB (combination attack using magical))
  <attr p="true" m="false" t="false" f="true" /> –define extra attributes (p=Post movement, m=Magic (for skill activation), t=Projectile (for skill activation), f=Field (for skill activation))
  <attack>
   <power value="3500" /> –define base attack power
   <all min="1" max="6" /> –define yellow range
   <core min="1" max="6" /> –define red range
   <height value="12" /> –define height variance allowed
  </attack>
  <corect hit="30" ct="10" /> –define modifications to hit rate and critical rate
  <need en="0" ballet="3" mental="120" /> –define total EN consumed, base Ammo available, and Will required for attack
  <train type="E" /> –define how much attack is upgraded per level. Values are A-F
  <aid> –extra effects of attack (status changes and such). See below
   <field type="LINE" friend="false" src="data7\weapon\schweinstein_map_symbol.xml" />
  </aid>
 </weaponinfo>

Example Possible <aid> Values

 <fund strength="0" magic="0" hit="10" avoid="10" defence="0" skill="0" sp="0" /> –add these fundamental stats as a buff
<cond type="DEFENCE" value="1" />  –add status effect Defense Down. Possible values are DEFENCE, HIT, MOVE, AVOID, ACTION
<mental value="3" /> –Add Will
<field type="THROW" friend="false" size="2" src="data7\weapon\nagebolk_map_symbol.xml" /> –define Field attacks. Type values are: THROW, CENTER, LINE. Friend defines possibility of friendly fire. Size is AoE, and src points to the definition file for the image cutin
<chara id="PLAYER_KOHAKU_2" weapon="MAID_V_K" /> –define characters and the attacks involved in a combination attack

A note on that last one. Combination Attacks have to be defined for each character (IE, there’s an FTS_CIEL, FTS_ARC, and FTS_AKIHA all for the Final Typenic Special) and you can just set it to not check and charge the other characters EN/Ammo for their use. There is a game glitch that you can still use a Combination Attack so long as the instigator has enough EN, even if the other participant(s) do not.

Data2
Some Battle Moon Wars 1 graphical files. Completely deprecated.

 

Data3
Act 1 definitions files. Partially deprecated

Data3/chara
Basic character definition files

*_demo.xml
Define pointers for character defensive properties

*_map.xml
Define various for map related sprite functions

*_map_plane.xml
Define spritesheet to use for map sprites

*_map_sprite.xml
Define sprites within spritesheet for map sprites (all *_sprite things for weapons and such will have a _plane file defining shortcuts for everything relating to that sprite function and will not be mentioned anymore)

*_msg.xml
Define defensive messages

*_symbol.xml
Define defensive sprites

Data3/demo
Various definition files for the animated battle sequences (backgrounds and such)

Data3/face
Definition files for the visual novel faces, partially deprecated

Data3/hero
Definition files for choosing a hero at the beginning of the game

hero_interface.xml
Define text and place graphics for choosing Super/Real path

Data3/map
Definition files for stage specific sprites and placement

Data3/scn
Definition files for stage scripts and victory conditions

#_*_a.xml
Script for stage #, route *, prebattle (c=shared, h=Haruna, t=Takumi)

#_*_b.xml
Script for stage #, route *, postbattle

#_*_s.xml
Script and definitions for stage #, route *, in-battle

#_*_v.xml
Victory conditions text for stage #, route *. Actual conditions are defined in #_*_s.xml

adv_back.xml
Define background place names in visual novel portions (covers all three acts)

Example Script Functions

 <msg side="LEFT" chara="HANE" face="THANKS"> —define message side (LEFT/RIGHT), character ID, and face to be used
  Thank you, Phantasmoon\nDon’t lose to that evil woman.
  </msg>
  <state side="LEFT" ctrl="VISIBLE" flag="true" /> –define where message appears and set visible (only needs to be done once. Future messages on that side will overwrite the current one until visibility is set to false)
  <wait kind="INPUT" /> —pause execution until any Input. Not using this means that lines will immediately display until the next <wait>

 <train name="3"> –define this variable set to be called later. Multiple enemies (even different types) can use the same ‘type’
  <lv value="9" /> —define level
  <exp value="180" /> —define experience awarded on defeat
  <battle hp="2" en="2" tough="2" quick="2" /> –define modifications to stats
  <item id="CURRY" attr="0" /> —define items held
 </train>

<addchara no="101" train="3" chara="ENEMY_MAKIPON" phase="ENEMY" action="NORMAL" />
  <setweapon no="101" />
  <addmap no="101" index="63" way="LEFT" />
Function for adding a character or enemy to a map, defining its modifications (train variable, "-1" is used for PCs) and setting its attacks. I haven’t screwed around with this too much.

<cond expert="HARD"></cond>
Call or define functions specific to extra mode. NORMAL or HARD are possible variables

<fun name="BATTLE_END_EVENT"></fun>
Functions defining the end of a stage

<cond_call name="EXPERT_END"></cond_call>
Call specific functions (almost always removing the Battle Mastery when failed)

<train id="PLAYER_LANCER" kind="EXP" value="2000" max="25" /> 
Add value to character (mostly used when adding character back into party between stages) EXP and KILL are the main values used normally, but any can be.

<item_add><item id="SHIRO" value="1" /></item_add>
Add item to inventory between stages. See item_interface.xml in data1 for item IDs

Data3/title
Define title screen information. Partially deprecated

title_interface.xml
Define some of the popups on the title screen

Data3/weapon
Definitions file for all Act 1 attack animations and messages

*.xml
Script file for attack *

*_demo.xml
Assorted definitions specific to attack *, including random variable assigning battle quote

*_msg.xml
Definitions for all battle quotes associated with the attack *, including story specific ones

*_plane/sprite
Define sprites for battle animations in attack * used by *.xml above

 

Data4
Media files for Act 1, mostly deprecated

Data4/bgm
Background music, duh

Data4/chara
Character map and defensive sprite sheets

 Data4/demo
Various graphics for battle animations (backgrounds, etc)

Data4/ed
Ending credits graphics

Data4/face
Character face sprites. PC and coss sprites somewhat deprecated. (See data8)

Data4/hero
Takumi and Haruna’s sprites for starting a new game. Deprecated. (See data6)

Data4/map
Various map spritesheets

Data4/scenario
Visual Novel portion backgrounds

Data4/se
Sound effects

Data4/title
Title graphics. Mostly deprecated (see data6)

Data4/weapon
Character attack spritesheets

 

Data5
Act 2 definition files. Partially deprecated. Identical to data3 in setup.

init_adv.xml
Welcome messages to display on fresh installation

 

Data6
Act 2 media files. Identical to data4 in setup except for the interface folder.

Data6/interface
Graphical files for nearly every part of the interface. There are 76. I’m not going to list them all. A few are deprecated and files in Data8 are used instead.

 

Data7
Act 3 definition files. Identical to data3/5 in setup

init_adv3.xml
Welcome messages to display on upgrade to Act 3

 

Data8
Act 3 media files.

Data8/face
The new home for all facial sprites (which includes names) of the PCs and bosses for the deprecated ones in data4/6 and all Act 3 characters

 

Data8_2
Media patch adding some extra files for Act 3. Same as Data4/6/8

See? That wasn’t so hard. Or complex for that matter. You now know more or less about as much as I do about messing with this game.

Now… I need a drink. Badly.

Posted in Battle Moon Wars | 9 Comments »

9 Shouts From the Peanut Gallery

  • Kresnik says:

    The biggest problem in editing these kind of things are unpack and repacking things. I see that since there are already tools provided for this one, it should give much less problem.

  • sage says:

    Documentation? What the FSCK?

    You are a rarity among programmers.

  • Aroduc says:

    I think the point is: “I’m not a programmer.”

  • Ryugan koji says:

    so if i want to translate the game, for example in my case, english to spanish i had to modificate most of the Data3/scn info rigth?

  • coolx says:

    nice !! ^_^
    do you think, BMW4 will use the same one like that ?! :p

  • Anonymous says:

    Watch werk through a monkey wrench into everything and go with a completely different system in act. 4

  • GameMaster0000 says:

    Possible to make other language(I’m thai). I try to change it. But in game it appear only ???????.

  • Chaos Chaud says:

    After I edit thigs, like the fundamental status or the spirits costs the game stops working when the characters should arrive at the stage. Can someone tell me why?

  • BG8 says:

    This post is very interesting… ^^
    Why isn’t it finished??? In the sense of doing also references to the act 4 and BMW the best…
    I hope someone will read my comment XDDD