[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: 1108
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Tue, 31. Jan 12, 23:57

ah okay.

btw, I couldn't download your RS file. Always had a 5 min timer and after it was finished, my session was lost.

So would you mind, pasting the content of your t file here? If you have changed any command names to better fitting ones I'll gladly update them.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Wed, 1. Feb 12, 00:38

gnasirator wrote:I submitted this and my MK3 improvement to get signed. And cycrow told me they might be interested in the explorers for their bonus pack.
Nice!

Cycrow can probably help you with your menu, too. He seems to enjoy helping (cryptically, sometimes, but he will hep).

(Don't let him trick you into needing a hotkey to launch, like the otherwise excellent Community Configuration Menu. Hotkeys suck.) ;)

To my eye, the job is not completely done until the user interface is clear to newbies. (Which would include yet another move to the Navigation menu... sorry!)

Also, the Earth sector may need special handling. It is not enemy territory, but any attempt to drop a satellite there will get the Explorer blasted out of the sky (it just happened to mine). It will be some time before testing is 100% complete. :)
But actually I'm more proud of the mk3 improvement ....
I looked at your description for the Mk3 Optimization. Twice. But I don't think that I understand what problem they solve? The number of times that my Mk3's have problems with fuel or enemies is a very low percentage of their trips. I do not find them annoying (except when they die, because they are a pain to train). So maybe you can tell me more about the script?
The new MK3s work SO perfectly well now. Can't even think of anything for them to do better now :)
One obvious thing would be a separate script to integrate pilots with the rest of the game. There are too many different kinds of pilots (CLS/CAG, pilot union, Mk3) and they do not work together seamlessly. Worse, pilots in cargo holds lose all of their pilot skill and experience.

There is some support built into the engine for pilots, although it only has one value for skill and experience. It would be a nice enough improvement if you could preserve that one setting throughout a pilot's lifetime. (Bonus points for integrating pilot union pilots better.)

I am thinking that there might be a way to store the various kinds of skills and experience settings -- perhaps based on the pilot's name? (I know that the names are not guaranteed to be unique, but they are more often than not).

Or maybe a script could be run on the pilot himself, that would track and coordinate his experience? This might have some problems, because some scripts destroy-then-recreate an object (like Apricot's CBeam/ABeam). Performance could be an issue as well. That is why I thought of tracking the pilot by his name.

If you could link the various kinds of pilots, and preserve their settings when they become passengers (as in rescuing ejected pilots), then you would have one fine addition to the game. It could make pilots almost fun. :)

Then, in your Mk3 script, if you went on to add a better info screen, and better in-game explanation (like a menu choice that sends a msg with the Help documentation!!!), then you might make pilots a real winner, rather than the tangled mess that they are now. :)

(It would be easier to fix the offending scripts, but that brings us back to the problem of it being a "mod" rather than a "script". So an external process would be better for compatibility, even if it is more difficult to code.)
But sadly they don't want to replace files with their bp, so no perfect mk3s in the next bp.
Would they mind if you simply renamed your script? You could call them Galaxy Traders, and put them right below Universal Trader on the Trade Menu. You could let them use the same ware (Mk3) -- just add a new option for the player.

I imagine that would involve copying a lot of EgoSoft code, but maybe they would not mind? You would have to get permission, obviously.

Nice work on the Galaxy Traders so far. Are you giving up on improving the menu? And I assume that you also submitted your command slot for the public list?
about the many readers: I bet, I alone am responsible for at least 20%
Of course. I might be responsible for another 20% because I edit a lot. But that still leaves over a thousand hits from others. In just a few days... that is quite a lot of attention. Clearly people are interested.

User avatar
Erenar
Posts: 278
Joined: Sat, 24. Dec 11, 01:24
x4

Post by Erenar » Wed, 1. Feb 12, 00:52

Check your pms Gnas :)

gnasirator
Posts: 1108
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Wed, 1. Feb 12, 01:59

@DrBullwinkle:

About the MK3 -> I know I'm not good at writing intuitive texts. The descriptons add up over time when I add and change all the features.

