[Discussion] Generic X3TC S&M questions III

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
FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Re: [Discussion] Generic X3TC S&M questions III

Post by FriendlyFirePhoenix » Thu, 26. Jan 23, 03:47

I've been working on an AL plugin that colours the names of ships and stations according to race.

So for example Argon Freight Transporter becomes \033BArgon\033X Freight Transporter.

I've been using [SIGNAL_CHANGESECTOR] to fire a script as ships are spawned and applying a local variable so the name is only changed once.

Generally it works pretty well, but I've discovered that [SIGNAL_CHANGESECTOR] isn't fired when a ship is spawned through the "create ship" command with a station as the "addto" parameter. I need to account for this for mods which create ships this way such as Pirate Guild. I tried catching ships spawning in stations with [SIGNAL_DOCKED] but that doesn't fire either.

Is there any command or workaround I'm missing that could catch these ships as they're created? Or am I just going to have to check for them on a timer? I imagine I could catch them with [SIGNAL_REQUESTUNDOCK] so they at least get their name changed as they're leaving. It's not ideal but I'm not sure what else is available.

Any help much appreciated!
I made a couple of X3 mods | Colour By Race | True Relations

TresCom
Posts: 1
Joined: Sat, 4. Feb 23, 01:14

Recently Installed X3 collection from Steam.

Post by TresCom » Sat, 4. Feb 23, 01:35

Hello I have recently begun playing pc games after not playing really at all for about 14 years. Tried some new games, but have found my way back to X3 which I loved.

However I am not enjoying the grind to get back to where I want to be in gameplay.

Do the cheats package work for Steam games, and I am a bit rusty... And could use some help with them as well. (where does Steam even keep the game files?!?)

Any help or info would be greatly appreciated. Thanks in advance!

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24950
Joined: Sun, 2. Apr 06, 16:38
x4

Re: [Discussion] Generic X3TC S&M questions III

Post by X2-Illuminatus » Sat, 4. Feb 23, 10:41

Yes, the cheat package works on Steam games. The default location for games on Steam is C:\Program Files\Steam\steamapps\common. But you can also right-click on your game in your library, select "Properties" --> "Local Files" --> "Browse" to open the explorer path to the specific game.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Whisperer
Posts: 119
Joined: Sun, 14. Nov 10, 19:02
x3tc

Re: [Discussion] Generic X3TC S&M questions III

