[MOD] Improved Explore Command Behaviour

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

Re: [WIP] Improved Explore Command Behaviour

Post by morbideth » Sun, 9. Dec 18, 10:28

Can we get a beta or alpha version to play with? Anything is better than the vanilla version.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [WIP] Improved Explore Command Behaviour

Post by MegaJohnny » Sun, 9. Dec 18, 16:21

morbideth wrote:
Sun, 9. Dec 18, 10:28
Can we get a beta or alpha version to play with? Anything is better than the vanilla version.
Sometime today. :)

I've tested the mod with the radar range mod, here are my findings:

M ship - 4677m/s travel speed - 100km radar range - Before - After
An M ship does 2 rings at the time of writing, and overall it took 35 minutes of game time.
L ship - 6830m/s travel speed - 250km radar range - Before - After
That one did 1 ring, and overall it took 15 minutes of game time. Not sure what happened with the kink at the end, I have a suspicion there's a bug in the coordinate system or something.
TODO - the L ship also went anticlockwise, when the code should in theory always go clockwise? I need to investigate this.

Both of this happened in low attention, so bear in mind there were no complications from collisions or turning speed.

Unmodded, it takes much longer, of course - a Pericles takes about 20 minutes for a baseline scan, and I got bored of waiting after about an hour. :p
Progress: 1 - 2 - 3 - 4

Edit: Now released, check it out!

Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by Kadatherion » Mon, 10. Dec 18, 02:32

Thank you, this is exactly what I hoped for, effective, and it won't use the vanilla exploring mechanic that I fear might completely mess up the default sector zoom size. I'm using the increased radar range mod as well (although I modified it to more conservative defaults, max is 100km for L/XL ships), so knowing that it adapts accordingly is the cherry on top.

You will want, however, to include the placeholder languages ids in your content.xml, or the mod will crash the game on startup for people running a non english installation:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content id="MeJ_Improved_Explore_Behaviour" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient" author="MegaJohnny" version="050" date="2018-12-09">
<text language="7" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
<text language="33" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
<text language="34" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
<text language="39" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
<text language="44" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
<text language="49" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
<text language="86" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
<text language="88" name="Improved Explore Behaviour" description="Overhauls the behaviour of the Explore command for player ships to make it more efficient." author="MegaJohnny" />
</content>

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by MegaJohnny » Mon, 10. Dec 18, 08:11

Kadatherion wrote:
Mon, 10. Dec 18, 02:32
Thank you, this is exactly what I hoped for, effective, and it won't use the vanilla exploring mechanic that I fear might completely mess up the default sector zoom size. I'm using the increased radar range mod as well (although I modified it to more conservative defaults, max is 100km for L/XL ships), so knowing that it adapts accordingly is the cherry on top.

You will want, however, to include the placeholder languages ids in your content.xml, or the mod will crash the game on startup for people running a non english installation:
Oops! I'm sure it fell back to the root content tag in XR. Good to know, I'll update this tonight.

Now uploaded with compliments to players with non-English games. ;)

captainradish
Posts: 190
Joined: Sat, 30. Apr 05, 06:09
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by captainradish » Wed, 12. Dec 18, 03:14

This mod is far superior to the vanilla behavior, IMO. Any way we can create a "galactic" version like X3's Universe Explorers? I'd love to be able to give my scout an explore command and totally ignore what it's doing from then on.

Reaper507
Posts: 62
Joined: Tue, 5. Aug 14, 00:34

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by Reaper507 » Wed, 12. Dec 18, 18:43

You should include this information in your post if it still actual:
readme.md wrote:This mod sticks to your savegame, and if you make a save while this mod is installed, you won't be able to load that save without this mod installed. This is unavoidable and will not be changed - this mod adds new blocking actions to AI scripts, which _WILL_ cause problems if the mod is suddenly removed.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by MegaJohnny » Wed, 12. Dec 18, 19:41

