Actually it is quite easy to save/load from ascii pfiles.
Have a look here:
github.com/tbamud/tbamud/blob/2f12752373...4/src/players.c#L239
All values are treated the same in load_char:
1. first, they are set to some predefined value (think of it as "zero", even if it sometimes is something else)
2. then, depending on the first letter, then the full code in the file, the values are set.
The same goes for save_char(), here:
github.com/tbamud/tbamud/blob/2f12752373...4/src/players.c#L503
Every value is written, one at a time, with a code to help read it again.
So, to make it save and load:
1. add a line for each value to save_char, like this:
Code:
if (GET_RIP_CNT(ch) != 0) fprintf(fl, "RipC: %d\n", GET_RIP_CNT(ch));
2. add these lines in load_char (so they match the existing pattern):
Code:
GET_RIP_CNT(ch) = 0;
..
..
case 'R':
if (!strcmp(tag, "Room")) GET_LOADROOM(ch) = atoi(line);
+ else if (!strcmp(tag, "RipC")) GET_RIP_CNT(ch) = atoi(line);
break;
Repeat for the other three values.