GPWiki.org
GPWiki.org
It is currently Thu Jun 20, 2013 12:24 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Mon Feb 09, 2009 9:54 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
I think it is time now to begin thinking about the relative strengths of different level monsters / characters.

We will need this for assessing player team strength, and populating the dungeon with appropriate monsters.

I've jotted down a few random ideas here which may be meaningless at a first glance. But within these scrawlings is actually a stats system :)


Biological contribution to primary character stats retains relative proportions of these figures:
Code:
        STR  AGI  INT
Warrior   24   11   15
Thief     18   22   16
Mage      15   14   20      
Priest    16   15   18      

Creature  17   17   17
(average)



Average secondary character stats per level
Code:
   
          Lvl1   Lvl100   x   Lvl50   Lvl25   Lvl12
-------------------------------------------------------
HP       200     2000     10   1100   650   425
DPS       20        120    6    70    45    32
Armor
(Pass)   100%     20%    5     45%    67%    82%
Hit Ch   
(Mean)   100%      5%   20     10%    20%    35%
-------------------------------------------------------
HPEff    200   200,000         20,000   4850    1480
-------------------------------------------------------
Diffic'y    1      6000            350     55     12
-------------------------------------------------------
N           1       78             21       8      4   



Armor offers damage reduction:
Code:
DamagePass= 1 / (1 + Armor/AF)


AF = Armor needed for 50% Damage reduction. Depends entirely on the level (attack skill?) of attacker. (attack skill /weapon skill will usually be highly correlated with level, and will be set that way for monsters)


eg, AF=128 (level 50 attacker)
Code:
Armor   Damagepass (DP)
0   1.00
32   0.80 Typical Lvl-12 defender
64   0.67 Typical Lvl-25 defender
128   0.50 Typical Lvl-50 defender. Equal level. 50% damage passed through a typical amount of armor.
256   0.33
384   0.25
512   0.20 Typical Lvl-100 defender. A massive 80% damage reduction here.


Armor is less effective defence against attacks from higher level opponents. AF increases with opponent level.

Code:
Opponent
Level     AF   
1-12      32
25      64
50      128
75      256
100      512


eg, Lvl 50 player attacked by Lvl 100 monster
typical armor at lvl 50 = 128
AF=512 @ lvl 100,
DP = 1/(1+128/512) = 80%


Gear and skills and primary/secondary stats are calibrated for give the following shares, for a typically equipped character:

Code:
   From...
   Level   Gear   Skill
HP   100%   0%   0%
DPS   50%   50%   0%
Armor   25%   75%   0%
Hit Ch   0%   0%   100%


Last edited by Jasmine on Tue Feb 10, 2009 10:45 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2009 10:25 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
HitCh (Hit chance) is a function like that demonstrated in the sample program I sent to Machiara last week, which creates a complex outcome roll to each attempted strike at an opponent. This is devised for melee attacks, but could easily be adapted for ranged and magic also.

The figures given for HitCh in the table in the previous post, and in the sample program is the mean proportion of wielded damage passed on to an opponent in an attempted strike at that opponent. (No they're not calibrated the same, but it's illustrating a principle.) And in the case of the table in the above post, that is HitCh with a Lvl 1 attacker.

To generalise this, use level difference (or the attack skill - defense skill difference which will be highly correlated with that.)

eg,

Code:
Miss = 0 DP
Shield Block = 0.20 DP
Glancing Blow = 0.50 DP
Normal Blow = 1.00 DP
Critical Blow = 2.00 DP



That means, if my attack is for 40 damage and...
I miss, my opponent takes 0 damage.
If opponent makes a shield block, they will get 8 damage.
If I make a glancing blow, opponent gets 20 damage.
If I make a normal blow, opponent gets the full 40 damage.
If I manage a critical blow, opponent gets a double damage of 80 :P.

So for example, if the players skill levels relate to this hit chance table:

Code:
Miss (10% likely)
Block (25% likely)
Glancing Blow (25% likely)
Normal Blow (30% likely)
Critical Blow (10% likely)


Then the average proportion of damage passed through hit chance is the dot product of these two vectors

= 0.0*0.1 + 0.2*0.25 + 0.5*0.25 + 1.0*0.3 + 2.0*0.1
= 0.0 + 0.05 + 0.125 + 0.3 + 0.2
= 0.63 DP
= an average of 63%

