[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

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

Post by DrBullwinkle »

Welcome to the X-verse, Klord.

You already know the answer to your question... it does not matter. Just get the scripts into the scripts folder, and the t files into the t folder. How you do it is unimportant.

Galaxy Explorers is a well-behaved and well-organized script. Some others are not so much. The Plugin Manager is an excellent tool that simplifies installation of scripts. Sometimes it simplifies uninstallation of scripts, as well.

Explore the "sticky" threads which are permanently "stuck" to the top of the forum. There is more information than you ever wanted to know there. :)

It is an old game with a lot of history, and some of that history is still relevant. Keep at it, and (most) things will make sense (eventually).

When modified to suit your tastes, X is the deepest, richest, space sim ever written. (And Galaxy Explorers makes it just a little bit better.) :)
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

Could you add a config switch to either spawn a satellite or make the trip to the closest factory to buy them. Feels kinda cheaty with the spawning option. I would rather the process went in line with the rest of the universe instead of magically creating them :)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Could you add a config switch to either spawn a satellite or make the trip to the closest factory to buy them?
:roll:

Now I am sorry that I mentioned the simulated buying. I should have stopped at "Yes". :)

The simulation of buying things is common in X scripts. It simplifies programming and makes the scripts more robust. For example, when a vanilla Mk3 trader needs a jump drive, it simulates "ordering" the equipment and waits "for delivery". The equipment itself is spawned at the appropriate time. That allows the script to work even when a jump drive source has not yet been found, or when it would require a long journey, or crossing enemy sectors.

With real buying, it is almost guaranteed that someone else will complain that their explorers stop and don't do anything, or dock at stations and wait.

"Realism" is fine, but only when it can be done reliably (without adding bugs or incompatibilities). For example, some mods change size types for both cargo holds and wares. It would not help anyone for gnasirator to attempt to add theoretical "realism" while simultaneously introducing potential incompatibilities with yet-to-be-specified mods.

And remember that these scripts are written by enthusiasts, in their spare time, for free. So making the job easy for the script-writer is at least as important as adding a feature that makes no difference to the main goal of the script.

Finally, satellites are not rare. Buying them from docks slows down the exploration task and complicates the code without affecting the game in any significant way. The explorers *do* buy the satellites in that the player pays for them. Only the source is fudged for the sake of code reliability.

That said, it is not my script, so I will shut up now and let gnasirator decide how he wants to proceed. :)
User avatar
Klord
Posts: 872
Joined: Wed, 1. Feb 12, 20:31
x3ap

Post by Klord »

DrBullwinkle wrote:Welcome to the X-verse, Klord.

You already know the answer to your question... it does not matter. Just get the scripts into the scripts folder, and the t files into the t folder. How you do it is unimportant.

Galaxy Explorers is a well-behaved and well-organized script. Some others are not so much. The Plugin Manager is an excellent tool that simplifies installation of scripts. Sometimes it simplifies uninstallation of scripts, as well.

Explore the "sticky" threads which are permanently "stuck" to the top of the forum. There is more information than you ever wanted to know there. :)

It is an old game with a lot of history, and some of that history is still relevant. Keep at it, and (most) things will make sense (eventually).

When modified to suit your tastes, X is the deepest, richest, space sim ever written. (And Galaxy Explorers makes it just a little bit better.) :)
I gotcha...plugin manager can do it. I just need to make packages using scripts.

By the way, if you can, please do help me in this plugin.
http://forum.egosoft.com/viewtopic.php? ... t=#3815568

Thank you...

Edited - Oops Im new to this forum thing. Sorry about mess. By the way...that way I got the mod installed but its not working well. & you have already checked the problem.
Last edited by Klord on Mon, 13. Feb 12, 08:22, edited 1 time in total.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

You quoted Erenar but then spoke about the Plugin Manager. Sorry, but I do not understand who you are addressing, and what you are saying.

However, I can help you with this:
Klord wrote:I just need to make packages using scripts.
You do not need to make a package for Galaxy Explorers. Click the "Install Archive" button on the Plugin Manager to install Galaxy Explorers.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

damn what a long night ...

new version is out. I hope, everyone is happy with it :)

