[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

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

Post by DrBullwinkle »

It is not a workaround... it is proper software development technique. You check your boundary conditions. Always. Whether or not you think you need it, and whether or not the guy before you did it. It prevents bugs, because you cannot anticipate when something unexpected will happen.

That said, you will be happy to hear that, in the end, I only found minor issues with Mk3 Optimization and Galaxy Explorers. I think it is time to begin planning a release party! Give the testers a few more days, but you are close... very close. :D

Also, I have to say THANK YOU for the breakpoint code. It took me the longest time to get it working properly. But, when working, it is extremely helpful. Without breakpoint, I would not have been able to trace the following obscure bug:

!move.jumptogate.nearest creates a full position array, while !move.jump does not. It turns out that "get position as array" returns only x,y,z without the sector; which is not documented in the MSCI Reference. Combine that with a newbie scripter who does not know these things, and the result is what you suspected and I wondered about: a bug in Free Jump for AI's. And here is the fun part: the call to !move.jump in autotrade.delivery is slightly unusual in that it passes a gate rather than a full position. And that was the only way to trigger the bug! Now Fixed, along with several other small improvements.

I was not able to get stuck ships (Mk3's and Explorers) to restart automatically. I had to restart their commands.

Assuming that I have packed everything correctly, here are the files. :

Suggestions for Mk3 1.7.8 and Galaxy Explorers 1.9.8.5. Plus Free Jump for AI fixes 1.4.03.


Change Log
================
Mk3 Optimization
================
1.7.8 Bullwinkle edits based on 1.7.7
2012-05-22
----------

t files:
- Fixed 1202 entries in t files which gave readtext errors.

Minor:
- Incremented version number in Setup (1.7.8 )
- Docs only in Delivery.



================
Galaxy Explorers
================
v1.9.8.5 Bullwinkle edits to 1.9.8.4
2012-05-22
----------

getSector: Added test for Boundary Condition: trapped in null sector.
(Also code for clean escape to a known sector).



================
Free Jump for AI
================
v1.4.03 Bullwinkle 2012-05-22
-----------------------------
- Package actually works now. Previous version had missing .pck's.
- Added jump timer for AI's.
- Re-implemented charging credits for jump.
(But jump even if we have to borrow credits from a friend.)
- AI's should no longer ask about jumping with followers.
- Fixed obscure bug in !move.jump that could cause jump to null sector if argument targetPos is passed in incorrect format.


(All changes clearly marked with "BW:" )
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Great Work!!!

I just came home from working at the university. I won't look into that stuff right now but later this evening.

I will then look into the files and prepare a new release with your fixes.

That should hopefully finalize the testing ...

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

Post by DrBullwinkle »

gnasirator wrote:That should hopefully finalize the testing ...
No, that *begins* the testing!

You can't issue a release and call it "tested"... you are probably kidding about that. :)

I have not even tried most of the features of Galaxy Explorers. I probably will not have an opportunity to do so in the next few days, either.

But I just converted two ESTs into UTs after they wandered into Xenon Sector 472 (even though it is blacklisted for them). Both scripts (Mk3 Opt and GalEx) seem to be working better than ever before.

If you get school credit for these scripts, you can tell your prof that I said they deserve an "A". (For whatever that's worth.) :)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Hmm, maybe I can talk my prof from automatic control engineering into accepting this work as my final test.
I would have to do some stability calculations and graph plotting though. Wouldn't be easy ... ;)

I just hope, that testing soon finishes because I've been working on this and the MK3 script for more than 7 months now. And that's only the latest stuff, I released in these two topics.
I'm getting tired of programming ... at least I need a break.

But fortunately, you guys are doing a great job at testing this stuff for me so that I can lean back and concentrate on fixing the found problems :)
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Seven months is not that much. How long has RRF been in development? Or MARS/MDMk3? CODEA?

Take a break for a month, then come back and see what kind of reports you have collected. Just don't accept any more feature requests for this version. (Including your own.) It is time for a Feature Freeze!
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

I've added Dr B's fixes to my current game and will report back on any anomalies I come across while playing.

I also agree with Dr B you should get a pass with distinction for your efforts :)
Still life in the old dog yet...
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

I'm currently checking Bullwinkles edits.

1. The changes to the MK3 script (delivery, main) are reasonable and welcome. I'll put them into the next release.

2. The addition to getSector doesn't make sense for me though:
You inserted the unstuck code right in the middle of the code, without any checks for boundary conditions. Like this, explorers would always end up in argon prime?
You have to check if [ENVIRONMENT] -> exists and then put the explorer back into action?!

I've added the check and put the rescue code into a subroutine. It will now only be executed if the ship is in null space.

And btw, you were using old script versions. At least your delivery script is NOT the one from 1.7.7?
Last edited by gnasirator on Wed, 23. May 12, 10:05, edited 1 time in total.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:Like this, explorers would always end up in argon prime?
Only if they are trapped in null space. At least, that was my intention.

And they would go to a KNOWN sector nearest Argon Prime. So, early in a Terran start, that might be somewhere near Heretic's End.

Checking for whether the environment exists is a good test for boundary conditions! I assumed that a known sector would exist. But some future mod might include a Nova Bomb which might destroy an entire sector. So, yeah, you're right to check for that. ;)

Putting the escape code in a sub is also a good idea. It might be useful elsewhere.

Thanks for double-checking my double-checks. :)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Welcome :)

