TA: Kingdoms Community Forum
 
HomePortalCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Veterancy

View previous topic View next topic Go down 
AuthorMessage
Vhaerun

avatar

Posts : 111
Reputation : 12
Join date : 2014-01-12
Age : 37
Location : VA, USA

PostSubject: Veterancy   Wed Jul 13, 2016 5:37 pm

With the new dev mode, I noticed something surprising on various units. Their hit points do not go up with veterancy.

_________________
" Boys have swag,
Men have style,
Gentlemen have class!"

-- Vaerun
Back to top Go down
View user profile
Nightfall



Posts : 21
Reputation : 11
Join date : 2015-11-17
Location : US of A

PostSubject: Re: Veterancy   Thu Jul 14, 2016 3:48 am

Which ones?
Back to top Go down
View user profile
Vhaerun

avatar

Posts : 111
Reputation : 12
Join date : 2014-01-12
Age : 37
Location : VA, USA

PostSubject: Re: Veterancy   Thu Jul 14, 2016 2:14 pm

It could be all of the units, however it could also be a problem with the dev mode because I did not see any changes to hit points with veterancy or caused by a unit that boosts other's hit points thru the adjust armor/joy parameters.

_________________
" Boys have swag,
Men have style,
Gentlemen have class!"

-- Vaerun
Back to top Go down
View user profile
$ MalinOMW

avatar

Posts : 576
Reputation : 10
Join date : 2011-07-22
Age : 24
Location : Poland

PostSubject: Re: Veterancy   Mon Aug 15, 2016 5:00 pm

maybe they get "personal aura armor" (titan shaman type things) with still same health points

(one time i got that philosophy question, does unit get more health by being veteran, or lose less health when get hurt)
Back to top Go down
View user profile
Vhaerun

avatar

Posts : 111
Reputation : 12
Join date : 2014-01-12
Age : 37
Location : VA, USA

PostSubject: Re: Veterancy   Mon Aug 15, 2016 6:36 pm

Possible, but we did notice that other stats such as weapon-stats do seem to increase with veterancy, i.e. units hit harder as they gain status.

_________________
" Boys have swag,
Men have style,
Gentlemen have class!"

-- Vaerun
Back to top Go down
View user profile
$ MalinOMW

avatar

Posts : 576
Reputation : 10
Join date : 2011-07-22
Age : 24
Location : Poland

PostSubject: Re: Veterancy   Tue Aug 16, 2016 7:21 pm

soo
i test by making small map in cartographer
2 jungle orcs, just other veteran level
and put 2 triggers
first which make 500dmg per sec
and second which heal 500hp per sec

and ....
both of orcs had losing and gaining health with same time

so by this expirience i might say, that units by veteran gain defense against shots (not health), or ... some other **** might come here xD
Back to top Go down
View user profile
$ MalinOMW

avatar

Posts : 576
Reputation : 10
Join date : 2011-07-22
Age : 24
Location : Poland

PostSubject: Re: Veterancy   Tue Aug 16, 2016 7:21 pm

btw how turn on dev mode?
Back to top Go down
View user profile
Vhaerun

avatar

Posts : 111
Reputation : 12
Join date : 2014-01-12
Age : 37
Location : VA, USA

PostSubject: Re: Veterancy   Tue Aug 16, 2016 10:12 pm

Check your inbox, MalinOMW.

_________________
" Boys have swag,
Men have style,
Gentlemen have class!"

-- Vaerun
Back to top Go down
View user profile
Wqaopl

avatar

Posts : 212
Reputation : 0
Join date : 2008-08-14

PostSubject: Re: Veterancy   Mon Aug 22, 2016 4:42 pm

could you make a unit that does 1 damage and has 5hp to test if its a hp increas or just armor?

_________________
There are loads of modern ideas but new ideas are rare.
Back to top Go down
View user profile
Vhaerun

avatar

Posts : 111
Reputation : 12
Join date : 2014-01-12
Age : 37
Location : VA, USA

PostSubject: Re: Veterancy   Mon Aug 22, 2016 11:44 pm

Deekay wrote:
Paladin wrote:
How does unit veterancy affect a unit and by how much does it modify its stats?
When a unit gets gold all its status are doubled (hp, damage, mana).

We all assumed that as units achieved more kills/stoning/capture/freezing, they would gain more stats. Now we know weapon damage and other stats do go up, i.e. veteran dragons tearing units up as they achieve kills. However, maxdamage/health/armor or whatever it is called in this game does not seem to:

Normal Unit on Right:



Gold Unit On Left:



Apparently the creators of this game forgot to adjust kill-ratio with status accordingly or maybe it is working as intended?

