Difference between revisions of "Installing template character"

From XStoryPlayer Wiki
Jump to: navigation, search
Line 28: Line 28:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</li>
 
</li>
 +
<li>If the conversion went well you should see the a <code>characterShape.obj</code> in the <code>./pack/pack_character/scenes/char_template</code> directory.<br>
 +
Also the textures should be compressed an added to the <code>./pack/pack_character/scenes/textures</code> directory.</li>
 +
<li>To test the converted '[[Template character]]' use the following settings in the <code>[[settings.ini]]</code> file.
 +
<syntaxhighlight lang="cpp">
 +
runtime
 +
{
 +
  start_mode  = TEST;
 +
 +
  debug_sys    = BASIC;
 +
  debug_render = NONE;
 +
  debug_phys  = NONE;
 +
  debug_brain  = ENABLED;
 +
 +
  pack2        = "pack/pack_character";
 +
 +
  save_key    = "";
 +
}
 +
 +
#define TEST_RUN "run_char.ini"
 +
</syntaxhighlight>
 +
Best is to create a new <code>'settings_char.ini'</code> and create a new shortcut with <code>-settings "settings_char.ini"</code> as startup parameter.<br>
 +
Also see [[Creating_cloth]] point 5. on how to do this.
 +
</li>
 +
<li>Copy the <code>testini</code> files from the '[[Tutorial resource pack]]' to your <code>./testini</code> directory. Because we use <code>#define TEST_RUN "run_char.ini"</code> the correct script <code>'run_char.ini'</code> is used.</li>
 +
<li>Open the <code>./testini/run_char.ini</code> file. It uses <code>mode = CHAR;</code> in order to test the character.</li>
 +
<li>Now start [[XStoryPlayer]] using your shortcut to run in [[test mode]]. You should see the [[template character]].</li>
 +
<li>Now open the <code>./pack/pack_character/sources/scenes/char_template/body.ma</li> in Maya. It contains the rigged template model.<br>
 +
Also checkout the <code>body.ini</code> file to take a look at the settings used for the character.</li>
 
</ol>
 
</ol>

Revision as of 14:56, 25 January 2015

In this tutorial you will learn how to load and create the 'Template character'.

Steps

  1. Re-download the 'Beta patch' using the Account manager and re-install it. Do this even if the version is the same.
    If you already have downloaded the 'Beta patch', delete it first in order to re-download it.
  2. Download the latest version of the 'Tutorial resource pack'. In the '3. Advanced Modding / 1. Creating character' directory you will see the following files:
    • pack_character: This directory contains the 'Template character'.
    • testini: This directory contains the files that you can use in Test mode.
  3. Copy the pack_character directory to your ./pack directory.
  4. Use the Filemaker to convert the 'Template character' to the game .obj files. Use e.g. this sample script:
    #define SOURCES  "../pack/pack_character/sources/"
    #define RUNTIME  "../pack/pack_character/"
     
    maya_auto_copy     = COPY_DIR;
    maya_auto_compress = COLOR;
     
    Maya scene
    {
      src_path = "[SOURCES]";
      run_path = "[RUNTIME]";
      in_file  = "[SOURCES]scenes/char_template/body.ma";
    }
     
    Compgen compress0 {compress = true;}
  5. If the conversion went well you should see the a characterShape.obj in the ./pack/pack_character/scenes/char_template directory.
    Also the textures should be compressed an added to the ./pack/pack_character/scenes/textures directory.
  6. To test the converted 'Template character' use the following settings in the settings.ini file.
    runtime
    {
      start_mode   = TEST;
     
      debug_sys    = BASIC;
      debug_render = NONE;
      debug_phys   = NONE;
      debug_brain  = ENABLED;
     
      pack2        = "pack/pack_character";
     
      save_key     = "";
    }
     
    #define TEST_RUN "run_char.ini"

    Best is to create a new 'settings_char.ini' and create a new shortcut with -settings "settings_char.ini" as startup parameter.
    Also see Creating_cloth point 5. on how to do this.

  7. Copy the testini files from the 'Tutorial resource pack' to your ./testini directory. Because we use #define TEST_RUN "run_char.ini" the correct script 'run_char.ini' is used.
  8. Open the ./testini/run_char.ini file. It uses mode = CHAR; in order to test the character.
  9. Now start XStoryPlayer using your shortcut to run in test mode. You should see the template character.
  10. Now open the ./pack/pack_character/sources/scenes/char_template/body.ma</li> in Maya. It contains the rigged template model.
    Also checkout the <code>body.ini
    file to take a look at the settings used for the character.