Page 1 of 1

Please can someone explain the stats?

PostPosted: Thu Dec 03, 2015 7:39 am
by Danny
Okay so am confused. How exactly do the attack stats in 001 work?

I have a slime that a slime weapon, the weapon deals 5 and the slime also deals 5 alone so thats 10 attack, so how it is that when the slim attacks me it deals on 3 everytime it attacks? Hows that work out?

The slime as 0 defense, the main actor as 0 defense, so really how does it work?

Edit: Serious question thanks!

Re: Please can someone explain the stats?

PostPosted: Sat Dec 05, 2015 3:26 pm
by RamchuK_Ntertainment
If you navigate to Actor Templates and look inside the 'Attacked' trigger for the template belonging to 'Actor', you will see the default formula being used.

For clarification, what you see is basically the comparison of an attack stat of the enemy versus the defense stat of a character. The damage to be taken is calculated as (attack / 2) - (defense / 4). (e.g. 4 Enemy ATT & 4 Your DEF = (4 / 2) - (4 / 4) = 2 - 1 = 1) This should explain how it's possible to be invincible, where an attacking actor does not deal any damage whatsoever. The amount of health being reduced however is a deviation of the damage calculated, by default it's a 20% increase. In the example given, the amount of health lost would be 1.2 from each successful attack being delivered. As you can see, higher stats will increase the impact of the deviation being applied.

Re: Please can someone explain the stats?

PostPosted: Sat Dec 05, 2015 4:11 pm
by Danny
So how i would i change this formula to deal the exact amount of damage the weapon as and the attack value of the ememy? So it the weapon a actor is using is 5 damage and there stat is 5 damage then they deal 10 damage? I hope you understand what am asking.

Re: Please can someone explain the stats?

PostPosted: Sat Dec 05, 2015 6:26 pm
by RamchuK_Ntertainment
Are you suggesting to ignore the attacked actor's defense statistic? Or do you want the damage to be the simple difference? For instance, if the attacker deals 10 attack, 5 from the item and 5 by default, yet the attacked character has a defense of 5, do you want the attacked actor to suffer 10 HP or 5 HP?

Re: Please can someone explain the stats?

PostPosted: Sat Dec 05, 2015 6:47 pm
by Danny
RamchuK_Ntertainment wrote:Are you suggesting to ignore the attacked actor's defense statistic? Or do you want the damage to be the simple difference? For instance, if the attacker deals 10 attack, 5 from the item and 5 by default, yet the attacked character has a defense of 5, do you want the attacked actor to suffer 10 HP or 5 HP?


I want the attacked actor to suffer 5HP, i want the defense to also be taken into concideration. Just simple attack/defense. The player as 10 HP with a defense of 5. The player is hit by a enemy that deals 10 damage but because the player as 5 defense he only takes 5 damage reducing his health to 5 and not 0.

Re: Please can someone explain the stats?

PostPosted: Sat Dec 05, 2015 8:03 pm
by RamchuK_Ntertainment
In that case, just set [damage = attack - defense] and just subtract [damage] from HP.

Re: Please can someone explain the stats?

PostPosted: Sun Dec 06, 2015 5:30 am
by Danny
RamchuK_Ntertainment wrote:In that case, just set [damage = attack - defense] and just subtract [damage] from HP.


Set it in which variable? Not following very well. Do i need all these variables?


Re: Please can someone explain the stats?

PostPosted: Sun Dec 06, 2015 1:42 pm
by RamchuK_Ntertainment
Yes, you still need all of the Local Variables, as they are used in calculations within the script. Besides, you will likely want to revisit the formula at a later time in the future and may want to make more use of the variables. I'm saying this because you technically don't need the attack and defense variables, yet it's best to just leave them.

Like I mentioned before, the Variable Operation that sets 'damage', just use attack - defense instead of (attack / 2) - (defense / 4). Now in the Change Health event, just use damage instead of Math.DeviateP(damage,20). All else remains; that's it.

Re: Please can someone explain the stats?

PostPosted: Mon Dec 14, 2015 7:27 pm
by Danny
I'm having a problem understanding what i change exactly...

Re: Please can someone explain the stats?

PostPosted: Mon Dec 14, 2015 11:05 pm
by Kraven4382
What you can do is remove the default calculation, and replace it with you own version. Would that be an option?

Re: Please can someone explain the stats?

PostPosted: Mon Dec 14, 2015 11:14 pm
by Danny
Kraven4382 wrote:What you can do is remove the default calculation, and replace it with you own version. Would that be an option?


Sorry what?

Re: Please can someone explain the stats?

PostPosted: Mon Dec 14, 2015 11:37 pm
by Kraven4382
Here is an image of the default damage/defense script. It's located under the top level actor template in the triggers section under "Attacked". Could you simply rewrite or replace this script?

gg maker help 3.PNG

Re: Please can someone explain the stats?

PostPosted: Mon Dec 14, 2015 11:39 pm
by Danny
Thats just it i don't know which parts of that script to rewrite, i don't fully understand what it means its 001 default code and makes no sense to me.