Post by Whisperer » Tue, 21. Mar 23, 13:13

    Good day everyone. After several years i started playing X3TC again and finished several plots (including the Goner’s). I now want to be able to script a ship that’s able to repair and board.

    I have managed to create a script that spawns a fully fitted Vidar with repair lasers in the sector that i’m in (with the help of Roguey’s scripting tutorial). How ever, i’m not able to create the marines that i want on my ship. I know i can select the option to add 5 marines from the ware option, but those are always all random and low level. I want the ship to have 5 high level marines.

    After a lot of reading i found out that i have to first create passengers on my ship, so i did. But now i see there are two ways to convert them in to marines, but both ways to convert them don’t seem to work. The two codes look like this:

    First code is this
    038 = $ship -> create passenger in ship: name=null race=null voice=null face=null
    039 $ship create marine from passenger: fighting=99 hacking=99 mechanical=99 engineering=99
    040 return null

    Second code is this
    038 = $ship -> create passenger in ship: name=null race=null voice=null face=null
    039 $ship -> train passenger to marine
    040 $ship -> set marine skill: fighting=99
    041 $ship -> set marine skill: hacking=99
    042 $ship -> set marine skill: engineering= 99
    043 $ship -> set marine skill: mechanical= 99
    044 return null

    In both cases i would assume the code spawns a passenger wich gets converted to a marine,… How ever, in both cases the passenger gets spawned in the ship, but despite the Vidar being able to hold 5 marines, the ship fails to convert them in to marines with a nearly max skill.

    What am i missing here that prevents the ship from spawning with a marine (and also do i have to code each marine sepperately)?

    (edit: unfortunatly i’m not able to figgure out all the code in the scripts and find my way to the workings of marines and training. This is my first time coding, and i’m realy not that computer savvy to go beyond anything but the most basic steps)

    Cycrow
    Moderator (Script&Mod)
    Moderator (Script&Mod)
    Posts: 22201
    Joined: Sun, 14. Nov 04, 23:26
    x4

    Re: [Discussion] Generic X3TC S&M questions III

    Post by Cycrow » Tue, 21. Mar 23, 15:26

    you are trying to convert the ship into a marine, you need to be converting the passenger. The passenger and ship are separate objects.

    use the return value from the create passenger routine instead

    Code: Select all

    $passenger = $ship -> create passenger in ship...
    $passenger -> create marine from passenger..
    
    
    $passenger -> train passenger to marine
    

    Whisperer
    Posts: 119
    Joined: Sun, 14. Nov 10, 19:02
    x3tc

    Re: [Discussion] Generic X3TC S&M questions III

    Post by Whisperer » Tue, 21. Mar 23, 19:00

    Alright, Cycrow. Thanks a ton, i’ll give this a try. Surprised to see you still here hanging on strong after all these years. Much apreciated!👍

    I’ll give it a try as soon as i get home.

    So if i get this right either of the two codes should work if i create the variable passenger and put this as the start of the code?

    Cycrow
    Moderator (Script&Mod)
    Moderator (Script&Mod)
    Posts: 22201
    Joined: Sun, 14. Nov 04, 23:26
    x4

    Re: [Discussion] Generic X3TC S&M questions III

    Post by Cycrow » Tue, 21. Mar 23, 20:03

    yes, either will work, the create marine command is basically the same as using the train as marine and the set marine skill commands, it just combines them together in a single command

    Whisperer
    Posts: 119
    Joined: Sun, 14. Nov 10, 19:02
    x3tc

    Re: [Discussion] Generic X3TC S&M questions III

    Post by Whisperer » Tue, 21. Mar 23, 21:20

    Well, you're awesome Cycrow, as always. First thing i did was fire up the pc and gave it a shot. Works like a charm! :D

    Got one question though,... Been reading up and down these forums and i can tell a lot of folk here are pretty savvy at the scripting and stuff. I'm not dreaming of ever being able to pull off what most of you here are doing,... but is there a comprehensive guide on this scripting and modding available somewhere? I'm very interested in learning a bit more of this stuff, but don't want to be bugging you all with even the most basic of questions. :oops:

    User avatar
    X2-Illuminatus
    Moderator (Deutsch)
    Moderator (Deutsch)
    Posts: 24950
    Joined: Sun, 2. Apr 06, 16:38
    x4

    Re: [Discussion] Generic X3TC S&M questions III

    Post by X2-Illuminatus » Wed, 22. Mar 23, 21:57

    There's the MSCI Handbook. While initially written for X2: The Threat, it explains the basics of MSCI scripting which also apply to the X3 games. There's also the MSCI Reference Forum, where various commands are explained. For other guides on scripting and modding, please see the tutorials and resources overview.
    Last edited by N8M4R3 on Fri, 24. Mar 23, 14:16, edited 1 time in total.
    Reason: broken link fixed
    Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

    Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

    Neuauflage der fünf X-Romane als Taschenbuch

    The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

    Einheit 101
    Posts: 643
    Joined: Sat, 3. Jan 09, 22:57
    x3tc

    Re: [Discussion] Generic X3TC S&M questions III

    Post by Einheit 101 » Mon, 1. Jan 24, 12:26

    Hello! I dont know if this has been asked but is there a way to remove the particle effect when the camera is moving? These little dirt particles that move on screen? Maybe i can simply replace the texture with a transparent one, but what texture is used for this effect?

    €DIT: I found it. For anyone wondering, just replace stardust_diff.dds with a fully transparent uncompressed ARGB8 dds file and the flying dust is gone!

    Regards, Einheit-101

    Post Reply

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