The basic idea behind the mk3 optimization is more profit per trade run. Main improvements are:
- better fuel management (no fix 20% of cargo hold wasted but fuel reserve dependand on trade range, experience AND cargo hold)
- proper rest ware selling. traders can even clear up their cargo space after being freshly started
- better fleeing routine after being attacked -> trader always jumps and then just restarts and goes on. no more waiting forever at stations
- and MANY MANY small detail improvements like proper fuelling calculations, merging of scripts, fight drone MKII support, moskito defense support, better status displays, improved delivery service, and so on

So I recommend: try it out. You won't notice any difference at first but if you know the exact behaviour of the original MK3s you will definitely see the improvement in all those little details.


about the galaxy explorers:
I haven't given up, no. But I'm taking a rest right now and concentrate on playing the game. The script is good enough for now.

and the idea about changing the MK3 traders to galaxy traders is not the worst ;)
I will think about that!

good night!

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Wed, 1. Feb 12, 07:24

You are good enough about explaining most things. It takes repeated practice, over a long period of time, to become really excellent at it.

The secret to good interface design is understanding your user's Point of View (POV) or perspective.

POV Quiz:
Two observers view the same object from a great distance. They see the object through a telescope.

The first observer views the object from directly above. He reports seeing a square.

The second observer views the object from the side. He reports seeing a triangle.

1) Which observer(s) is/are correct?
2) What is the object?


Re: Mk3
I will try your script. Clearly, you and I have different concerns about Mk3 ships. :) But I am sure that I will appreciate not *ever* having to restart a UT.
about the galaxy explorers:
I haven't given up, no. But I'm taking a rest right now and concentrate on playing the game. The script is good enough for now.
Yes! I completely agree. I only asked because of your submissions... it had an air of finality about it. By all means, enjoy your work!

When you get back to it again, I replaced the explorer that was destroyed at Earth with 10 Discoverers in Legend's Home. I set them up and started them to Explore Galaxy. They proceeded to follow each other around the same system. Ten cute little explorers, all doing exactly the same thing at the same time.

Then they did exactly the same thing in the next system. All doing the same thing at the same time. *sigh*

So I think the multi-ship logic needs a bit more testing. :)



New List:

- (Background task; long term): Figure out how to put the entire interface under one command (on the Navigation) menu.

- Make sure that multiple Explorers do not all do the same thing at the same time.

- Automatic rename does not number the Explorers. (Isn't that the main purpose for automatically renaming them?)

- Special handling for Earth sector (avoid it). Earth may be "friendly" but they are phobic about satellites (and Explorers). There is no value in an Explorer entering Earth sector at all.

- Try to reproduce Probe1's report about dropping satellites in hostile sectors. It is unclear whether he used the config menu to turn off hostile sectors, but we should try to reproduce it.

- Fine-tune the t file, if necessary. I did it once, but you got a new one before I could finish testing mine. :) So I will take another look at it.

gnasirator
Posts: 1108
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Wed, 1. Feb 12, 09:12

DrBullwinkle wrote:1) Which observer(s) is/are correct?
2) What is the object?
1) both
2) pyramid :)

-> So I think the multi-ship logic needs a bit more testing.

jepp! I know. My workaround right now is to put them into different sectors before starting. But you are right, will check that. maybe add another global var containing current working sectors ...

With that var I can also get a number for new explorer's names!

Earth: did you try setting terrans to enemy for that explorer ship?

t-file: Can you send me your tunings? I didn't completely rewrite it so I can still implement it!

sat drop in enemy sectors -> will check it out :)


good morning! you're early up!

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Wed, 1. Feb 12, 14:57

gnasirator wrote:2) pyramid :)
Exactly. :) The point is that two different people, with different experiences and/or skill sets, can see exactly the same thing and come to completely different conclusions. And their observations may both be partially correct and partially wrong -- or incomplete -- at the same time.

If you can see things from the other person's point of view, then you will understand them better.

On that note, your edits to your original post make the instructions much clearer now. Nice job.
Earth: did you try setting terrans to enemy
If Terrans are set as enemy, then the explorer will avoid all of Terran space. They need a separate rule to avoid *Earth*. Always. There is no reason for an explorer to *ever* go into Earth sector.

I will take another look at the t file.

