RPG in a Box

RPG in a Box

Ver estadísticas:
FascinatedRoby 28 AGO 2023 a las 16:12
Damage Formula
Does anyone actually know what the damage formula is? With in game testing I've been getting some odd results with how attack, damage, and Min/Max damage values interact with each other and its left me unsure how to go about setting up weapons for my games

if someone happened to know what the formula is or where i could find or what in the world min and max damage for weapons even means it would be very appreciated.
< >
Mostrando 1-1 de 1 comentarios
Roneranger 25 SEP 2023 a las 22:18 
you can override the existing damage calculation formula by creating a script called "damage_logic". the default code looks like this:

$stat_diff = $attacker.stat["attack"] - $defender.stat["defense"];
if $stat_diff <= 0 then
$damage = random(0, 1);
elseif $weapon == null then
$damage = $stat_diff + random(-1, 1);
else
$damage = $stat_diff + random(-1, 1) + random($weapon.min_damage, $weapon.max_damage);
end;
if $damage < 0 then
$damage = 0;
end;
return $damage;

if you ever need help i suggest checking out the riab discord server.
< >
Mostrando 1-1 de 1 comentarios
Por página: 1530 50