Author Topic: Melee and meleeskill  (Read 3890 times)

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Melee and meleeskill
« 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?   

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11454
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Melee and meleeskill
« Reply #1 on: July 04, 2014, 02:07:47 pm »
It should be working...

Can you post the code?

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: Melee and meleeskill
« Reply #2 on: July 04, 2014, 08:39:44 pm »
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.

Code: [Select]
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

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Melee and meleeskill
« Reply #3 on: July 04, 2014, 10:16:38 pm »
i'll take a look in the morning.

edit: i took a look, the AI uses the exact same "to hit" determination as players.
« Last Edit: July 05, 2014, 02:32:36 pm by Warboy1982 »

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: Melee and meleeskill
« Reply #4 on: July 06, 2014, 06:36:38 pm »
i'll take a look in the morning.

edit: i took a look, the AI uses the exact same "to hit" determination as players.

Code: [Select]
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.  :(

« Last Edit: July 06, 2014, 06:40:51 pm by clownagent »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile