Currently I have a users table:
Code: Select all
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) NOT NULL,
`password` varchar(32) NOT NULL,
... other stuff clipped...
Code: Select all
`userid` int(11) NOT NULL,
`charid` smallint(2) NOT NULL,
`currlocation` int(11) NOT NULL,
`strength` smallint(3) NOT NULL,
`dexterity` smallint(3) NOT NULL,
`iq` smallint(3) NOT NULL,
`toughness` smallint(3) NOT NULL,
`charisma` smallint(3) NOT NULL,
`attack` int(5) NOT NULL,
`defense` int(5) NOT NULL,
`health` int(5) NOT NULL,
`fatigue` smallint(3) NOT NULL
I'm starting to add more skills to the game - some which all players have, and some which you have to train before you get (so not everyone will have them). Do I keep adding fields to charinfo to hold these? Or do I make a separate table for skills that not everyone will have and do something like this instead?:
Code: Select all
`userid` int(11) NOT NULL,
`skillname` varchar(30) NOT NULL,
`skillnum` smallint(3) NOT NULL