[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
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Wed, 25. Jan 12, 16:07

gnasirator wrote:the features you wish for - well they are in already. Except the gate coverage.
Yes, that is my main point. :) If you fine-tune the features that you already have, and eliminate any problems that come up, then your script will be better than all of the other explorer scripts that have been done in the past.

Gate coverage is optional, in my opinion. However, it would be a nice feature on huge systems.
Well, I really wouldn't need to bother find and buy satellites ... but it's so realistic. If I skipped that and just dropped newly spawned sats, I have to at least implement a massive charge for that (twice the sat costs?).
*Shrug*. Attempts at "realism" is what kills most scripts. Your script does the same tasks as the vanilla Explorer Command scripts -- but it does it better. The vanilla script does not charge for satellite placement, so your script does not have to charge a fee, either. (However, please do whatever you want. :) )
So my todo list would be:
- switch to enable/disable gate coverage (depending on sector size and sat type may be skipped)
- switch to enable/disable discovering of new, unknown sectors
- switch to decide whether to buy satellites (cheaper), or just to spawn them at a much more expensive rate
To prioritize, I would write that list as:

1) Switch to enable/disable discovering of new, unknown sectors. (This is the one important feature that is neglected by other Explorer scripts.)

2) Ability to cover gates of large systems. (a switch for this is optional) (Always using Advanced Satellites simplifies the problem of covering large sectors.)

Only after the first two are done:
3) Decide whether to buy satellites or just to spawn them. (Do one or the other, and decide for yourself whether to charge. My vote is to spawn satellites and not charge a fee, but it is not an important question to me.)

Simple is better. The game is too complicated already! :)

Also, remember that finding missing satellites will add enough complexity to your script. There is no need to add more! :)
Last edited by DrBullwinkle on Wed, 25. Jan 12, 17:46, edited 2 times in total.

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

Post by gnasirator » Wed, 25. Jan 12, 16:53

DrBullwinkle wrote: - When everything else is done, the ability to have multiple Explorers will be a nice addition.
What do you mean by that? You can have multiple Explorers already. Just buy more than ONE ship to run the command on?! ;)

I'll priorize like you suggested. Sounds good to me.

But I doubt, that I will work on this today. Had enough hours on my computer ...

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

Post by DrBullwinkle » Wed, 25. Jan 12, 16:58

Sorry, I missed that!

What I meant is that there may be some fine-tuning involved in coordinating two or more Explorers. You do not want them working in the same sector(s), but you want to make sure that all sectors are covered when they are done. If you have already done that, then forget that I mentioned it. :)

Yes, the whole point of all of this game stuff is to have fun. There is no need to do anything other than what you *want* to do (and when you want to do it). :)

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

Post by gnasirator » Wed, 25. Jan 12, 17:35

ah alright, I get it.

You mean something like:
if <another Explorer> is in [SECTOR]
move on
end

I'll implement that! That's a good idea.

I think the rest is already taken care of.

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

Post by DrBullwinkle » Wed, 25. Jan 12, 17:37

Yes, exactly that. :)

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

Post by gnasirator » Wed, 25. Jan 12, 22:25

-> Done :)

Except the other explorer check. It doesn't matter if two are working simultaneously in one sector. they might even work on different tasks.
In absolute worst case, the sector is scanned twice. but that's no problem.

So have fun. And good night!

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

Post by DrBullwinkle » Wed, 25. Jan 12, 23:41

gnasirator wrote:It doesn't matter if two are working simultaneously in one sector. they might even work on different tasks.
In absolute worst case, the sector is scanned twice. but that's no problem.
It is only a problem if two or more Explorers scan the same sector, then choose the same next sector and repeat. In that case, you could have multiple Explorers mapping the entire galaxy together.

However, I would be happy with ONE Explorer that does the job well!

Thanks... downloading now...

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

Post by gnasirator » Wed, 25. Jan 12, 23:57

the odds for that are (1/amount of gates)^jumps.

soooo that's a VERY small chance for them to discover the whole universe together. And therefore I don't think it's absolutely necessary to implement a check.
that check would be VERY much work ... no thanks. the lord of randomness will do that for me just fine :)
Last edited by gnasirator on Thu, 26. Jan 12, 00:14, edited 1 time in total.

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