now you can choose to buy or to spawn sats. If buying works well enough I will sooner or later remove the spawning part, as I think that buying is more appropriate. And it sure will help the script get signed!

Rebuilt the sector choose routine. Explorers shouldn't fly into unexplored sectors anymore if not told to.

Added new check for scanned sectors. if explorers are set to scan sectors in a greater range than what the sector has been scanned before, they may rescan the sector.

And I tidied up a bit. named all the global vars consistently.
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

Nice fast work :) Will check out the new buy routine and let you know if there are any problems.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:damn what a long night ...
You don't eat an elephant all at once. You eat him one bite at a time. ;)

Explore unexplored sectors
Partially works.

Test: Humble Trader Start. I created five Discovers, turned off most options, and started Galaxy Explorer. They proceeded immediately to the next sector (The Hole), then went back and forth between the sectors.

(I repeated the entire test twice with the same results both times.)

Unfortunately, finding even one unexplored sector can be a spoiler. So:

1) The test for unexplored sectors still has a hole.

2) It would be nice if the Explorers would stop and send a msg to the player's log when they cannot find a path. Do they *know* when they cannot find a path? If not, then maybe that is why they go back and forth between two sectors... constantly searching for the impossible?

Save Setup as Default
Does not work.

Test: Save Setup as Default. Create a new Explorer. Defaults are normal defaults, not the saved defaults.

Load Setup from Default
Does not appear to work, but that may be because saving does not actually work (above).

Test: Save Setup as Default. Create a new Explorer. Click "Load Setup from Default". Immediately returns user to the Command menu. Returning to the Galaxy Explorer Configuration menu shows no change -- the "saved" defaults are not used.

Question: How does the option for "Buy range satellites" work? If they need a satellite, and the player wants to force them to buy satellites, then don't they need to go buy one? Or do they msg the user saying that they cannot find satellites within range?

3) Better text would be: "Satellite purchase range".

That is all I tested this time.

The script gets better every time you work on it, gnas.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

"1) The test for unexplored sectors still has a hole. "

Nope, it's meant to be like that. I don't want the explorers to stop. They are just supposed to go on as long as they are told to.
I have built in that loop hole for the Humble Trader test:
If there are ONLY unexplored sectors around - go for one. Because that test is the only situation where it is possible to be surrounded by only unexplored sectors. Everytime else there is at least one option to go - and then they will choose that option. Like you said after exploring the one sector, they keep going between those two. That is intended to be. They could maintain a satellite network between those two for example.

Will look into save and load again. That must have gotten messed up with my naming all global vars consistently ...

"Satellite purchase range" -> will do so.
Explorers check everytime after they have reached a new sector if there is a satellite of the wanted type to buy somewhere inside the buyrange. If found, the buy it and then return to do their work.

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

Post by DrBullwinkle »

gnasirator wrote:I have built in that loop hole for the Humble Trader test:
If there are ONLY unexplored sectors around - go for one.
Haha! You might have mentioned that *before* I tested it. :P

I think that is OK, because they did not go beyond The Hole. On both test runs they went to the Hole... do they always do that? Or was I just lucky?
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

Gnas, just wanted to let you know that TECSG has made his Stealth Sat modification usable by 3rd party scripts. Would be nice to get that implemented if you have the time and motivation :) Between this script and his SCS, the 2 work wonders for galaxy exploring and scouring.

http://forum.egosoft.com/viewtopic.php? ... start=1575
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

hmm stealth sats. nice to have, that's right. But without knowing that script, I guess that there might come up some compatibility issues as I then rely on his script to be installed?

And furthermore it would modify the original game behaviour very much. I don't think I'll get this signed then?

I know, it would be nice to have stealth sats in hostile sectors but on the other hand - where's the challenge? It's much more interesting without knowing the exact strength of the enemy army ;)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:where's the challenge?
I agree with everything you said, gnas.

You definitely do not want to get caught in the trap of providing support for another author's mod or script.

However, sometimes there are opportunities to provide "hooks" that others can use. For example, what if you were to put "Advanced Satellite" into the t file? Then an interested person could modify that t file so that the Explorer could drop whatever they want?

