Creature stats table proposal

Re: Creature stats table proposal

Postby hwoarangmy » 15 Sep 2014, 15:55

Danimal {l Wrote}:Also, chikens run like hell, my poor minions cant get a hold of them
If you were a chicken and a troll was after you, would you wait for him ?
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Danimal » 15 Sep 2014, 18:50

but my trolls spends all the time on the farm just chasing chickens (and not only him)... only the wyverns are able to hunt one and go back to work
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Creature stats table proposal

Postby hwoarangmy » 16 Sep 2014, 08:15

Danimal {l Wrote}:but my trolls spends all the time on the farm just chasing chickens (and not only him)... only the wyverns are able to hunt one and go back to work
I was joking ;) I just set a speed at random. I will open an issue for this :)
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Bertram » 16 Sep 2014, 09:20

Hi guys,

@hwoarangmy:
As Danimal is playing using the win32 binary, I don't remember but you might have already fixed, ... or not. (Just in case.) :)

@Danimal:
When hwoarangmy will have fixed the newest editor flaws seen, I'll redo a release. The new editor version will likely please you. :)

@all:
Do you I could open an issue with what I proposed above, at least for the first 2 issues proposed?

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Creature stats table proposal

Postby hwoarangmy » 16 Sep 2014, 09:46

Bertram {l Wrote}:As Danimal is playing using the win32 binary, I don't remember but you might have already fixed, ... or not. (Just in case.) :)
That's a good point. @Danimal, I've already changed the chicken behaviour since my first patch. Now, they are slower and they only move from 1 tile at a time. I don't know if the version you are using has the corresponding patches so it might already be fixed. To be sure, can you tell me if your chickens move diagonally or not ?

Bertram {l Wrote}:Do you I could open an issue with what I proposed above, at least for the first 2 issues proposed?
For me, it's good.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Akien » 16 Sep 2014, 10:15

Bertram {l Wrote}:@all:
Do you I could open an issue with what I proposed above, at least for the first 2 issues proposed?

It's good for me, you're the Evil Lord of proposals summary issues :-D
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Creature stats table proposal

Postby Bertram » 16 Sep 2014, 10:16

Ok, I'll open an issue superseding the #7 one.
(Sorry, when I type too fast I skip words sometimes. lol.)

you're the Evil Lord of proposals summary issues :-D

Eh eh.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Creature stats table proposal

Postby Danimal » 16 Sep 2014, 15:55

yes, they zoom diagonally :shock: , but ill wait for next exe to whim again over you

BTW go with it Bertram, i support your issues roadmap.
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Creature stats table proposal

Postby Bertram » 16 Sep 2014, 16:02

BTW go with it Bertram, i support your issues roadmap.

Done already. ;) I thought you were already ok by your previous answers.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Creature stats table proposal

Postby hwoarangmy » 16 Sep 2014, 16:13

Danimal {l Wrote}:yes, they zoom diagonally :shock: , but ill wait for next exe to whim again over you
Ok, then it's not the last version. I will close the issue and we will open another after testing the new version if needed. FYI, in the last version, chickens are slower. When they are idle, they have 50% chances of staying idle (animation "pick"). And when they move, it is only 1 tile at a time. Now, it is much easier for creatures to catch them :)
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Danimal » 16 Sep 2014, 17:15

Lots of hungry creatures thank you from the bottom of their dark, dried up hearts.
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Creature stats table proposal

Postby Bertram » 14 Oct 2014, 09:11

Hey there, :)

Now the new format is in place, adding stats is rather easy. :)
So far, I've added a few missing stats regarding HP and stats entropy per turn.

Next PR will finish that work and start adding the XP table.

Once all that is in, I'll be on the most desired stuff, spawning conditions. ;)