Reaper507 wrote:
Wed, 12. Dec 18, 18:43
You should include this information in your post if it still actual:
readme.md wrote:This mod sticks to your savegame, and if you make a save while this mod is installed, you won't be able to load that save without this mod installed. This is unavoidable and will not be changed - this mod adds new blocking actions to AI scripts, which _WILL_ cause problems if the mod is suddenly removed.
I will do - but bear in mind my mod isn't special in having this property! Any and every AI mod which adds new blocking actions has the property that it can't be removed cleanly. What impact that has on your universe, I've no idea. Honestly, they probably have to restart their scripts but are otherwise fine after a little while. But it's still not a good idea to load up a save game where some ships' AI commands are just missing.

User avatar
FalconGrey
Posts: 440
Joined: Thu, 22. Apr 04, 01:53
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by FalconGrey » Sat, 15. Dec 18, 20:07

Just a thought, so far liking this change to the explorer command but could you include an 'uninstall' readme (with a warning for the ill experienced) so those who would WANT to uninstall could easily without having to plague you with requests for instructions?

Now, for the REAL reason for my thoughts and this post! I remember my old Universal Explorer that you could send off and it would one by one knock out each sector! The explorer after gaining enough experience (pilot experience I believe in this case) would automatically (If my memory is right or you may have had to give the order to start universally exploring) evolve into exploring all sectors. Could this mod eventually evolve into a Universal Explorer as there once was for X3:TC?

And for a second thought, could it be added that the explorer optionally place satellites near stations and resource beacons in mining locations then refill these things as needed? (Again based on pilot skill) Yes, I do know.... this means going WAY beyond what was originally envisioned and a HELL of a LOT of work... more than I could.

And looking at what is in your script and seeing what it replaced... they had the freaking explorer waiting 5 minutes before moving to the next section!?!? WTF?!? :evil: :rant:
It's not if we win or lose that matters, it's that we stood and faced it.

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

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by Requiemfang » Sat, 15. Dec 18, 20:35

FalconGrey wrote:
Sat, 15. Dec 18, 20:07
Just a thought, so far liking this change to the explorer command but could you include an 'uninstall' readme (with a warning for the ill experienced) so those who would WANT to uninstall could easily without having to plague you with requests for instructions?

Now, for the REAL reason for my thoughts and this post! I remember my old Universal Explorer that you could send off and it would one by one knock out each sector! The explorer after gaining enough experience (pilot experience I believe in this case) would automatically (If my memory is right or you may have had to give the order to start universally exploring) evolve into exploring all sectors. Could this mod eventually evolve into a Universal Explorer as there once was for X3:TC?

And for a second thought, could it be added that the explorer optionally place satellites near stations and resource beacons in mining locations then refill these things as needed? (Again based on pilot skill) Yes, I do know.... this means going WAY beyond what was originally envisioned and a HELL of a LOT of work... more than I could.

And looking at what is in your script and seeing what it replaced... they had the freaking explorer waiting 5 minutes before moving to the next section!?!? WTF?!? :evil: :rant:
I second the universal explorer bit.

barra
Posts: 25
Joined: Tue, 31. Jan 17, 07:58
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by barra » Sat, 15. Dec 18, 23:11

thanks for this life saver !
I got a suggestion: Since the sectors are from different size, I thought it would be nice if the player would be able to scale the size of the explorable area, using fe. the mousewheel while hovered over the explore "dome"! This would help by very huge sectors and for smaller undiscovered rest areas too.
Dont know how hard it will be to implement such a feature but it would be definitly nice!

SirDeity12
Posts: 90
Joined: Sun, 2. Dec 18, 00:48

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by SirDeity12 » Sun, 16. Dec 18, 00:01

I only skimmed through the posts before this one very quickly, so my apologies if I missed the answer to this question, but does your explore MOD take into account pilot levels? I hope so that way there's still an advantage to having a higher level pilot in there. I'm thinking the pilot level should impact the ship's speed during exploration. Even a level 0 pilot on auto-explore should be a heck of a lot faster than the vanilla auto-explore though! Vanilla auto-explore makes no sense at all...

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

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by morbideth » Sun, 16. Dec 18, 12:31