That would be easy to implement, and it puts the maintenance burden where it belongs... on the modder.

If you want to get fancy you could put an array in the t file. I am sure that someone has done that before -- perhaps parse a delimited string or something like that? An array would allow a modder to add more than one option (of whatever ware they want to drop).

====================================

In other news, I started a new Discoverer today. I had <<Spawn>> satellites selected, but the first thing the explorer did was to go purchase satellites. :)

One reason I prefer spawning is that my Discoverers only have cargo space for two Advanced Satellites, which is not even enough to do one large sector.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

arg, okay will check that error :)

hm yeah it would be possible to read texts from the t-file and then decide in-script depending on the text, what to do.
But the only effect would be, that the script will only buy adv. sats. if the correct text is in the t-file. if not, it won't do anything. I highly doubt that I can save a direct ware reference to the t-file?!
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:hm yeah it would be possible to read texts from the t-file and then decide in-script depending on the text, what to do. ...

I highly doubt that I can save a direct ware reference to the t-file?!
Oh, I see the problem. The idea only makes sense if you can save a ware reference that can be decoded by the SE. EMP means that the actual ware reference will vary from game to game. *Sigh*

But, wait.. doesn't "get amount of <ware> in cargo hold" accept a simple string (just the name of the ware)? Scripts that add custom wares, then check for them, have to be able to handle an indirect reference.

So I think that you can do it.

Of course, it will be up to the modder to be sure to put *exactly* the correct text in the t file.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

phew, are you sure the command does that?

I'll try - for curiosity :)

Nope, doesn't work. Returns '0' units whereas there are more than 0 on board.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:phew, are you sure the command does that?
No, I am not sure that "get amount of <ware> in cargo hold" will work with just a name (rather than an ID).

However, I *am* sure that scripts add custom wares, then check for their existence. Using EMP. So there must be a way.

===================================================
EDIT: After thinking more about this problem, I wonder whether EMP may be architecturally flawed? EMP is definitely better, now that Cycrow has built support for it into the Plugin Manager. Still, I get ReadText errors that I cannot track down.

For example, ReadText24-111 at Equipment Docks, when there does not appear to be a "24" file. I know that it is the Advanced Thruster, but I cannot figure out why it is having problems.

It does not help that I cannot find documentation about how EMP works. I have read several EMP threads, but they never explain how it makes relationships. And all of the EMP threads appear to be stale -- it seems that nobody supports it.

I mentioned this in the Plugin Manager thread, and Cycrow gave me one of his cryptic one-liners: "Maybe a t file is not getting loaded". That does not explain how or why a t file might not get loaded, but your question seems as though it might be related.

As far as I can figure out, for EMP to work correctly, *all* of the related t files must be loaded. Always.

And t files are usually loaded in the setup script, right? But what if a script does not load the t file on every reload of a saved game? That could leave t files unloaded which, in turn, would result in ReadText errors.

I am speculating about most of this. Does it make any sense, or am I missing something fundamental? (Actually, I *know* that I am missing the fundamentals of EMP, so maybe I should ask what, exactly, am I missing?) :)
===================================================
gargamel69
Posts: 64
Joined: Sun, 24. Feb 08, 11:14

Post by gargamel69 »

Hi, and thx for your script. I try to install in my TC/AP X3 but have a problem. I have change language in lang.dat file to 34 to spanish. I install your script, copy all files to respective folders, and nothing new appears. I try to change your 7600-L044.pck to 7600-L034.pck and dont work too. Its possible that works with spanish? Am i doing something wrong?
Thx.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

nothing new appears
Please double-check the following:

1) The ship that you run the command on must have Explorer Command software installed.

2) Have you Activated the Script Editor?

3) Do you see "Explore Galaxy" on the Special menu? (Or whatever text you used in place of "Explore Galaxy")
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

@ "Its possible that works with spanish?"

Hmm, I guess it should "work" in spanish but you should get readText errors everywhere.

The only two languages I have implemented are german and english.

http://www.yourfilelink.com/get.php?fid=763637

try this one. It should work with language id 43 but still uses english texts.


and for AP, make sure to unpack the files to the addon folder!

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