[Discussion] Generic X3TC S&M questions III

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

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

Post by FriendlyFirePhoenix »

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 »

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: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

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

Post by X2-Illuminatus »

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 »

    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: 22437
    Joined: Sun, 14. Nov 04, 23:26
    x4

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

    Post by Cycrow »

    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 »

    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: 22437
    Joined: Sun, 14. Nov 04, 23:26
    x4

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

    Post by Cycrow »

    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 »

    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: 25130
    Joined: Sun, 2. Apr 06, 16:38
    x4

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

    Post by X2-Illuminatus »

    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: 660
    Joined: Sat, 3. Jan 09, 22:57
    x3tc

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

    Post by Einheit 101 »

    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
    4fAkt
    Posts: 5
    Joined: Sun, 24. May 20, 11:04
    x4

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

    Post by 4fAkt »

    Hello dear X-comunity!
    I recently picked up the X-Series again (X3TC 3.4) and have already lost myself to the modding aspect of the gameplay experience ;)

    Initially, I just wanted to enhance the appearance of the game's (already beautiful) planets a little bit. However, it quickly spiraled into a full-blown project, and now I’m looking at over 43,000 planet models - if I count all possible combinations of surface features and atmospheric properties.
    One solution that would reduce the number of models I need to generate is to separate the planet models into surface-, cloud layer-, and atmosphere-components, which can then be placed at the same position of a sector in any combination to form the desired planet. So, what I need to do is to edit the planets' .bod files and separate their parts accordingly.
    Currently, I’m limited to editing .bod files using Notepad++ or Python scripts to change the file names of existing textures.

    MY QUESTIONS:
    What other ways are there to access and edit .bod files?
    – 3ds Max is far too expensive, and Gmax has been wiped from existence.

    Alternatively: Does anyone know, what character set the .bod files make use of, so that I can edit them manually? I’ve tried a number of encodings, but most characters still cant be displayed properly. :(

    Thank you so much in advance!
    4fAkt
    Posts: 5
    Joined: Sun, 24. May 20, 11:04
    x4

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

    Post by 4fAkt »

    I was wrong about GMax. Though its developers do not provide any downloads, registration keys or other information on their once free software, solutions to the situation can be found on archive.org.

    I wonder why I didn't stumble upon this, when I looked into the matter a few months ago :gruebel:

    I still would like to know, which characterset one has to use, to properly open and display .bod files in a text editor. But that's rather out of personal interest.
    Otherwise consider my previous question as answered :)
    4fAkt
    Posts: 5
    Joined: Sun, 24. May 20, 11:04
    x4

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

    Post by 4fAkt »

    On my remaining question; it seems that when using the X3 Editor2s BOD-Compiler the resulting .bod file can be properly interpreted and displayed by a text editor :D
    But I asume, this is commonly known to the most modders/modelers.
    Thanks so far and until my innevitable next questions!
    Cycrow
    Moderator (Script&Mod)
    Moderator (Script&Mod)
    Posts: 22437
    Joined: Sun, 14. Nov 04, 23:26
    x4

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

    Post by Cycrow »

    for the bod files, there are 2 formats, bob and bod. The bob files are binary files and the bod files are text files. You can convert between the 2. Generally, the model itself should be in a bob file, and the scene in a bod.

    The text file should just be a standard UTF8 file

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