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
Mark_Farlander
Rebel Alliance
Posts: 580
Joined: Tue Jan 16, 2018 10:47 pm

Post by Mark_Farlander » Thu May 03, 2018 12:14 pm

Keen observation that leads to another question: what's the difference between "50% Shields", "(50% Shields)" and "Shields 50%, Charging" Status 1 in AlliED?
I've flown a few tests and I've found the differences listed below. Just keep in mind I've only tested fighters.

Effects on AI fighters (Ace AI)
50% Shields: the fighter starts the mission with 50% Shields, then it never recharges shields, even if it takes hits; so the shields cannot get higher than 50%, but if they drop they will stay down.

(50% Shields): the fighter starts the mission with 50% Shields, then it recharges shields up to 200%, and of course if it takes hits it will keep recharging shields up to 200%. Since the fighter moves at 75% of its maintenance speed, I have to conclude that the shield recharge is set at maximum rate.

Shields 50%, Charging: it seems this works the same way as (50% Shields).

Effects on your fighter
50% Shields: you start the mission with 50% Shields, but the shield percentage is not shown on your shield monitor. You have to press Alt+C and access the map (M) to see that your craft is at 50% Shields. Then, when you try to recharge your shields (F10), you will discover that your craft doesn't have a shield system!

(50% Shields): you start the mission with 50% Shields, the shield percentage is shown on your shield monitor, and you can normally recharge your shields or redirect the shield recharge to engines.

Shields 50%, Charging: this works the same way as (50% Shields).


Conclusions
There is only 1 shield recharge configuration for Ace AI fighters: Shield recharge at maximum rate until they reach 200% Shields, then Shield recharge at maintenance level.
If an Ace AI fighter doesn't recharge shields, it's because it has no shield system, but this doesn't prevent it from having a "shield charge" at the beginning of the mission.
The fact that there is no 100% Shields intermediate level seems to fully confirm your theory, keiranhalcyon7.

That said, keep in mind that all the tests have been done with Ace AI fighters.
Further testing is required to find out what happens with the other AI levels.
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 » Thu May 03, 2018 4:31 pm

2 clarifications on my previous post are needed:
Mark_Farlander wrote:
Thu May 03, 2018 12:14 pm

If an Ace AI fighter doesn't recharge shields, it's because it has no shield system, but this doesn't prevent it from having a "shield charge" at the beginning of the mission.
I mean a shield charge can be set using a Status in AlliED, for example setting the Status 1 to 50% Shields.




Mark_Farlander wrote:
Thu May 03, 2018 12:14 pm

The fact that there is no 100% Shields intermediate level seems to fully confirm your theory, keiranhalcyon7.
I mean there is no 100% Shields intermediate level to stop recharging: all Ace AI fighters with a shield generator recharge up to 200% Shields.
I don't judge tactics. The Battle is the best and only Judge.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu May 03, 2018 4:39 pm

What happens if you combine one of the 50% settings with the 200% setting?

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:23 am

One thing at a time: I think repeating the tests with non-fighter crafts or changing the AI level should have priority over that.
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 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