(= the abstract figure I'm calling HitCh)


(with my 40 damage example, this is an average of 25.2 damage delivered per attempted strike)

Armor then reduces this as shown in the previous post.


Last edited by Jasmine on Mon Feb 09, 2009 10:56 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2009 10:50 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Notes:

(i) It would be unfair to match level 1 characters against level 1 monsters because the conflict would be too testing for early level characters. Introduce a new level 0, for any monsters with strengths notably lower than level 1.

The first few levels of the game may be mostly level 0 monsters, until the level difference X - 1 is high enough for level 1 opponents to be challenging but not difficult to a level X player.

This is less significant for teams with 2 or more players, because there will always be the advantage of outnumbering an opponent.

Level 0 could be mix in with level 1.




(ii) These notes may be added to.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 09, 2009 10:52 pm 
Funky Monkey

Joined: Mon Aug 16, 2004 2:48 pm
Posts: 1604
Location: Minneapolis, MN USA
Not sure how much random-number generating you're planning to have in this game, but here is an article about making a "more random random" from a guy who is working on his own rogue-like ...

http://ilovevb.net/Web/blogs/heroicadve ... andom.aspx

Hope it's helpful,
-Bryk

_________________
www.mwgames.com ... Dicey Curves, Space Mission, Jump Gate, Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 11:49 am 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Armor components

For gear derived armor, contributions of the typical armor value should be from the sum of various armor pieces. Which armor pieces do we want? And how much armor does each piece typically contribute to the whole?


Code:
Head (Helmet)     -- 15%
Shoulders (Mantle) -- 14%
Upper Body (Vest) -- 23%
Arms (Bracers) -- 12%
Legs (Pants) -- 15%
Feet (Boots) -- 10%
Hands (Gauntlets) -- 11%


what about...
Code:
Waist (Belt)?
Back (Cloak)?


eg, at level 25, we typically have 64 armor, so typical armor pieces available at that level might be:

Code:
Helmet -- 10 armor
Vest -- 15 armor
Bracers -- 8 armor
etc


Some items may carry stat bonuses at the cost of some of the armor value. eg,

Code:
Helmet of Intelligence -- 6 armor + 2 INT.
Bracers of Agility -- 5 armor + 2 AGI.




Armor classes
We were considering an armor type vs damage type table for pair matching weapon and armor types to specific monsters. (Prefer to use Normal damage weapons vs Light armor. Prefer Piercing damage weapons vs Heavy armor)

Suppose the table is a function:
Code:
AWBias( AT as Armor_Type, DT as Damage_Type)


which returns an armor multiplier for this combination of damage type and armor type.

eg, AWBias(Light_Armor, Normal_Damage) = 0.5

... meaning that light armor only has 50% effectiveness vs normal damage, so 18 light armor contributes 9 armor vs normal damage.



If armor gear is of mixed type, then how do we resolve this?

Suppose attacking weapon is of damage type DT

Ah = Heavy Armor value
An = Normal Armor value
Al = Light Armor value

A = Ah+An+Al = Total Armor value


(Pre-Step) Hit chances apply to modify the original attacker damage:

Code:
HitChDamage(Damage)


(Step 1) Calculate effectiveness of the current armor combination.

Code:
AEff= AWBias(Heavy_Armor,DT) * Ah + AWBias(Normal_Armor,DT) * An + AWBias(Light_Armor,DT) * Al
(Effective Armor)


(Step 2) Resolve Damage with armor AEff .

Code:
AMD = HitChDamage / (1 + AEff / AF)
(Armor modified damage)


(Step 3) AMD is then subtracted from the defender's HP.




If damage is also of mixed type (12 damage; 8 piercing, 4 normal) , then how do we resolve this? :)

Dp = Piercing Damage value
Dn = Normal Damage value
Ds = Slash Damage value
...
D = Dp + Dn + Ds + ... = Total Damage