Post by DrBullwinkle » Thu, 26. Jan 12, 00:14

Sounds good. The important thing is that they should not all make the same decision of which sector to explore next.

In the Maintain case, how do your Explorers detect when a satellite has been destroyed? Do they have to randomly stumble upon the affected sector? Or can they do a higher-priority galaxy-wide scan for missing satellites?

You should get some sleep... I can wait until tomorrow! :)

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

Post by gnasirator » Thu, 26. Jan 12, 00:18

they stumble through every sector. that's their basic principle of working their way through the universe.
so it's a good idea to have 10+ of them flying around.

you can see the explorers as some kind of 'fire and forget' missiles. set them to work and hide them in your assets view ;)

they check for missing sats inside of sectors only. just as you said -> keep it simple.
of course I could build some script, analysing every sector in the universe and send out maintenance bots for exactly that sector. but that's a totally different approach and would require lots of work for this script.

good night :)

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

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

gnasirator wrote:they stumble through every sector. ,,, so it's a good idea to have 10+ of them flying around...

...of course I could build some script, analysing every sector in the universe and send out maintenance bots for exactly that sector. but that's a totally different approach and would require lots of work for this script.
No, no! Your approach is perfect! :)

If I have to have 10 Explorers, that is another reason why it is not important to charge a fee for dropping a satellite (but I don't mind if you do charge a fee. I don't care on that point :) ).

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

Post by gnasirator » Thu, 26. Jan 12, 00:57

you don't HAVE to. it's just faster.
One is totally enough.

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

Post by DrBullwinkle » Thu, 26. Jan 12, 01:04

One should be fine for the first pass.

However, for maintaining destroyed satellites, a single Explorer cannot possibly keep up with enemy destruction of satellites. Not in my game, anyway. :)

Especially in Terran space.

So 10 Explorers is the solution, and it is a good one, IMHO.

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

Post by gnasirator » Thu, 26. Jan 12, 10:02

correct. sooo ...... script seems fine now?

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

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

The plan seems good.

Here is some feedback on the current version:

EDIT: I have updated the following list based on later discussions. I wanted to keep the list current so that you can work from it.

- Change text in your Original Post from "advanced ship commands" to "Additional Ship Commands".

- Change text in your OP from 'This script adds a command called "Explore Galaxy".' to 'This script adds a command called "Explore Galaxy" to the Custom menu. Also, there is a "Configure Galaxy Explorers" option on the Additional Ship Commands menu.'

- If I run the Config menu on the Player ship (which seemed the most obvious thing to do the first time), it does not seem to work (as intended, probably) although it *does* change the name of my ship! Maybe the simplest solution is to make the default for renaming "Off".

- Change "Automatic naming" to "Automatically rename Explorers".

- The menu choice "Drop Sats at Gates" should tell the user that it only affects large sectors. Maybe "Drop Sats at Gates of large sectors"?

- 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. How about making the default 110-120%?

- A nice-to-have feature would be a way to remember default settings for other Explorers. Perhaps an option to "Make these the default settings"?

- OR put the default values in your t file. That way a user can change them semi-easily.

- Speaking of the t file, you have yours packed with encryption, which I do not think is correct for TC. I suggest that you simply distribute the xml file without making it a .pck. (Or pack it without encryption so that users can open it with ordinary archival tools.)

- Consider combining the start command ("Explore Galaxy") and the Config menu into a single sub-menu on the Custom menu. It is a bad habit to make the user look in two different places for one feature. Alternatively, tell the user about the other location (with a msg).

- Oh, one more thing... I see that you have named your scripts "plugin.explorer...". While that is an obvious name, it would be far too easy for someone else to choose the same name, thereby causing a conflict with your script. A more unique name would be better. Some possible naming choices:

- plugin.gnas.galaxyexplorer...
- plugin.gnas.explorer...
- plugin.galaxyexplorer...
- plugin.gnasirator.galaxyexplorer...
- plugin.gnasirator.explorer...
Last edited by DrBullwinkle on Thu, 26. Jan 12, 18:56, edited 4 times in total.

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.

Post Reply

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