As you have added blocking actions, I believe you need modify aicompat.xml as well as increment the version of both aicompat, and the order. It seems to cause issues with the game if these are not accurate.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by MegaJohnny » Mon, 17. Dec 18, 14:12

FalconGrey wrote:
Sat, 15. Dec 18, 20:07
Just a thought, so far liking this change to the explorer command but could you include an 'uninstall' readme (with a warning for the ill experienced) so those who would WANT to uninstall could easily without having to plague you with requests for instructions?

Now, for the REAL reason for my thoughts and this post! I remember my old Universal Explorer that you could send off and it would one by one knock out each sector! The explorer after gaining enough experience (pilot experience I believe in this case) would automatically (If my memory is right or you may have had to give the order to start universally exploring) evolve into exploring all sectors. Could this mod eventually evolve into a Universal Explorer as there once was for X3:TC?

And for a second thought, could it be added that the explorer optionally place satellites near stations and resource beacons in mining locations then refill these things as needed? (Again based on pilot skill) Yes, I do know.... this means going WAY beyond what was originally envisioned and a HELL of a LOT of work... more than I could.

And looking at what is in your script and seeing what it replaced... they had the freaking explorer waiting 5 minutes before moving to the next section!?!? WTF?!? :evil: :rant:
I need to look into standing orders and how to define/add one, but it would be nice. I'm keeping a beady eye on the trade run thread in case they upload something for me to scrounge off. :P

There seems to be an AI script dedicated to buying equipment and handling the docking for you and stuff, so that bit could actually be pretty easy.

Alright, look, the next version will be save-remove-friendly. The readme is unambiguous about uninstalling - and I can only say I don't know or care what happens to anyone's save game if they uninstall the mod from their save game. But they are welcome to try it out.
morbideth wrote:
Sun, 16. Dec 18, 12:31
As you have added blocking actions, I believe you need modify aicompat.xml as well as increment the version of both aicompat, and the order. It seems to cause issues with the game if these are not accurate.
Can't say I've ever looked into it, and I haven't noticed any unusual debuglog output when I was testing this mod. But I'll keep it in mind.
SirDeity12 wrote:
Sun, 16. Dec 18, 00:01
I only skimmed through the posts before this one very quickly, so my apologies if I missed the answer to this question, but does your explore MOD take into account pilot levels? I hope so that way there's still an advantage to having a higher level pilot in there. I'm thinking the pilot level should impact the ship's speed during exploration. Even a level 0 pilot on auto-explore should be a heck of a lot faster than the vanilla auto-explore though! Vanilla auto-explore makes no sense at all...
It doesn't yet, but it's on the todo list! I need to think of some way to nerf bad pilots - make them erratic in their ring radiuses, maybe, so they have a chance of leaving gaps in their search.
barra wrote:
Sat, 15. Dec 18, 23:11
thanks for this life saver !
I got a suggestion: Since the sectors are from different size, I thought it would be nice if the player would be able to scale the size of the explorable area, using fe. the mousewheel while hovered over the explore "dome"! This would help by very huge sectors and for smaller undiscovered rest areas too.
Dont know how hard it will be to implement such a feature but it would be definitly nice!
I would like to do this, but I don't know enough about the map menu yet to determine what can be configured in the UI yet. I'm considering (as a temporary thing) just boosting the radius by 50%, so while it's not configurable it at least suits people who want a bigger area.

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

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by morbideth » Mon, 17. Dec 18, 16:04

MegaJohnny wrote:
Mon, 17. Dec 18, 14:12
I need to look into standing orders and how to define/add one, but it would be nice. I'm keeping a beady eye on the trade run thread in case they upload something for me to scrounge off. :P

There seems to be an AI script dedicated to buying equipment and handling the docking for you and stuff, so that bit could actually be pretty easy.

