[SCR] Custom Start v1.4.0 (21-04-14)

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

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod » Sat, 18. May 13, 00:29

The menu can't be launched directly, but you can make a version that can be launched via script editor as follows:
1. Take a copy of the script renamed so it's not prefixed with 'setup', so it won't run automatically. This might need to be done via 'save as' in X-Studio in case it needs recompiled with the new name.
2. Either Delete everything from top of the script up until line 35 (which has comment 'add custom start logic here'), or put 'gosub setup.start:' at the top.

This is the mechanism it uses to ensure a one-time popup at game creation:

First time the setup script ever runs it will:
1. Write a global variable to block future executions in that savegame.
2. If playership exists, assume it's a gameload rather than gamestart and exit.
3. Create a neutral nav beacon in sector null and run the setup script on it as a new task.
4. Exit.

This setup script on the nav beacon will:
a. Poll at 1 second intervals until the player ship exists. Polls 10 times before giving up (sanity check).
b. Launch the menu
c. Destruct the nav beacon

So possibly in your case
- The playership exists on first run (step 2), maybe delayed by some other setup script that doesn't want to exit. Adding a call to write to player logbook into the script if that occurs should highlight this.
- The nav beacon gets cleaned up by some well meaning mod before the menu fires. Adding write to logbook calls per iteration should show whether all 10 iterations occur.
- The modded game or hardware is so slow to initialize it passes the 10 second sanity check on the polling loop. Try editing line 3 and set it to 30 seconds, then start a new game.

I've never seen it fail to pop up myself. I even use it on TC, even though some of my library script laser/missile spawning logic won't produce ideal results.

Virtualaughing
Posts: 1939
Joined: Sat, 14. Jun 08, 20:40
x4

Post by Virtualaughing » Sat, 25. May 13, 12:50

Speaking of temptation when i read this topic.....
Now i have to face a challenge. "do not go modified you fool" says my little angel in my mind :D
X to X3 is MENU SUPERIOR!
I think Egosoft has already worked out our doom, because Xenon AI will reach the stars! :D

User avatar
TTD
Posts: 11165
Joined: Sun, 6. Jul 08, 10:29
x4

Post by TTD » Sat, 25. May 13, 13:20

@ Virtualaughing

If you have exhausted X with all the official starts, then using this, coupled with Cycrow's Cheat package, will give you an extensive range of game-play.

kvntvan
Posts: 4
Joined: Tue, 21. May 13, 05:45
x3ap

Post by kvntvan » Mon, 3. Jun 13, 16:34

So I installed this mod recently and played a new game on XRM 1.29 and a few other mods and noticed a weird error occurring, some of the stations would have <Invalid> L Alpha or <Invalid> M Gamma as their names instead of actually station names. Also the Showrooms (special XRM shipyards) would appear as <INVALID> XXL and a few ships would show up as weird code names like #FECAS or something like that.

It began to create an error with my UT's because they weren't appearing to the AI yet were still being docked at, causing lots of UT standbyes.

After an extensive amount of time uninstalling and reinstalling the game/mod files/scripts and plugins, I found the culprit to be this custom start script.

Has anyone had similar problems with XRM and this mod?

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod » Mon, 3. Jun 13, 16:44

With custom start being entirely script based rather than modifying game files, it's highly unlikely to be responsible for the symptom as described.

The menu does allow you to spawn any station from the list of stations available to the script API, so it is possible to select and spawn weird undefined stations, but other than that I've no insight into this.

There are some ships in game with names starting with hashes, meant to be rogue terraformer ships (#deca, #cefa etc)

MassterJ
Posts: 25
Joined: Thu, 29. May 08, 22:50
x4

Post by MassterJ » Mon, 3. Jun 13, 18:42

hello to all i have see someone have the same error as me :

i have the menu but all stuff are nammed <Read text>

i have see it's due to the language used on my game hmmm i use french language how can i resolve that please for french?

on the way i have some others scripts and menun appears well in english these ones are from XRM, and Salvage script so .... if the menu appear correctly for this script it's can be excellent


any idea?

i have X3 AP 3.0 (french) with XRM 1.29c and one salvagee script 4.11 named SCS 4.11


MJ

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod » Mon, 3. Jun 13, 18:53

You can make the English text appear in the French game by:

1. Copy 9051-L044.xml to 9051-L033.xml
2. Change this line at the top of the file:

Code: Select all

<language id="44">
To:

Code: Select all

<language id="33">
I don't otherwise have any real localized versions of the strings file.

MassterJ
Posts: 25
Joined: Thu, 29. May 08, 22:50
x4

Post by MassterJ » Mon, 3. Jun 13, 19:35

thank you for the fast reply

it's work great and suddenly it's more easier to use ^^


mj

nexenon
Posts: 3
Joined: Sat, 18. May 13, 23:57

Post by nexenon » Wed, 5. Jun 13, 18:11

Wow this looks like about the best way to end the start game grind without enabling the script editor. I would love to DL it but when I click the link it takes me to:

Code: Select all

http://www.x1tp.com/root/index.php?option=com_jdownloads&Itemid=6&view=finish&cid=1268&catid=124
And this pops up in my browser:

Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available.

Could you please post another link if possible? I am looking forward to trying this out.

:)

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod » Wed, 5. Jun 13, 18:28