Rime(TA Universe) wrote:
Current unit health memory field size is 16-bit integer
Unit template (UNITINFO) field size is 32-bit integer
Damage network packet - damage amount field is 16-bit integer

The actual damage made to units in game:
Code:
if ( Target.Armored && Amount < 30000 )
     AmountNew = Amount * Target.DamageModifier;
Veteran = Target.Kills / 5;
   if ( Veteran > 5 )
     Veteran = 5;
FinalAmount = 4 * AmountNew * (25 - Veteran) / 100;

As Rime pointed out, maxhealth is -32768 and 32767 but only for the healthbars as the healthbars cannot show anything above 32767. However, in the pictures above at the bottom near the unit pics the status line that says hp=? will go above 32767, but the information box in the left corner will show some negative number, i.e. -32563 something which is odd. And then Xon points this out:

Xon(TA Universe) wrote:
Ok, I have found several locations which make use of the veteran level.

49D6E0 - Appears to have something todo with determining the accuracy of a unit. (I think, there are 2 calls to Random() depending on the vet level & health)

489BB0 - Unit_ApplyDamage - When a unit is hit by a weapon, it applys a health buff.
499CD0 - Unit_CalcWeaponDamage - When a unit fires a weapon (and hits something), damage amplification based on vet level?

Unit_CalcWeaponDamage
- Finds the per-unit type damage otherwise applies the default damage.

Code:
.text:00499DAE xor     ecx, ecx
.text:00499DB0 mov     eax, 66666667h
.text:00499DB5 mov     cx, [ebx+UnitStruct.Kills]
.text:00499DBC imul    ecx
.text:00499DBE sar     edx, 1
.text:00499DC0 mov     eax, edx
.text:00499DC2 shr     eax, 1Fh
.text:00499DC5 add     edx, eax
.text:00499DC7 cmp     edx, 5
.text:00499DCA jle     short loc_499DD1
.text:00499DCC mov     edx, 5
.text:00499DD1
.text:00499DD1 loc_499DD1:  
.text:00499DD1 lea     ecx, [edx+edx*2]
.text:00499DD4 mov     eax, 51EB851Fh
.text:00499DD9 lea     ecx, [ecx+ecx+100]
.text:00499DDD imul    ecx, esi
.text:00499DE0 imul    ecx
.text:00499DE2 sar     edx, 5
.text:00499DE5 mov     eax, edx
.text:00499DE7 shr     eax, 31
.text:00499DEA add     edx, eax
.text:00499DEC mov     esi, edx
This appears to be the formula for calcing a unit's weapons's damage when it hits something. Equation looks like(Where rounding occurs is important!);
Damage(M) = Damage(I)*((5*RoundDown(Kills/5,0))+100) /100

Kills are capped at 25/Veteran level at 5

Code:
.text:00489BF3 xor     ecx, ecx
.text:00489BF5 mov     eax, 66666667h
.text:00489BFA mov     cx, [esi+UnitStruct.Kills]
.text:00489C01 imul    ecx
.text:00489C03 sar     edx, 1
.text:00489C05 mov     ecx, edx
.text:00489C07 shr     ecx, 1Fh
.text:00489C0A add     edx, ecx
.text:00489C0C cmp     edx, 5
.text:00489C0F jle     short loc_489C16
.text:00489C11 mov     edx, 5
.text:00489C16
.text:00489C16 loc_489C16:  
.text:00489C16 mov     ecx, 25
.text:00489C1B mov     eax, 51EB851Fh
.text:00489C20 sub     ecx, edx
.text:00489C22 imul    ecx, edi
.text:00489C25 shl     ecx, 2
.text:00489C28 imul    ecx
.text:00489C2A sar     edx, 5
.text:00489C2D mov     eax, edx
.text:00489C2F shr     eax, 1Fh
.text:00489C32 add     edx, eax
.text:00489C34 jmp     short loc_489C3A
This appears to be the formula for calcing a how much actual damage a unit takes from a weapon. Equation looks like(Where rounding occurs is important!);
Damage(Reduced) = ROUNDDOWN(Damage(Initial)(25-ROUNDDOWN(Kills/5,0))/25)


The above line quoted by Xon is possibly what happens to units that gain status. The game does not adjust the health of the veteran unit but adjusts weapon damage of other units to affect the veteran unit's health less. Basically, what could be affected during veterancy is what is in the weapon section of the fbi such as damage, manapershot and other tags. Any other ideas?

_________________
" Boys have swag,
Men have style,
Gentlemen have class!"

-- Vaerun
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Veterancy   

Back to top Go down
 
Veterancy
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TA: Kingdoms Community Forum :: GENERAL :: General Chat-
Jump to: