[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: Moderators for English X Forum, Scripting / Modding Moderators

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

Post by gnasirator » Thu, 26. Jan 12, 17:54

DrBullwinkle wrote:What is "Range of inner sector scan"? Is that a way to control whether the Explorer scans outside of the gates? That would be a nice feature! The text does not explain the function (not for me, anyway). Also, I think the default should be to scan slightly outside the gates, because pirate bases are usually slightly outside the gates.
Yes, exactly that. 100% scans the sector until the gates. 200% twice the radius and so on.

Got to go, will answer the rest later.

AND you sure, that after closing the config menu, the explorers start to work? They do rename, yes, but they shouldn't (CAN'T) start their job.
Renaming is therefore switchable...

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 26. Jan 12, 18:08

gnasirator wrote:100% scans the sector until the gates. 200% twice the radius and so on.
OK, good. That is a nice feature! I cannot think of a better name for it right now. Perhaps we can think about it for the future. What do you think of making the default 110-120%?
AND you sure, that after closing the config menu, the explorers start to work? They do rename, yes, but they shouldn't (CAN'T) start their job.
Renaming is therefore switchable...
OK. So:

1) I suggest that the default for Automatic naming should be "No".

2) Maybe better text would be "Automatically rename Explorers".

EDIT: Aha! I found the "Explore Galaxy" command on the Custom menu! I missed that the first three or four times that I tried it. :?

So that changes my suggestion for renaming the configuration menu. Let me ask this... can you replace the "Explore Galaxy" command on the Custom menu with your configuration menu? Then add an On/Off switch? I think it is a bad habit to make the user look in two entirely different places to control a single function. (Yes, I know that EgoSoft does that commonly, but that is one of the things that makes X3 difficult to play.)

Also, I updated my previous message so that you can work from that list.

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

Post by gnasirator » Thu, 26. Jan 12, 22:26

jep you're right. usability could be improved in my script :)

Soo, I would do it like lucike in his commercial agent script. only ONE command, which opens the menu and in there is the command to start the explorer. good idea.

and if you know a way to rename the ships back to normal after their job is cancelled, let me know pls. I can't think of a way right now. but it exists. lucike is doing exactly that with his commercial agents.

and thanks for the list. I will work through it, next time I have some spare time for programming. I'm visiting my girlfriend over the weekend, so no time.

But as always, I like you ideas. thanks :)

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 26. Jan 12, 23:22

gnasirator wrote:Soo, I would do it like lucike in his commercial agent script. only ONE command, which opens the menu and in there is the command to start the explorer. good idea.
Yes, Lucike does many things very well. His scripts are organized, rugged, and well-documented. Most of them serve useful purposes, and some of them are the best at what they do.

The only thing that I do not like about Lucike's scripts is that he does not stop when the job is done. Most of his scripts are designed to simplify an overly complicated manual process (which he does well). HOWEVER he then goes too far, by adding overly complicated stuff that makes his scripts more difficult to learn than the vanilla commands that they are meant to simplify! (And don't get me started on pilots, which are unrealistic in an AI-centric game, don't work with some vanilla scripts, and add complication to an already too-complicated task.)

So mimic Lucike's best habits and avoid his tendency to complicate things; then your code will be perfect. :)
if you know a way to rename the ships back to normal after their job is cancelled, let me know pls. I can't think of a way right now. but it exists. lucike is doing exactly that with his commercial agents.
Store the original name of the ship in an array that is saved with the game save?

As for girlfriends, they come first. Have a great weekend! :)

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

Post by gnasirator » Fri, 27. Jan 12, 11:47

the problem is not how to save the name.
it is how to catch the moment when the player orders the ship to stop, or gives the ship a new command.

I need an easy, fast and secure method to hook the rename-to-old-name script on to this event.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 27. Jan 12, 18:18

gnasirator wrote:the problem is ... how to catch the moment when the player orders the ship to stop, or gives the ship a new command.
If I read this correctly, it goes something like this:

Code: Select all

While [CAG main script] is on the stack
  loop
When [no longer on the stack]
  Rename
Look at plugin.com.agent.rename

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

Post by gnasirator » Fri, 27. Jan 12, 21:07

great. will copy that. you're a good help. thanks :)

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 27. Jan 12, 21:17

I am happy to help!

By the way, I found some interesting links at the bottom of Gazz's page:

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

Post by gnasirator » Sat, 28. Jan 12, 00:13

jep I was reading that menu tutorial while I tried to figure out how to do menus. sadly the link is down. file not available. so I had to grab a menu tutorial from somewhere else. add some tries & errors and voila, menu worked.
it's only basic but more than enough for me.

the format menu lib sounds interesting but I don't think I need it. It's enough to set up the basic parameters right now and I don't really want to make the menus too complicated.

Firepower01
Posts: 40
Joined: Mon, 18. Jul 11, 04:59

Post by Firepower01 » Sat, 28. Jan 12, 04:08

gnasirator wrote:
Firepower01 wrote:A small fee sounds fair to me.