In the meanwhile, I have a question that will need to be answered, though:
(And maybe it can't be answered now but let us ponder it)

Atm, creatures are receiving XP based on those formulas:
- Workers:
- Claim ground tile:
https://github.com/OpenDungeons/OpenDun ... .cpp#L1182
{l Code}: {l Select All Code}
receiveExp(1.5 * (mDefinition->getClaimRate() / (0.35 + 0.05 * getLevel()))


- Claim wall tile:
https://github.com/OpenDungeons/OpenDun ... .cpp#L1362
{l Code}: {l Select All Code}
receiveExp(1.5 * mDefinition->getClaimRate() / 20.0);


- Digging Gold:
https://github.com/OpenDungeons/OpenDun ... .cpp#L1478
{l Code}: {l Select All Code}
receiveExp(5.0 * mDefinition->getDigRate() / 20.0);


- Digging Dirt:
https://github.com/OpenDungeons/OpenDun ... .cpp#L1488
{l Code}: {l Select All Code}
receiveExp(1.5 * mDefinition->getDigRate() / 20.0);

+
https://github.com/OpenDungeons/OpenDun ... .cpp#L1493
2.5 when dug.

- Fighters:

- Attacking:
https://github.com/OpenDungeons/OpenDun ... .cpp#L2137
{l Code}: {l Select All Code}
expGained = 1.0 + 0.2 * std::pow(damageDone, 1.3);


- Being attacked:
https://github.com/OpenDungeons/OpenDun ... .cpp#L2144
{l Code}: {l Select All Code}
tempCreature->receiveExp(0.15 * expGained);


+ a bonus which value is based on the difference between the two creatures' levels:
https://github.com/OpenDungeons/OpenDun ... .cpp#L2148
{l Code}: {l Select All Code}
 if (tempCreature->getLevel() >= getLevel())
    expGained *= 1.0 + (tempCreature->getLevel() - getLevel()) / 10.0;
else
    expGained /= 1.0 + (getLevel() - tempCreature->getLevel()) / 10.0;


The question is, according to the next XP table, what growth will we want for each of those actions?

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Creature stats table proposal

Postby hwoarangmy » 14 Oct 2014, 10:17

IMHO, it is too complex. It would be better (and easier to configure) to have a linear experience evolution. In any case, IMO, we need to have that in configuration files.
We could have (per race) :
- Experience per level. ATM, creatures level up when :
{l Code}: {l Select All Code}
mExp >= 5 * (getLevel() + std::pow(getLevel() / 3.0, 2))

Max level for creatures is 30 (I think we should keep the same max for every creatures so that a player will know when a creature is maxed or not).
If we aim an average game lenght ~ 30mn, I would say we should need 5 to 10 mn to max a creature. However, we should decide if we want players to try to max their creatures or get average ones ie : How many trolls level 10 should beat a troll level 30 ?

In any case, gained experience should not depend on level (otherwise, their is no point in increasing the experience needed to gain a level). I think it should give a constant value (in a config file). For workers, we can have 2 values (claiming and digging).

Concerning fighters, it's the same. I think we should give a constant value when attacking or being attacked. Eventually, give a bonus/malus with level difference.

To summarize, IMHO, we should keep everything as simple as possible by using configurable constant values. We should gather the complex stuff in the way the needed experience to level up is computed because :
- we can compute it only once per level up.
- Changing it will have an impact on all the constant values giving experience
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Bertram » 14 Oct 2014, 10:46

Hey :)

IMHO, it is too complex. It would be better (and easier to configure) to have a linear experience evolution. In any case, IMO, we need to have that in configuration files.
We could have (per race) :
- Experience per level. ATM, creatures level up when ...

Just to make it clear, we agreed about making the experience points needed to earn each level set in an array into the creatures.cfg file in a [XP][/XP] tag couple for instance.
Is that still ok? (I'm on this so I'll need to know. XD)
See the sheet file in there: https://github.com/OpenDungeons/OpenDungeons/issues/153

Max level for creatures is 30 (I think we should keep the same max for every creatures so that a player will know when a creature is maxed or not).

Agreed.

If we aim an average game lenght ~ 30mn, I would say we should need 5 to 10 mn to max a creature. However, we should decide if we want players to try to max their creatures or get average ones ie : How many trolls level 10 should beat a troll level 30 ?

Good question: IMHO, and this still need to be tweakable, but there would be tiers here: E.g:
- Creatures Tier 1: Average level in ~5 minutes.
- Max level in 10-15 minutes.
- Tier 2: Average level in ~10 minutes.
- Max level in ~15 minutes.
- Tier 3: Average level in ~15 minutes.
- Max level in well, 30 minutes?

IMHO, for the same creature, a lvl 10 would be worth 4-5 level 1 creatures. But this is without counting on difference on how physical/magical attack and defense would grow for each of them.
A big creature would be more beatable if you're using a set of melee fighters + rangers + magic attacking creatures, right?

In any case, gained experience should not depend on level (otherwise, their is no point in increasing the experience needed to gain a level). I think it should give a constant value (in a config file). For workers, we can have 2 values (claiming and digging).

Agreed.

Concerning fighters, it's the same. I think we should give a constant value when attacking or being attacked. Eventually, give a bonus/malus with level difference.

Agreed, but the level difference computation is understandable IMHO, and should somehow be kept.

Best regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Creature stats table proposal

Postby Danimal » 14 Oct 2014, 10:58

Just to make it clear, we agreed about making the experience points needed to earn each level set in an array into the creatures.cfg file in a [XP][/XP] tag couple for instance.
Is that still ok? (I'm on this so I'll need to know. XD)

I support this
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Creature stats table proposal

Postby hwoarangmy » 14 Oct 2014, 11:19

Bertram {l Wrote}:Just to make it clear, we agreed about making the experience points needed to earn each level set in an array into the creatures.cfg file in a [XP][/XP] tag couple for instance.
Is that still ok? (I'm on this so I'll need to know. XD)
That's what I remembered but I couldn't find any trace so I thought I had dreamed. That's even better as it will allow to tweak each level. Since I was not sure it was the choosen solution, I didn't want to talk about it as it could sound many work. But if you are on it, that's good :)

Bertram {l Wrote}:IMHO, and this still need to be tweakable, but there would be tiers here: E.g:
- Creatures Tier 1: Average level in ~5 minutes.
- Max level in 10-15 minutes.
- Tier 2: Average level in ~10 minutes.
- Max level in ~15 minutes.
- Tier 3: Average level in ~15 minutes.
- Max level in well, 30 minutes?
That sounds a bit long to me if we aim 30 mn to 1h for a game...

Bertram {l Wrote}:IMHO, for the same creature, a lvl 10 would be worth 4-5 level 1 creatures
That sounds good to me. IMO, we are talking about fighting creatures in a row, not at the same time. @Danimal what do you think ?
In the same spirit, we should also decide the same for creatures tier 1 / 2 / 3 (again, it's just to balance, we shouldn't consider here weakness on magic / physical strength)

Bertram {l Wrote}:But this is without counting on difference on how physical/magical attack and defense would grow for each of them.
A big creature would be more beatable if you're using a set of melee fighters + rangers + magic attacking creatures, right?
Of course, that's why I took Troll vs Troll ;) But I think we need to know more or less what we aim for to set initial values. Then, we will tweak as needed. But the closer we are from something good, the better :)

Bertram {l Wrote}:Agreed, but the level difference computation is understandable IMHO, and should somehow be kept.
Ok. So maybe a float constant value would do (and maybe the same when receiving damage) :
{l Code}: {l Select All Code}
bonsuExpGained = bonusAttack * (tempCreature->getLevel() - getLevel());
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Danimal » 14 Oct 2014, 11:25

Bertram wrote:IMHO, for the same creature, a lvl 10 would be worth 4-5 level 1 creatures

That sounds good to me. @Danimal what do you think ?

i foresee a hell of tweaking :cry: ; but i thing the more correct would be to say a lv10 will be 3 times stronger than a lv1. I think the increments will add over the basic ones (ex: Att 10 base +1lv ), so a level 1 can still hold his ground against a lv10 if even for a few seconds.
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Creature stats table proposal

Postby Bertram » 14 Oct 2014, 15:25

Heya :)

