OpenXcom Forum

Modding => Work In Progress => Topic started by: The Reaver of Darkness on July 26, 2016, 06:27:51 am

Title: Change UFO crash percentage?
Post by: The Reaver of Darkness 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?
Title: Re: Change UFO crash percentage?
Post by: Solarius Scorch 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.
Title: Re: Change UFO crash percentage?
Post by: yrizoud 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.
Title: Re: Change UFO crash percentage?
Post by: The Reaver of Darkness 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.
Title: Re: Change UFO crash percentage?
Post by: yrizoud 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
Title: Re: Change UFO crash percentage?
Post by: The Reaver of Darkness 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.