Thread: Strange archery View Single Post
#32 He111 Approved Member Join Date: Jan 2009 Location: Newcastle, NSW, Australia Posts: 707 Quote:
 Originally Posted by Goblin Wizard Some facts about arrow script: (..\data\aix\weapon\inf.g1.archer.arrow.static\inf .g1.archer.arrow.static.aix) Each soldier has 24 HP. Types of arrow damage: Code: ```[*] = ;const DeadDamage = 24; [*] = ;const HardDamage = 12; [*] = ;const LiteDamage = 4;``` An example of damage probability with western bow against unarmored target: Code: ```[*] = ; if Distance < 5 then [*] = ; begin [*] = ; if CubeRes <= 9 then HPDec := DeadDamage [*] = ; else [*] = ; if CubeRes <= 11 then HPDec := HardDamage [*] = ; else [*] = ; if CubeRes <= 12 then HPDec := LiteDamage; [*] = ; end``` Code: ```[*] = ; if Distance < 45 then [*] = ; begin [*] = ; if CubeRes <= 3 then HPDec := DeadDamage [*] = ; else [*] = ; if CubeRes <= 6 then HPDec := HardDamage [*] = ; else [*] = ; if CubeRes <= 8 then HPDec := LiteDamage; [*] = ; end``` Code: ```[*] = ; if Distance < 95 then [*] = ; begin [*] = ; if CubeRes <= 2 then HPDec := HardDamage [*] = ; else [*] = ; if CubeRes <= 4 then HPDec := LiteDamage; [*] = ; end``` Code: ```[*] = ; if Distance < 100 then [*] = ; begin [*] = ; if CubeRes <= 2 then HPDec := LiteDamage; [*] = ; end``` As you noticed there is no chance to kill a soldier in one shot (no possibility of dealing DeadDamage) at long range. If distance is greater that 94 meters you need 6 successful hits to kill a soldier! Even at medium range like 45 meters chance of dealing DeadDamage is very low. And all of this is against unarmored target! Some examples of crossbow damage (xbow against 0 armor): Code: ```[*] = ; if Distance < 5 then [*] = ; begin [*] = ; if CubeRes <= 10 then HPDec := DeadDamage [*] = ; else [*] = ; HPDec := HardDamage; [*] = ; end``` Code: ```[*] = ; if Distance < 40 then [*] = ; begin [*] = ; if CubeRes <= 6 then HPDec := DeadDamage [*] = ; else [*] = ; if CubeRes <= 7 then HPDec := HardDamage [*] = ; else [*] = ; if CubeRes <= 9 then HPDec := LiteDamage; [*] = ; end``` Code: ```[*] = ; if Distance < 100 then [*] = ; begin [*] = ; if CubeRes <= 3 then HPDec := DeadDamage [*] = ; else [*] = ; if CubeRes <= 4 then HPDec := HardDamage [*] = ; else [*] = ; if CubeRes <= 6 then HPDec := LiteDamage; [*] = ; end``` As you can see xbow is absolutely deadly at short range. Nearly every bolt kills. Of course at long range xbow is not so deadly but still has a chance of insta kill (unarmored target). So If you don't like dev's archery system you can easily change it yourself.
HARD CODING!!! YOU MUST BE JOKING!!! .. With nested IFs!!     You cannot be serious.

--- additional ---

Ooopss, sorry , it's a script not source code

.
__________________
.
========================================
.
.....--oOo-- --oOo-- HE-111 --oOo-- --oOo--.....
.
========================================
-oOo- Intel i7-2600K (non-clocked) -oOo- GA-P67A
-oOo- DF 85 full tower -oOo- 1000W corsair
-oOo- 8 GB 1600Hz -oOo- 2 x GTX 580 1.5M (295.73)
-oOo- 240 SSD -oOo- W7 64bit
-oOo- PB2700 LED 2560 x 1440 6ms 60Hz -oOo-
========================================

Last edited by He111; 11-26-2011 at 08:14 PM.