Message
| wow, that's a lot of stats to add. It'll probably take some time but it's more than doable. I'll get right down to all the basics... after I make a quick comment on planning.
First thing's first. You're going to be reconstructing (or at least, should reconstruct) a lot of the game engine to fit all of your new stats. SMAUG was written based off of 7 stats (Strength, Wisdom, Intelligence, Dexterity, Constitution, Charisma, and Luck). You're going to want to have an idea of how each of your new stats will affect gameplay. ie) Strength is used to measure how much weight a person can carry, how heavy a weapon they can wield, how much force they can strike a person with, ect.
Granted, the above isn't needed but it's more realistic if you have a use for a stat rather than it just being "I have a 10 for 'common sense'..." That's great, but what's that do for the player if it's just 'there'? ;)
Okay, Now that we have the fundamental outline complete on "what does what", it's time to actually add your new stats. This part is relatively easy, although it's highly repetitive. Find all the stat variables (look in mud.h) and start adding in your brand new stats right below it. You should be able to copy the format and have it work. Next, go to save.c and find all the values that save the old stats to a pfile. Add in new stuff there (again, mimic and you can't go wrong). Then find the section where you're assigned stats (during player creation). I don't have a copy of SMAUG in front of me and I'm not overly familiar with it but I believe it's in comm.c. Again, mimic the old stats and add in your new ones. You might have to do a few other updates here and there but that's pretty much the bulk of it for adding in your new stats. Congratz, you're on your way.
This... is the hideous part. The new 'stats' are added but they don't serve any purpose yet. You should start by tracking down all the functions that use those 7 basic SMAUG stats and edit them to fit your needs. Perhaps you want shops to sell items cheaper if their physical appearance is high rather than their charisma. Maybe both? Add it in. Do you want a high common sense have a better chance of avoiding traps instead of dexterity? Again, add it in. Next you need to add in anything that hasn't already been covered, obviously. Perhaps you want someone with high stealth to be automatically affected by sneak... no problem, just use an if check or something similar. Keep in mind, lots of math has gone into all of these formulas to keep the game balanced. Keep your formulas simple and make sure you don't make a stat become useless or extremely overpowered.
Now, update your 'score' sheet. Design something and jot down how, exactly, you want your new score sheet to look. Since a big section of it is going to be devoted to your stats, perhaps it might even be best to take off existing stats from the current score card and create a new card dedicated to nothing but stats? Do you want it to display numbers or tick marks? Now build it. Use the resources at hand to help in its creation. Take a look at how the variables are currently used in the current score card and you should be able to learn everything you'll need for your new score card.
Congratz, you're just about finished. Make clean and compile. Fix all errors, done. :P
Anyway, I'll be more than glad to help assist you if you get stuck along the way. But without having the above stuff already finished and in a form that I (or anyone) can visibly see, not much more can be said. Follow the basic structure I just layed out and start hacking away at the code. If you screw up and it doesn't work, post what you did and we'll explain why it didn't work (and how to get it working). Make sure you backup your files before you start so you can roll back to them if needed! |
Implementer of Lost Prophecy,
Tzaro | top |
|