[mods] kuertee's (RPG, QOL, UI): 18 Feb 2024: Kuda: many bug-fixes; UIX: New callbacks for new mods; ATD: Ironman mode

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Sun, 12. Jul 20, 03:44

Falcrack wrote:
Fri, 10. Jul 20, 16:17
...in the provided save game...
Thank for you testing this and providing a save game!

I will look into it and reply to each of your comments in a day or two.

One comment I can reply to immediately:
...It is intended that ships can be at full health, but have wear and tear damage?...
No, it is not. Wear and tear damage is health damage rather than a separate metric.
So, it's clearly a bug.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Sun, 12. Jul 20, 09:55

Played a little bit with Wear And Tear enabled and really like another layer of "things to look at".
Also it plays nice with Getting Paid mod as I have to pay wages for service crew preventing my wear and tear.

Found a few "issues" though:
  1. I 've ordered my Kestrel Sentinel with 76% hull/23% WnT and 0/2 serive crew to dock in my HQ for running repairs.
    Kestrel docked, but after waiting 10 real time minutes nothing changed - it still had 76%/23WnT.
    I have wear and tear interval repais set to 10s and all to 5% (max): https://i.imgur.com/p7ePLVZ.jpg
    Same goes with my other ship.
  2. Found that some ships have hull + WnT > 100%:
    https://i.imgur.com/0Ry9tjD.jpg
    https://i.imgur.com/7mHpUMw.jpg
  3. Small little one - "Wear and tear" tab (https://i.imgur.com/2Q1BvIq.jpg) could be named "Wear and Tear" for consistency with base game's naming convetion.
I'm playing on a 3.30 HF1 beta.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Sun, 12. Jul 20, 15:51

Falcrack wrote:
Fri, 10. Jul 20, 16:17
...Another issue is one of the ships showing up in the wear and tear menu that was at 100% hull health, but it had 7% wear and tear...
Mycu wrote:
Sun, 12. Jul 20, 09:55
...Found that some ships have hull + WnT > 100%...
Would you both remember if the Wear and Tear values updated correctly when you close the map all the way to the HUD, then re-open it?
The Wear and Tear data is only pushed to the map when the player opens the map.
If the map is open, the WnT data in the game world updates as per the selected frequencies, but their data is not pushed to an already-opened map.
Hull percentages, and other native ship attributes, however, are updated on an already-opened map in real-time.

And ... I don't have the Split Vendetta DLC, so I can't test your save file, Falcrack.
But I am still looking at the code for the bugs you described.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Sun, 12. Jul 20, 19:48

kuertee wrote:
Sun, 12. Jul 20, 15:51
Would you both remember if the Wear and Tear values updated correctly when you close the map all the way to the HUD, then re-open it?
Just checked it and the sum is still ~110% when re-opening the map.
Unfortunately I can't provide you a save file as it's heavy modded.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Mon, 13. Jul 20, 15:22

Falcrack wrote:
Fri, 10. Jul 20, 16:17
...Another issue is one of the ships showing up in the wear and tear menu that was at 100% hull health, but it had 7% wear and tear...
Mycu wrote:
Sun, 12. Jul 20, 09:55
...Found that some ships have hull + WnT > 100%...
Mycu wrote:
Sun, 12. Jul 20, 19:48
Just checked it and the sum is still ~110% when re-opening the map...
I think I found the bug.
For some reason, likely my forgetfulness, line 377 is disabled:

Code: Select all

<!-- <set_value name="$shipData.{$ship}.$wearAndTearPerc" exact="(($shipData.{$ship}.$wearAndTearPerc - $hullDiff) * 100)i / 100f" /> -->
in this code block that detects the difference of a ship's hull to what it was:

Code: Select all

<do_if value="$ship.hullpercentage gt $shipData.{$ship}.$hullpercentage">
	<!-- repaired outside the wear and tear system, remove from wear and tear data -->
	<debug_text text="'$ship: ' + $ship + ' saved $hullpercentage: ' + $shipData.{$ship}.$hullpercentage" chance="$debugChanceCalculating" />
	<set_value name="$hullDiff" exact="$ship.hullpercentage - $shipData.{$ship}.$hullpercentage" />
	<debug_text text="'$ship: ' + $ship + ' $hullDiff: ' + $hullDiff" chance="$debugChanceCalculating" />
	<!-- <set_value name="$shipData.{$ship}.$wearAndTearPerc" exact="(($shipData.{$ship}.$wearAndTearPerc - $hullDiff) * 100)i / 100f" /> -->
	<do_if value="$shipData.{$ship}.$wearAndTearPerc lt 0">
		<set_value name="$shipData.{$ship}.$wearAndTearPerc" exact="0" />
	</do_if>
	<debug_text text="'$ship: ' + $ship + ' repaired outside. new $wearAndTearPerc: ' + $shipData.{$ship}.$wearAndTearPerc" chance="$debugChanceCalculating" />
</do_if>
And the disabled line adds that difference (i.e. repair that occurs outside the wear and tear system) into the wear and tear data.
I can't remember why I disabled that line. Likely for testing. Then I forgot to re-enable it.

I'll keep checking the mod for other potential bugs, including the bug with the docking process.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Tue, 14. Jul 20, 07:17

Falcrack wrote:
Fri, 10. Jul 20, 16:17
...I thought the default action was to contact the player in cases of wear and tear?...
By default: (1) ships that are in your wing will request to dock for running repairs; and (2) ships that are not in your wing will decide to dock for running repairs themselves.
...I had a freighter I had stripped of all crew for testing purposes (AT-18 in the provided save). I had given it an order to go to an equipment dock when I was done testing it in order to get repaired and get a new crew. I come back after letting the game run overnight and found that this freighter had never made it to the equipment dock, it had decided to dock for repairs at some random nearby station. Canceling all the existing order and giving it a new order to go get a new crew still resulted in the same issue. So I couldn't get it to go to the dock to get crew because of it automatically deciding to dock for repairs....
Ok ... I found the bug for this issue. Ships with no service crew were docking for running repairs even if it has no service crew to repair wear and tear. Therefore, it will dock for the time 1% to 25% crew would have repaired its wear and tear. But because it has no service crew, no repair will be done. It will undock still with wear and tear. It will soon detect it still needs to dock and therefore will add the "Dock for running repairs" AI at the top of its AI behaviour list. So, any order you give it to acquire crew will be pushed down the list of actions with its "Dock for running repairs" AI.

The fix: AI should not dock for running repairs unless the ship has at least 1 service crew.

Note that I don't know why the ship's other orders would have been canceled. The "Dock for running repairs" AI should have been added to the top of its behaviour list instead.
...Another issue is one of the ships showing up in the wear and tear menu that was at 100% hull health, but it had 7% wear and tear. It is AT-16 in the provided save game. I think it's because it had prior damage unrelated to wear and tear before I fixed it up manually. It is intended that ships can be at full health, but have wear and tear damage?...
This bug, I've already described in my recent conversations above this one. Basically, I forgot to re-enable the line of code that applies repairs outside the wear and tear system into the wear and tear data.



I'll release a new version in a day or two.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Tue, 14. Jul 20, 09:25

kuertee wrote:
Tue, 14. Jul 20, 07:17
Ok ... I found the bug for this issue. Ships with no service crew were docking for running repairs even if it has no service crew to repair wear and tear. Therefore, it will dock for the time 1% to 25% crew would have repaired its wear and tear. But because it has no service crew, no repair will be done. It will undock still with wear and tear. It will soon detect it still needs to dock and therefore will add the "Dock for running repairs" AI at the top of its AI behaviour list. So, any order you give it to acquire crew will be pushed down the list of actions with its "Dock for running repairs" AI.

The fix: AI should not dock for running repairs unless the ship has at least 1 service crew.
It would explain why my Kestrel went for running repairs and then nothing was repaired while docked. It had 0/2 service crew.
But in WnT settings we have something like: "Apply (-)/repair(+) wear and tear when docked - Service crew 0%-24% capacity.".
That's why I thought that 0% service crew would still apply repairs.
kuertee wrote:
Tue, 14. Jul 20, 07:17
I'll release a new version in a day or two.
Thanks.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

tomchk
Posts: 1294
Joined: Mon, 26. Jan 15, 19:55
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by tomchk » Tue, 14. Jul 20, 18:13

Will you be getting SV? Because it's a bargain even at full price, in my opinion. :) Strongly recommended!
Care to see what I've been creating? https://www.youtube.com/user/ytubrute

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Wed, 15. Jul 20, 10:18

tomchk wrote:
Tue, 14. Jul 20, 18:13
Will you be getting SV? Because it's a bargain even at full price, in my opinion. :) Strongly recommended!
I did. Many thanks to a donation from a forum regular and mod user. :)





