(→char/save/party.txt: replace named constant with value) |
(→char/save/storage.txt: replace named constant with value) |
||
Line 87: | Line 87: | ||
##int account_id | ##int account_id | ||
##int storage_amount | ##int storage_amount | ||
#0 to | #0 to 300 space separated: | ||
##item (however the 'broken' field does not work properly) | ##item (however the 'broken' field does not work properly) | ||
Revision as of 06:45, 27 December 2012
This is some notes on the save formats of TMWA. It is not intended to authorative, but rather a porting tool.
General
Save files generally consist of a number of tab separated fields, each of which may consist of a number of space and/or comma-separated fields.
Any line starting with //, or being empty, is usually ignored. But, any line not matching for format correctly is also usually ignored.
If there are any C0 control characters, funny stuff might happen.
integer
All integers stored at this level are in base 10.
/0|-?[1-9][0-9]*/
bool
A bool is just an integer that is expected to have the value 0 or 1 only.
string
A string is a sequence of non-control characters.
word
A word is a string containing no spaces.
char
a char is maybe a word of length 1. Bad things would happen if it were length 0 instead.
item
An item - which is usually in a space-separated list, which is itself between tabs - consists of:
Comma-separated fields:
- int id
- int nameid
- int amount
- int equip
- int identify
- int refine
- int attribute
- int card0
- int card1
- int card2
- int card3
- optional int borken
Add new common types here
login/save/account.txt
The standard 12 or 13 tab separated fields form, followed by a final "special" field:
- int account_id
- string userid
- string pass
- string lastlogin
- char sex
- int logincount
- int state
- string email
- string error_message
- int connect_until_time
- string last_ip
- string memo
- optional int ban_until_time
- account_reg2 variables (##) (there may be from 0 to 16 of these, separated by spaces)
- variable entries - the key and value are comma separated.
- string-nocomma key
- int value
- variable entries - the key and value are comma separated.
There is an older version with 5-7 fields, plus the variables again:
- int account_id
- string userid
- string pass
- string lastlogin
- char sex
- optional int logincount
- optional int state
- account_reg2 variables again ...
Finally, there is a sentinel:
- int account_id
- literal string "%newid%"
char/save/athena.txt
char/save/accreg.txt
char/save/storage.txt
tab-separated:
- comma-separated:
- int account_id
- int storage_amount
- 0 to 300 space separated:
- item (however the 'broken' field does not work properly)
char/save/party.txt
It may be a sentinel:
- int party_newid
- literal string %newid%
It may be a party entry:
- int party_id
- string name
- comma separated:
- bool exp
- bool item
immediately followed by 0 to 12 of *tab* separated (hmph):
- comma-separated
- int account_id
- int leader
- string name
map/save/mapreg.txt
This file does NOT do comment checking. However, it does still check the format and skip if it fails.
Each line is tab separated:
- comma-separated...
- string varname
- optional int arrayindex
- string/int value, depending on whether varname ends with a $