(alternate step 1)
Code:
AEff
=  [ AWBias(Heavy_Armor,Piercing_Damage) * Ah*Dp+ AWBias(Normal_Armor,Piercing_Damage) * An*Dp + AWBias(Light_Armor,Piercing_Damage) * Al*Dp ] / D
+  [ AWBias(Heavy_Armor,Normal_Damage) * Ah*Dn+ AWBias(Normal_Armor, Normal_Damage) * An*Dn + AWBias(Light_Armor, Normal_Damage) * Al*Dn ] / D
+  [ AWBias(Heavy_Armor,Slash_Damage) * Ah*Ds+ AWBias(Normal_Armor, Slash_Damage) * An*Ds + AWBias(Light_Armor, Slash_Damage) * Al*Ds ] / D
+ ...
(Effective Armor)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 12:32 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
While I appreciate the effort that's gone into this, it should not be necessary to do all this to populate a dungeon. The level attribute alone should be sufficient. Something simple should be able to be used to figure this out - say, the total level of all mobs in a dungeon = 10 * the total party level with no mob being more than +- 1/2 levels higher or lower than the average level of the party.

If each room has no more than +- 1/2 levels of the total party level of mobs that should make distributing them fairly easy.

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 5:56 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Machaira wrote:
While I appreciate the effort that's gone into this, it should not be necessary to do all this to populate a dungeon.


No it isn't specifically for the dungeon, I'm migrating to game mechanics. But I'm guessing you don't want a system like I've developed here :P



If populating a dungeon is going to be as simple as you've described here, then my job on the map generator is all but done.

I can't insert monsters because I have nowhere to insert them into, and no monster types to select from. I could simply output monster positions to a list, and include random power levels, but that really would be arbitrary. I'd be creating and saving a list of random numbers. :rolleyes

Those random numbers would be better calculated in the routine which loads and initialises the map, where specific creatures will be created in response to those random numbers.

So at most, really, are monster positions, and a start location for the team. I'll get on that later tonight. :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 6:18 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
Jasmine wrote:
Machaira wrote:
While I appreciate the effort that's gone into this, it should not be necessary to do all this to populate a dungeon.


No it isn't specifically for the dungeon, I'm migrating to game mechanics. But I'm guessing you don't want a system like I've developed here :P


I already had an idea for most of this. I thought I'd mentioned it before. I haven't had a chance to update the wiki. :(

Jasmine wrote:
If populating a dungeon is going to be as simple as you've described here, then my job on the map generator is all but done.

I can't insert monsters because I have nowhere to insert them into, and no monster types to select from. I could simply output monster positions to a list, and include random power levels, but that really would be arbitrary. I'd be creating and saving a list of random numbers. :rolleyes

Those random numbers would be better calculated in the routine which loads and initialises the map, where specific creatures will be created in response to those random numbers.

So at most, really, are monster positions, and a start location for the team. I'll get on that later tonight. :)


I think part of the generation of the map is placing mobs, albeit a separate part. Once mob types are fleshed out a bit more, along with items, skills, stats, etc ( :confused ) the placement can be done. How were you thinking mob positions would be calculated? Assume you have the total party level and average party member level values available.

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 6:30 pm 
Corpse Bride
User avatar

Joined: Tue Jul 01, 2008 11:44 pm
Posts: 2217
Location: England
Machaira wrote:
How were you thinking mob positions would be calculated? Assume you have the total party level and average party member level values available.



random selection of locations in rooms, and ensuring...
(1) that any two monsters are positioned at least three squares apart,
(2) that no one room can have more than 3 monsters.
(3) that the team start position is not close to any monsters.

Each of these points can be treated as a 'camp' if needs be, packing monsters around it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 9:09 pm 
P2k
User avatar

Joined: Tue Aug 23, 2005 5:11 am
Posts: 2145
How many maps could conceivably be loaded at one time?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 9:23 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
One

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 9:27 pm 
P2k
User avatar

Joined: Tue Aug 23, 2005 5:11 am
Posts: 2145
So if you leave an area and come back all the enemies respawn?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 9:30 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
No, if you exit a dungeon you don't go back to it. You start a new one.

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 10:37 pm 
P2k
User avatar

Joined: Tue Aug 23, 2005 5:11 am
Posts: 2145
Don't dungeons consist of multiple areas?

I take it there is no portaling back to town like Diablo?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 10, 2009 10:54 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11200
Location: Abingdon, MD
Struan wrote:
Don't dungeons consist of multiple areas?

Yes, but they'll all be in the same level. Have you see what Jasmine's put together?

Struan wrote:
I take it there is no portaling back to town like Diablo?

No.

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group