re: Wear and Tear, I found the bug that docks ships in seemingly random stations.
My AI docking process sends commands in batches. And ships in a batch will always dock in a station that the first ship of the batch finds suitable - instead of each ship finding their own docks.
I've already fixed it.

I'll do another play tonight after work, then release an update tomorrow afternoon/night or so.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Fri, 17. Jul 20, 05:31

I've got an update
Wear and tear v.1.0.1, 17 Jul 2020: https://www.nexusmods.com/x4foundations/mods/523
  • Bug-fix: Repairs outside the wear and tear system NOW affect the wear and tear data. Previously, the code was disabled.
  • Bug-fix: "Dock for running repairs" AI finds docks that are nearest each ship rather than the dock nearest to the first ship in the batch of ships the AI determined that need to dock. Note that the player CAN still group-select ships and order them to "Dock for running repairs" at one location.
  • Bug-fix: Ignore ships that do not require service crew.
  • Bug-fix: Running repairs when docked are now applied even when the selected intervals are low. Previously, running repairs were sometimes ignored at low application/repair intervals.
  • Tweak: Ships that already have a dock order at the top of their queue of actions do not request nor acquire "Dock for running repairs".
  • Bug-fix: Ships that do not have any service crew do not request to "Dock for running repairs" nor acquire the "Dock for running repairs" AI.
  • Tweak: NPC wingmen confirm your order to dock for running repairs.
  • Bug-fix: "Apply to ship hulls" option in Extension Options re-enabled.
  • Bug-fix: Property > Deployables tab re-enabled.
