[Discussion] Generic X3TC S&M questions II
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 58
- Joined: Tue, 4. May 10, 23:07
Yea, quite a bit less stuttery after dropping to medium shaders. Apparently X3 uses over 500 megs of VRAM even without AA... but it seems it only started recently. My current pet theory is that it started with a combination of Improved Boarding's added marine features or something similar, and IR, as it seems I got a sudden spike in overall lagginess when I installed IB in my last game (before switching mods to SRM). In other words, it may be my cards memory, but this wasn't ahppening before, even when looking on similarly massive patrol forces (multiple M1/M2/M7)
Edit: Other info - global scripts was showing multiple copies of Sorenson's EC eliminator, but that might be normal. There were a couple other I can't recall, and am at school on laptop, so I can't check till I get home.
Edit: More question: I know you can't disable script editor, but what about additional debugging information? I would prefer to not see destination of hostile enemies when I look at their info for example...
EDIT Nevermind all that hooplah about Tships, found it out, to the haskell machine!
Edit: Other info - global scripts was showing multiple copies of Sorenson's EC eliminator, but that might be normal. There were a couple other I can't recall, and am at school on laptop, so I can't check till I get home.
Edit: More question: I know you can't disable script editor, but what about additional debugging information? I would prefer to not see destination of hostile enemies when I look at their info for example...
EDIT Nevermind all that hooplah about Tships, found it out, to the haskell machine!
-
- Posts: 9378
- Joined: Mon, 29. Dec 08, 20:58
I've forgotten this and it's embarassing...
What's the easiest way to get a simple player boolean input...?
Do you accept this? Yes/No
And then run 2 different things obviously.
I've forgotten whether you need to use menus or not.
What's the easiest way to get a simple player boolean input...?
Do you accept this? Yes/No
And then run 2 different things obviously.
I've forgotten whether you need to use menus or not.

