From The Mana World
Line 25: Line 25:


== login/save/account.txt ==
== login/save/account.txt ==
The standard 13-field form:
The standard 12 or 13 tab separated fields form, followed by a final "special" field:
#int account_id
#int account_id
#string userid
#string userid
Line 39: Line 39:
#string memo
#string memo
#optional int ban_until_time
#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


Historically, there was no ban_until_time.
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%"


== Add new sections here ==
== Add new sections here ==

Revision as of 06:00, 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]*/

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.

Add new common types here

login/save/account.txt

The standard 12 or 13 tab separated fields form, followed by a final "special" field:

  1. int account_id
  2. string userid
  3. string pass
  4. string lastlogin
  5. char sex
  6. int logincount
  7. int state
  8. string email
  9. string error_message
  10. int connect_until_time
  11. string last_ip
  12. string memo
  13. optional int ban_until_time
  14. account_reg2 variables (##) (there may be from 0 to 16 of these, separated by spaces)
    1. variable entries - the key and value are comma separated.
      1. string-nocomma key
      2. int value

There is an older version with 5-7 fields, plus the variables again:

  1. int account_id
  2. string userid
  3. string pass
  4. string lastlogin
  5. char sex
  6. optional int logincount
  7. optional int state
  8. account_reg2 variables again ...

Finally, there is a sentinel:

  1. int account_id
  2. literal string "%newid%"

Add new sections here