Like I just edited above: Another thing I noticed was, that your scripts are out of date. At least the delivery script is older than from 1.7.7.

But I merged your edits into my current versions and will release them into 1.7.8.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:your scripts are out of date. At least the delivery script is older than from 1.7.7.
Oh, man! That is proof that everyone needs a proof-reader.
But I merged your edits into my current versions and will release them into 1.7.8.
Thank you!

I guess this is why people work in teams. :)
Last edited by DrBullwinkle on Wed, 23. May 12, 11:31, edited 2 times in total.
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

It's out!

And the new explorers, too. The only changes here are the updated getSector script.
Rest works as intended and I'm very happy with it :)


btw: in a short test, I put my explorer into null and he returned not to Argon Prime but to some other sector quite far away.
I had the whole universe explored.

I guess, the sector array, you are choosing from is not sorted by distance.
But on the other hand, this doesn't matter. As long as they pop out in a know sector, all is fine!
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Download page still says version 1.9.8.4(0)?

(And, yes, I intentionally did not do any checking of the sectors array, because a random placement is actually preferred.)
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Hu,

you are right. X1TP didn't update the file.
I just tried reuploading twice. The download is not changed.

I'll provide an alternative mirror.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

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

Post by gnasirator »

Looks great!

I already found out to use the acc:

But I can't find the upload button?
Last edited by gnasirator on Wed, 23. May 12, 15:52, edited 1 time in total.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

I post the link instead of the credentials. There are too many site-scraper-bots around. :)

Downloads Tab: "New Download" button should be just below and to the left of the Downloads Tab itself. (to the left of the Search bar)

It is odd wording. It is a new Upload rather than a Download!
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

http://s14.directupload.net/images/120523/csz5sxyi.jpg

Suggestion: would you please upload my two scripts to that site?

I'll post the link on page 1 then :)


{Image greater than 640x480, oversize image now linked - Terre}

edit: how did Terre find out, I posted an oversize image in such a short time? :)
Didn't even know, there were restrictions ...
Last edited by gnasirator on Wed, 23. May 12, 15:56, edited 1 time in total.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Yes, exactly. Right about where that big, red, ellipse is. :)

Did you remember to log in (with the public credentials)?

(And did you remember to remove the public credentials from your earlier post? Maybe not absolutely necessary, but I am safety-conscious regarding the Internet.)

Mk3 Optimization v1.7.8

Galaxy Explorers v1.9.8.5
gnasirator
Posts: 1114
Joined: Mon, 13. Dec 04, 16:15
x3tc

Post by gnasirator »

Oh I thought if they're public in another thread, they may be public here, too.

I'll remove them.

I tried logging in to google with that data. but it then asks me a secret question, which I don't know :)

thanks, page 1 changed!
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

gnasirator wrote:Oh I thought if they're public in another thread, they may be public here, too.
*Shrug* Maybe. I just think that it is a bit risky. Every time you publish something like that, you are inviting a malicious bot to attack the site. It is enough of a risk that they are published once. Besides, if LV ever changes them, then you will be glad that you posted the link instead of the text.
I tried logging in to google with that data. but it then asks me a secret question, which I don't know :)
See? Google agrees with me. :)

You can PM or email one of the "full" members listed on the "Project Home" tab. They all have "Owner" privilege, and can give you "Committer" privilege. You will need a Google ID, I think... at least an email address.

PS: Was the secret question obvious? Like "Who is Luke's father?" (or sister)? Or "What is the greatest movie of all time?"

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