[SCR] [X3:TC/AP] [v1.9.8.12] [03/23/14] Galaxy Explorer

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Sectors are treated hostile, if the sector's owner race is hostile to me OR if the explorer has it set to enemy.
In this case, explorers will retreat immediately back out of that sector, except if the sector has to be passed through to get out of a dead end in the universe.

The other case, where explorers flee, is when they are about to get attacked. They will then retreat into the gate furthest away from the aggressive ship.
Explorers can detect hostile intentions BEFORE a ship actually attacks. That usually gives them the edge.

Everything works in a recursive way, so explorers always ONLY know the current sector they're in and its neighbors.
The mighty dice does the rest of the job here ;)
Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen »

They are Banzais, don't believe anything else you hear.. :lol:

Warriors of the Wind...
veryinky
Posts: 41
Joined: Sat, 26. May 12, 07:17

Post by veryinky »

DrBullwinkle wrote:Katana, too.
They're doing well, except I'm having a problem where they deploy 1 satellite then stop what they're doing and go buy one more (Advanced Satelites: Buy 24) to bring them back up to 25.

They're set to deploy advanced satelites, not cover sectors, buy range 10, ignore homebase. And I pre-loaded them with 25 satellites.

They've managed to deploy about 15 satellites and scan 20 systems in about 1 day's game time, the running back and forth every time they deploy a sat is very wasteful.

The other problem I'm having is that 4 out of 5 of them are docked to random stations and "Fetch Freight" while doing nothing. Restarting them as explorers does nothing.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

noted!

Will check that out.
veryinky
Posts: 41
Joined: Sat, 26. May 12, 07:17

Post by veryinky »

The "Fetch Freight" behavior seems related to the number of energy cells the ships have (10), if I manually buy energy cells for them and then set them to Explorer again they start exploring again. This happens to explorers I give jump drives to.

The drop 1 satellite, refill behavior only happens when they're set to not cover a sector. When set to cover a sector, they actually cover the sector in one shot and only go for more satellites when they run out.

I'm going to test this on a clean install of AP to make sure it's not a conflict.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Several versions ago, I tried the "buy satellite" behavior. I had the same experience as veryinky: Explorers spent more time buying satellites than they did exploring.

I always let them spawn satellites. Personally, I think it is more logical behavior, especially given the way that explorers randomly navigate. They "charge" for the satellite, and satellites are not rare, so the net result for your game is simply that the explorers work better if they spawn the satellites.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

verinky, do you have the mk3 improvement installed? Or only the galaxy explorer?
veryinky
Posts: 41
Joined: Sat, 26. May 12, 07:17

Post by veryinky »

gnasirator wrote:verinky, do you have the mk3 improvement installed? Or only the galaxy explorer?
Yes. I have your mk3 trader improvement 1.8.1. Also testing out DrBullwinkle's v2 marine repairs and mobile mining mk2.

Running AP 2.0.
DrBullwinkle wrote:I always let them spawn satellites.
I considered that solution but one of the things I enjoy the most about the game is watching the ArtificialLife part of the game. Constructing an extensive satellite network drains the galaxy's stocks of satellites and I find it fun to watch them go back and forth buying goods.

I'm thinking of building a factory complex for building adv. satellites since the trade overview mod is reporting that it costs me about 220k credits per system my Galaxy Explorer - Satellite Network ship covers.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

veryinky:
good news, I could fix some problems with explorers retreating in a wrong way from hostile sectors.

also they will now buy satellites only if below certain storage levels (25% or 40% if the buystation can top the explorer up).
so the net result for your game is simply that the explorers work better if they spawn the satellites.
So this should improve drastically in the next update ;)


Only the delivery bug is still out of my grasp. I first thought it might be because something with the vanilla script wouldn't work, but if you use the current mk3 improvement the explorers will use the new delivery script, too.

could you somehow describe, how to reproduce that bug? Or maybe provide me a save where a ship is currently hanging in the waiting loop?
veryinky
Posts: 41
Joined: Sat, 26. May 12, 07:17

Post by veryinky »

Glad to hear.

Could you check what happens when an Explorer is "homebased" by a ship (TL in my case). The TL has 50 adv satellites in it's hold, the explorers go to it to "buy" satellites but they don't actually take any satellites from the TL and their inventory doesn't go up. They seem to be docking with the TL without actually doing anything.

It might have to do with the TL not having money or price, so they can't actually buy the satellites.

