Experience System - Page 2

Experience System

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Well to be precise about the effect of experience, here's the piece of code:

Code: Select all

void CUnit::ExperienceChange()
{
	logExperience=log(experience+1);
	limExperience=1-(1/(experience+1));

	power=unitDef->power*(1+limExperience);
	reloadSpeed=(1+limExperience*0.4);	

	float oldMaxHealth=maxHealth;
	maxHealth=unitDef->health*(1+limExperience*0.7);
	health+=(maxHealth-oldMaxHealth)*(health/oldMaxHealth);
}
As this might be mumbo-jumbo to some of you, I made a few graphs:

Image

The vertical axes are multipliers. So the power is at best doubled, the reload speed is at best 1.7 times better, and the max health is at best 1.4 times higher.
Note that these are limits when the experience goes to infinity, so you'll never get at those numbers.

The accuracy is also increased, but this varies from weapon to weapon.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

erm....whats power? ;.;
CrowJuice
Posts: 88
Joined: 13 May 2005, 11:01

Post by CrowJuice »

So there is a small difference between a unit with 4 XP and 40 XP? That doesn't sound right. There should be a bigger gain. The curve should be more straight IMO.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post by knorke »

Hm, but an Peewee with 100000 health would be a bit strange :shock:
Most units only reach something like 0.4 anyway, maybe 2.0 for some plasma cannons or somthing.
And the curve is quite steep in the beginning, so experience is very usefull in the beginning (the first kills the unit does) but then gets less important as the effect of "OMG i just killed a krogoth!!" wears of after you have done it twenty times.
It makes sense.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

If you manage to get a 100000HP Peewee you deserve it.
mongus
Posts: 1463
Joined: 15 Apr 2005, 18:52

Post by mongus »

you cannot get 10k hp peewee, look at what he said, its 1.4 times the starting hp. so in extreme case, if pewee has 1000 hp originally, you will get it up to 1400.


the usual ammount of experience units get after dying.. is around 0.8 and 1

if you are lucky, you can get arty with 1.4 or maybe more.

so.. looking at the chart, when you have a 1 exp unit, the gain is about:

1.35 HP

1.2 Reload speed

1.5 Power.

quite close to peak values, as its a curve.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

This is true.

There is also an experience peak, probably related to the number of bits avalilable to store unit experience at all. (2^12 prolly) I once played a game on Comet where my brilliant opponents continually sent L1 units at my comm for a solid thirty minutes. After a while, he had a whopping 32.20 experience, with some ridiculous amount of health etc. Prolly could have survived two nukes or something.

Anyway, after it hit that ceiling, the experience wouldnt go any higher.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

mongus: that was in a what-if scenario. Even if experience meant a linear growth in power you'd still have trouble getting a unit to survive long enough to do that.
User avatar
Aun
Posts: 788
Joined: 31 Aug 2005, 13:00

Post by Aun »

Someone write a patch for mod-controlled exp gain?
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Me want, me want! I wanna control how much per shot :P
User avatar
Sgt Doom
Posts: 144
Joined: 19 Jun 2006, 10:52

Post by Sgt Doom »

I love the system, I have my own pimped out Liche atomic bomber that I pilot myself and lead my air swarms :D
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

No, the problem with a linear summation system is that it *could* get more powerful, over time. Meaning you could potentially have a peewee that could kill a krogoth.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Yes but that Peewee would have to have survived many battles and veteran units would have much higher priority for atztackers in such a situation.
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post by hollowsoul »

how u meant to tell a single ridicolous high level unit in a group of them & then try to micro to hell & back to kill all the high level ones, before they kill u?


Atm the curve is grand idea, units get experience points & since its a curve it u dont get a unrealistic super peewee.

U think a tank & its crew get so much experience in a real war that there
nearly unstoppable.
Or do they learn how to fix it / reload faster / aim better / work as a unit = slightly better aim, faster at reloading, team-work, driver learns to angle tank better so to deflect rounds (yes this is done in RL & was done in WW2). There all small improvements, but u dont get a super tank in the end

I say leave if as it is, or worse case scenario
make it modable incase some crazy modder wants to change it, they can
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

I think the curve should get killed off at 3x normal stats :P
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

U think a tank & its crew get so much experience in a real war that there
nearly unstoppable.


You think there is any material that can withstand a direct hit from a ball of plasma?
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

erm....whats power? ;.;
;.;
it is mod defined though anyway? so if you want a mod where experience means more go ahead
it would be nice if you could have exp calculated on a per hit OR a per unit OR both (bonus XP for every kill, XP per hit)
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

.1 per shot .8 per kill er something....

and I got a good thing that wouldn't make em grow too fast but always grow..

.15 per level :P
1=1.15
2=1.30
3=1.45
4=1.60
5=1.75
6=1.90
7=2.05
8=2.20
9=2.35
10=2.50
and it could stop their :P
Crampman
Posts: 117
Joined: 22 Dec 2005, 12:17

Post by Crampman »

The experience system is usefull, bit I think it would be nice to also display the number of kills of the units, just like OTA.
Post Reply

Return to “General Discussion”