aliens

Author Topic: 'retaliation: false' not working?  (Read 6243 times)

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
'retaliation: false' not working?
« on: March 13, 2016, 09:47:57 pm »

"Pursuit Pattern" (shit name i know) is the name for STR_ALIEN_REPRISAL defined  below (wannabe replacement for vanilla retaliation)


The race is "Cult of Sirius", meaning it's either one of these.
  - id: STR_CULT
    retaliation: false
    ...
  - id: STR_CULT_P
    retaliation: false
    ...


Mission (vanilla RETALIATION mission is not deleted but it still has vanilla name, "Alien Retaliation", so it should not be that):
 - type: STR_ALIEN_REPRISAL
    points: 0
    objective: 4
    spawnUfo: STR_BATTLESHIP # Spawned for the final retaliation run
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
        STR_ANTHROPOD_OCULANT_1: 10
        STR_ANTHROPOD_OCULANT_2: 20
        STR_FLOATER_SNAKEMAN_1: 10
        STR_FLOATER_SNAKEMAN_2: 20
        STR_MUTON_ETHEREAL_1: 20
        STR_MUTON_ETHEREAL_2: 10
    waves:
      - ufo: STR_UFO_PROBE
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_UFO_SCOUT
        count: 2
        trajectory: P8
        timer: 3000
      - ufo: STR_UFO_CARRIER
        count: 3
        trajectory: P8
        timer: 3000
      - ufo: STR_BATTLESHIP
        count: 2
        trajectory: P8
        timer: 3000

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: 'retaliation: false' not working?
« Reply #1 on: March 13, 2016, 09:58:14 pm »
Retaliation: false won't stop a race from retaliating if it was attacked directly.

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: 'retaliation: false' not working?
« Reply #2 on: March 13, 2016, 10:11:12 pm »
i see.
any vanilla-oxc trick to *completely* exclude races form any form of retaliation?
« Last Edit: March 13, 2016, 10:12:56 pm by robin »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: 'retaliation: false' not working?
« Reply #3 on: March 14, 2016, 02:12:36 am »
i see.
any vanilla-oxc trick to *completely* exclude races form any form of retaliation?

Retaliation: false is used when the game is generating scheduled Retaliation missions (which only start appearing after a certain month or when you research Cydonia or Bust) - it picks the race from those who have this setting for true.

But if you shot down a UFO, then the Retaliation race will always be the one of the UFO - there's no way to change this.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: 'retaliation: false' not working?
« Reply #4 on: March 14, 2016, 08:38:16 am »
i see.
any vanilla-oxc trick to *completely* exclude races form any form of retaliation?

No, but if you would be interested in a non-vanilla-oxc trick, I will be adding a new flag (on the race level, same as existing retaliation flag) this week:

Code: [Select]
  retaliationRace: DEFAULT # if shot down and triggered, the same race will retaliate
  retaliationRace: NONE # no retaliation even if shot down and triggered
  retaliationRace: STR_ETHEREAL # if shot down and triggered, the Ethereals (or any other race you specify) will retaliate instead

Suggestions on more or different parametrisation welcome.

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: 'retaliation: false' not working?
« Reply #5 on: March 14, 2016, 09:08:44 am »
I think oxc-extended already addresses the retaliation trigger with 'retaliationAggression':

    retaliationAggression: -100    # -100 = no retaliation at all

may be wrong though.

(The no-retaliation i'd need would be per-race --so extended's retaliationAggression is good!--, because the deployment for base defense is only one: i can't have human factions assaulting the base with an alien arsenal and vice versa --woops, missed one bit from the reply--; i'm just not exactly ready to switch to extended).
« Last Edit: March 14, 2016, 10:29:42 am by robin »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5412
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: 'retaliation: false' not working?
« Reply #6 on: March 16, 2016, 05:54:12 am »
You can override retal in OXCE by:

Code: [Select]
alienRaces:
  - id: STR_SECTOID
    retaliationMission: STR_ALIEN_RETALIATION   #default mission spawn after destroing ufo.
    retaliationAggression: 0                    #chance modiffer to spawn retaliation mission.

So you can have humans flying human ships on retals and aliens - alien ships. Just don't forget to set this for *every* race, just in case.

About deployments:

Code: [Select]
ufos:
  - type: STR_UFO_TYPE #default config ...
    craftCustomDeploy: STR_BATTLESHIP_1 #override craft default weapon deploy.
    missionCustomDeploy: STR_TERROR_MISSION_2 #override mission defulat weapon deploy.

Also I don't think 'retaliation: false/true' has any meaning anymore, since scheduled retals have a race list anyway.
« Last Edit: March 16, 2016, 06:00:08 am by Dioxine »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: 'retaliation: false' not working?
« Reply #7 on: March 16, 2016, 10:10:33 am »
Just one thing, retaliationAggression: 0 doesn't mean no retaliation, actually it means no change to vanilla.

Formula for retaliation odds (unless overridden by mission type) is:
Code: [Select]
retaliationOdds = 100 - (4 * (24 - _game->getSavedGame()->getDifficultyCoefficient()) - race->getRetaliationAggression());

Also, robin, if you can use only vanilla, maybe you can use the
Code: [Select]
retaliationOdds: 0 on the mission type... but you will have to define custom missions for your new alien race as the flag is not on the race, but on the mission(s).

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: 'retaliation: false' not working?
« Reply #8 on: March 16, 2016, 08:36:26 pm »
Just one thing, retaliationAggression: 0 doesn't mean no retaliation, actually it means no change to vanilla.

Formula for retaliation odds (unless overridden by mission type) is:
Code: [Select]
retaliationOdds = 100 - (4 * (24 - _game->getSavedGame()->getDifficultyCoefficient()) - race->getRetaliationAggression());

Also, robin, if you can use only vanilla, maybe you can use the
Code: [Select]
retaliationOdds: 0 on the mission type... but you will have to define custom missions for your new alien race as the flag is not on the race, but on the mission(s).
retaliationOdds is not documented on ruleset reference, where did you find it?

Is this how it should be used:

alienMissions:
  - type: STR_MY_MISSION
    retaliationOdds: 0
    points: 50
    ...


?
« Last Edit: March 16, 2016, 09:41:45 pm by robin »

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: 'retaliation: false' not working?
« Reply #9 on: March 16, 2016, 09:37:31 pm »
It should be `retaliationAggression`, Meridian mixup names in that post.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: 'retaliation: false' not working?
« Reply #10 on: March 16, 2016, 10:09:15 pm »
It should be `retaliationAggression`, Meridian mixup names in that post.

I really meant retaliationOdds, it was implemented by Warboy about 6 months ago.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: 'retaliation: false' not working?
« Reply #11 on: March 16, 2016, 10:12:04 pm »
I really meant retaliationOdds, it was implemented by Warboy about 6 months ago.
Then I probably miss it or forget about this.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: 'retaliation: false' not working?
« Reply #12 on: March 16, 2016, 10:29:11 pm »
Then I probably miss it or forget about this.

Found it, it's this one: https://github.com/SupSuper/OpenXcom/commit/a3c09c0a6a9901a35b465b4b134d7fe8daefb2d7

retaliationOdds is not documented on ruleset reference, where did you find it?

Is this how it should be used:

alienMissions:
  - type: STR_MY_MISSION
    retaliationOdds: 0
    points: 50
    ...


?

Yes, that looks OK.
« Last Edit: March 16, 2016, 10:32:20 pm by Meridian »

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: 'retaliation: false' not working?
« Reply #13 on: March 16, 2016, 11:34:33 pm »
Thanks, i'll definitely try it!