OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Meridian on October 12, 2018, 10:30:01 pm

Title: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 12, 2018, 10:30:01 pm
EDIT: topic split from: https://openxcom.org/forum/index.php/topic,6557.0.html


2) Retaliation UFOs can destroy XCom bases without any base defense taking place

As it says, once the final retaliation run begins there's no way to stop it short of defense facilities firing. If they fail, then the base is automatically destroyed.

This simulates a missile strike (or a saboteur/infiltrator) and if that sounds too extreme for some, it could be suggested to have a flag on base facilities that defines whether the facility will be destroyed or not by such a strike (underground facilities would survive, surface ones would not), but that would require a ton of more work and I only need the full destruction part at this point.

Destroying the whole base:

Code: [Select]
ufos:
  - type: STR_BATTLESHIP
    missilePower: -1                 # -1 means destroy everything

Destroying only a few random facilities:

Code: [Select]
ufos:
  - type: STR_BATTLESHIP
    missilePower: 5                 # N means destroy N 1x1 buildings or equivalent

This second part is a bit more complicated.
2x2 buildings count for 4, 3x3 buildings count for 9 and so on...

But missilePower 1 can destroy also 2x2 and 3x3 buildings... missilePower 2 however cannot destroy two 2x2 buildings.

Probably best to give example:

missilePower: 2 can destroy:
- two 1x1 buildings
- one 1x1 building and one 2x2 building
- one 2x2 building
- one 3x3 building... or 4x4, 5x5, 6x6 ... i.e. as soon as it "starts" destroying a building, it finishes destroying it

missilePower: 5 can destroy:
- 1, 1, 1, 1, 1
- 1, 1, 1, 1, 2
- 1, 1, 1, 2
- 1, 1, 2
- 1, 2
- 2, 1
- 2, 2
- 3 (or bigger)

Access lift cannot be destroyed (unless you destroy the whole base with missilePower: -1).
If a base has only 5 buildings, and missile power is 200... access lift still remains :)

Translations:

Code: [Select]
  STR_ALIEN_MISSILES_HAVE_DAMAGED_OUR_BASE: "Alien missiles have damaged our base {0}"
  STR_ALIEN_MISSILES_HAVE_DESTROYED_OUR_BASE: "Alien missiles have destroyed our base {0}"
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 15, 2018, 07:16:39 pm
I've implemented all 3 new features in Tech-Comm yesterday and testing has gone smoothly so far.

"Destroying only a few random facilities" was a nice bonus added by Meridian since my initial suggestion was to completely remove the base. I've used this to implement enemy bombers that will attack and damage the player's bases, which allows to reduce the higher number of base defense missions, and makes defense facilities even more necessary.

I'm on the process of balancing the new features and there are two possible suggestions talked over the Discord channel:
1) Make optional the requirement that all facilities need to be connected to the Access Lift. This will affect both facility building (you can place facilities anywhere) and prevent their removal if something gets destroyed and they're not connected to the lift anymore. The caveat will be that the base defense terrain needs to be redesigned so that movement between all existing base modules is still possible with empty space between facilities (so this won't work with the vanilla base defense terrain)

2) Add a flag for impregnable facilities (that can't be damaged by enemy air attacks). This can be used with the vanilla base terrain (the Access Lift already can't be destroyed by aerial attack) or modders can also redesign their base facilities. In Tech-Comm I've designed the base facilities/terrain from the start so that there are both ground level and underground versions of most facilities (Living Quarters, Stores, etc.)
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Solarius Scorch on October 16, 2018, 03:02:29 pm
I agree it would be useful to be able to indicate buildings as impervious to bombardment, since the lift already is (if I'm not mistaken), and OXCE is about unhardcoding stuff.
The connectivity to the access lift issue would be worth pursuing, but I think only as part of a larger redesign.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: R1dO on October 16, 2018, 05:25:04 pm
Just a thought here.

Instead of destroying the facility. Why not convert it to "building-type" rubble.
Either 4-way connected or 2-3 side connected (like the corridors mod).

In that case you do away with the problem of connectivity.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 16, 2018, 06:09:49 pm
Just a thought here.

Instead of destroying the facility. Why not convert it to "building-type" rubble.
Either 4-way connected or 2-3 side connected (like the corridors mod).

In that case you do away with the problem of connectivity.

That's a good idea to solve the connectivity issue, if there's a special 'rubble' facility that still allows connection with the other base modules (with corridors).

However, there are two separate issues that would need to be addressed:
1) limiting the damage to the single building that is hit (and not losing any connected ones)
2) ensuring that friendly units can reach any facility that has become isolated because of the missile strike. Tech-Comm base terrain is designed that it solves the 2nd issue (with a ground level) but on vanilla it will require some change.