BTW, is there a reason that you pack your scripts and t files? It makes testing and debug a little bit more difficult, because the X3 Editor is not very well-behaved about extracting them.
good morning! you're early up!
I was up late. Now I'm up early(ish). :) Probably lunch time for you?

gnasirator
Posts: 1108
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Wed, 1. Feb 12, 16:34

is there a reason that you pack your scripts and t files?
There is:
Reason is, that X3 prefers .pck files over .xmls. So if there is an old .pck file in your scripts folder and I supply an xml, it will produce errors.

That's why I generally supply all files as .pck.
If you want, I can add a 2nd link with an xml version ... ?!



-> Always exclude earth. yes sir! it's on the todo list :)

-> and about time: your guess was right. it was 13:57 here when you posted.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Wed, 1. Feb 12, 17:45

gnasirator wrote:if there is an old .pck file in your scripts folder and I supply an xml, it will produce errors.
Right. That is why I would never distribute a .pck unless there is a good reason to do so. :)

But, no matter. Maybe you could consider distributing only the source files when you also change the names of your scripts to something like plugin.gnas.explore...

In the meantime, rather than a separate distribution (which is a maintenance hassle), you could distribute both .pck's and .xml's in the same archive. (Same with the t files.) That way, people who don't want the .pck's can delete them. Everybody else will wind up using the .pck's.

Otherwise, I can just suck it up and deal with the .pck's. It is not a show-stopper, obviously. :)

gnasirator
Posts: 1108
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Wed, 1. Feb 12, 19:11

hmm good idea.

I think I'll do the dual way then.

Internall I'm maintaining two backup folders anyway. One with xmls and one with pcks, as it's a pain to unpack them all manually in x3 again if I wanted to edit them :)

you're so full of good ideas ... impressive!

edit:
New List:

- Make sure that multiple Explorers do not all do the same thing at the same time.

- Special handling for Earth sector (avoid it). Earth may be "friendly" but they are phobic about satellites (and Explorers). There is no value in an Explorer entering Earth sector at all.
Done. Automatic numbering required too much additional code, so I skipped that. And honestly, if you have a swarm of explorers, it doesn't matter which one is which, as long as you can see, what they are doing.
It would matter, if you were friends with the pilot ...

edit2:
- Try to reproduce Probe1's report about dropping satellites in hostile sectors. It is unclear whether he used the config menu to turn off hostile sectors, but we should try to reproduce it.
Done, fixed. probe1 was right. My relation check didn't work. don't know, why. I now use another that works.

And I now distribute both pck and xmls... it's redundand but saves some work for bugfixing/editing ;)

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Thu, 2. Feb 12, 17:52

Thanks. The ideas come from experience. I haven't written an X3 script yet, but I have written a lot of code. Every problem solved adds to the "library". :)

gnasirator wrote:Automatic numbering required too much additional code, so I skipped that. And honestly, if you have a swarm of explorers, it doesn't matter which one is which, as long as you can see, what they are doing.
OK. I don't mind that you skipped it, but just so that you know a different POV, the only reason that I would use automatic naming would be to help me to identify each explorer so that I can watch its progress. Specifically, I want to know which sector it started in. I can do that easily enough by manually naming the explorers. In other words, the numbering would be the main reason for using automatic naming (for me). (But it is OK the way it is... that is why you have a config screen!)


My relation check didn't work. don't know, why. I now use another that works.
OK, good.

Right now I am working on the Duke's plot. The greatest challenge is that Duke's Buccaneer's keep sending me to assassinate pirates and Paranids. But I had to be friends with the pirates in order to start the Duke's plot, and I did build a large space fuel/weed complex, which resulted in many pirates being spawned. So the net result is that I have a *lot* of pirates roaming my universe, who *should* be friendly, but who become angry every time I kill a pirate.

This environment is hazardous for my explorers! I don't want them killing pirates, but I also don't want them to be killed because they ignore threats. And I *do* want them to maintain satellites in pirate sectors.

