PyMS
v1.2.1

By: poiuy_qwert
  1. Introduction
  2. PyGRP v3.8
  3. PyPAL v1.5
  4. PyLO v1.6
  5. PyTBL v1.7
  6. PyTRG v2.6
  7. PyDAT v1.11
  8. PyGOT v1.2
  9. PyAI v2.4
  10. PyICE v1.8
  11. PyFNT v1.2
  12. PyTILE v1.3
  13. PyPCX v1.0
  14. PyMPQ v1.0
PyTBL v1.7

PyTBL is used to convert TBL files to and from TXT files.
  1. Changes
  2. Commandline Options
  3. Syntax
  4. Example Usage
  5. Reference


Changes^

PyTBL v1.7 PyTBL v1.6 PyTBL v1.5 PyTBL v1.4 PyTBL v1.3 PyTBL v1.2 PyTBL v1.1 PyTBL v1.0

Commandline Options^

Option Long Option Description
-h --help Display the command line format and options with small descriptions.
-d --decompile Decompile a TBL file to a TXT file. Default
-c --compile Compile a TXT file to a TBL file.
-r --reference Output a reference at the top of a decompiled file.
--gui Opens a file with the GUI


Syntax^

Every line of a decompiled TBL file is a string, the only exceptions are emtpy lines, and comments. Comments can be anywhere on a line, and they start with the hash character #. For example:
Code
# This line is not a string because the whole thing is a comment.
Marine<0>#This line (excluding the comment) is a string
Also, if you noticed the <0>, PyTBL uses the same string formatting as TBLPad. Special characters can be accessed by putting their ASCII codes in angle brackets < >. For example, if you want to have a hash symbol in your string, you must use <35>. For a list of usefull ASCII codes, check out the -r option on the command line, and the Reference section below.
There are four types of strings:
  1. Regular String
  2. Unit String
  3. Requirement String
  4. Hotkey String
Regular Strings dont really follow a format, they just set the rule for all strings, all strings must end in a <0>:
Code
string<0>
The first 228 strings in the TBL are Unit Strings, and each corrisponds to a unit id (first string is unit id 0, Terran Marine). They are in the form:
Code
Unit Name<0>Subname<0>StarEdit Group<0>
A Requirement String doesn't really follow a format, but the deafult StarCraft format is that every requirement is on its own line, with three spaces for indenting:
Code
Something1 Requires:<10>   One Requirement<0>
Somethings Require:<10>   Two<10>   Requirements<0>
#  ...
Hotkeys are more strict then the other types of strings. The first character is the hotkey character (which includes the Escape key <27> for Cancle buttons), the second is the tooltip type, and the third is the string. There are 6 different types of tooltip:
For example:
Code
a<0><3>A<1>ttack<0>
m<1>Train <3>M<1>arine<0>
a<2>Upgrade Infantry <3>A<1>rmor<0>
t<3>Psionic S<3>t<1>orm<0>
p<4>Develop <3>P<1>sionic Storm(Templar ability)<0>
d<5><3>D<1>evourer Aspect<0>


Example Usage^

Decompiling the default stat_txt.tbl to a modding project, then recompiling:
Command Line
python PyTBL.pyw Default\stat_txt.tbl "C:\StarCraft\My Mod\stat_txt.txt"
  ..edit strings..
python PyTBL.pyw -c "C:\StarCraft\My Mod\stat_txt.txt"


Reference^

ASCII Codes
Miscalaneous
    <0> = End Substring
    <9> = Tab
   <10> = Newline
   <18> = Right Align
   <19> = Center Align
   <27> = Escape Key
   <35> = #
   <60> = <
   <62> = >

Menu Screen Colors
    <1> = Cyan
    <2> = Cyan
    <3> = Green
    <4> = Light Green
    <5> = Grey*
    <6> = White
    <7> = Red
    <8> = Black*
   <11> = Invisible*
   <12> = Truncate
   <14> = Black
   <15> = Black
   <16> = Black
   <17> = Black
   <20> = Invisible*
   <21> = Black
   <22> = Black
   <23> = Black
   <24> = Black
   <25> = Black
   <26> = Black/Cyan?
   <27> = Black
   <28> = Black

In-game Colors
    <1> = Cyan
    <2> = Cyan
    <3> = Yellow
    <4> = White
    <5> = Grey*
    <6> = Red
    <7> = Green
    <8> = Red (Player 1)
   <11> = Invisible*
   <12> = Truncate
   <14> = Blue (Player 2)
   <15> = Teal (Player 3)
   <16> = Purple (Player 4)
   <17> = Orange (Player 5)
   <20> = Invisible*
   <21> = Brown (Player 6)
   <22> = White (Player 7)
   <23> = Yellow (Player 8)
   <24> = Green (Player 9)
   <25> = Brighter Yellow (Player 10)
   <26> = Cyan
   <27> = Pinkish (Player 11)
   <28> = Dark Cyan (Player 12)
   <29> = Greygreen
   <30> = Bluegrey
   <31> = Turquiose




« PyLO PyTBL PyTRG »