19 Jan, 2009, zordrac2 wrote in the 1st comment:
Votes: 0
Okay 2 questions:

1) Has anyone ever worked out how to add boards using stock Rom code (not counting when you have no player files or do a pwipe)? Is it possible? If so, how?

2) Assuming that it is impossible and the only option is to import a 2nd board system, one that isn't integrated with player files, are there any that anyone has written already that I could use, that would work for Rom?

Please, if anyone has this up and running, or has any tips, it'd be greatly appreciated.
19 Jan, 2009, Tyche wrote in the 2nd comment:
Votes: 0
We added a story board. Besides the changes in note.c, we added a last_story field to the pcdata struct.
I won't go into all that, but where I think the nugget of your problem lies..

In order to allow both new and old players to load and to save. You have to make use of the version field.

In fwrite_char()…
//       version 6 - added PCData::last_story field
fprintf (fp, "Vers %d\n", 6);
….
fprintf (fp, "Not %ld %ld %ld %ld %ld %ld\n",
ch->pcdata->last_note, ch->pcdata->last_idea,
ch->pcdata->last_penalty, ch->pcdata->last_news,
ch->pcdata->last_changes, ch->pcdata->last_story);


In fread_char()…
if (!str_cmp (word, "Not")) {
ch->pcdata->last_note = fread_number (fp);
ch->pcdata->last_idea = fread_number (fp);
ch->pcdata->last_penalty = fread_number (fp);
ch->pcdata->last_news = fread_number (fp);
ch->pcdata->last_changes = fread_number (fp);
if (ch->version >= 6)
ch->pcdata->last_story = fread_number (fp);
else
ch->pcdata->last_story = 0;
….
case 'V':
KEY ("Vers", ch->version, fread_number (fp));


Every time you add a new field to character data that's saved, you increment the version written and write a test based on that in your fread_char() code.

Edit: I would add that my ROM code above may differ from stock, but the above should be general enough for you to get the idea.
19 Jan, 2009, Davion wrote in the 3rd comment:
Votes: 0
If you're talking about Erwin's board system, I've added it to numerous codebases over the last 9 years without a single issue. I have made some modifications to it, but that was simply changing the UI for my preference. You might be doing it wrong… The snippet I'm referring too is this one
20 Jan, 2009, zordrac2 wrote in the 4th comment:
Votes: 0
Having to change the version is the thing that I wasn't doing. I guess that it is obvious in some ways, but it isn't listed anywhere. We don't have the last_changes (etc) but could add that I guess. It looks like a neat system that you have working there, that would be robust.

I talked to many people who had the exact some problems that I did, as it is far from obvious how to fix it.
21 Jan, 2009, Tyche wrote in the 5th comment:
Votes: 0
21 Jan, 2009, quixadhal wrote in the 6th comment:
Votes: 0
Keeping version numbers on all data formats is a good thing. It allows you to write migration code to automatically convert older forms into newer ones, thus you should never have to wipe player files, and should always be able to import data from your oldest ancestor format.
21 Jan, 2009, Skol wrote in the 7th comment:
Votes: 0
It works surprisingly well too Zordrac, I've restored player files from 9 years past and they convert all happy and such. Though I do remove all equipment etc, as often it's imbalanced old eq by power builders in the equipment arms race. (And it's simpler ;p).
0.0/7