I do not have a solution for that problem. :( I am just pointing it out.


Here is the t file that I have been using:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<language id="44">
<!-- [grey][/grey] [blue][/blue] [cyan][/cyan] [green][/green] [magenta][/magenta] [red][/red] -->
<!-- [white][/white] [yellow][/yellow] -->

<!--Galaxy Explorer -->


<page id="2008" title="scipt objects commands" descr="0">
	<t id="558">EXPLORE_GALAXY</t>
	<t id="1260">EXPLORE_GALAXY_CONFIG</t>
 </page>
 <page id="2010" title="commands" descr="Long version of commands assigned to ships using the command console. Page 2010 and 2011 belong together and hold short and long versions of the same commands"> 
	<t id="558">Galaxy Explorer</t>
	<t id="1260">Galaxy Explorer Configuration...</t>
 </page>
 <page id="2011" title="commands" descr="Short version of commands. These are the commands assigned to ships using the commandconsole. Page 2010 and 2011 belong together and hold short and long versions of the same commands"> 
	<t id="558">Gal.Exp</t>
	<t id="1260">Gal.Exp.Cfg</t>
 </page>
 <page id="2022" title="command info" descr=" ">
	<t id="558">This command makes the ship explore the whole x-universe. Can optionally drop satellites and scan asteroids.</t>
	<t id="1260">Galaxy Explorer Settings Menu</t>
 </page>
 <page id="7600" title="Command Overview" descr=" ">

	<!--Explorer Befehle -->
	<t id="1000">Galaxy Explorer</t>
	<!-- <t id="2000">Start Galaxy Explorer...</t> -->
    
	<t id="3100">Galaxy Explorer Settings</t>
	<t id="3150">Drop sat type</t>
	<t id="3220">Drop navSats</t>
	<t id="3230">Drop adv. navSats</t>
	<t id="3235">Drop sats at gates of large sectors</t>
	
	<!-- Is this still used? (Bullwinkle) =============================================== -->
	<t id="3240">Autobuy satellites</t>
	<!-- ================================================================= -->

	<t id="3300">Scan asteroids</t>
	<t id="3310">Error: Need mineral scanner to scan asteroids.</t>
	<t id="3400">Scan sectors</t>
	<t id="3520">Radius of sector to scan</t>
	<t id="3600">Automatically rename Explorers</t>
	<t id="3700">Explore hostile sectors</t>
	<t id="3800">Explore unknown sectors</t>
	<t id="4000">Save Setup as Default</t>
	<t id="5000">Load Setup from Default</t>
	<t id="8000">Yes</t>
	<t id="8500">Adv.</t>
	<t id="9000">No</t>
	<t id="9500">Std.</t>
	<t id="9600">None</t>

  </page>
</language>

Notes:

- Do you still use id 3240?

- I see what you mean about the menu command being the same as the text shown in the Property view. However, for human users, a consistent name is quicker to scan. So "Galaxy Explorer" makes sense in both locations. This is consistent with Station Camper, for example, which shows "Station Camper" in the Property view when it is working. I like it that way... it is direct and easy to spot. (But you're the boss.) :)

- What does the "G" in "G ASAT ROID 120%" stand for?

- All caps is harder to read than mixed case. It takes longer for the eye to scan.


Overall, Galaxy Explorers is working well! You have a nice script in progress here, Gnasirator.

gnasirator
Posts: 1108
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Thu, 2. Feb 12, 18:36

thanks I'll add your t-file changes!

id 3240 is not used anymore, that's true. But i left it in because the whole buying routine is still in, too. It's just deactivated. Maybe I have to redecide about that as spawning sats it could be a critical point for signing.

Btw: 'G' stands for Gates which stands for drop satellites at gates!
I assumed that interested users would find that out automatically over time ... e.g. by try and error :)

Btw there is another nice script out there that does automatic naming.
I don't know if it works with the explorers but I guess with automatic naming switched off, it should be no problem.
It officially supports my mk3 improvement btw ;)
link: http://forum.egosoft.com/viewtopic.php?t=307684
maybe that would help you?

about your pirate problem .... theoretically I COULD implement an emergency escape routine when attacked. I could copy the code from my mk3 improvement. explorers would flee into another sector when attacked and restart themselves there.
but it's not really usefull as its main power lies in the trader's using their jumpdrives to escape.
and I won't implement jumpdrive usage into galaxy explorers. way too much micro management about fuelling and so on ;)
so that's what I could offer you:
if attacked:
- cancel current task
- fly straight out of sector
- restart there