With the current installment of Tech-Comm the first issue is minor because the damage has been implemented in a low setting for balance, so that the player will simply assume that the missile destroyed additional buildings with the strike. But other modders might find those two additions useful.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 19, 2018, 06:49:16 pm
The connectivity to the access lift issue would be worth pursuing, but I think only as part of a larger redesign.

Been thinking about the whole connectivity issue and there's an aspect that I failed to consider with the connectivity, namely how it limits facility building - to build in a row from A to C, you need to build first facility A, then B, then C.

This is basically a road bump so that you can't build all 36 slots at the same time, and it's a necessary one for a number of reasons - as Solarius said, connectivity would be worth pursuing but only as a part of larger redesign, which I'm not interested at this point.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: R1dO on October 20, 2018, 08:30:12 pm
First of all a small disclaimer, since i am not that familiar with the capabilities of OXCE+ i might make some wrong assumptions.

Been thinking about the whole connectivity issue and there's an aspect that I failed to consider with the connectivity, namely how it limits facility building - to build in a row from A to C, you need to build first facility A, then B, then C.

This is basically a road bump so that you can't build all 36 slots at the same time, and it's a necessary one for a number of reasons - as Solarius said, connectivity would be worth pursuing but only as a part of larger redesign, which I'm not interested at this point.

I was under the impression OXCE+ allows replacing buildings, now if i assume the original tile stays available during the build phase of replacing why not use the following approach:

* When building a new base start with tiles that are of a building type that allows omnidirectional connectivity.
  - Either as default tile upon base construction or a building type with 0-day construction (like the access lift).
  - For instance "sewers" , "caves" or plain "ground level fields" (last one will require each facility to have some sort of access to the ground level, otherwise you risk having "disconnected" tiles during construction).
* Now the player can replace/upgrade those tiles as desired
* Optional: Let the player remove those tiles that are not needed for connectivity so it can still have "choke point" defensive base layout (although this might need a connectivity check when removing).

Could this work?

...
However, there are two separate issues that would need to be addressed:
1) limiting the damage to the single building that is hit (and not losing any connected ones)
2) ensuring that friendly units can reach any facility that has become isolated because of the missile strike. Tech-Comm base terrain is designed that it solves the 2nd issue (with a ground level) but on vanilla it will require some change.

Since it is sometimes hard to gets ones ideas clear using written text let's try to elaborate a bit.

1) I believe it is not so much part of the base building concept but a functionality of the missile strike routine. Hence the proposal to "convert" the targeted tile to the "rubble building", instead of removing it.
2) If using the "convert" routine this should not be a problem under the condition the mod provides a "rubble" facility with appropriate connectivity.

Hope i made myself a bit clear.

Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 28, 2018, 10:47:48 am
Added 2 more features for missiles:

1. instead of destroying a facility (and disconnected facilities too)... we can just replace the facility with rubble... defined as a global parameter (a name of a 1x1 facility)

Code: [Select]
destroyedFacility: STR_RUBBLE

2. added weights to facilities (default 100), so you can affect which ones are more or less likely to be hit; or even which are protected (weight 0, or access lift)

Code: [Select]
facilities:
  - type: STR_HYPER_WAVE_DECODER
    missileAttraction: 500     # 5x more likely to be hit
  - type: STR_HANGAR
    missileAttraction: 25     # 4x less likely to be hit
  - type: STR_SUPEREXPENSIVE_HQ
    missileAttraction: 0     # cannot be hit

