Re: Replacement for saving throws/thac0?

From: Deidril (F.Manisse@cryo-networks.fr)
Date: 07/10/02


Mathew Wrote :

> My class.c file is weighing in at a hefty 460k as a result of expanding
> levels and classes.  It's taking about a zillion years to compile. (snip)

> My question for the list is this: has anyone scrapped the old method of
> dealing with saving throws and thaco?  I'm assuming yes.  It seems that
> returning case after case is NOT the best way to go.  If for no other
> reason than sitting around for 20+ minutes every time anything which
> requires a full recompile is added. :)

> Any suggestions as to how to modify the systems in question?  Saves in
> particular take up the majority of the file.  At least 10000 lines of it.

I would say the game rules using thaco/saving throw has nothing to do with
your problem. You have problem because your file is too large. Why don't you
try to extract classes data from the code and put it in the library under
some
file format ?

I've done it ( and i think some codebases do it as well ) and i ended having
a
file like this :

#
# Class file for Warrior
#

Idnum: 4

Name: "Warrior"
Abbreviation: "Wa"

Levels: 50
Max_hit: 500
Max_mana: 100

Str_modif: 2
Int_modif: -3
Wis_modif: 0
Dex_modif: 0
Con_modif: 2
Cha_modif: 0

Race: Drow
Race: Dwarf
Race: Elf
Race: Gnome
Race: Half-elf
Race: Halfling
Race: Human
Race: Orc

Resist_fire: 150
Resist_earth: 100
Resist_holy: 75
Resist_air: 75
Resist_water: 75

# level thaco titles
Level: 1    20  "Swordpupil"            "Swordpupil"
Level: 2    19  "Recruit"               "Recruit"
Level: 3    18  "Sentry"                "Sentress"
Level: 4    17  "Fighter"               "Fighter"
Level: 5    16  "Soldier"               "Soldier"
<snip>
Level: 50   -7  "Berserker Lord"        "Berserker Lady"

Skill:
    Name:       "battlecry"
    Level:      1
    Maxvalue:   90
    Cost:       10
    Practice:   1
Skillend:

Skill:
    Name:       "kick"
    Level:      1
    Maxvalue:   90
    Cost:       10
    Practice:   1
Skillend:

Skill:
    Name:       "bash"
    Level:      2
    Maxvalue:   90
    Cost:       15
    Practice:   1
Skillend:

etc ...

My opinion is that a maximum amount of game data should be extracted and put
into the library
but there is other opinions about it...

Managing your code and your library is a different task than designing or
tuning
your fight system.

Iria of Ensimud

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT