[Discussion] Generic X3TC S&M questions I

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
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster »

If I have a ship set to "Notify me when order complete", how do I end my script to make sure the ship does this? If I end a script with "set command -> COMMAND_NONE and return null, it ends, but I never get notified that the ship has completed the task. Thanks!

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

Post by Cycrow »

it only works if your script is set as a command. and it finishes properly.

setting the command to none before finishing will prevent it from happening

when the command script finishes it will set to none anyways
User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster »

Cycrow wrote:it only works if your script is set as a command. and it finishes properly.

setting the command to none before finishing will prevent it from happening

when the command script finishes it will set to none anyways
Well, I'm having no luck. It is a command, and I'm using as the first line of the script: $ship -> set command (MY_COMMAND), which works fine. The end of the script is "return null". When the ship finishes the action sucessfully, the ship info reads "current action: none, Command: none", but it still doesn't notify me that the job is done. Any suggestions? (that's without using "set command COMMAND_NONE")

-Grax

Edit: Never mind, I got it. Added:

Code: Select all

002   $cmd = [THIS] -> get command
003   [THIS] -> set command: COMMAND_NONE
004 @ = wait 1 ms
005   [THIS] -> set command: $cmd
to the preload script. Did the trick.
tickerprice2684
Posts: 25
Joined: Sun, 27. Apr 08, 12:08
x3tc

Post by tickerprice2684 »

Ive got the plugin manager, installed the cheat package off Cycrow and changed my name to 'Thereshallbewings' but still no cheat menu appearing even if i go to controls there is no cheat to assign a key too nothing. Im playing in english.
Pplease help
Prepare to be spontaneous..!
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22414
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

did you save and reload the game after changing your name ?

if you did and its not working, the first thing to check is if the scripts are in the right place.

open up the script editor and goto the scripts list, scroll down to the bottom and you should see some files named, z.cheat.cycrow.
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

Is it possible to copy a stations products/resources cycle? I am trying to add some Terran missile fabs to my game since there are none left, but every time I try to connect a terran station to a hub the game crashes. So, I thought I would try using another races factory and just have it make the terran missiles. Im not sure if the cycle time for terran facts are the same since they go energy->C-rations + ore ->missile instead of the usual energy ->food1 ->food2 + ore-> missile of everyone else.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22414
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

cycle time and amount of resources needed are dynamically generated based on what product and resources have been added to the station
morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth »

thx
tc3
Posts: 45
Joined: Sun, 30. Jul 06, 13:16
x3tc

Post by tc3 »

i was trying to add more guns to the front turret of my cutlass, which only has 4 by default. I managed to edit the tships file, adding in an extra 4 guns, and the game, when booted, sees the extra 4, and i can load 8 guns in the front bay in the weapons config. However, in practice, only 4 of the visible 8 actually fire. If i deselect the first 4, the later 4 dont fire at all. Is it a ship model issue, and i actually cant give the cutlass 8 guns, ala the thor or something im missing? Sorry if this has been explained elsewhere, i couldnt see anything. Thx in advance:)
User avatar
s9ilent
Posts: 2033
Joined: Wed, 29. Jun 05, 01:45
x4

Post by s9ilent »

Quick question (I'm not in reach of my X3 machine.. again)

Get True/total/(free) amount of ware in cargo bay

Does this return 0, or null when there is nothing (or no space)?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22414
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

tc3 wrote:i was trying to add more guns to the front turret of my cutlass, which only has 4 by default. I managed to edit the tships file, adding in an extra 4 guns, and the game, when booted, sees the extra 4, and i can load 8 guns in the front bay in the weapons config. However, in practice, only 4 of the visible 8 actually fire. If i deselect the first 4, the later 4 dont fire at all. Is it a ship model issue, and i actually cant give the cutlass 8 guns, ala the thor or something im missing? Sorry if this has been explained elsewhere, i couldnt see anything. Thx in advance:)
there not visable because you havn't added any more gun points. You cant do that in TShips alone.

you have to edit the models scene file to add new gun positions. Then in TShips assign the new guns to the model positions.

what i assume you have done, is simply doubled up the current weapons, so each point has 2 weapons instead. So you still have the same for gun positions
Thygrrr
Posts: 58
Joined: Sat, 25. Oct 08, 11:55
x3tc

Post by Thygrrr »

I'd like to ask a few beginner questions, if I may:

1. I'm trying to add products to a station I created, but somehow the production prices seem very random. Is there a way to accurately set the products per cycle, cycle time, primary and secondary resources used for the product? Is it possible to set those for each product independently?

There ARE prebuilt computer-owned complexes, such as the Medium Shield Production Complexes ... so somehow, I think I'm just looking in the wrong direction [that is, in General Trade Commands -> for Stations].


2. How do I un-link and re-link a complex? I can easily move its sub-factories around, but the tubing remains, so I'm trying to re-link the complex.

3. Is there a way to make an object (e.g. a station) invisible and no-clip, other than moving it far, far away?

4. Is there a reliable way to calculate a simple bounding box for a station? "get size" returns a cryptic, unidimensional value.

5. How do I get my program to stop asking me for a "script input", I assume that's the context used to populate [THIS] and [SECTOR], etc.
X³ - Terran Conflict, Steam Version
Mein DXDIAG dump (clicky)
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22414
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

Thygrrr wrote:I'd like to ask a few beginner questions, if I may:

1. I'm trying to add products to a station I created, but somehow the production prices seem very random. Is there a way to accurately set the products per cycle, cycle time, primary and secondary resources used for the product? Is it possible to set those for each product independently?

There ARE prebuilt computer-owned complexes, such as the Medium Shield Production Complexes ... so somehow, I think I'm just looking in the wrong direction [that is, in General Trade Commands -> for Stations].


2. How do I un-link and re-link a complex? I can easily move its sub-factories around, but the tubing remains, so I'm trying to re-link the complex.

3. Is there a way to make an object (e.g. a station) invisible and no-clip, other than moving it far, far away?

4. Is there a reliable way to calculate a simple bounding box for a station? "get size" returns a cryptic, unidimensional value.

5. How do I get my program to stop asking me for a "script input", I assume that's the context used to populate [THIS] and [SECTOR], etc.
1. The product cycle is created based on the relvel of the product/resources added. You will need to balance the resources to get the correct product cycle. But products will always produce at the same level

Also, the computer-owner complexes, are not real complexes, they are jsut factories that have multiple products. and dont work in the same way. They only produce one product at a time, not all of them similtaneously like player complexes do.

2. You cant

3. you cant make it invisible, but u can disabled collosions on the object, My cheat scripts can do that

4. get size is the radius of the bounding sphere

5. not sure what u mean by this, how are you running the script, and how do u intended it should work ?
User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster »

Cycrow wrote:
Thygrrr wrote:2. How do I un-link and re-link a complex? I can easily move its sub-factories around, but the tubing remains, so I'm trying to re-link the complex.
2. You cant
Sure you can... just destroy the complex hub and all your factories are now unlinked. Of course, you need to buy more Kits to reconnect.

-Grax
Thygrrr
Posts: 58
Joined: Sat, 25. Oct 08, 11:55
x3tc

Post by Thygrrr »

Thank you very much for the helpful replies! :)
Cycrow wrote: 4. get size is the radius of the bounding sphere
Gah, I'm an idiot. Somehow I thought it was the Sphere's diameter. Procedurally generated Complex Rings, here I come! :D
Cycrow wrote: 5. not sure what u mean by this, how are you running the script, and how do u intended it should work ?
I press "r" in the script list. A "script input" window pops up. Then a script "summary" type window pops up, and if only I press enter on that, the actual script (with all its own dialogs) runs.

I intend it to work by running from the script list, for now.

Graxster wrote: Sure you can... just destroy the complex hub and all your factories are now unlinked. Of course, you need to buy more Kits to reconnect.
Thanks, I shall try this. I just wonder whether the complex placement/connection dialog pops up when I place the complex kit using a script... The tubes strangely have a massive performance hit for me.
X³ - Terran Conflict, Steam Version
Mein DXDIAG dump (clicky)
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22414
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

well, generally you dont run stuff from the script editor unless your testing.

but doing so, will always ask you what object to run it on, theres no way to stop that

if you choose null, the script will be a global script, otherwise it'll run on the object that you select
Thygrrr
Posts: 58
Joined: Sat, 25. Oct 08, 11:55
x3tc

Post by Thygrrr »

Cycrow wrote:well, generally you dont run stuff from the script editor unless your testing.

but doing so, will always ask you what object to run it on, theres no way to stop that

if you choose null, the script will be a global script, otherwise it'll run on the object that you select
I figured as much... thanks for clarifying. :)

Well... X³TC's interface is so amazingly convoluted, I see hardly any difference between

Code: Select all

Z-C-F12-ENTER-<cursor down times X>-R-ENTER-ENTER
and

Code: Select all

Z-C-<cursor down times X>-ENTER-<cursor down times X>-ENTER
... especially since binding a hotkey for my script is not a sensible option.
X³ - Terran Conflict, Steam Version
Mein DXDIAG dump (clicky)
User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

Post by Graxster »

Thygrrr wrote:The tubes strangely have a massive performance hit for me.
Not so strange... it's common. I personally use the "invisible tubes" mod from X3R in X3TC. Also modified it to make all the "billboard" signs vanish. It not only makes them invisible, you can fly right through where they are and not collide with anything.

-Grax
alex2069
Posts: 205
Joined: Thu, 22. Dec 05, 21:19
x3tc

Scripting interface questions (comment line, etc)

Post by alex2069 »

In X3R, I swear I was able to comment/toggle a single line with a key press/combination... Or am I insane?
What is the key/combination?

Also, other than single ctrl+x/c/v, is there a way to cut/copy/paste for MULTIPLE lines? I seem to be remembering that there was a way, but I think that I'm thinking of another program/interface.
One at a time can be rather tedious.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

',' or '.', iirc - it's in the script editor help, anyway.

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