Is that OK so or are there more ideas and/or objections?
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: davide on October 28, 2018, 11:09:29 am
MissileAttraction -> AirStrikeRisk ?  :-[ :-X
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 28, 2018, 11:17:57 am
MissileAttraction -> AirStrikeRisk ?  :-[ :-X

I don't understand the question.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: davide on October 28, 2018, 01:06:00 pm
I apologize, but in my opinion the attribute could be renamed ;)
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Ethereal on October 28, 2018, 06:00:33 pm
Is that OK so or are there more ideas and/or objections?

And if the base defense was disabled by the player intentionally, will the UFO bomb the base? The idea is that the UFO bombs the base precisely because of the fact that the UFO was shot from the base. Or did I misunderstand?
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 28, 2018, 06:06:27 pm
And if the base defense was disabled by the player intentionally, will the UFO bomb the base? The idea is that the UFO bombs the base precisely because of the fact that the UFO was shot from the base. Or did I misunderstand?

In this case, the player cannot disable base defense, it will start automatically.

Also, there is no UFO as such... this is meant to represent an intercontinental ballistic missile (or its alien equivalent).

So all options for such "UFO missile" are:
1. it gets shot down by base defenses
2. it doesn't get shot down and destroys some facilities on impact
3. it doesn't get shot down and destroys the whole base on impact

Battlescape base defense doesn't occur at all.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Ethereal on October 28, 2018, 06:31:01 pm
Understood. Specialized UFO-bomber, which can be shot down and make a ground mission, but the attack on the base, he does not make a landing mission, and bombs and flies back. Great idea! Thanks.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 28, 2018, 06:37:52 pm
Understood. Specialized UFO-bomber, which can be shot down and make a ground mission, but the attack on the base, he does not make a landing mission, and bombs and flies back. Great idea! Thanks.

The UFO-bomber can be shot down by craft, if it is detected and intercepted on its way to the target, or it can be shot down down by base defenses before it performs the bombing. It can also be given an avoidBonus and/or high speeds to prevent craft/base defenses from destroying it, in order to replicate a missile rather than a bomber craft.

The UFO-bomber/missile doesn't fly back after the bombing, it simply disappears (like vanilla)

--- posts merged ---

@Meridian,

I was looking at the code dealing with alien missile strikes and I have a question: when selecting which facility will be hit, does the code favor larger (2x2) structures? Naturally 2x2 facilities have 4 times the odds of being hit than a 1x1 structure because they occupied a larger area, but from looking at the code it seemed to me that larger facilities will always be selected first for destruction. Did I misunderstood the code?
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Eddie on October 28, 2018, 06:48:31 pm
Some ideas to further expand on this feature:

Assuming this is not a nuclear missile hitting the base but an UFO doing bombing runs, the function of base defence facilities could be different. There is not one bombing run but the UFO continuously bombs the base (doing a bit of damage each run) while base defence keeps shooting at it. Once the UFO is sufficiently damaged by the base defences (or runs out of ammo, e.g. timer runs out) it disengages and stops the bombing. Stronger base defence shortens the time of bombing. This way, weak base defence is still useful.

To make base bombing less punishing, gradual damage models could be implemented. For example, a living quarters is changed to "damaged" on the first hit, "rubble" on the second. The damaged living quarters is still a living quarters, but has reduced capacity. The "build over" feature can then be used to repair the facility, defining repair time and cost.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 29, 2018, 07:02:00 pm
@Meridian,
I was looking at the code dealing with alien missile strikes and I have a question: when selecting which facility will be hit, does the code favor larger (2x2) structures? Naturally 2x2 facilities have 4 times the odds of being hit than a 1x1 structure because they occupied a larger area, but from looking at the code it seemed to me that larger facilities will always be selected first for destruction. Did I misunderstood the code?

If you didn't change "missileAttraction", then all facilities have equal chance of being hit. Same chance for 2x2 hangar as for 1x1 radar.

Assuming this is not a nuclear missile hitting the base but an UFO doing bombing runs, the function of base defence facilities could be different. There is not one bombing run but the UFO continuously bombs the base (doing a bit of damage each run) while base defence keeps shooting at it. Once the UFO is sufficiently damaged by the base defences (or runs out of ammo, e.g. timer runs out) it disengages and stops the bombing. Stronger base defence shortens the time of bombing. This way, weak base defence is still useful.

No, thank you.
And yes, it is a missile... either conventional (destroys facilities), or nuclear (destroys bases).

To make base bombing less punishing, gradual damage models could be implemented. For example, a living quarters is changed to "damaged" on the first hit, "rubble" on the second. The damaged living quarters is still a living quarters, but has reduced capacity. The "build over" feature can then be used to repair the facility, defining repair time and cost.

Done.
You can now define different destroyed facility for each facility:

Code: [Select]
facilities:
  - type: STR_HANGAR
    destroyedFacility: STR_HANGAR_DAMAGED    # must be of same size as the original facility

If not defined, the global rubble facility setting still applies: https://openxcom.org/forum/index.php/topic,6668.msg105690.html#msg105690
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 30, 2018, 01:58:39 am
Done.
You can now define different destroyed facility for each facility:

Code: [Select]
facilities:
  - type: STR_HANGAR
    destroyedFacility: STR_HANGAR_DAMAGED    # must be of same size as the original facility

If not defined, the global rubble facility setting still applies.

I'm happy because of the possibilities, I'm crying because I'll have to design damaged and rubble versions of 50+ maps :D
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 30, 2018, 01:00:29 pm
Two more updates:

1. damaged facilities logic now applies to battlescape (base defense) missions too

Especially relevant with this setting: https://openxcom.org/forum/index.php/topic,6663.0.html

2. changed the order of construction/destruction

First a damaged facility is constructed and added to the base and only after that the original facility is destroyed... this means that whatever can be saved will be saved, e.g. craft in the hangar, transfers/hires/purchases of items/craft/scientists/engineers, ongoing manufacturing projects, etc. considering limits enforced by the damaged facilities of course
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 30, 2018, 04:21:43 pm
2. changed the order of construction/destruction

First a damaged facility is constructed and added to the base and only after that the original facility is destroyed... this means that whatever can be saved will be saved, e.g. craft in the hangar, transfers/hires/purchases of items/craft/scientists/engineers, ongoing manufacturing projects, etc. considering limits enforced by the damaged facilities of course

So previously when a facility was damaged, all its content was destroyed automatically. Now, when a facility is damaged some of its content can still be saved, depending on the damaged facility that replaces it?

One question: this only applies if the Storage Limits For Recovered Items option is activated?
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 30, 2018, 05:02:14 pm
So previously when a facility was damaged, all its content was destroyed automatically. Now, when a facility is damaged some of its content can still be saved, depending on the damaged facility that replaces it?

Best would probably be an example.

Let's say you have 2 workshops (50 space each, together 100) and 40 engineers working on 2 projects each taking 30 space and half of the engineers.

1. If one workshop is destroyed... OpenXcom needs to deallocate 50 workshop space... it will first deallocate all 40 engineers, but because it is not enough (10 space missing), it will cancel also one project (and keep the second project).

2a. If one workshop is damaged and replaced by a "damaged workshop" with just 25 capacity... before the change I did, first the workshop would be destroyed (same as in point 1), 40 engineers will be deallocated and 1 project cancelled... and after that a new workshop will be built without any impact

2b. If one workshop is damaged and replaced by a "damaged workshop" with just 25 capacity... after the change I did, first a new workshop would be added, so the game would have 25 workshop space more (total 125)... and then the original workshop would be destroyed (space decreased to 75), but instead of -40 engineers and -1 project... the game would only need to do -25 engineers and -0 projects.

Other facilities have similar algorithms... long story.

One question: this only applies if the Storage Limits For Recovered Items option is activated?

No, this setting doesn't have any impact here.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 30, 2018, 05:51:03 pm
Best would probably be an example.

Let's say you have 2 workshops (50 space each, together 100) and 40 engineers working on 2 projects each taking 30 space and half of the engineers.

1. If one workshop is destroyed... OpenXcom needs to deallocate 50 workshop space... it will first deallocate all 40 engineers, but because it is not enough (10 space missing), it will cancel also one project (and keep the second project).

2a. If one workshop is damaged and replaced by a "damaged workshop" with just 25 capacity... before the change I did, first the workshop would be destroyed (same as in point 1), 40 engineers will be deallocated and 1 project cancelled... and after that a new workshop will be built without any impact

2b. If one workshop is damaged and replaced by a "damaged workshop" with just 25 capacity... after the change I did, first a new workshop would be added, so the game would have 25 workshop space more (total 125)... and then the original workshop would be destroyed (space decreased to 75), but instead of -40 engineers and -1 project... the game would only need to do -25 engineers and -0 projects.

Other facilities have similar algorithms... long story.

OK, that's clear regarding projects. But I still a doubt about items/personnel/craft. Let's say a Hangar is occupied by 2 craft, it is hit and damaged reducing it's capacity to 1. What happens to the excess craft? It is destroyed or can it be transferred to a base with spare capacity? My question also applies to personnel/items when living quarters/stores are hit.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Meridian on October 30, 2018, 06:09:25 pm
OK, that's clear regarding projects. But I still a doubt about items/personnel/craft. Let's say a Hangar is occupied by 2 craft, it is hit and damaged reducing it's capacity to 1. What happens to the excess craft? It is destroyed or can it be transferred to a base with spare capacity? My question also applies to personnel/items when living quarters/stores are hit.

Only one craft can occupy a hangar.
If the hangar "allows" more than one craft, additional craft are stored in the base, NOT in any particular hangar.
So if the capacity is reduced to 1, the single craft that occupied the hangar before will be saved... and other craft will also be saved, or better said not affected, because they are not in any hangar.

As for other things:

1/ Destroying hangar:

a/ If it has a "main" craft:
- deassigns any soldiers assigned to the main craft
- deequips all items assigned to the main craft (not counting craft weapons I think)
- destroys the main craft (and its weapons I think)

b/ If it doesn't have a main craft:
- destroys craft production for this hangar... potentially for the base too (until base limit is reached), if you allow craft that are not in a hangar
- destroys craft transfers for this hangar... potentially for the base too (until base limit is reached), if you allow craft that are not in a hangar

2/ Destroying psi lab:
- just removes people from training

3/ Destroying labs:
- just removes scientists from projects... does NOT cancel projects

4/ Destroying workshops:
- removes engineers from projects
- cancels projects if necessary too

5/ Destroying stores:
- does NOT destroy items in the base...
- ... but, destroys excess transfers/purchases for this base

6/ Destroying living quarters:
- does NOT kill people at the base...
- ... but, KILLS scientists/engineers in transfer/hired... does NOT kill soldiers in transfer/hired

If a facility has more than one of these attributes... all effects are applied simultaneously in OXCE.
In OpenXcom, only the first relevant effect (in the above order) would be applied (which is a bug IMO, that's why we changed it).


PS:
7/ Destroying training facility (gym)... doesn't do anything yet... I could swear I added it some time ago... but I can't find it... I'll add it too... and it will just remove people from training same as psi labs
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on October 30, 2018, 06:31:35 pm
Very clear, thank you very much for the detailed explanation - this is info that players will need.
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: animal310 on June 23, 2019, 01:40:11 pm
I'm a little confused as to how this works.

Does any ship in an Alien Retaliation Mission with the MissilePower command line have the ability to attack a base as opposed to just the last ship in the mission (the battleship)? How does this work? Does it fly around looking for a base and then attack if it detects it?

When base defences are activated do they attack the attacking ship or the 'missile'? For example if a medium scout attacks will the base defences be up again the Medium Scouts armour level?

Looks like a great feature!

Edit, I'm thinking I might be wrong, would this work?

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RETALIATION_1
    points: 0
    objective: 4
    spawnUfo: STR_MEDIUM_SCOUT # Spawned for the final retaliation run
    operationType: 0
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
        STR_SECTOID: 20
        STR_SNAKEMAN: 20
        STR_ETHEREAL: 20
        STR_MUTON: 20
        STR_FLOATER: 20
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_MEDIUM_SCOUT
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 1
        radarRange: 1018
      - ufo: STR_LARGE_SCOUT
        count: 3
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 2
        radarRange: 1018
      - ufo: STR_MEDIUM_SCOUT
        count: 2
        trajectory: P0
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 1
        radarRange: 1018
  - type: STR_ALIEN_ RETALIATION_2
    points: 0
    objective: 4
    spawnUfo: STR_LARGE_SCOUT # Spawned for the final retaliation run
    operationType: 0
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
        STR_SECTOID: 20
        STR_SNAKEMAN: 20
        STR_ETHEREAL: 20
        STR_MUTON: 20
        STR_FLOATER: 20
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_FIGHTER_SHIP
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        radarRange: 1344
      - ufo: STR_SENTRY_SHIP
        count: 3
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 3
        radarRange: 1018
      - ufo: STR_LARGE_SCOUT
        count: 2
        trajectory: P0
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 2
        radarRange: 1018
  - type: STR_ALIEN_ RETALIATION_3
    points: 0
    objective: 4
    spawnUfo: STR_SENTRY_SHIP # Spawned for the final retaliation run
    operationType: 0
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
        STR_SECTOID: 20
        STR_SNAKEMAN: 20
        STR_ETHEREAL: 20
        STR_MUTON: 20
        STR_FLOATER: 20
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_MEDIUM_SCOUT
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 1
        radarRange: 1018
      - ufo: STR_LARGE_SCOUT
        count: 3
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 2
        radarRange: 1018
      - ufo: STR_SENTRY_SHIP
        count: 2
        trajectory: P0
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 3
        radarRange: 1018
  - type: STR_ALIEN_ RETALIATION_4
    points: 0
    objective: 4
    spawnUfo: STR_TERROR_SHIP  # Spawned for the final retaliation run
    operationType: 0
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
        STR_SECTOID: 20
        STR_SNAKEMAN: 20
        STR_ETHEREAL: 20
        STR_MUTON: 20
        STR_FLOATER: 20
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_FIGHTER_SHIP
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        radarRange: 1344
      - ufo: STR_SENTRY_SHIP
        count: 3
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 3
        radarRange: 1018
      - ufo: STR_TERROR_SHIP
        count: 2
        trajectory: P0
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 5
        radarRange: 1344
  - type: STR_ALIEN_RETALIATION_HK
    points: 0
    objective: 4
    spawnUfo: STR_BATTLESHIP # Spawned for the final retaliation run
    operationType: 0
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
        STR_SECTOID: 20
        STR_SNAKEMAN: 20
        STR_ETHEREAL: 20
        STR_MUTON: 20
        STR_FLOATER: 20
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_MEDIUM_SCOUT
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 1
        radarRange: 1018
      - ufo: STR_LARGE_SCOUT
        count: 3
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 2
        radarRange: 1018
      - ufo: STR_BATTLESHIP
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        radarRange: 1344
  - type: STR_ALIEN_RETALIATION
    objective: 4
    spawnUfo: STR_BATTLESHIP #Spawned for the final retaliation run
    operationType: 0
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
        STR_SECTOID: 20
        STR_SNAKEMAN: 20
        STR_ETHEREAL: 20
        STR_MUTON: 20
        STR_FLOATER: 20
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_FIGHTER_SHIP
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        radarRange: 1344
      - ufo: STR_SENTRY_SHIP
        count: 3
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        huntBehavior: 1
        missilePower: 3
        radarRange: 1018
      - ufo: STR_BATTLESHIP
        count: 2
        trajectory: P8
        timer: 3000
        hunterKillerPercentage: 50
        huntMode: 2
        huntSpeed: 100
        radarRange: 1344
  - missionWeights:
      0:
        STR_ALIEN_RETALIATION_1: 50
        STR_ALIEN_RETALIATION: 25
        STR_ALIEN_RETALIATION_HK: 25
      1:
        STR_ALIEN_RETALIATION_1: 25
        STR_ALIEN_RETALIATION_2: 25
        STR_ALIEN_RETALIATION: 25
        STR_ALIEN_RETALIATION_HK: 25
      3:
        STR_ALIEN_RETALIATION_1: 10
        STR_ALIEN_RETALIATION_2: 30
        STR_ALIEN_RETALIATION_3: 10

        STR_ALIEN_RETALIATION: 25
        STR_ALIEN_RETALIATION_HK: 25
      6:
        STR_ALIEN_RETALIATION_1: 10
        STR_ALIEN_RETALIATION_2: 10
        STR_ALIEN_RETALIATION_3: 20
        STR_ALIEN_RETALIATION_4: 10
        STR_ALIEN_RETALIATION: 25
        STR_ALIEN_RETALIATION_HK: 25
      9:
        STR_ALIEN_RETALIATION_2: 10
        STR_ALIEN_RETALIATION_3: 10
        STR_ALIEN_RETALIATION_4: 30
        STR_ALIEN_RETALIATION: 25
        STR_ALIEN_RETALIATION_HK: 25

Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: Hobbes on June 27, 2019, 03:52:19 pm
Does any ship in an Alien Retaliation Mission with the MissilePower command line have the ability to attack a base as opposed to just the last ship in the mission (the battleship)? How does this work? Does it fly around looking for a base and then attack if it detects it?


No, only the UFO spawned for the retaliation run performs the missile attack. The base needs to be detected by the previous UFOs.

Quote
When base defences are activated do they attack the attacking ship or the 'missile'? For example if a medium scout attacks will the base defences be up again the Medium Scouts armour level?

There's no actual missile, it's the UFO that performs the attack, so yes if a Medium Scout was attacking, the base defenses would be up against it.

Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: animal310 on June 29, 2019, 02:54:06 pm
Thanks Hobbes

Another great feature, finally missile defences have a use!!

Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: animal310 on July 17, 2019, 02:51:42 pm
Earlier in the thread there was mention of the ‘corridor mod’ to replace damaged sections of the base. Does anyone have this mod (or a STR_RUBBLE one) or know where I can find them?
Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: psavola on October 06, 2022, 11:23:48 pm
I saw this feature in action for the first time in my N'th TWoTS run (see https://openxcom.org/forum/index.php/topic,5566.msg149665.html#msg149665).

One thing I was left wondering about is that the aliens conducted a bombing run at least three times in a short time on the same base (and will likely continue to do so). Without this feature, retaliation mission eventually usually results in a base defense, which is guaranteed to make the aliens forget your base. Apparently the aliens continue with retaliation even though they repeatedly succeed in destroying base facilities. Is this working as intended? Maybe the aliens should be more liable to declare success and stop the retaliation if they get (partial) success in retaliation? Or maybe this is just something the modder can consider (fir example, ufos with missilePower should have a higher interruptPercentage - yet I don't think alien succeeding in its mission counts?)

TWoTS has the following ruleset for Alien retaliation, with only the cruiser having missilePower 2 setting.

    waves:
      - ufo: STR_SURVEY_SHIP
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_ESCORT
        count: 2
        trajectory: P8
        timer: 3000
      - ufo: STR_CRUISER
        count: 2
        trajectory: P8
        interruptPercentage: 10
        timer: 3000
      - ufo: STR_DREADNOUGHT
        count: 2
        trajectory: P8
        interruptPercentage: 50
        timer: 3000 
      - ufo: STR_FIGHTER
        count: 1
        trajectory: P8
        timer: 10
        hunterKillerPercentage: 70
        huntMode: 1

If there are only supposed to be two cruisers, how come I would get hit three times (I think this is the same retaliation run)? And should the retaliation and bombings continue until they attack the base with a dreadnought (or interrupt the retaliation)?

Edit: I discovered that TWoTS has a scripted "small retaliation", starting at month 6, with execution odds 30 %, which target the base and have the following characteristics:

    waves:
      - ufo: STR_SURVEY_SHIP
        count: 3
        trajectory: P8
        timer: 3000
      - ufo: STR_FIGHTER
        count: 1
        trajectory: P8
        timer: 2000
        hunterKillerPercentage: 30
      - ufo: STR_CRUISER
        count: 3
        trajectory: P8
        interruptPercentage: 40
        timer: 2000

I think this explains the three bombing runs I saw. I suppose this also means that the aliens don't stop their three bombing runs if they are successful in the first ones, you'll have to interrupt them somehow to be safe.

Title: Re: [DONE] [Suggestion] Alien missile strikes
Post by: psavola on December 04, 2022, 05:02:44 pm
I noticed another nasty thing with an alien bombing run.

The aliens bombed a subpen (one out of three) while two crafts were out on a mission (a transport and an escort) and one was back at the base. The RNG chose to destroy the subpen associated with the transport out on a mission. The transport was instantly terminated midflight, while its escort turned back home, happy to have accomplished its mission objectives.

A more realistic and fair alternative would be that iyou could choose which one(s) of your craft you scrap,. Or transfer one in midflight to another base, or have the time to transfer out a craft still at the base elsewhere before the others get back. But unfortunately this would likely require some new UI features, so I'm not holding my breath.

A non-UI option would be to implement a preference algorithm to choose which craft should be scrapped if there no longer enough subpens for the returning crafts, instead of being based on RNG. I suppose players would prefer transports over interceptors, and newer and better equipped interceptors over older ones.

This is particularly nastyt, because you also lose all the crew (if the transport would have been in the subpen, you would have only lost the transport, which would have been manageable). They also don't have a safety eject option, like interceptors getting actually destroyed on geoscape have.

I was playing IM so unfortunately I had no save before the incident.