XML:Advanced tutorial: Difference between revisions

m
no edit summary
m (ignore this)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 8: Line 8:
This means that you don't have to modify everything, you can also add new content and it will work together with the old stuff.
This means that you don't have to modify everything, you can also add new content and it will work together with the old stuff.


:: '''''Resources depend on each other.'''''
:: '''''Resources can depend on each other.'''''


For example:
For example:
Line 14: Line 14:
"ai2_movetoflag ''CharacterNameOrID FlagID''" is a BSL command, it tells a character to move to a specific flag. This command makes use of one resource.
"ai2_movetoflag ''CharacterNameOrID FlagID''" is a BSL command, it tells a character to move to a specific flag. This command makes use of one resource.


"ai2_dopath ''CharacterNameOrID PathName''" is also a BSL command, it tells a character to walk or run on a specific path formed by several flags. The path is one resource that contains actually several other resources. So it depend on them, right? A much more complex example is ONCC ...
"ai2_dopath ''CharacterNameOrID PathName''" is also a BSL command, it tells a character to walk or run on a specific path formed by several flags. The path is one resource that contains actually several other resources. So it depend on them, right? While path collections are pretty simple there are also much more complex examples like ONCC and ONLV.
 
{| class="wikitable" width="100%"
|valign="top"|<pre>
flag collection (BINACJBOFlag)</pre>
|valign="top"|<pre>
path collection (BINACJBOPatrol Path)
  |
  +-- flags</pre>
|valign="top"|<pre>
Oni Character Class (ONCC)
  |
  +-- animation collection (TRAC)
  |      |
  |      +-- animations (TRAM)
  |
  +-- texture list (TRMA)
  |      |
  |      +-- textures (TXMP)
  |
  +-- 3D model (TRBS)
  |      |
  |      +-- various 3D data types
  |
  +-- ... many more</pre>
|}


:: '''''I think we should try something together now.'''''
:: '''''I think we should try something together now.'''''
Line 20: Line 45:
* Let's play in window mode, then we can change to a notepad when we need to.
* Let's play in window mode, then we can change to a notepad when we need to.


* We need someone that act as a guinea pig. Let's load level 1, first savepoint, activate developer mode (try typing "x" or "thedayismine").
* We need someone to be our "[[wp:Guinea_pig#In_scientific_research|guinea pig]]". Let's load level 1, first savepoint, activate developer mode (try typing "x" or "thedayismine").
:: See if you have a QWERT<u>Y</u> keyboard. ~ key will open the developer mode for you. Or is it a QWERT<u>Z</u> keyboard? Then try ^ key.
:: See if you have a QWERT<u>Y</u> keyboard. ~ key will open the developer mode for you. Or is it a QWERT<u>Z</u> keyboard? Then try ^ key.
:: If you cannot find the right key you can also change your key_config.txt in the folder with the game application. For example: "bind divide to console" (Devide key from numpad.) (See [[Customizing/Binding|here]] for other possible keys, fkeys might not work as console unlocker.)
:: If you cannot find the right key you can also change your key_config.txt in the folder with the game application. For example: "bind divide to console" (Devide key from numpad.) (See [[Customizing/Binding|here]] for other possible keys, fkeys might not work as console unlocker.)
Line 105: Line 130:
* The modified "BINACJBOFlag.oni" and "BINACJBOPatrol Path.oni" are put into a [[XML|package]] now. Reinstall with this package.
* The modified "BINACJBOFlag.oni" and "BINACJBOPatrol Path.oni" are put into a [[XML|package]] now. Reinstall with this package.


* Are we done? Almost. Still a BSL file needs to be written. Let's kick out all BSL files from '''"GameDataFolder\IGMD\EnvWarehouse"''' and insert only this as BSL file. (It's a txt file, suffix changed to bsl.) Be sure to do that in AE's directory, not vanilla's one.
* Are we done? Almost. Still a BSL file needs to be written. Let's backup and then kick out all BSL files from '''"GameDataFolder\IGMD\EnvWarehouse"''' and insert only this as BSL file. (It's a txt file, suffix changed to bsl.) Be sure to do that in AE's directory, not vanilla's one. Load level 1 and do a kick to start the test.


[[Image:XML_advanced_tutorial.png|400px|right|thumb]]
[[Image:XML_advanced_tutorial.png|400px|right|thumb]]
Line 116: Line 141:
  ai2_spawn A_t48
  ai2_spawn A_t48
  chr_changeteam A_t48 TCTF
  chr_changeteam A_t48 TCTF
  chr_wait_animtype 0 kick
  chr_wait_animtype 0 kick  
  ### Do a kick. Engine will continue with following lines.
  ### Do a kick. Engine will continue with following lines.
  dmsg "[r.Hey man, try new path now.]"
  dmsg "[r.Hey man, try new path now.]"
  '''ai2_dopath A_t48 patrol_63'''
  '''ai2_dopath A_t48 patrol_63'''
8,464

edits