on the other hand, the explorers never really stand still anyway. so it doesn't matter whether they fly out of sector or stay inside. they always just fly with max speed.

naah I think I'll leave it ... :)

and about all caps text:
internal command names are all written in caps. so I just follow standards there.

greetings

edit: one more thing about your edits.
Naming all ships Galaxy Explorer makes their names too long. that's why I chose scout. it's nicely short.
Suggestion: Gal.Ex. instead?

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Thu, 2. Feb 12, 19:36

gnasirator wrote:the whole buying routine is still in, too.
Oh, I did not know that you wrote that! My original suggestion to just spawn the satellites was intended to avoid your having to write a routine to buy them.

However, I noticed a good side-effect from spawing. Discoverers don't have enough cargo space to hold satellites and even emergency jump fuel. So spawning is good, cargo-wise. It allows me to give my Discoverers 40 eCells, which is enough to jump over trouble spots.

However, there is nothing wrong with buying satellites. I just did not think it was worthwhile to invest more time in a feature that doesn't directly affect the main mission. :)
'G' stands for Gates which stands for drop satellites at gates!
I assumed that interested users would find that out automatically over time ... e.g. by try and error :)
Probably an "interested" user would figure it out, but not me. :P I turned on the feature and never looked at it again. :)

I love Rename Ships with Expressions (RSwE). I use it to make it easier to find important ships, my ships, the current ship(s) that I am MORTing, and fighter wings. It's awesome.
if attacked:
- cancel current task
- fly straight out of sector
- restart there
Oh, I *like* that idea. However, as you say, they mostly fly at max speed (except near gates and asteroids and when dropping satellites :) ).

In any case, I suspect that my Discoverers get one-shot killed by Harriers. Even with Gazz's OOS Rebalance, those Harriers one-shot a lot of my ships (including UT's and even Ospreys).
about all caps text:
internal command names are all written in caps. so I just follow standards there.
Of course. I meant for "ASAT ROID". But it is a tiny comment... do as you like.
Naming all ships Galaxy Explorer makes their names too long.
Too long for what? It fit everywhere that I looked. But I don't really care what you use as a base name, because automatically naming without individual identifiers causes more problems than it solves, especially if you work with them from the Property view.

("Galaxy Explorer" is, however, consistent.) (And it is obvious and easy to scan.) (And it looks nice.) :)

gnasirator
Posts: 1108
Joined: Mon, 13. Dec 04, 17:15
x3tc

Post by gnasirator » Thu, 2. Feb 12, 19:59

sorry my mistake.
the names DO fit.

they used to be too long when I had the "SCAN" in, too.
already changed that internally.

the buying routine actually is not very sophisticated and works quite well. problem is that satellites are rare throughout the universe. and with explorers having to buy their vast amounts of satellites it takes a LOT longer to build and maintain a sat network.
on the other hand ... it's just how life is out there :)

buying would add another interesting point:
it would make sense to have bigger and slower ships for maintaining the sat network. and small + fast ships for exploration.
I will definitely rethink the spawning decision!

about the escaping:
If the average M5 would live long enough to make a jump out of sector it would be worth a try. but my harpies are all almost instakilled. like yours.
So it would be a waste of work.
On the other hand, if I implemented the buying routine back in and e.g. a TS is used to maintain the sat network, the whole fuelling and jumping concept would make sense.

Naming:
ok I get it. Will try it with non capitals there.

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44
x3tc

Post by DrBullwinkle » Thu, 2. Feb 12, 20:09

Do you know a way to determine, for certain, when a ship is one-shot killed? I am guessing because it happens often. And Harriers do it to Corvettes, which is just wrong.

I am not sure what to say about escaping and buying satellites. I think that I would recommend fine-tuning your current feature set 100% before adding more complexity. Otherwise, you run the risk of the problems that I mentioned in my very first post to you (death by feature creep)!

My first Explorer (the one that was killed at Earth) was a Spitfyre. That seemed to last longer. It does not seem likely that a Harrier would one-shot a Spitfyre. For that matter, not many ships can catch up to a Spitfyre. Heck, a Spitfyre can outrun most missiles! :)

Post Reply

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