LGP DesignDoc

From NexusCrossing

Jump to: navigation, search

Last Major Update:

Emry 09:37, 4 December 2008 (UTC)

Contents

[edit] Introduction

Here I plan to work on a communal design document for the classes related to the Objects and the Object Lists. What will go directly on this page is the current form of the design document. The Discussion page should be used for suggesting and discussing changes. I realize that in practice I will be the only one making changes at first so the Discussion page won’t get much use, but in time I will have people who are interested in the project and they will help out with this page as well.

Eventually this page or one linked from it will have interface and implementation information as well.

[edit] The Current Direction

Starting over from the ground up on the Character related classes. First I will attempt to implement classes based on the D20 system. At a later time, I will create classes based on a new system.

[edit] Status

[edit] Legal

This document and the associated program may use Open Game Content from the AnimeD20 SRD [1] and the D20 3.5 SRD [2] under the terms of the Open Gaming License. [3]. For the purpose of this license, nothing here is to be concidered Open Game Content except for those items that are already Open Game Content under the licensing terms for the Anime D20 SRD and the D20 3.5 SRD. However, as I am using the BSD License for this project, those parts that are not Open Game Content are more freely available for your use than those parts that are.


[edit] The Character Sheet

In Pencil and Paper D20 games every character has a character sheet to keep track of all the data needed to play the character. Perhaps that is where we should start.

http://nexus.nexuscrossing.org/wikifiles/d20/d20CharacterSheet.doc[4]

This link goes to a copy of the D20 3.5 character sheet. I have referenced the page that it comes from so that you can look there for other information that might be of use to you as well.

Bellow I will start the discussion on the individual sections of the sheet.

[edit] Biographical Information

The top of most D20 character sheets is what could be considered the biographical section. The main things of immediate concern in implementing a character in programming terms are the Race, Character Classes, and Character levels. Most everything else is basically flavor text. Age MIGHT be a concern.

[edit] Ability Scores

The ability scores are the core of the system. They are the most basic element of the character and effect everything else. For these values we will need ways to change them, ways to apply temporary modifiers, and ways to give various information to other functions. These values will effect everything from carrying capacity to spell ability, to hit points, to how well the character can pick a lock or knock down a door.

[edit] Saving Throws

Fortitude, Reflex, Will Power

These values are used to determine how well a character gets through many situations. Saving Throws are just what the name implies. They are used in those moments when the character has just one chance through instinct or fate to save themselves. Skill does not generally play into this area beyond the implication that training will increase your capabilities.

The saving throw will be based off of a base value, plus an attribute modifier, plus whatever situational modifiers apply at the time.

[edit] Misc Combat Stats

  • Hit Points
  • Initiative
  • Armor Class
  • Damage Resistance
  • Attack Values

[edit] Weapons and Armor

Weapons and Armor provide modifiers and abilities for combat and sometimes in non-combat situations.

[edit] Other Equipment

[edit] Feats

Feats provide bonuses and abilities. Sometimes they are a simple skill bonus, and sometimes they are a new power all togethere.

[edit] Skills

[edit] Spell Book

[edit] Spells Per Day

[edit] Design Notes

[edit] lgpVALUE

 enum lgpValue {
                 LGPERROR = -9999, NONVALUE = 0,           //Error Codes               
                 BASE, MODIFIER, CURRENT,           //States to choose a derived value
               };

[edit] Generic Object Class

Once the creature class is created, I will create a generic Object class to act as an interface.

[edit] Ability Scores

Ability scores are at the core of everything in D20, so they should perhaps be the first item created.

 class AbilityScore
   {
     public:
       //Constructors & Destructor
       AbilityScore(){};
       AbilityScore(int val) : valueM(val){};
       ~AbilityScore(){};
       //Member Functions
       void set(int val);
       virtual int operator()(lgpVALUE state);
     protected:
       int value(lgpVALUE state);
       int valueM;
   };
 int AbilityScore::operator()(lgpVALUE state){return(value(state));}
 int AbilityScore::value(lgpVALUE state)
   {
     switch(state)
       {
         case BASE:
           return(valueM);
           break;
         case CURRENT:
           //Code to determine current value
           break;
         case MODIFIER:
           if(valueM >= 10)
             {
               int val = valueM - 10;
               val = val/2;
               return(val)
             }
             else
               {
                 int val = valueM - 11;
                 val = val/2;
                 return(val);
               }
         default:
           return(LGPERROR);
       }
   }

[edit] References

  1. Anime D20 SRD
  2. D20 3.5 SRD
  3. Open Gaming License
  4. http://www.geocities.com/lmolls/dnd.html
Personal tools