That's what I remembered but I couldn't find any trace so I thought I had dreamed. That's even better as it will allow to tweak each level. Since I was not sure it was the choosen solution, I didn't want to talk about it as it could sound many work. But if you are on it, that's good :)


Locally, I've worked on adding support for move speed, physical/magical atk and def in the configuration file, but also in the code.
What's left before next PR is adding range support for weaponless attacks in the file, and test a bit all that. Then, I'll work towards adding support for the XP array. :)

What I'd propose for range handling is that the creature has got a range for its weaponless attack, and that range is swapped with the weapon's one
when equipped.
Also, the weapon damage is atm added to the natural attack of the creature. While it looks fine for "mêlée" weapons, it sounds weird for ranged ones (which we don't have, btw, but anyway).
Thus, I'd propose to add a RangedWeapon boolean parameter.
If set to true, only the weapon's damage are triggered on the victim, if false, natural + weapon damages are dealt to the victim.

Last but not least, IMHO, not every creature should be able to equip every kind of equipment. Once we'll make the forge functional, I think we'll have to define the permitted weapons per creatures.

That sounds a bit long to me if we aim 30 mn to 1h for a game...

Yeah, might indeed be. I've got no clear vision, yet, anyway. :S

Of course, that's why I took Troll vs Troll ;) But I think we need to know more or less what we aim for to set initial values. Then, we will tweak as needed. But the closer we are from something good, the better :)

Sure :)

