aliens

Author Topic: Help: make aliens melee consistently  (Read 9540 times)

Offline robin

  • Commander
  • *****
  • Posts: 1226
  • ULTIMATE ROOKIE
    • View Profile
Help: make aliens melee consistently
« on: April 03, 2014, 12:42:19 am »
So I made this melee AI unit (alien).
I'd want it to go to the target and attack.
Stats for the unit and the weapon seem ok (see code further).
...
Well it just wanders around doing nothing. I had just a single attack against a civilian over several test battles.

Is there some trick to make it aggressive, like "just go straight to the target and attack"?


Code: [Select]
items:
  - type: CYBERMITE_WEAPON
    weight: 3
    bigSprite: -3
    floorSprite: 31
    handSprite: 104
    hitSound: 54
    clipSize: -1
    power: 100
    damageType: 7
    accuracyMelee: 80
    tuMelee: 15
    battleType: 3
    fixedWeapon: true
    invWidth: 2
    invHeight: 2
    recover: false
units:
  - type: STR_CYBERMITE_TERRORIST
    race: STR_CYBERMITE
    stats:
      tu: 90
      stamina: 120
      health: 30
      bravery: 110
      reactions: 60
      firing: 0
      throwing: 0
      strength: 20
      psiStrength: 100
      psiSkill: 0
      melee: 80
    armor: CYBERMITE_ARMOR
    standHeight: 5
    kneelHeight: 5
    value: 25
    deathSound: 23
    intelligence: 3
    aggression: 2
    specab: 1
    livingWeapon: true
« Last Edit: April 03, 2014, 01:16:28 am by robin »

Offline MFive

  • Captain
  • ***
  • Posts: 95
  • Lazy Sectoid
    • View Profile
Re: Help: make aliens melee consisntently
« Reply #1 on: April 03, 2014, 01:08:52 am »
honestly, i have no idea but i think their might be an AI 'weight ' that you can put on guns to make them more likely to attack stuff, and at very least you can use chryssalid AI, that should work

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Help: make aliens melee consistently
« Reply #2 on: April 03, 2014, 09:29:28 am »
try giving it aggression 1, intelligence 4 and lower the TU cost of the weapon to 10

Offline robin

  • Commander
  • *****
  • Posts: 1226
  • ULTIMATE ROOKIE
    • View Profile
Re: Help: make aliens melee consistently
« Reply #3 on: April 03, 2014, 09:38:57 am »
try giving it aggression 1, intelligence 4 and lower the TU cost of the weapon to 10
I already tried with aggression 1 and intelligence 4 (which should be the chryss) and it still didn't attack. I thought it was because the weapon had acid damage, so I changed it to melee damage, but no effect. So I gave it the current stats, aggression 2 and intelligence 3 which are the zombie's stats.
I was thinking about trying 2 and 2 (reaper stats); I'll try again with  1, 4, and 10 TUs.

(Could it be the cyberdisc special ability that interferes with its attacking?)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Help: make aliens melee consistently
« Reply #4 on: April 03, 2014, 09:52:59 am »
no, that's only checked when a unit dies.

i'm not sure man, try enabling debug AI in your config and check your log file if you wanna see what decisions it's making

Offline robin

  • Commander
  • *****
  • Posts: 1226
  • ULTIMATE ROOKIE
    • View Profile
Re: Help: make aliens melee consistently
« Reply #5 on: April 03, 2014, 12:11:10 pm »
Edit:
Holy shit I don't know what I did but now it attacks like there is no tomorrow!
Killing spree! Fantastic.


No luck. Not only it doesn't attack, it even runs away as soon as it sees my agents!

Well.
I originally wanted it to explode itself on the target, but I couldn't make it work.
So I reverted to a "normal" melee attack (acid injection was the idea), but I can't seem to do this either.

This is the unit btw:


..Is there a limit to how short a unit can be? As you can see it is very small so I gave it these stats:
-   standHeight: 6
-   kneelHeight: 5
^
I think the problem was this afterall. I'll try to elaborate later.
« Last Edit: April 03, 2014, 12:46:24 pm by robin »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11783
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Help: make aliens melee consistently
« Reply #6 on: April 03, 2014, 05:34:12 pm »
Maybe it's stupid, but do you have that option where aliens purposefully avoid exposure to your fire turned on? It might be the thing too. (Options were reset recently, which could enable your terror unit to attack.)

And by the way, could we have some info on this? Is it a terror unit? What race does it work with? Will there be a new main race to go with the Cybermite?

Offline robin

  • Commander
  • *****
  • Posts: 1226
  • ULTIMATE ROOKIE
    • View Profile
Re: Help: make aliens melee consistently
« Reply #7 on: April 03, 2014, 05:52:23 pm »
It really shouldn't be the case (never turned on the "sneaky AI" option).

I think the problem was that "standHeight:" and "kneelHeight:" had the same value "6".
Ad soon as I changed it like this:
-   standHeight: 6
-   kneelHeight: 5
it started attacking.
But I haven't tested and I may have made other modifications (in the ruleset) which may have been the real trigger of the correct behaviour.


That IS the Cybermite (cyber-mite), which is the terror unit for the Waspite race.
(The name "Cybermite" is not final; I don't dislike it but I dislike that it rhymes with Waspite, so I'm thinking of "Injectrod" (since it injects a toxin with its melee attack and "-trod" makes the word sounding like "arthropod")).

« Last Edit: April 03, 2014, 05:58:06 pm by robin »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Help: make aliens melee consistently
« Reply #8 on: April 03, 2014, 07:21:20 pm »
aliens don't kneel, visibility comes from 2 voxels below height, attacks come from 3 voxels below that. your cybermite was tracing LOF from inside the ground. raising it to a height of 6 would have been the key.

Offline robin

  • Commander
  • *****
  • Posts: 1226
  • ULTIMATE ROOKIE
    • View Profile
Re: Help: make aliens melee consistently
« Reply #9 on: April 03, 2014, 07:51:30 pm »
I know they don't kneel but they all have both height values in the "units:" section of the ruleset.
Also I always had 6 and 6 (I even put 12 and 12); it started attacking.. or that's what it seems to me.. when I changed kneelHeight from 6 to 5.

Oh well, it works and it's quite a brutal terror unit. I'm happy.


Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Help: make aliens melee consistently
« Reply #10 on: April 03, 2014, 08:13:12 pm »
OP says 5.

also, i can garauntee you that the value is only there for the sake of completeness, it is NEVER taken into account for aliens because they have no facility for kneeling.
« Last Edit: April 03, 2014, 11:10:24 pm by Warboy1982 »