OpenXcom Forum
OpenXcom => Open Feedback => Topic started by: clownagent on July 04, 2014, 12:12:21 am
-
I would like to use meleeskills for alienunits.
In the ruleset I added for the alien melee weapons "skillApplied: true" and changed the meleeaccuracy. However, the alien units score always 100% hits even if I set accuracy to 1% they always hit.
Strangely, when I control the alien units (via psi or in debug mode) the meleeskill seems to be working, which means that the percentage of hits is approx. equal to the accuracy.
However when the aliens are are AI controlled they always hit, no matter whats the accuracy.
So, am I missing something important or is the melee skill not working for aliens?
-
It should be working...
Can you post the code?
-
When you use the code below the reaper should have a melee accuracy of 1, that means it should not be able to hit something. This works if you control the reaper in debug mode.
However, when the AI controls a reaper its attacks always hit.
I tested it with a "new battle" terror mission directly from the main menu.
items:
- type: REAPER_WEAPON
skillApplied: true
accuracyMelee: 1
units:
- type: STR_REAPER_TERRORIST
stats:
tu: 75
stamina: 90
health: 148
bravery: 90
reactions: 64
firing: 0
throwing: 0
strength: 90
psiStrength: 35
psiSkill: 0
melee: 1
-
i'll take a look in the morning.
edit: i took a look, the AI uses the exact same "to hit" determination as players.
-
i'll take a look in the morning.
edit: i took a look, the AI uses the exact same "to hit" determination as players.
items:
- type: REAPER_WEAPON
skillApplied: true
accuracyMelee: 1
units:
- type: STR_REAPER_TERRORIST
stats:
tu: 75
stamina: 90
health: 148
bravery: 90
reactions: 64
firing: 0
throwing: 0
strength: 90
psiStrength: 35
psiSkill: 0
melee: 1
So, you say above code should work and the reaper should score approx. 1% hits? Or is there an additional switch/tag to be set in the ruleset necessary?
With only the above code, the reaper always hits, no matter what I set as accuracy. :(
-
https://github.com/SupSuper/OpenXcom/commit/2eef496d3f539c88d2c33a5e36c68bece6408f2a (https://github.com/SupSuper/OpenXcom/commit/2eef496d3f539c88d2c33a5e36c68bece6408f2a)