I aim to have it re-hosted sometime this evening after work.

Update: now re-hosted

nexenon
Posts: 3
Joined: Sat, 18. May 13, 23:57

Post by nexenon » Wed, 5. Jun 13, 22:11

Thanks for the new link Shimrod! :) And so fast too!

I have it installed now and it seems to be working. Thanks again, this has convinced me to start a new AP game. (this time no tempting script editor enabled 8) )

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod » Wed, 5. Jun 13, 22:58

No problem. The BT cloud hosting isn't too bad particularly since it's free with my ISP package, though they'll have me over a barrel for keeping the subscription going :)

They seem to have gone to the windows 8 school of UI design though.

"I know, let's put a single row of giant vacant icons at the top of the screen with no useful information on them and leave 90% of vertical space blank. That way a user can resize their browser window in a pencil-like configuration, and continue working underneath it!"

"Great idea, cloud driven productivity! But Should we put in a download counter so the user can see how many people downloaded their file?"

"Nah that would detract from the beauty of the giant blank file icon that occupies the entire page, when delving into the file. It might confuse the user and lead to support calls. Instead let's aim for what's clearly the 80% use-case and put <fullscreen> and <play all> buttons underneath the zip file icon."

User avatar
heratik
Posts: 1210
Joined: Tue, 3. May 11, 16:31
x3tc

Post by heratik » Wed, 5. Jun 13, 23:06

Hi Shimrod, this looks amazing, one question, is there a TC version of this mod, or any way of making it compatible with TC?

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod » Wed, 5. Jun 13, 23:12

It'll work on TC, I've used it myself. Probably the worst that it might do is pick a sub-standard laser configuration when spawning ships, since the equipping algorithm uses DPS data unavailable to TC scripting APIs.

I've been meaning to load up the scripts and try and isolate AP-specific functionality, working around stuff like lack of a 'get minimum' script API with the equivalent, etc. Give it a try.

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

Post by DrBullwinkle » Wed, 5. Jun 13, 23:15

Shimrod wrote:"Should we put in a download counter so the user can see how many people downloaded their file?"

"Nah that would detract from the beauty of the giant blank file icon that occupies the entire page
:rofl:

User avatar
heratik
Posts: 1210
Joined: Tue, 3. May 11, 16:31
x3tc

Post by heratik » Wed, 5. Jun 13, 23:17

Awesome! Thanks, I'll try it now!

User avatar
TTD
Posts: 11165
Joined: Sun, 6. Jul 08, 10:29
x4

Post by TTD » Wed, 5. Jun 13, 23:19

I just took a look at the new site.

Such a waste of space !
But the download works fine.
So it remains in my sig.

The link with 1tp might get removed if certain problems there are not resolved though.
Shame really as it was a very good site.

User avatar
heratik
Posts: 1210
Joined: Tue, 3. May 11, 16:31
x3tc

Post by heratik » Wed, 5. Jun 13, 23:34

It works!

Thanks.

BTW I am on an an Apple app store version of the game, have you seen it tested on that? do you want me to report any issues? :D

Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod » Thu, 6. Jun 13, 00:10

I've not had any mac specific feedback before and haven't used X on a mac myself either. It sounds like the game is loading and running at least this relatively simple script though.

If there were a problem in one of the more complex scripts like Smart I wouldn't be able to repro it locally, though I could potentially debug via logfile tracing.

User avatar
TTD
Posts: 11165
Joined: Sun, 6. Jul 08, 10:29
x4

Post by TTD » Thu, 6. Jun 13, 00:30

Glad you got sorted H.
I thought I had tried it on TC,but so much has happened of late ,I was not sure..

@Shimrod.

This script with Cycrow's CP makes a great combination that has breathed new life into my X gaming.
Thanks.

Post Reply

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