______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
I dont know about bool, but you can try
<RetVar/IF> <RefObj> -> get user input without sector: type=<Script Reference Type>, title=<Var/String>
<RetVar/IF> <RefObj> -> get user input type=<Script Reference Type>, title=<Var/String>, sector=<Var/Sector>
(I have no idea what the sector does thou....)
(I use it for int's)
But personally I prefer a menu (it is more coloUrful-er)
<RetVar/IF> <RefObj> -> get user input without sector: type=<Script Reference Type>, title=<Var/String>
<RetVar/IF> <RefObj> -> get user input type=<Script Reference Type>, title=<Var/String>, sector=<Var/Sector>
(I have no idea what the sector does thou....)
(I use it for int's)
But personally I prefer a menu (it is more coloUrful-er)
-
- Posts: 9378
- Joined: Mon, 29. Dec 08, 20:58
I used the first with a boolean in it... but it needs a reference object. Not usre what the object does with the script and I don't need one so I did my usual job of sticking THIS in there... 
It's from a menu anyway, I just wanted a popup instead of part of the menu. Works anyway.

It's from a menu anyway, I just wanted a popup instead of part of the menu. Works anyway.
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
I'm Jon. I'm mostly not around any more. If you want to talk, please message me! It's cool.
______
-
- Posts: 58
- Joined: Tue, 4. May 10, 23:07
-
- Posts: 35
- Joined: Mon, 22. Mar 10, 21:08
I am currently reassigning the weapon types that the ships can use in tships.txt.
Now I wonder whether the AI will be able to use the ships in that new configuration (e.g. a pirate M4 with an Ion Disruptor) or will I have to touch another resource (maybe jobs.txt?) to have the game spawn the new conifgs?! That is in a complete restart, no need to be save compatible.
Worst case I would get a ships spawned with weapons incompatible with its weapon slots
Now I wonder whether the AI will be able to use the ships in that new configuration (e.g. a pirate M4 with an Ion Disruptor) or will I have to touch another resource (maybe jobs.txt?) to have the game spawn the new conifgs?! That is in a complete restart, no need to be save compatible.
Worst case I would get a ships spawned with weapons incompatible with its weapon slots

-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
In the Ship Rebalance Mod, paulwheeler was messing around with new default loadouts for ships.
Try there.
Try there.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 35
- Joined: Mon, 22. Mar 10, 21:08
But there has been done so much more in that mod that it will be very hard to re-engineer which changes have been done for what purpose - especially for a beginner.
And it would be nice to have the answer in the forums
There is the Job scripts topic referenced in the Tutorials and Resources sticky, but it leaves me even more confused
In fact, I think this is the reason for my confusion, as it says there is an "...'add default equipment' script command, but it's hardcoded...". But it seems that exactly that did not work in that case and a change to "jobs.txt" was the solution.
Now I wonder whether all the "standard" jobs like police, recon, military,... will end up in some odd configurations as due to my changes some weapons are no longer supported by the spawned ships...
Edit:
Thanks to paulwheeler there is an answer to the question
Q&A in the Ship Rebalance Mod
And it would be nice to have the answer in the forums

There is the Job scripts topic referenced in the Tutorials and Resources sticky, but it leaves me even more confused

In fact, I think this is the reason for my confusion, as it says there is an "...'add default equipment' script command, but it's hardcoded...". But it seems that exactly that did not work in that case and a change to "jobs.txt" was the solution.
Now I wonder whether all the "standard" jobs like police, recon, military,... will end up in some odd configurations as due to my changes some weapons are no longer supported by the spawned ships...
Edit:


Q&A in the Ship Rebalance Mod
paulwheeler wrote:WhoCares01 wrote:A quick question if I wanted to make a little change there myself.
If I reassign the weapon types that the ships can use in tships.txt, will the AI be able to use the ships in that new configuration as well or will I have to touch another resource (jobs.txt?) to have the game spawn the new conifgs?!
Just as an example, if I gave a Boron M5 just Ion Disruptors (which it doesn't have and don't fit in vanilla, too big & too much energy) and removed the standard weapons, would I end up with Boron M5 patrols with some standard weapons in the trunk but no weapons mounted to the gun pods?!
Weapons are set by both TShips and TCockpits. Generally TShips sets whats in the main guns and TCockpits sets whats in the turrets (for most ships...)
AI ships will only spawn what they can mount. So if you took away all weapons except for the IonD they would all spawn with IonDs. However, if the weapon is M cargo size and the shp is only S it won't spawn them.
Jobs does not control which weapons are spawned. It is hard coded into the game and depends on ship/weapon compatibility, order in TLasers, ware size and some other factors.
Last edited by WhoCares01 on Sat, 13. Nov 10, 17:12, edited 1 time in total.
-
- Posts: 70
- Joined: Thu, 20. May 10, 09:12
Hey
I tried installing Ship rebalance mod + CMOD4 and all their extra's today, started 10 hours ago.
I want to be able to play my savegame from before i tried installing those mods, at this time im unable.
I tried recreating the installation for the savegame to be compatible with it, but it seems no matter what i try, my game will load, then 10-60seconds later freeze with an audioloop or crash during loading. I think the crash is because its a slightly diffirent save in a busy system with a big complex, the audioloop is in the far bottom right unknown sector so thats really empty.
During the recreating of the installation i started it up to check if it worked, often i'd hear "uninstalled uninst uninstauninstalled" but now i don't so i figure it should work now, but it doesn't...
[Edit: also to mention, i installed all but 2 scripts/mods again, just like i had when i saved the game in question, (wing hotkey/hotkey manager still to do) all those scripts seemed like they worked together flawlessly.
EndEdit]
Any advice on how i can salvage my savegame? Any topic/guide out there on it? (searching yields me with pretty much every mod topic:p)
This is just plain weird, installing 2 hotkey scripts made the diffirence aparently... it's working...funky[/b]
I tried installing Ship rebalance mod + CMOD4 and all their extra's today, started 10 hours ago.
I want to be able to play my savegame from before i tried installing those mods, at this time im unable.
I tried recreating the installation for the savegame to be compatible with it, but it seems no matter what i try, my game will load, then 10-60seconds later freeze with an audioloop or crash during loading. I think the crash is because its a slightly diffirent save in a busy system with a big complex, the audioloop is in the far bottom right unknown sector so thats really empty.
During the recreating of the installation i started it up to check if it worked, often i'd hear "uninstalled uninst uninstauninstalled" but now i don't so i figure it should work now, but it doesn't...
[Edit: also to mention, i installed all but 2 scripts/mods again, just like i had when i saved the game in question, (wing hotkey/hotkey manager still to do) all those scripts seemed like they worked together flawlessly.
EndEdit]
Any advice on how i can salvage my savegame? Any topic/guide out there on it? (searching yields me with pretty much every mod topic:p)
This is just plain weird, installing 2 hotkey scripts made the diffirence aparently... it's working...funky[/b]
-
- Posts: 9
- Joined: Mon, 7. Jul 08, 19:42
hotkeys and commands
Hi,
I started to make a litle script. It works well if I run it from the current ship through the command panel, but I have a problems if I try to reach it in a different way. If I set a hotkey in the setup script, the [THIS] variable is empty. So how can I give [THIS] or my currently driven ship to the main script through a hotkey call? I tested writing out the serialised object to a message, and I only got a #0. I read about that [THIS] is not present in global scripts, but if I sit in a ship and I push a hotkey, this script runs locally on this ship.
Thanks!
*EDIT*
Its solved, I wrote a little if condition:
It gives now correct values if I run the command from the ship via hotkay or command, and from an other ship too.
I started to make a litle script. It works well if I run it from the current ship through the command panel, but I have a problems if I try to reach it in a different way. If I set a hotkey in the setup script, the [THIS] variable is empty. So how can I give [THIS] or my currently driven ship to the main script through a hotkey call? I tested writing out the serialised object to a message, and I only got a #0. I read about that [THIS] is not present in global scripts, but if I sit in a ship and I push a hotkey, this script runs locally on this ship.
Thanks!
*EDIT*
Its solved, I wrote a little if condition:
Code: Select all
if [THIS]
$ship = [THIS]
else
$ship = [PLAYERSHIP]
end
Last edited by cynosure on Sun, 14. Nov 10, 00:00, edited 1 time in total.
-
- Posts: 266
- Joined: Sun, 5. Oct 08, 10:06
-
- Posts: 9
- Joined: Mon, 7. Jul 08, 19:42
Can I put this command to a "thread" or something similar to the background?
This command never exits, so it hangs up my script. I want to follow my target while the script finishes its job, but it needs the target to be in 2Km.
The AP starts well, and my ship follows my target, but nothing happens if I stop AP manually too...
The whole code:
Code: Select all
START $ship->command {COMMAND_FOLLOW} : arg1=$target, arg2=null, arg3=null, arg4=null
The AP starts well, and my ship follows my target, but nothing happens if I stop AP manually too...
The whole code:
Code: Select all
if $range > $tbrange
$text = sprintf: pageid=$page.id textid=201, null, null, null, null, null
display subtitle text: text=$text duration=2500 ms
START $ship->command {COMMAND_FOLLOW} : arg1=$target, arg2=null, arg3=null, arg4=null
while 1
$range = get distance between $ship and $target
if $range < $tbrange
break
end
= wait 1000 ms
end
end
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Re: hotkeys and commands
You should usecynosure wrote:It gives now correct values if I run the command from the ship via hotkay or command, and from an other ship too.Code: Select all
if [THIS] $ship = [THIS] else $ship = [PLAYERSHIP] end
if [THIS] is object class (ship)
and
if [THIS] exist
instead because hotkey scripts can sometimes get gibberish values that are "not nothing" but are not existing objects.
Movement instructions will only work on task 0 of a ship.cynosure wrote:Can I put this command to a "thread" or something similar to the background?
START $ship->command {COMMAND_FOLLOW} : arg1=$target, arg2=null, arg3=null, arg4=null
You can run the "break condition" on another task, though.
Like start the watcher script on task 3456456, then execute the (unstoppable) follow command.
When the break condition is fulfilled, the watcher script interrupts task 0 with a priority 1000 script that does nothing but
[THIS] -> follow [THIS] with timeout 1ms.
That shuts down follow mode.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 9
- Joined: Mon, 7. Jul 08, 19:42
Well, it works well with this code. The problem was only that the AP closes up to the target ship for 1.1Km from the ship's hull.
but the script checks range beetween ship cores. So if I check a 2KM range for a weapon, the script never leaves from the loop. If I manually modify the checking range to 2.5-3Km, the script works nice. In an orca the difference is about 1-1.2Km from the center to its nose while checking distance on the HUD and by a script.
*EDIT*
Can I set the FOLLOW precision somehow to something like 500m?

*EDIT*
Can I set the FOLLOW precision somehow to something like 500m?
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
You can use the get size library script I wrote. (that works OOS which the regular script instruction does not)
Add the "size" of both ships to the distance and it works with every ship.
Add the "size" of both ships to the distance and it works with every ship.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 2035
- Joined: Wed, 18. Aug 10, 14:28
-
- Posts: 9
- Joined: Mon, 7. Jul 08, 19:42
Re: hotkeys and commands
every ship (from M5 to M1) is an instance of Class named {Ship 2004}?Gazz wrote:You should usecynosure wrote:It gives now correct values if I run the command from the ship via hotkay or command, and from an other ship too.Code: Select all
if [THIS] $ship = [THIS] else $ship = [PLAYERSHIP] end
if [THIS] is object class (ship)
and
if [THIS] exist
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Check out the appendix in the MSCI.
The table misses some new ones like TM but those are obvious so...
The table misses some new ones like TM but those are obvious so...
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 9
- Joined: Mon, 7. Jul 08, 19:42
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Scripts can neither detect nor use X3's tractor beam feature.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.