Craft stat rounding effects

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.

Re: Craft stat rounding effects

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri May 04, 2018 12:01 pm

keiranhalcyon7 wrote:
Thu May 03, 2018 4:39 pm
What happens if you combine one of the 50% settings with the 200% setting?
Since the 50% setting is evaluated before the 200% setting, the craft will have 50% shield.

The shield status is evaluated is this order:
  1. skirmish combat goal for starfighter: shield *= 2
  2. No Shields: the shield generator is removed and shield = 0
  3. 50% Shields: the shield generator is removed and shield /= 2
  4. Shields 0%, Charging: shield = 0
  5. Shields 50%,Charging or (50% Shields): shield /= 2
  6. (200% Shields) or 200% Shields: shield *=2

User avatar
Mark_Farlander
Rebel Alliance
Posts: 580
Joined: Tue Jan 16, 2018 10:47 pm

Post by Mark_Farlander » Fri May 04, 2018 12:38 pm

This is really awesome!
I've looked for this info for long time.

How did you get this?
I don't judge tactics. The Battle is the best and only Judge.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri May 04, 2018 1:05 pm

The code starts at address 0041C513.

User avatar
Mark_Farlander
Rebel Alliance
Posts: 580
Joined: Tue Jan 16, 2018 10:47 pm

Post by Mark_Farlander » Fri May 11, 2018 11:52 am

I've flown a few tests to determine how AI level can affect the shield recharge time of a fighter.

Craft analyzed: X-Wing T-65
Status 1: Shields 50%, Charging (we already know this status doesn't remove the shield generator)
Status 2: Normal

AI level: Rookie
The fighter always moves at 75% of its maintenance speed, but never recharges shields, even if it takes hits.
As soon as the craft takes hull damage, the shields get boosted to 20% due to a partial energy transfer from cannons to shields, then the fighter doesn't recharge shields beyond that level.

AI level: Officer
This works the same way as Rookie AI. The major difference between these 2 AI levels is how the craft attacks enemies.

AI level: Veteran
The fighter moves at 75% of its maintenance speed and recharges shields up to 200%, then immediately switches to 100% of its maintenance speed.
The recharge time from 50% shields to 200% shields is 6 minutes and 31 seconds.
Whenever the craft takes hull damage after the shields are out (but the shield system is not damaged), the shields immediately get boosted to 40% due to a total energy transfer from cannons to shields, then the fighter keeps recharging shields as before.

AI level: Ace
This works the same way as Veteran AI, but the recharge time from 50% shields to 200% shields is 2 minutes and 40 seconds.

AI level: Top Ace
The fighter moves at 75% of its maintenance speed and recharges shields up to 200%, then keeps moving at 75% of its maintenance speed for 7 seconds, then switches to 87% of its maintenance speed (it's actually 87.5%, but we know that the game engine uses integer math for percentages) for 31 seconds, and finally switches to 100% of its maintenance speed.
The recharge time from 50% shields to 200% shields is 1 minute and 32 seconds.
Whenever the craft takes hull damage after the shields are out (but the shield system is not damaged), the shields immediately get boosted to a variable percentage, but never more than 20%, because even if a total energy transfer from cannons to shields is still viable, the cannon charges are not full.

AI level: Jedi
This works the same way as Top Ace AI. The major differences between these 2 AI levels are the targeting refresh time and the ability to evade enemy fire.
I don't judge tactics. The Battle is the best and only Judge.

User avatar
Mark_Farlander
Rebel Alliance
Posts: 580
Joined: Tue Jan 16, 2018 10:47 pm

Post by Mark_Farlander » Fri May 11, 2018 3:20 pm

To determine how AI-controlled fighters manage energy I've flown an X-Wing T-65 and I've taken note of the time required to recharge the shields from 50% to 200% with different recharge configurations.
Every setting listed below makes the fighter move at 75% of its maintenance speed.

Configuration 1: Shield recharge at increased rate + cannon recharge at increased rate
Recharge time (from 50% to 200%): 6 minutes and 22 seconds

Configuration 2: Shield recharge at maximum rate + cannon recharge at maintenance level
Recharge time (from 50% to 200%): 3 minutes and 12 seconds

Configuration 3: Shield recharge at maximum rate + cannon recharge at maintenance level + total energy transfer from cannons to shields
Recharge time (from 50% to 200%): 2 minutes and 20 seconds

Configuration 4: Shield recharge at increased rate + cannon recharge at increased rate + keep partially transferring energy from cannons to shields
Recharge time (from 50% to 200%): 1 minute and 49 seconds

Configuration 5: Shield recharge at increased rate + cannon recharge at increased rate + keep totally transferring energy from cannons to shields
Recharge time (from 50% to 200%): 1 minute and 19 seconds


Conclusions
Veteran AI fighters use configuration 1 until they are at 200% shields, then they set both the recharges to maintenance level.

Ace AI fighters use configuration 2 until they are at 200% shields, but they keep every cannon charge at the minimum level that still allows to fire a fully charged laser shot, whereas the remaining energy is transferred to shields. When they are at 200% shields, they set both the recharges to maintenance level.

Top Ace AI fighters use configuration 5 until they are at 200% shields, but they keep every cannon charge at the minimum level that still allows to fire a fully charged laser shot, whereas the remaining energy is transferred to shields. When they are at 200% shields, they keep recharging cannons at increased rate until they are at 3 fourth of the total charge, I mean half way of the full charge bar.
I don't judge tactics. The Battle is the best and only Judge.

Post Reply