Shield Recharge Hook
Moderator: JeremyaFr
Shield Recharge Hook
- JeremyaFr
- Posts: 3839
- 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: 2173
- 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?
- JeremyaFr
- Posts: 3839
- 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: 580
- 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: 3839
- 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: 10931
- 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: 10931
- 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: 1157
- 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: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
“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: 1157
- 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: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- JeremyaFr
- Posts: 3839
- 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: 3839
- 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.
- AngeI
- Posts: 515
- Joined: Sun Jan 24, 2016 5:27 pm
Hi, I was just trying to test this out and I need to understand what the value represents. If I set Recharge to say 5, is that 5hp per second or something else? In any case I was testing this on a Modified Frigate and no matter what value I put in, I never noticed any shield recharging going on. What am I missing?
-
- Posts: 1157
- Joined: Mon Apr 05, 2004 11:01 pm
One of the TFTC patches applies the 200%-->100% max Shields for all capital ships at mission start. Maybe that is interfering? Also in AlliED mission editor, if you set status1 or status2 fields to (200%) I think that helps the recharge process but it's slow. The Neb-B2 doesn't have a shield generator mesh, so I'm guessing that the UseGenerator = 0, PerShieldGeneratorRate = 0, but RechargeRate =5 or a higher number to speed things up. Ive not tested this so it's just an assumption.
Last edited by Bman on Fri Oct 15, 2021 8:16 am, edited 2 times in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- AngeI
- Posts: 515
- Joined: Sun Jan 24, 2016 5:27 pm
I've tried various scenarios, I can't get it to work, so need some input from @JeremyaFr on this.
- AngeI
- Posts: 515
- Joined: Sun Jan 24, 2016 5:27 pm
@JeremyaFr an update, it seems this feature is working ok in XWAU but broken in TFTC.
- JeremyaFr
- Posts: 3839
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the shield hook.
I've added a IsShieldRechargeForStarshipsEnabled setting.
You can enable or disable the shield recharge for starships with the IsShieldRechargeForStarshipsEnabled setting.
Hello,
I've updated the shield hook.
I've added a IsShieldRechargeForStarshipsEnabled setting.
You can enable or disable the shield recharge for starships with the IsShieldRechargeForStarshipsEnabled setting.