Alright, look, the next version will be save-remove-friendly. The readme is unambiguous about uninstalling - and I can only say I don't know or care what happens to anyone's save game if they uninstall the mod from their save game. But they are welcome to try it out.
Are you referring to default orders? that is just this.ship.defaultorder
MegaJohnny wrote:
Mon, 17. Dec 18, 14:12
morbideth wrote:
Sun, 16. Dec 18, 12:31
As you have added blocking actions, I believe you need modify aicompat.xml as well as increment the version of both aicompat, and the order. It seems to cause issues with the game if these are not accurate.
Can't say I've ever looked into it, and I haven't noticed any unusual debuglog output when I was testing this mod. But I'll keep it in mind.
It doesn't throw errors. It makes the scripts run poorly. Add a dozen or so wait commands and then try running the script, you should see it then.

Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by Kadatherion » Tue, 18. Dec 18, 16:08

MegaJohnny, would you consider doing something much like this script for the automine behaviour? I - and judging by the general forums several others - just hate how autominers have the tendency of locking on some ore deposit 2000km away, messing up with the map zoom (and wasting hours). This happens both to "pure" autominers and station assigned miners (which run the same script, with the only addition of it autoselecting the wares to mine depending on what the mother station needs). If their automatic behaviour was much like the one you use here - IE: since we are talking automining instead of a point and click single command, something like in a 350km radius from the center of the sector they choose to mine in, in the same way your explorers plan a spiral around it - it would be perfect. They'd be much more effective, and one wouldn't have to worry coming back to them just to notice they messed up a sector's zoom.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by MegaJohnny » Tue, 18. Dec 18, 16:12

Kadatherion wrote:
Tue, 18. Dec 18, 16:08
MegaJohnny, would you consider doing something much like this script for the automine behaviour? I - and judging by the general forums several others - just hate how autominers have the tendency of locking on some ore deposit 2000km away, messing up with the map zoom (and wasting hours). This happens both to "pure" autominers and station assigned miners (which run the same script, with the only addition of it autoselecting the wares to mine depending on what the mother station needs). If their automatic behaviour was much like the one you use here - IE: since we are talking automining instead of a point and click single command, something like in a 350km radius from the center of the sector they choose to mine in, in the same way your explorers plan a spiral around it - it would be perfect. They'd be much more effective, and one wouldn't have to worry coming back to them just to notice they messed up a sector's zoom.
Oof, that's a very good idea. I've got annoyed by autominers expanding the sector map as well, especially in Grand Exchange. I'll have to check what script actions are available for this, but if they are, I'd be happy to try and come up with something.

TheEarl
Posts: 352
Joined: Fri, 3. Aug 07, 17:27
x3ap

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by TheEarl » Tue, 18. Dec 18, 16:43

Hi ! I use your mod for some days and like it !
Thank you !

My explorers found some stations out of the ecliptic that still have a '?' on the map and are unknown.
Perhaps an explorer could fly to all unkown stations and objects in a sector after finishing the circles.
If you like this idea :)

Skaeger
Posts: 6
Joined: Fri, 7. Dec 18, 09:18
x4

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by Skaeger » Fri, 21. Dec 18, 05:06

This has been set to hidden on nexus. I would very much like to try out this brilliant mod, is there another download link I could use?

And does the "respect right-click position" mean that the search would start wherever I right click?

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

Re: [MOD/WIP] Improved Explore Command Behaviour

Post by Requiemfang » Fri, 21. Dec 18, 05:28

The heck? why was it set to hidden? This mod works pretty well, why do that? This is basically the only explore script that works better than the vanilla explore script.
Skaeger wrote:
Fri, 21. Dec 18, 05:06
And does the "respect right-click position" mean that the search would start wherever I right click?
yes, they start exploring from the right click position.

spudhead
Posts: 7
Joined: Sat, 12. Aug 06, 07:20
x4

Has anyone figured out how to uninstall it?

Post by spudhead » Fri, 21. Dec 18, 11:54

I expect the author has hidden this mod because with V1.5 of X4 the new online ventures feature doesn't work on a modified game and this mod CANNOT be uninstalled without gimping the savegame. Has anyone figured out how to remove this mod without said gimping? Id love to try the new features in X4.

Post Reply

Return to “X4: Foundations - Scripts and Modding”