As for the bonus XP, I'd rather propose this since IIUC the bonusAttack could be very high:
{l Code}: {l Select All Code}
ExpReceived = X;
int levelDiff = target->getLevel() - getLevel();
ExpReceived += ExpReceived * (levelDiff / levelDiff + 1);


(Same when receiving damage.)

Examples:
Level difference: 0 -> Bonus: 0

Attacker/target is stronger:
Level difference: 1 -> Bonus XP * 1/2, Total: XP + XP * 1/2
Level difference: 2 -> Bonus XP * 1/2, Total: XP + XP * 2/3
Level difference: 4 -> Bonus XP * 1/2, Total: XP + XP * 4/5

Attacker/target is weaker:
Level difference: -1 -> Bonus XP * -1/2, Total: XP - XP * 1/2
Level difference: -2 -> Bonus XP * -2/3, Total: XP - XP * 2/3
Level difference: -4 -> Bonus XP * -4/5, Total: XP - XP * 4/5

What do you think?
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Creature stats table proposal

Postby hwoarangmy » 14 Oct 2014, 16:31

The problem with this approach is that if we give a bonus for level difference, we should also give a bonus for tier difference. Is it normal for a troll level 1 to have 50% bonus versus a gnome level 2 ?

Moreover, with your algorithm, if the level is not the same for 2 creatures, the bonus will be 50% for 1 level difference (which seems a lot) and up to 29/30 so more or less 100% for 29 level difference (which doesn't seem much).

Well, I'm not so sure it is such a good thing to have bonus experience after all...
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Bertram » 14 Oct 2014, 17:00

Arf, fair point, indeed.

Let's forget about this for now, then...
Let's have fixed XP per actions, and tweak the XP array according to that. This way, it will be very simple to tweak.

Would you guys be ok with it?
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Creature stats table proposal

Postby hwoarangmy » 15 Oct 2014, 08:10

Bertram {l Wrote}:Let's have fixed XP per actions, and tweak the XP array according to that. This way, it will be very simple to tweak.
Well, as always, I think we should start simple and see if we need something more complex. So, IMHO, it is better to do that.
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Creature stats table proposal

Postby Bertram » 15 Oct 2014, 10:57

Ok
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: No registered users and 0 guests