As for the Explorers getting stuck in "Ferry Freight" mode, for me they're m3's to m5's (Sabers, Advanced rapiers, Valkyries) with jump drives, 10 energy cells in their hold, and get stuck after docking with Buy Energy Cells: 10.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Thanks, fixed the buying from homebase issue. This works now, too.

I still couldn't reproduce any errors within the delivery service.
But one thing makes me think:
You said "and get stuck after docking with Buy Energy Cells: 10". So this means, the explorers first try to buy energy cells regularly from that station. This must fail then so that they now decide to order fuel at the delivery service.

Could that be the case? And can you please upload a save where I can watch this? It would make fixing a LOT easier :)
Thanks!

edit: released 1.9.8.7. Even though I'm still not sure if the delivery bug is fixed, I have changed some stuff in the fuelling system. Maybe the problem is gone by now and I don't want to let you guys wait any longer for the other fixes :)

edit2: 1.9.8.7a fixes another bug I just found: the check if a position was already taken by a sat was malicious. It should work fine again and prevent multiple navsats being dropped in one place.
veryinky
Posts: 41
Joined: Sat, 26. May 12, 07:17

Post by veryinky »

gnasirator wrote:Thanks, fixed the buying from homebase issue. This works now, too.
I got your 1.9.8.7 update this morning and a good 6 hour ingame later, I've noticed that the explorer behavior has changed. They no longer get "stuck" at a station trying to Fetch Freight. They do something called "gather wares" but at least they keep busy and don't stay at stations all the time. They seem to be able to buy their own energy cells now and keep a reasonable stock.

How does the explorer script determine when it has "enough" satellites? Because my Katana explorers seem to consider 35-40 to be insufficient and try stop what they're doing and load up on them.

No Fetch Freight jobs right now. I'll upgrade to 1.9.8.7a and play for a couple more hours, but looks like whatever bug was causing it was fixed.

The explorers are doing well right now, though I'm experiencing casualties due to obnoxious Xenon fleets traversing between the two Xenon sectors near Omicron Lyre. I was trying out M5s for asteroid scanning duty but they just don't seem to live very long.

Edit: Can you check the 1.9.87a file? It's got two SPKs in it. GalaxyExplorer-V$ASK-25.6.2012 and GalaxyExplorer-V-25.6.2012
Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen »

veryinky wrote: The explorers are doing well right now, though I'm experiencing casualties due to obnoxious Xenon fleets traversing between the two Xenon sectors near Omicron Lyre. I was trying out M5s for asteroid scanning duty but they just don't seem to live very long.
When I started playing AP, I ran into that. The 2.0 update broke the rrf system, and that's why there is a constant train through those sectors.

Somewhere on here (if I find it, I'll post a link) is an archive with the original rrf scripts. Throw those in, and that will clear up some.

Well, Google was no help with that.. :roll: But, I had a copy, so here is my link : 1.0 RRF Scripts
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:veryinky:
good news, I could fix some problems
Oh, sure... you ignore me for months, but then some guy with a lot of tattoos shows up, and you listen to him!

(just kidding...) :)

I'm glad that veryinky said it a different way, so that it made more sense to you. If you succeed in making satellite purchase work properly, then that would benefit everyone!

Even I would use it, if it worked. ;)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

jeah, I just like him more :D
Somehow I could find the bugs better with his descriptions.

about the archive: I can't upload the fixed version but it is the newer .spk file. Always the newest!
How does the explorer script determine when it has "enough" satellites?
Enough is when the ship is full. And it will start buying if below 40-20%.

But now as you mention it, it would make sense to limit the max amount of satellites for big ships like a TS... Let's say 100 sats is the absolute maximum?
veryinky
Posts: 41
Joined: Sat, 26. May 12, 07:17

Post by veryinky »

gnasirator wrote:Enough is when the ship is full. And it will start buying if below 40-20%.

But now as you mention it, it would make sense to limit the max amount of satellites for big ships like a TS...
Could you add it to the explorer settings menu so the player can set the limit to personal taste? (store a minimum of X number of satellites) Checking to restock only after finishing the current "Job", since carrying around an excess of satellites is wasteful if the ship never touches them to maintain the minimum stock. Meaning a ship set to a minimum of 20 satellites will continue exploring and deploying until it runs out, then going into the buy wares: satellite routine until it reaches the minimum stock or the known universe runs out of satellites.

