[MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.22

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

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

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

[MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.22

Post by morbideth » Sat, 22. Dec 18, 17:44

This is a mod that will allow you to order your ships to collect all deployables of a given type in a sector.
Run the command by right-clicking on the desired deployable with one of your ships selected. Whatever type of deployable you click it will only collect that type. i.e. if you click on an Advanced Satellite, it will pick up only advanced satellites leaving all of your basic satellites alone.

[ external image ]

IF Updating from an older version to 0.2, delete the collect deployables folder from you extensions directory first.
Must be installed in your %installdir%\extensions folder
v0.22 REQUIRES: !!!API!!!
[ external image ]

Changelog:
  • v0.22 Update to reflect changes in the API. Dependencies added. You now have to have the APIs enabled to enable this mod.
  • v0.21
    • Fixed issue with multiple mods using the UI API and trying to load their mods at the same time.
  • v0.2
  • v0.11
    • removed leftover debug code.
  • v0.10 initial release
Last edited by morbideth on Tue, 22. Jan 19, 01:49, edited 9 times in total.

Buzz2005
Posts: 2193
Joined: Sat, 26. Feb 05, 01:47
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.10

Post by Buzz2005 » Sat, 22. Dec 18, 18:53

your mod kills the right click, when installed if you right click anywere (stations, ships or empty space) you dont get the context menu but ability when you move the mouse it moves the map vertically

so its not working for me
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.10

Post by morbideth » Sat, 22. Dec 18, 19:36

Buzz2005 wrote:
Sat, 22. Dec 18, 18:53
your mod kills the right click, when installed if you right click anywere (stations, ships or empty space) you dont get the context menu but ability when you move the mouse it moves the map vertically

so its not working for me
Oops, missed a line when I commented out the debug code. Uploaded a fixed version.

roflmao86
Posts: 3
Joined: Thu, 13. Dec 18, 03:51

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.11

Post by roflmao86 » Sat, 22. Dec 18, 21:32

wow mega thanks for this mod,very useful
you can upload it to nexusmod for a better visibility (for your work)

pesoda
Posts: 16
Joined: Thu, 13. Dec 18, 19:45
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.11

Post by pesoda » Sat, 22. Dec 18, 21:45

The first right-click UI MOD. Cute pegasus trotted from satellite to satellite well. And I understand how valuable this work and how much trouble to step in. Thank you so much. Still we cannot edit actiontype, right?

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.11

Post by morbideth » Sat, 22. Dec 18, 21:50

pesoda wrote:
Sat, 22. Dec 18, 21:45
The first right-click UI MOD. Cute pegasus trotted from satellite to satellite well. And I understand how valuable this work and how much trouble to step in. Thank you so much. Still we cannot edit actiontype, right?
Not yet, I'll be updating my other post with more information soon.

ApoxNM
Posts: 777
Joined: Wed, 5. Dec 18, 06:17
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.11

Post by ApoxNM » Sun, 23. Dec 18, 12:19

Great mod,

and

WHY IS THIS NOT IN THE BASE GAME?

cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.11

Post by cole2839 » Wed, 26. Dec 18, 20:38

When I right click the message says ReadText(1042, 400) instead of what you intended. It seems it still works, just the UI message is wrong.

Game version 1.5

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.11

Post by morbideth » Wed, 26. Dec 18, 21:13

cole2839 wrote:
Wed, 26. Dec 18, 20:38
When I right click the message says ReadText(1042, 400) instead of what you intended. It seems it still works, just the UI message is wrong.

Game version 1.5
Did you put it in your install dir and not your documents folder?

cole2839
Posts: 108
Joined: Tue, 4. Dec 18, 01:43
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.11

Post by cole2839 » Wed, 26. Dec 18, 21:53

morbideth wrote:
Wed, 26. Dec 18, 21:13
cole2839 wrote:
Wed, 26. Dec 18, 20:38
When I right click the message says ReadText(1042, 400) instead of what you intended. It seems it still works, just the UI message is wrong.

Game version 1.5
Did you put it in your install dir and not your documents folder?
Ok, that might be the problem. I'll try and see if that fixes it.

Romz
Posts: 21
Joined: Sat, 24. Dec 16, 19:39
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by Romz » Fri, 4. Jan 19, 22:11

Nот working for me.
New game, 1.5, this mod only and API. Right click menu does not appear.

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by Requiemfang » Fri, 4. Jan 19, 22:42

Hey morbideth is there suppose to be loose files in the mod folder? you have loose files and cat/dat files all jumbled in there together... wouldn't this cause issues since the cat/dat files are basically the loose files in packaged form?

Romz
Posts: 21
Joined: Sat, 24. Dec 16, 19:39
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by Romz » Fri, 4. Jan 19, 23:10

Romz wrote:
Fri, 4. Jan 19, 22:11
Nот working for me.
New game, 1.5, this mod only and API. Right click menu does not appear.
Also Right Click API partially destroy main (standard) right click menu for all ships.
May be, it is a reason.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by morbideth » Sat, 5. Jan 19, 06:09

Romz wrote:
Fri, 4. Jan 19, 23:10
Romz wrote:
Fri, 4. Jan 19, 22:11
Nот working for me.
New game, 1.5, this mod only and API. Right click menu does not appear.
Also Right Click API partially destroy main (standard) right click menu for all ships.
May be, it is a reason.
You need BOTH the Community Right Click API and the UI API enabled for this to work. Let me know if that solves your problem.
Requiemfang wrote:
Fri, 4. Jan 19, 22:42
Hey morbideth is there suppose to be loose files in the mod folder? you have loose files and cat/dat files all jumbled in there together... wouldn't this cause issues since the cat/dat files are basically the loose files in packaged form?
No.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by morbideth » Sat, 5. Jan 19, 18:48

Another thing that might cause your issue is if you are updating from an older version, if so, delete the collect deployables folder before installing the new version.

User avatar
nonnex
Posts: 366
Joined: Wed, 28. Aug 13, 12:42
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by nonnex » Sat, 5. Jan 19, 18:56

Nice Job.

/me like mucho.

Perfect addition to your deploy script.

Romz
Posts: 21
Joined: Sat, 24. Dec 16, 19:39
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by Romz » Sat, 5. Jan 19, 19:37

morbideth wrote:
Sat, 5. Jan 19, 06:09
You need BOTH the Community Right Click API and the UI API enabled for this to work. Let me know if that solves your problem.
Of course, I use both. Does not work.
The mod that displays trade and combat rank works, but after a while (long) stops working.
But this I associate with memory leaks in the game itself.

Lord Simpson
Posts: 28
Joined: Sat, 31. Jan 09, 20:20
x4

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by Lord Simpson » Sat, 5. Jan 19, 21:53

Hi

Just what i was looking for! I've already cleaned up a bit of my Satellite spam from before installing the sector satellites mod!

Found two bugs though
  1. I cant give my ships docking / refitting commands from the right click menu (those options nolonger appear).

    Collect deployables command appeared correctly.

    Looks like it may be a bug in the API however as the issue persists if i just remove collect deployables .
    • G_Work_Around, RightClickAPI both installed in game directory/extensions.
    • Never used a previous version.
  2. Collect deployables results in funny behaviour if you queue up multiple sectors, the ship will only pick 1 item up in a sector before moving on to the next. When the ship reaches the end of the queued sectors it goes back to the first sector and starts again. e.g.

    Command issued in sector A then sector B then sector C (3 Satellites in each sector)
    • Ship collects 1 ( 2 remaining) item from Sector A,Moves to Sector B
    • Ship collects 1 ( 2 remaining) item from Sector B,Moves to Sector C
    • Ship collects 1 ( 2 remaining) item from Sector C,Moves to Sector A
    • Ship collects 1 ( 1 remaining) item from Sector A,Moves to Sector B
    • Ship collects 1 ( 1 remaining) item from Sector B,Moves to Sector C
    • etc

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by morbideth » Sun, 6. Jan 19, 01:50

Romz wrote:
Sat, 5. Jan 19, 19:37
Of course, I use both. Does not work.
The mod that displays trade and combat rank works, but after a while (long) stops working.
But this I associate with memory leaks in the game itself.
OK, something weird is going on, if you the show ranks working, and right click is "breaking" that means the file is properly loaded but ran into a bug when you click, effectively crashing the right click menu. Please run your game with -logfile debuglog.txt, and post the output here. ( debuglog.txt is in your Documents\Egosoft\X4\<somenumber>\ directory) Also, give me more information. What are you clicking on? What faction? What ship selected? If you can, record a video of it, and post it to youtube as an unlisted video, then give me the link. We'll find this bug and mush it.
Lord Simpson wrote:
Sat, 5. Jan 19, 21:53
I cant give my ships docking / refitting commands from the right click menu (those options nolonger appear).
Looks like it could have something to do with the cleanup code. Might take some time to fix
Lord Simpson wrote:
Sat, 5. Jan 19, 21:53
Collect deployables results in funny behaviour if you queue up multiple sectors, the ship will only pick 1 item up in a sector before moving on to the next. When the ship reaches the end of the queued sectors it goes back to the first sector and starts again. e.g.

Command issued in sector A then sector B then sector C (3 Satellites in each sector)
  • Ship collects 1 ( 2 remaining) item from Sector A,Moves to Sector B
  • Ship collects 1 ( 2 remaining) item from Sector B,Moves to Sector C
  • Ship collects 1 ( 2 remaining) item from Sector C,Moves to Sector A
  • Ship collects 1 ( 1 remaining) item from Sector A,Moves to Sector B
  • Ship collects 1 ( 1 remaining) item from Sector B,Moves to Sector C
  • etc
This is working as intended. It creates a new order when it finishes the current order. If you already have an order queued, it goes does that, then adds its order at the end of the queue, back and forth. It is changeable, but it would be annoying to do so, and its low priority atm. I'm busy working on my EST remake. I'll add it to the TODO list though.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Re: [MOD] Collect Deployables (Satellites, Nav Beacons, Resource Probes, Laser Towers) v0.20

Post by morbideth » Sun, 6. Jan 19, 02:12

Lord Simpson wrote:
Sat, 5. Jan 19, 21:53
I cant give my ships docking / refitting commands from the right click menu (those options nolonger appear).
OK found and fixed, I'll release an update to the API once I see if Romz's problem is also in the API. It snuck past me because it doesn't happen the first time you right click on something.

Post Reply

Return to “X4: Foundations - Scripts and Modding”