aliens

Author Topic: Change UFO crash percentage?  (Read 3962 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Change UFO crash percentage?
« on: July 26, 2016, 06:27:51 am »
Normally, a UFO will crash when it sustains 50% or more damage without being destroyed. Is there a way to increase this percentage? edit: this can be done by giving UFOs shields with OXCE



Extra question: can I add more sets to Alien Item Levels, beyond the 0, 1, and 2?
« Last Edit: September 08, 2019, 09:59:56 am by The Reaver of Darkness »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Change UFO crash percentage?
« Reply #1 on: July 26, 2016, 10:17:22 am »
Normally, a UFO will crash when it sustains 50% or more damage without being destroyed. Is there a way to increase this percentage?

Probably not.

Extra question: can I add more sets to Alien Item Levels, beyond the 0, 1, and 2?

Yes - FMP uses 5, X-Piratez uses 6.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Change UFO crash percentage?
« Reply #2 on: July 26, 2016, 02:07:05 pm »
Normally, a UFO will crash when it sustains 50% or more damage without being destroyed. Is there a way to increase this percentage?
You can mod weapons to fire quicker and do less damage, or fire slower and do more damage (adapat the ammo accordingly). This will make it easier/harder to force UFOs to land without destroying them.
Note, in the interception window, OpenXcom lets you click a weapon to disable it temporarily. This lets you send an interceptor armed with missile and gun, and decide what to use.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Change UFO crash percentage?
« Reply #3 on: July 26, 2016, 08:26:32 pm »
You can mod weapons to fire quicker and do less damage, or fire slower and do more damage (adapat the ammo accordingly). This will make it easier/harder to force UFOs to land without destroying them.
Note, in the interception window, OpenXcom lets you click a weapon to disable it temporarily. This lets you send an interceptor armed with missile and gun, and decide what to use.
I actually wanted to shrink the window between crashed and destroyed. I've been editing the damage values of weapons but I'm finding the only way to make a weapon have a decent chance of destroying a UFO is if a double set of the weapon will down it in one shot. It leads to the weapons being slow firing high damage finicky weapons just to get a few UFO destructions in there.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Change UFO crash percentage?
« Reply #4 on: July 26, 2016, 09:02:49 pm »
For what it's worth, I can precise that the "double set of the weapon" idea is wrong. Even if two projectiles/rays hit at the same time, the game processes each one at time, and if the first one causes the UFO to crash, the second one goes nowhere - and thus it won't change a crash into a cloud of debris.

ref: DogfightState::update() in DogfightState.cpp
Code: [Select]
https:// Projectile reached the UFO - determine if it's been hit.
if (((p->getPosition() >= _currentDist) || (p->getGlobalType() == CWPGT_BEAM && p->toBeRemoved())) && !_ufo->isCrashed() && !p->getMissed())
{
(hit accuracy check)
}
isCrashed() becomes true when damage>50%, and thus it bypasses the entire "hit" logic

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Change UFO crash percentage?
« Reply #5 on: July 29, 2016, 07:44:11 am »
Well, that makes it even harder to destroy them. Thus all the more reason to want to shrink the margin.