Thanks for the bug reports, Falcrack and Mycu.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Fri, 17. Jul 20, 08:50

kuertee wrote:
Fri, 17. Jul 20, 05:31
I've got an update
Wear and tear v.1.0.1, 17 Jul 2020: https://www.nexusmods.com/x4foundations/mods/523
That's a really nice list of fixes. Thanks.
I'll try it on my next gaming session.

Better to just overwrite files or make a clean save method (remove old version->load->save->install new version->load)?
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Fri, 17. Jul 20, 10:00

Mycu wrote:
Fri, 17. Jul 20, 08:50
...Better to just overwrite files or make a clean save method (remove old version->load->save->install new version->load)?
No need for a clean-save. :)
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Fri, 17. Jul 20, 21:51

Ok, so some feedback for 1.0.1:
Otherwise it works as advertised :)
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Sat, 18. Jul 20, 02:32

Mycu wrote:
Fri, 17. Jul 20, 21:51
Ok, so some feedback for 1.0.1:
Thank you! Will fix now. (Damned, escape pods! Hahaha!)

EDIT: I'm also going to disable wear and tear on these other ship types, in case their "people.capacity" property is 1 or more
shiptype.xsdrone, shiptype.escapepod, shiptype.distressdrone, shiptype.lasertower, shiptype.smalldrone
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Sat, 18. Jul 20, 04:41

Wear and tear https://www.nexusmods.com/x4foundations/mods/523

Update:
=======
v1.0.2, 18 Jul 2020:
  • Bug-fix: These ship types are now ignored: shiptype.xsdrone, shiptype.escapepod, shiptype.distressdrone, shiptype.lasertower, shiptype.smalldrone.
  • Tweak: In case of data pre-v1.0.1, excess wear and tear (i.e. when wear and tear + ship's hull percentage is greater than 100) is removed.
  • Tweak: UI: "Dock for running repairs" command is disabled on ships with no service crew. Previously, when this command is given, they would ignore it anyway.
  • Tweak: UI: "Dock for running repairs" command is also disabled on ships that are already docking. Previously, this command is disabled on ships that were already docking for running repairs but not for other docking reasons.
Thanks heaps for your bug-reports, Mycu!
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Sat, 18. Jul 20, 08:48

WOW, it was fast :)
Thanks.
Looks good at first glance.

One thing wonders me - is there a reason why my Sonra Vanguard doesn't have a "dock for running repairs" menu option available?
https://i.imgur.com/VQUAQvO.png
It has some service crew, is not docking nor docked.
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by kuertee » Sat, 18. Jul 20, 17:51

Mycu wrote:
Sat, 18. Jul 20, 08:48
...One thing wonders me - is there a reason why my Sonra Vanguard doesn't have a "dock for running repairs" menu option available?...
Can you check if a pair of its behaviours are "dock" and "dock and wait" without a trade order after, or something along those lines?
If so, the mod may have already sent it a "dock for running repair" command, which has then superseded by another order.
What does the hour glass icon signify? Idle?
Spoiler
Show
And if, and only if and not otherwise, you know how to turn on X4's global debugging feature, you can log the mod's effects on an individual ship by giving the ship the "Wear and tear: Debug ship" order on the map. But that order is only available when the mod's Debug option in its Extension Option is enabled. But do this ONLY if you know how to turn on X4's debugging feature.

Then send the log to me.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Sat, 18. Jul 20, 18:38

On the previous screenshot on the right there is opened information tab for Sonra. Order queue is empty.
I've cleared all orders to make sure that this ship is not going to dock resulting in missing menu option.

Here is end part of my log file after selecting "Debug ship" on Sonra: https://pastebin.com/MBPFhpna
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Mycu » Sat, 18. Jul 20, 21:15

One more thing - on a Wear and Tear tab column sorting buttons (size/ name/ hull) are not working.
Is it somehow possible to add new (or replace exisiting one) button to sort by WnT?
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

Falcrack
Posts: 4929
Joined: Wed, 29. Jul 09, 00:46
x4

Re: [mods] kuertee's (QOL, UI, gameplay). new mod news: Wear And Tear

Post by Falcrack » Sat, 18. Jul 20, 22:40

Will this mod repair battle damage that ships get? I know service crew will repair M and larger ships, does this mod add to the service crew damage repair in the vanilla game, or replace it?

Post Reply

Return to “X4: Foundations - Scripts and Modding”