Difference between revisions of "Unpacking/packing packs"

From XStoryPlayer Wiki
Jump to: navigation, search
 
(14 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
Each pack file results in either an story or fastsex element in the [[story menu]] and [[fastsex menu]].<br>
 
Each pack file results in either an story or fastsex element in the [[story menu]] and [[fastsex menu]].<br>
 
We can also use pack directories. A pack directory is an unpacked pack file. It contains all the files from the pack file.<br>
 
We can also use pack directories. A pack directory is an unpacked pack file. It contains all the files from the pack file.<br>
If a pack directory is placed in the ./pack location of XStoryPlayer it works the same as a pack file. But now you can easily edit all files.
+
If a pack directory is placed in the ./pack location of XStoryPlayer it works the same as a pack file. But now you can easily edit all the files it contains.
  
 
==Unpacking==
 
==Unpacking==
 
+
<ol>
1. Goto the ./filemaker directory and open the 'start.ini' file. The start.ini file contains the script code that is parsed when running the filemaker.exe
+
<li>Goto the ./filemaker directory and open the 'start.ini' file. The start.ini file contains the script code that is parsed when running the filemaker.exe</li>
 
+
<li>Uncomment the unpack script part like this:
2. Uncomment the unpack script part like this:
+
 
+
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
 
Pack pack1
 
Pack pack1
Line 26: Line 24:
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
</li>
3. Now run the filemaker.exe, the dungeon pack will automatically be unpacked to the ./pack location
+
<li>Now run the filemaker.exe, the dungeon pack will automatically be unpacked to the ./pack location
 
+
When it is finished you will hear a whistle blowing. (Useful for when parsing takes long time to complete so you can get coffee).</li>
When it is finished you will hear a whistle blowing (Useful for parsing long taking script to get coffee).
+
<li>You should now see ./pack/pack_dungeon directory with in it all files that are in the ./pack/pack_dungeon.bin pack file.</li>
 
+
<li>Start XStoryPlayer and open the [[fastsex menu]]. Here you should now see two dungeon elements instead of one. Press F3 to exit XStoryPlayer</li>
4. You should now see ./pack/pack_dungeon directory with in it all files that are in the ./pack/pack_dungeon.bin pack file.
+
<li>Open the ./pack/pack_dungeon/story.txt file and change the names like this:
 
+
5. Start XStoryPlayer and open the [[fastsex menu]]. Here you should now see two dungeon elements instead of one.
+
 
+
6. Open the ./pack/pack_dungeon/story.txt file and change the names like this:
+
 
+
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
 +
sort_id = 199999; // <<-- Change, makes mod pack show at top of fastsex menu
 +
...
 
episode saiko
 
episode saiko
 
{
 
{
   name   = "Dungeon Mod"; // <<-- Change
+
   name = "Dungeon Mod"; // <<-- Change, sets pack name
 
   ...
 
   ...
 +
  save = "save/save_dungeon_mod_saiko.dat"; // <<-- Change, sets save file name
 
}
 
}
 
    
 
    
 
episode monica
 
episode monica
 
{
 
{
   name   = "Dungeon Mod"; // <<-- Change
+
   name = "Dungeon Mod"; // <<-- Change, sets pack name
 
   ...
 
   ...
 +
  save = "save/save_dungeon_mod_monica.dat"; // <<-- Change, sets save file name
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
</li>
 +
<li>Start XStoryPlayer again, and you should now see that your pack is renamed to "Dungeon Mod".</li>
 +
<li>Press F3 to stop XStoryPlayer directly and proceed with [[basic code scripting]].</li>
 +
</ol>
  
7. Start XStoryPlayer again and you should now see that your pack is renamed to "Dungeon Mod".
+
==Packing==
 +
This part of the tutorial is not neccessary, but added for completeness. It allows you to easily distribute/share your custom mod pack with others.
 +
<ol>
 +
<li>Goto the ./filemaker directory and open the 'start.ini' file.</li>
 +
<li>Make sure the 'unpack a pack' script part is commented again.
 +
<li>Now uncomment the pack script part like this:
 +
<syntaxhighlight lang="cpp">
 +
Pack pack
 +
{
 +
  file    = "[RUNTIME]pack/pack_dungeon2.bin";
  
8. Press F3 to stop XStoryPlayer directly and proceed with [[basic code scripting]].
+
  zip      = true;
 +
  path_full = true;
 +
 
 +
  addpath = "[RUNTIME][PACKPATH]*.*";
 +
}
 +
</syntaxhighlight>
 +
</li>
 +
<li>Now run the filemaker.exe, the dungeon pack directory will automatically be packed to the ./pack/pack_dungeon2.bin pack file.
 +
When it is finished you will hear a whistle blowing.</li>
 +
<li>You should now see a ./pack/pack_dungeon2.bin file with in it all files that are in the ./pack/pack_dungeon pack directory.</li>
 +
<li>Comment the 'pack a pack' script part again and remove the ./pack/pack_dungeon2.bin file so it does not conflict with the rest of the tutorials.</li>
 +
</ol>

Latest revision as of 11:39, 6 January 2015

Most modding can be done using the Filemaker. It is a script parser that allows you to: Unpack/pack files, Convert Maya files to Game files, Automatically create dds textures, Make font textures etc.
It has a very simple gui, because the scripts it uses contain all relevant information. For now we will use it to unpack a pack file.

Pack files

As you may have noticed the pack directory contains several pack files.
Each pack file results in either an story or fastsex element in the story menu and fastsex menu.
We can also use pack directories. A pack directory is an unpacked pack file. It contains all the files from the pack file.
If a pack directory is placed in the ./pack location of XStoryPlayer it works the same as a pack file. But now you can easily edit all the files it contains.

Unpacking

  1. Goto the ./filemaker directory and open the 'start.ini' file. The start.ini file contains the script code that is parsed when running the filemaker.exe
  2. Uncomment the unpack script part like this:
    Pack pack1
    {
      unpack = true;
     
      file    = "[RUNTIME]pack/pack_dungeon.bin";
     
      outpath = "[RUNTIME]pack/";
    }
  3. Now run the filemaker.exe, the dungeon pack will automatically be unpacked to the ./pack location When it is finished you will hear a whistle blowing. (Useful for when parsing takes long time to complete so you can get coffee).
  4. You should now see ./pack/pack_dungeon directory with in it all files that are in the ./pack/pack_dungeon.bin pack file.
  5. Start XStoryPlayer and open the fastsex menu. Here you should now see two dungeon elements instead of one. Press F3 to exit XStoryPlayer
  6. Open the ./pack/pack_dungeon/story.txt file and change the names like this:
    sort_id = 199999; // <<-- Change, makes mod pack show at top of fastsex menu
    ...
    episode saiko
    {
      name = "Dungeon Mod"; // <<-- Change, sets pack name
      ...
      save = "save/save_dungeon_mod_saiko.dat"; // <<-- Change, sets save file name
    }
     
    episode monica
    {
      name = "Dungeon Mod"; // <<-- Change, sets pack name
      ...
      save = "save/save_dungeon_mod_monica.dat"; // <<-- Change, sets save file name
    }
  7. Start XStoryPlayer again, and you should now see that your pack is renamed to "Dungeon Mod".
  8. Press F3 to stop XStoryPlayer directly and proceed with basic code scripting.

Packing

This part of the tutorial is not neccessary, but added for completeness. It allows you to easily distribute/share your custom mod pack with others.

  1. Goto the ./filemaker directory and open the 'start.ini' file.
  2. Make sure the 'unpack a pack' script part is commented again.
  3. Now uncomment the pack script part like this:
    Pack pack
    {
      file     = "[RUNTIME]pack/pack_dungeon2.bin";
     
      zip       = true;
      path_full = true;
     
      addpath = "[RUNTIME][PACKPATH]*.*";
    }
  4. Now run the filemaker.exe, the dungeon pack directory will automatically be packed to the ./pack/pack_dungeon2.bin pack file. When it is finished you will hear a whistle blowing.
  5. You should now see a ./pack/pack_dungeon2.bin file with in it all files that are in the ./pack/pack_dungeon pack directory.
  6. Comment the 'pack a pack' script part again and remove the ./pack/pack_dungeon2.bin file so it does not conflict with the rest of the tutorials.