Shield Recharge Hook
Moderator: JeremyaFr
Shield Recharge Hook
- JeremyaFr
- Posts: 2940
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
Here is a new hook.
xwa_hook_shield.zip
This hook permits to define shield recharge rates for any craft.
Suppose that the mission is "[MissionDir]\[Mission].tie".
Suppose that the craft is "FlightModels\[Model].opt".
The possible involved files are:
- "[MissionDir]\[Mission]_Shield.txt"
- "[MissionDir]\[Mission].ini", section "Shield"
- "FlightModels\[Model]Shield.txt"
- "FlightModels\[Model].ini", section "Shield"
To define the recharge rate, create a file named "FlightModels\[Model]Shield.txt" or create a section named "[Shield]" in "FlightModels\[Model].ini".
The format is:
UseGenerator = 0 to use RechargeRate or 1 to use PerGeneratorRechargeRate
PerGeneratorRechargeRate = per generator recharge value
RechargeRate = recharge value
If the file does not exist, default values are used.
By default, the recharge rate is controlled as this:
For starfighters the recharge rate is 20.
For Interdictor, Victory Star Destroyer, Imperial Star Destroyer, and Super Star Destroyer, the recharge rate is 5 multiplied by the number of shield generators still alive.
For other starships, the recharge rate is 5.
For other crafts, the recharge rate is 0.
For player craft, if the rate is 0 then it is set to 20.
To define the recharge rate for a craft for a given mission, create a file named "[MissionDir]\[Mission]_Shield.txt" or create a section named "[Shield]" in "[MissionDir]\[Mission].ini".
The format is a line per craft:
ModelIndex, UseGenerator, PerGeneratorRechargeRate, RechargeRate
Here is a new hook.
xwa_hook_shield.zip
This hook permits to define shield recharge rates for any craft.
Suppose that the mission is "[MissionDir]\[Mission].tie".
Suppose that the craft is "FlightModels\[Model].opt".
The possible involved files are:
- "[MissionDir]\[Mission]_Shield.txt"
- "[MissionDir]\[Mission].ini", section "Shield"
- "FlightModels\[Model]Shield.txt"
- "FlightModels\[Model].ini", section "Shield"
To define the recharge rate, create a file named "FlightModels\[Model]Shield.txt" or create a section named "[Shield]" in "FlightModels\[Model].ini".
The format is:
UseGenerator = 0 to use RechargeRate or 1 to use PerGeneratorRechargeRate
PerGeneratorRechargeRate = per generator recharge value
RechargeRate = recharge value
If the file does not exist, default values are used.
By default, the recharge rate is controlled as this:
For starfighters the recharge rate is 20.
For Interdictor, Victory Star Destroyer, Imperial Star Destroyer, and Super Star Destroyer, the recharge rate is 5 multiplied by the number of shield generators still alive.
For other starships, the recharge rate is 5.
For other crafts, the recharge rate is 0.
For player craft, if the rate is 0 then it is set to 20.
To define the recharge rate for a craft for a given mission, create a file named "[MissionDir]\[Mission]_Shield.txt" or create a section named "[Shield]" in "[MissionDir]\[Mission].ini".
The format is a line per craft:
ModelIndex, UseGenerator, PerGeneratorRechargeRate, RechargeRate
Last edited by JeremyaFr on Mon Feb 22, 2021 4:35 pm, edited 1 time in total.
Reason: Update download link
Reason: Update download link
- Driftwood
- Posts: 2115
- Joined: Wed Oct 22, 2003 11:01 pm
- Contact:
So, wait. Does this override the MXvTED stats? So say you have a "generic" baseline slot install for say "generic fighter", you call the ship in a mission that is overriding the default opt in that "generic" spot, the game then calls the shield stats from the .ini file rather than the "hard" stats in the .exe assigned to the slot itself?
-
- Posts: 986
- Joined: Mon Apr 05, 2004 11:01 pm
Awesome Jeremy thank you. Driftwood, I think so, otherwise default values are used as he wrote above. Very flexible if it works temporarily on a per mission file basis too. 

W-I-P: ISD-II, (Imp) Escort Carrier, NL-1 Platform, Misc, & TFTC.
- JeremyaFr
- Posts: 2940
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
What MXvTED calls Shield Recharge and Shield Decharge, I call them Score and Promo Points. These fields have nothing to do with shield.
- Mark_Farlander
- Posts: 577
- Joined: Tue Jan 16, 2018 10:47 pm
Wonderful! That's why it never worked when I tried to edit those values.
I don't judge tactics. The Battle is the best and only Judge.
- JeremyaFr
- Posts: 2940
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
I've updated the hook.
You can now define the shield recharge rate on a per mission basis.
I've updated the hook.
You can now define the shield recharge rate on a per mission basis.
- Darksaber
- Posts: 10932
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
So your saying
Shield Rechange = Score
Shield Decharge = Promo Points
If so I could change these in MXvTED and BHE Modules
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- Darksaber
- Posts: 10932
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
Cheers something to do on a rainy day 

“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
-
- Posts: 986
- Joined: Mon Apr 05, 2004 11:01 pm
Hi Jeremy, when we utilize UseGenerator = 1, PerGeneratorRechargeRate = 5, RechargeRate = 0, I'm assuming that means that a given .opt model must have at least one ShieldGenerator type Mesh present, otherwise UseGenerator = 0 .... statement is used. Is that fair statement? Thanks.
Last edited by Bman on Mon Apr 01, 2019 2:39 am, edited 1 time in total.
W-I-P: ISD-II, (Imp) Escort Carrier, NL-1 Platform, Misc, & TFTC.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
-
- Posts: 986
- Joined: Mon Apr 05, 2004 11:01 pm
Ah, interesting. Thanks mate. I removed that part from my above post so not to confuse everyone.
W-I-P: ISD-II, (Imp) Escort Carrier, NL-1 Platform, Misc, & TFTC.
- JeremyaFr
- Posts: 2940
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
I've uploaded the hook to GitHub and OneDrive. It can be downloaded via XwaHooksSetup.
I've uploaded the hook to GitHub and OneDrive. It can be downloaded via XwaHooksSetup.
- JeremyaFr
- Posts: 2940
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the shield hook.
This hook now supports the new meshes count limit.
Hello,
I've updated the shield hook.
This hook now supports the new meshes count limit.