I also picked up an explorer that was sending me distress calls about being low on oxygen. I think he ejected from his ship when he was getting killed. He's also seemed to have disappear from my cargo bay, and I do have a cargo life support system. Odd

I'd also like to figure out a way to get those pirates to stop killing my satellites :/
That's strange, as my script doesn't use pilots at all. Do you mean the OTHER Universe ExplorerS script?

@Malakie:
Okay I will think about a new Name.
The sector black list sounds doable but who should enemy sectors be blacklisted for? For the other explorers? But what if behind that enemy sector is another unknown one? Explorers would want to discover that.
I spontaneously can think of an option "Avoid enemy sectors". If switched on, the explorers would leave a sector immediately if the newly disocvered one turns out to be hostile. And they would not fly into sectors with enemy owner races at all (as soon as they are discovered, though. They won't be able to predict if unknown sectors are enemy).
Would that be okay?
Yeah it appears I mixed your two scripts up. They're listed with the same name in the script index. Sorry!

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 28. Jan 12, 04:35

Firepower01 wrote:I'd also like to figure out a way to get those pirates to stop killing my satellites :/
As you have seen, if you kill pirates, they will get mad and take it out on one of your satellites (or freighters).

One way to slow down destruction of your satellites is to drop a laser tower along with each satellite that you drop in a risky sector. It isn't perfect, but it can help, especially if the pirates are only mildly annoyed with you.

Galaxy Explorers also helps a little by placing the satellites far off of the ecliptic. That reduces the amount of traffic near them and, consequently, reduces the number of "drive-by shootings".

For more difficult sectors you could create a mineral mine or factory in the sector (instead of a satellite). They have much stronger shields and can usually withstand a few hits.

The only sure-fire way to keep your satellites safe is to keep your sectors clear of enemies by using patrols. If you do not have a large fleet yet, then one of the above solutions will reduce the problem.

Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 » Sat, 28. Jan 12, 09:01

Or you could get the Salvage Command Software script and upgrade your advsats to "Stealth" versions. Then they'll only die if something bumps them.

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

Post by gnasirator » Sat, 28. Jan 12, 10:00

yeah but come on ... I don't want this to become a cheat script.

The universe is a rough place to live. even for poor, lonely, defenseless satellites ;)

they die from time to time ... so you'd better protect them!

Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 » Sat, 28. Jan 12, 10:18

Once you get a healthy coverage of the entire universe it doesn't take that long for a few universal explorers to repair lost sats anyway :)

Speaking of cheat script.. hehe, is there any way I can convince you to make their level up requirements a little easier? Once you have most of the universe discovered it's pretty hard to level them up and well, it's nice to have asteroid scanning-advsat replacing minions.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 28. Jan 12, 15:26

Consider it done, Probe1.

Galaxy Explorers have no level-up requirements. They are AI's, just like the rest of the game.

Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 » Sat, 28. Jan 12, 20:35

I.. mixed this script up with the other older script haha. my bad. I just realized it right now and you've already noticed my error.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 28. Jan 12, 20:49

No problemo, hermano. :)

I have hopes that Galaxy Explorers will become the best of the universe-explorer scripts. Already, Galaxy Explorers has the one important feature missing from most explorer scripts -- the choice of whether to uncover new sectors or not.

Gnasirator will fix it up nicely, I'm sure. He has done an amazing amount of work in just a few days.

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

Post by gnasirator » Sun, 29. Jan 12, 00:56

thanks ... :oops: too kind!



monday I'll return home. I hope I can get this script "perfect" then. Already looking forward to working your todo list, DrBullwinkle.

nap_rz
Posts: 1383
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by nap_rz » Mon, 30. Jan 12, 05:36

am I thinking this right? galaxy explorer will enable ships that equipped with it to explore the universe automatically?

but to what extent? will 1 ship explore all the sectors?
then what after all sectors revealed, the ship will stop? or wandering around aimlessly?

what about enemy sectors, like xenon sectors? will they enter it and get killed? what about if they have to cross an enemy sector to get into other sector, like the xenon 347 to get from the middle universe to the northeastern side of the universe?

is this compatible with XRM?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Mon, 30. Jan 12, 05:47

nap_rz wrote:am I thinking this right? galaxy explorer will enable ships that equipped with it to explore the universe automatically?
Yes, that is the primary purpose of the Galaxy Explorer. It is like the vanilla Explorer Command Software, but with additional improvements.

One (or more) ship(s) will explore all sectors. You can choose whether you want them to discover new sectors, or whether they should only visit sectors that you have already visited.

Galaxy Explorers also can scan asteroids and place satellites. If you choose to have them maintain a satellite network, then they will continue to do that until you tell them to stop.

The explorers will enter enemy sectors, but will immediately leave IF you tell them not to map enemy sectors.

Good question about crossing enemy sectors. I will leave that one to Gnasirator to answer. :)
is this compatible with XRM?
Probably. Please let us know the results of your tests!

(Please note that Galaxy Explorers is still being developed. It works now, but Gnasirator has plans to improve it.)

Post Reply

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