Creature stats table proposal
Posted: 11 Sep 2014, 13:12
Creatures needed data just keep on increasing as the game becomes more complex, and the previous creature.def is pretty lacking.
This creates issues like being able to declare super-creatures on level file that totally breaks the game. All creatures should obey their stats table and super creatures should be declared on the creature.def and given a proper skin/color distinction over its common version.
This means as well that the game should read from the map file the creature class to add and calculate its stats (add base equipment as well) before spawning it.
So this is what i think a creature stats table should have:
Creature class
***combat stats***
Base HP
HP gain per level
Base damage (physical/magical or both)
Damage gain per level
Base defense (physical/magical or both)
Defense gain per level
Walk speed (on different terrains, 0 speed on one means it cant pass that terrain)
Walk speed gain per level (% over base, should never go over 1.3 of base speed)
Skills name (and a level requesite before being able to use it, skills will have their own .def for things like effects and cooldown)
XP table (XP needed to level up, we should have 3 tables, weak creature, normal creature, strong creature; so weak monsters level up faster and stronger ones slower)
***Work stats***
Zero means it cant work on related room/task, All have Base value and Gain per level.
Dig
Claim
Blacksmith can work on forge
Researcher can work on library
Mysticism can pray and summon on related rooms
Favourite room/s (if a creature is idle and the room exists, it will go there to work )
It can be casino, library, temple, farm, training hall...
***Equipment***
If the creature can have equipment it will spawn with the one declared here, creature will only upgrade weapon/shield to one of the same kind.
This will allow to specialize some creatures to be axe/hammer/sword wielders (so they stick to weapon type) and include two-handers which will have their own animation (Ex: Heavy axe and Claymores for orcs and Barbarians) and pre-set animations depending on weapon (a hammer doesnt hit the same as an sword, i can prepare characters animations on exporting if they always stick to a weapon, this would make combat animation a lot better, and unrelated to code ).
***Others***
Rooms and size needed for spawn
Mood conditions:
Money/pay day wage
liked/hated creatures near
Max stat limitation? we could avoid this variable just by calculating properly the final stats, as easy as creating an excel table and adding the base and growth values.
Practical example:
Spider
20 Hp +5 Hp lvl
5,0 Atack +1,+0 lvl (physical magical)
2,1 Def +1,+1 Lvl (physical magical)
1,0.5,0 Speed on land,water,lava; x1.05, x1.05, x1.05 speed gain per level
Poison skill - lv3, Trap skill - lv6
weak creature XP table
Dig 0 + 0 lvl
Claim 0 + 0 lvl
Blacksmith 0 + 0 lvl
Researcher 0 + 0 lvl
Mysticism 0.3 + 0.1 lvl
Temple, Prison, Graveyard - Favourite rooms
No Equipment
Dormitory 4, Farm 4 (room requesites)
Wage: 10 gold per lvl
Cave hornet +1 mood
Swamp pup -1 mood
Warlock
40 Hp +4 Hp lvl
0,6 Atack +0,+2 lvl (physical magical)
0,4 Def +1,+3 Lvl (physical magical)
0.7, 0.4, 0 Speed on land,water,lava; x1.05, x1.05, x1.05 speed gain per level
Fireball skill - lv2, Meteor skill - lv5, Teleport skill lv10
medium creature XP table
Dig 0 + 0 lvl
Claim 0 + 0 lvl
Blacksmith 0 + 0 lvl
Researcher 10 + 4 lvl
Mysticism 5 + 1 lvl
Library, Casino, Temple, - Favourite rooms
StaffLv1 (base equipment)
Dormitory 9, Farm 9, library 9 (room requesites)
Wage: 50 gold per lvl
Troll +1 mood
Dragon -1 mood
***SOMETHING TO REMEMBER***
Sounds use by a classification depending on creature.def value
viewtopic.php?f=39&t=5695&start=25#p59177
This creates issues like being able to declare super-creatures on level file that totally breaks the game. All creatures should obey their stats table and super creatures should be declared on the creature.def and given a proper skin/color distinction over its common version.
This means as well that the game should read from the map file the creature class to add and calculate its stats (add base equipment as well) before spawning it.
So this is what i think a creature stats table should have:
Creature class
***combat stats***
Base HP
HP gain per level
Base damage (physical/magical or both)
Damage gain per level
Base defense (physical/magical or both)
Defense gain per level
Walk speed (on different terrains, 0 speed on one means it cant pass that terrain)
Walk speed gain per level (% over base, should never go over 1.3 of base speed)
Skills name (and a level requesite before being able to use it, skills will have their own .def for things like effects and cooldown)
XP table (XP needed to level up, we should have 3 tables, weak creature, normal creature, strong creature; so weak monsters level up faster and stronger ones slower)
***Work stats***
Zero means it cant work on related room/task, All have Base value and Gain per level.
Dig
Claim
Blacksmith can work on forge
Researcher can work on library
Mysticism can pray and summon on related rooms
Favourite room/s (if a creature is idle and the room exists, it will go there to work )
It can be casino, library, temple, farm, training hall...
***Equipment***
If the creature can have equipment it will spawn with the one declared here, creature will only upgrade weapon/shield to one of the same kind.
This will allow to specialize some creatures to be axe/hammer/sword wielders (so they stick to weapon type) and include two-handers which will have their own animation (Ex: Heavy axe and Claymores for orcs and Barbarians) and pre-set animations depending on weapon (a hammer doesnt hit the same as an sword, i can prepare characters animations on exporting if they always stick to a weapon, this would make combat animation a lot better, and unrelated to code ).
***Others***
Rooms and size needed for spawn
Mood conditions:
Money/pay day wage
liked/hated creatures near
Max stat limitation? we could avoid this variable just by calculating properly the final stats, as easy as creating an excel table and adding the base and growth values.
Practical example:
Spider
20 Hp +5 Hp lvl
5,0 Atack +1,+0 lvl (physical magical)
2,1 Def +1,+1 Lvl (physical magical)
1,0.5,0 Speed on land,water,lava; x1.05, x1.05, x1.05 speed gain per level
Poison skill - lv3, Trap skill - lv6
weak creature XP table
Dig 0 + 0 lvl
Claim 0 + 0 lvl
Blacksmith 0 + 0 lvl
Researcher 0 + 0 lvl
Mysticism 0.3 + 0.1 lvl
Temple, Prison, Graveyard - Favourite rooms
No Equipment
Dormitory 4, Farm 4 (room requesites)
Wage: 10 gold per lvl
Cave hornet +1 mood
Swamp pup -1 mood
Warlock
40 Hp +4 Hp lvl
0,6 Atack +0,+2 lvl (physical magical)
0,4 Def +1,+3 Lvl (physical magical)
0.7, 0.4, 0 Speed on land,water,lava; x1.05, x1.05, x1.05 speed gain per level
Fireball skill - lv2, Meteor skill - lv5, Teleport skill lv10
medium creature XP table
Dig 0 + 0 lvl
Claim 0 + 0 lvl
Blacksmith 0 + 0 lvl
Researcher 10 + 4 lvl
Mysticism 5 + 1 lvl
Library, Casino, Temple, - Favourite rooms
StaffLv1 (base equipment)
Dormitory 9, Farm 9, library 9 (room requesites)
Wage: 50 gold per lvl
Troll +1 mood
Dragon -1 mood
***SOMETHING TO REMEMBER***
Sounds use by a classification depending on creature.def value
viewtopic.php?f=39&t=5695&start=25#p59177