Is there a script to change station/complex suffix or announced name?

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
Raath
Posts: 1
Joined: Mon, 8. Oct 18, 09:29

Is there a script to change station/complex suffix or announced name?

Post by Raath » Mon, 8. Oct 18, 09:33

If I place multiple mines or complexes in a system they all get announced by the computer suffixed as Alpha. Is there an existing script/mod or method to change the suffix so I can have the computer announce Silicon mine Beta, Gamma etc?

Is it also possible to rename my complexes like the AI so where I'm only building missiles, rename it to the relevant category or item and have her say "Missile complex Alpha", "Energy Complex Beta"

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: Is there a script to change station/complex suffix or announced name?

Post by Joubarbe » Mon, 8. Oct 18, 13:26

Existing scripts, not that I'm aware of.

Otherwise, you have this command:

Code: Select all

set serial name of station to
Here is my own script that I use to automatically rename stations built by Mayhem:

Code: Select all


dim $allSCodes = [alpha (100)], [beta (101)], [chi (121)], [delta (103)], [epsilon (104)], [eta (106)], [gamma (102)], [iota (108)], [kappa (109)], [lambda (110)], [mu (111)], [nu (112)], [omega (123)], [omicron (114)], [phi (120)], [pi (115)], [psi (122)], [rho (116)], [sigma (117)], [tau (118)], [theta (107)], [upsilon (119)], [xi (113)], [zeta (105)]
$sector = [THIS]-> get sector
$thisType = [THIS]-> get subtype

$allStations = $sector-> get station array from sector
$allSerials = array alloc: size=0

for each $station in array $allStations using counter $index
$stationType = $station-> get subtype
if $stationType == $thisType AND $station != [THIS]
$stationSerial = $station-> get serial name of station
append $stationSerial to array $allSerials
end
end

for each $SCode in array $allSCodes using counter $index
for each $serial in array $allSerials
if $serial == $SCode
remove element from array $allSCodes at index $index
end
end
end

$thisName = $allSCodes[0]
[THIS]-> set serial name of station to $thisName

return 1
(f*ck indentation)

Post Reply

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