[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

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

Post by Shimrod »

Custom Start

Description

This script will pop a one time menu when starting a new game, with options to customize:
- Start sector
- Player ship and extra ships
- Station placement
- Universe exploration and satellites
- Race relations
- Money, salvage insurance, unfocused jumpdrive, player HQ, jump beacons

The menu can be skipped without applying any changes and it cannot be opened again within that game.

Note: Games will automatically be flagged *modified* by the presence of the init script. This is to allow the menu to be popped up when the script editor is not enabled.

[ external image ]

Rationale

Having played through many X games, I often prefer to start the game with a particular scenario in mind. Sometimes I simply want to avoid re-exploring the galaxy over again.

I find having the script editor enabled invariably spoils the game as temptation is always there to use it once its activated. I instead started creating custom setup scripts for my new game scenarios, which would run once at the start of a game.

The idea is that the setup script will perform one-time changes at game start without having to activate the script editor to do it manually. This way I can play through the game with script editor deactivated, without temptation being in my way.

I've taken this a step further and added a menu, so I can achieve the most common things I tend to want (particular ship, salvage insurance, exploration) without having to edit scripts before starting a new game.

Compatibility

Tested on AP/vanilla, AP/XRM, TC/XTC

Install

To install, copy the t\9051 file into the AP addon\t folder, while copying the scripts files into the addon\scripts folder. Then start a new game and the menu should pop up.

To uninstall, delete those files, in particular those which the game will automatically load (!init.glen.modified, setup.glen.start).

References
- Developed using Exscriptor
- Hosted by XDownloads

Resources

Text file: 9051-L044.xml


Edit [1st Dec 2015]: replaced outdated with working xdownloads link. X2-Illuminatus
Last edited by Shimrod on Wed, 8. Oct 14, 16:45, edited 27 times in total.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

1.4.0
- Made Custom Start compatible with Terran Conflict
- Add a toggle for whether to scan asteroids
- Improved logic for populating carriers. Observe max fighter size that can dock and add an M6 if possible. Set ship command Protect to the carrier.
- Add a jump beacon to spawned ships when the Beacon Jump script is detected
- Add replicators to spawned ships when the Replication script is detected
- Add text files for DE, PL, CS, IT, ES, FR, RU with English strings.
- Improve start sector selector temporary map reveal to account for sectors and objects already discovered.

1.3.2
- Fix a bug causing the menu not to appear at game start.

1.3.1
- Write a log file to support debugging reported menu no-shows: %USERPROFILE%\Documents\Egosoft\X3AP\log09051.txt.
- Replaced the original !init.glen.modified.xml with a new !init.glen.start.xml that X-Studio won't fail to load, and is therefore more likely to properly make the game modified so the script will load.
- Increased sanity check limit on polling for playership creation from 10 to 20 seconds. Still poll at 1 second intervals.

1.3.0
- Added starting sector selection.

1.2.0
- Added station placement
- Added ship equipment setting (minimal, standard, optimized)

1.1.0
- Add option for whether to fill spawned ship docking slots.
Last edited by Shimrod on Mon, 21. Apr 14, 22:41, edited 6 times in total.
karabAs
Posts: 98
Joined: Sun, 7. Dec 03, 01:58
x3tc

Post by karabAs »

Perfect! Thank you.
Balkor_Wolf
Posts: 17
Joined: Sun, 9. Jan 11, 18:12

Post by Balkor_Wolf »

I love you <3

Edit: Having a bit of a problem, I extracted the files into the appropiate folders but nothing worked, should I not extract them?

Edit 2: Fixed it now, just me being an idiot >.<
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Yes the zip file should be extracted and the files copied into these folders:

Steam\steamapps\common\x3 terran conflict\addon\scripts
Steam\steamapps\common\x3 terran conflict\addon\t

It can be confirmed in-game that the scripts are in the right place by enabling the script editor and paging through the list of scripts to verify that the setup.glen.start script is present. If its not in the list, the scripts were copied into the wrong folders.

If all the following are true:
a. Starting a new AP game
b. Don't see the Custom Start menu
c. In game script editor shows the scripts are there

Then this would suggest an error in the script's mechanism for detecting a new game start. Hopefully this will not be the case!
NSSA99
Posts: 19
Joined: Sat, 1. Dec 07, 12:55
x3tc

Great Job!!!

Post by NSSA99 »

Nice job on this script. This really saves a lot of time when setting up a new game. I often want to try out different scripts and mods and this will help alot.
Mark

Honesty, Integrity and sincerity. Once you can fake these you have it made.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Minor update to add the option of not filling the docking bay of spawned ships.
Dieu_Le_Fera
Posts: 22
Joined: Fri, 29. Jan 10, 13:18
x3tc

Post by Dieu_Le_Fera »

this is a very nice script... since I can't take my saved game from TC over to AP I can at least give myself the assets needed to remake my saved game without having to do it all over again... thank you.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Thanks.

I'm considering enhancing it at some stage for placing stations, as I'd rather like to start off with a business. The options have downsides though:
1. Place in TL cargos: You end up with lots of TL's.
2. Direct placement: Can't position&rotate them readily OOS, no complex connections, special player stations (EQ, SY, HQ) might not initialize unless properly ejected from TL.

I'll probably go with #2: temporarily reveal sector map to support placement, then hide all the sectors afterwards.
Dieu_Le_Fera
Posts: 22
Joined: Fri, 29. Jan 10, 13:18
x3tc

Post by Dieu_Le_Fera »

any chance you can have it so that we can edit what the ships are given. I don't mean add a cargo of Nividium or anything just be able to adjust what what is installed.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

It's not impossible, but coding menus is extremely tedious, and it'd take a pretty detailed tree of menus for configuring ship extensions and so on, for the playership and additional ships.

Would a global 'equip: nothing, default equipment, full monty' selection fit requirements?
Dieu_Le_Fera
Posts: 22
Joined: Fri, 29. Jan 10, 13:18
x3tc

Post by Dieu_Le_Fera »

i would like the all or nothing option.. because being given a ship with everything from the get go is just a little to much... especially if i can just adjust the credits accordingly to outfit the ships I would like/need.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

I'll plan on adding the following options, when I get a window to implement it (working on a p2p jumpdrive atm!)

Ship Equipment:

Nothing
- Only has SETA

Default
- Whatever the 'add default items to ship' script command adds.
- When I tested it on an empty XRM centaur, this added shields, random tunings, lasers, drones, and some equipment.

Full
- Uses my equipping library
Dieu_Le_Fera
Posts: 22
Joined: Fri, 29. Jan 10, 13:18
x3tc

Post by Dieu_Le_Fera »

perfect.
dougeye
Posts: 2409
Joined: Sat, 7. Mar 09, 18:29
x3tc

Post by dougeye »

when the loadouts are spawned is it not referenced to custom loadouts xrm created? i may have my terminology wrong but as i see it if you create a custom loadout and assign the ship type the correct loadout will it not just use the new load out?
I used to list PC parts here, but "the best" will suffice!
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

I'm unfamiliar with XRM custom loadouts and how they might be exposed through script APIs. I expect 'add default items to ship' might link to this, although it has randomness in what it produces.

When I spawn ships in Custom Start I use scripts to fully equip them based on my own algorithms. Adding lasers is the most interesting part: to support laser switching ideally every combination of lasers wants to be added, but if that won't fit into cargo a compromise is needed.
dougeye
Posts: 2409
Joined: Sat, 7. Mar 09, 18:29
x3tc

Post by dougeye »

shimrod i love every thing about the script apart from one thing which im not sure is in your control or not.

im trying to create a start as a yaki (xrm) were i start in a m3, i just want to adda couple of more m3's and 1 UT so i have a wing and a trader, now my complaint is that the ships get every single weapon / uprage they can possibly carry which tbh sucks a little when im trying to create a sort of poor mans yaki start as i want ships but not fully kitted out just the essentials. otherwise it means i can just go and sell off all the excess weapons and ive got enough to start an empire almost lol. Is there no way to add a menu like cyrows cheat script that lets you choose weapons and upgrades before selecting how many of that ship type i want to spawn?
I used to list PC parts here, but "the best" will suffice!
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

I'm planning on adding a setting for equip level of spawned ships (nothing, default equipment, optimized), per:
http://forum.egosoft.com/viewtopic.php? ... 42#3814742

I'm partway through adding the ability to place stations first, probable eta for the updates within a couple days.
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

My 2 day estimate proved a little over-cautious.

Code: Select all

1.2.0
- Added station placement
- Added ship equipment setting (minimal, standard, optimized)
Tonight I start anew as a teladi company-owner. Smart's enhancement list can wait :)
Shimrod
Posts: 907
Joined: Tue, 18. Feb 03, 01:43
x4

Post by Shimrod »

Uploaded 1.3 with ability to select starting sector. Useful if placing stations far away from the regular start location.
Post Reply

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