so I'm trying to modify the mod "equipment tooltips" https://www.nexusmods.com/x4foundations/mods/838
it's first & foremost for my own usage, but if it works, I'll propose it to the author or ask if I can release another version depending ...
What I want is to display the following data :
Travel Charge Time, Travel Attack Time, Travel Release Time
here's my temporary code some of which works, but thanks to sanity checks doesn't make everything bug out
Code: Select all
-- travel speed ? (added by whis)
if hoveredData.travel_thrustfactor and hoveredData.travel_thrustfactor > 0 then
met.addToOutput(ReadText(1001, 8053),
hoveredData.travel_thrustfactor, --This Works in kN
selectedData and selectedData.travel_thrustfactor,
ReadText(1001, 115)
)
end
-- travel charge
if hoveredData.TravelChargeTimeFactor then
met.addTextLine("TravelChargeTimeFactor") -- TravelChargeTimeFactor is nil
end
if hoveredData.travel_chargetime and hoveredData.travel_chargetime > 0 then
met.addToOutput(ReadText(1001, 11141), --travel_chargetime is nil
hoveredData.travel_chargetime,
selectedData and selectedData.travel_chargetime,
ReadText(1001, 115)
)
end
-- travel attack time
if hoveredData.travel_attacktime and hoveredData.travel_attacktime > 0 then
met.addToOutput(ReadText(1001, 11121),
hoveredData.travel_attacktime, --is nil
selectedData and selectedData.travel_attacktime,
ReadText(1001, 115)
)
end
-- travel release time
if hoveredData.travel_releasetime and hoveredData.travel_releasetime > 0 then
met.addToOutput(ReadText(1001, 11131),
hoveredData.travel_releasetime, --is nil
selectedData and selectedData.travel_releasetime,
ReadText(1001, 115)
)
end
I've searched through game unpacked source files
and in helper.lua we have the following :
Code: Select all
typedef struct {
const char* Name;
const char* RawName;
const char* Ware;
uint32_t Quality;
const char* PropertyType;
float ForwardThrustFactor;
float StrafeThrustFactor;
float RotationThrustFactor;
float BoostThrustFactor;
float BoostDurationFactor;
float BoostAttackTimeFactor;
float BoostReleaseTimeFactor;
float BoostChargeTimeFactor;
float BoostRechargeTimeFactor;
float TravelThrustFactor;
float TravelStartThrustFactor;
float TravelAttackTimeFactor;
float TravelReleaseTimeFactor;
float TravelChargeTimeFactor;
}