I'm in the early stages of turning a fresh Drupal 4.7 installation into the core engine of a web-based RPG. I may have many questions eventually... :) But my first question is this:

What's the best way to add new types of info about each user without doing anything that would interfere with future Drupal updates?

Basically, I want each person who has a username to also have a set of data for their game character -- things like in-game abilities, an inventory of in-game items, etc. Here are my three thoughts so far about how to do this:

(1) Add new fields to the SQL data about each user. All of the existing fields could remain in place, but I would add ones like "stats_ability_one", "stats_ability_two", etc.
(2) Create a whole separate database (or at least a separate part of this database).
(3) Think of some other solution. :)

I'm tempted to just go ahead with #1 since this would be the quickest and easiest to implement. But if I ever decide to update to a future version of Drupal, would that updating process wipe out user data fields that it doesn't recognize? And would I possibly be encountering problems that I haven't even thought of yet? I have quite a bit of experience in web design and PHP, but much in working directly with SQL, so any thoughts would be appreciated. Thanks in advance... :)

Comments

inforeto’s picture

To tie data to the user use the profile module.

Have a look at the creation of new content types, this would be used for most things.
(cck module, etc. plus views module)

To have more complex data you can have your own database tables, leaving the user ones alone.
The php code can be put in nodes and/or group them as a new module for ease of maintenance.

Treesong’s picture

I'm going to try adding all of the additional fields using the profile module. Then, I'll probably create a special PHP function that can directly work with the numbers stored in these new fields. Thanks for the help, and I'll let you know how it goes... in the meantime, if anyone else has ideas too, feel free to throw them out there... :)