And an "opportunist" option, where it stocks up if it passes through a sector with some for sale while exploring but not under the purchase limit. And puts a satellite in that sector for future purchase consideration.
Aegyen wrote:When I started playing AP, I ran into that. The 2.0 update broke the rrf system, and that's why there is a constant train through those sectors.
Ah. That would explain why pirate, yaki and xenon are running rampant while those big M2's and M7's only seem to react while I'm in the sector. Thanks for the fix.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

great ideas. I already thought about this opportunist mode. If you set the buyrange to 0 it already is just that: explorers only buy from within their current sector. And the satellite will be dropped anyway, if set so.

But it makes sense to add a max and a min sat amount in the config menu. This should give enough flexibility for everyone.

Let's see what I can do...

edit:
For example if you set the max amount to max, min amount to max - 1 and buyrange to 0, you have your opportunistic mode. Explorers will now only buy if they find sats inside their current sector. And they'll always do so, except if they are fully loaded.

I have the max and min sat amounts working right now. I only need to create a new SatSpawnMod menu file. And then do some testing. You can hope for the new version tomorrow as I am going to sleep now!
Have a good night, everyone :)

edit2: Testing is VERY successfull. Play around with buyrange, max and min sat amounts and you can set every desired behaviour! Be it an opportunistic explorer, only buying from within sector or the UBER sat master (TS with high settings for buyrange, max and min amounts), buying from literally anywhere and spamming sats throughout the universe.
Think, I'll release this version soon.

edit3: because I like to be opportunistic, I implemented the opportunistic mode as default behaviour parallely to all other settings. ;)
this means if explorers are still above their buying threshold and stumble across a station selling sats in their current sector, they'll buy some regardless of their settings. They still obey the max sats on board limit, though. This saves some flights.

edit4: Created the new SatSpawnMod (*cough* not necessary anymore *cough*) and released v1.9.8.8! Have fun with a dramatically improved satellite management :)
My Recommendation: Get a small TS with jump drive and set it to:
- Buyrange: 20
- Max Sats: 60
- Min Sats: 15
- SatType: Adv
- Cover Sector: Yes
- All Scans etc off and Discover hostile off, too.

This will build you a sat grid in no time ;)

edit5: v1.9.8.9 is a hotfix, I found two small glitches in the new menu file and in the satspawnmod.
I also fixed the 'Explore Galaxy' command being set to no command for a fracture of a second between change of sectors.
Goatman
Posts: 81
Joined: Thu, 22. Jul 10, 03:40
x3tc

Post by Goatman »

Thanks for a very useful script, I love it!

Is there any way to have a "manual sat placement mode"?

Option box "number of sats per system ="
Option box "placement of sat1 x,y,z"
Repeat for required number of sats on line one.
Also maybe an above/below gate +/- input

This would allow us to choose how many sats per system, and where they are placed.
The 2 at 15/50 isn't ideal for me,and auto cover is a bit of overkill....

This is the only way I can think of to improve this awesome script!

Thanks,
Goatman
TC 3.2 *Moddified* with XRM,highhulls, eEQv2.7.2.2,EquipResandDevV1.00CommPluginConfigV1.51,FDNV7.2/LIModv7, MissdefMk2,XRMdockwaresizefix,Nofog,Npcbailing,Salvageclaimsoft, SalvcommandNPC's,Smart2.2,Memiaautoscansector,GALAXYEXPLORER1.9.8.9,Workshop_V20,BounceV1.7,Codea3310/BasicpayV3103/MilitaryTransV3300/PersonalTransV3400/MefosV3206, and ALL required Librarys,** yet to add MbrrV2.16!!** just have a few ssWares in the cheat menu? And all FINALLY coexist peacefully!
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Hmmmmmm, this would be possible, sure. everything is :)

Do you mean that the sat layout is then valid for every system? Regardless of its size?
Because think for example of a small system, where you enter 4 sats and a square layout.
then the explorer enters a huge system like albion and there only covers the center.
What would you do to get that right?

But if you can provide a good concept that fits in for everyone, I'll gladly add it in as a bonus feature.

cheers!
User avatar
Klord
Posts: 872
Joined: Wed, 1. Feb 12, 20:31
x3ap

Post by Klord »

Im having trouble...my explorers dont establish satellites.
They do explore pretty well, & I can see in the property menu that they are "buying sats". But no one have sats in their cargo bay & they dont place sats.

Am I missing something here ?

Edit - In explorer config, I have enabled them to deploy sats. But rest of the options look like greek to me. Unable to understand.

Thank you...
X fanatic. More of an X3 fanatic.
What about X4? Nah, I prefer a space simulator rather than a walking simulator.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”