[SCRIPT] x0ne Turret Control System (TCS) 1.02 [UPDATED 31/12/2010]

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

G.Org
Posts: 533
Joined: Tue, 31. Oct 06, 19:04
x4

Post by G.Org » Tue, 9. Oct 07, 05:55

thx a lot. renaming files helped :D
"Fairy tales are more than true — not because they tell us dragons exist, but because they tell us dragons can be beaten."
- G. K. Chesterton -

Kurt Shur'Tugal
Posts: 489
Joined: Sat, 25. Feb 06, 05:23
x3

Post by Kurt Shur'Tugal » Sat, 13. Oct 07, 07:24

when will the 2.0 update be rdy?

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Sat, 13. Oct 07, 12:21

Kurt Shur'Tugal wrote:when will the 2.0 update be rdy?
It's mostly done, unfortunately RL isn't giving me much time to finish it right now. It's a big update - almost like writing everything from the ground up again, so there's also a lot of testing and documentation to get through too.

Ask me again in a month ;)

User avatar
surferx
Posts: 1180
Joined: Wed, 6. Nov 02, 20:31
x4

Post by surferx » Sat, 10. Nov 07, 03:09

Hi, xOne, I was transferring ecells from an M1 to my M2 and the M1 went out of transporter range. When I got back in range the transporter screen popped back up and I started transferring again. However the highlighted line had moved to the top of the freight list and now TCS was highlighted and I was transferring it instead of ecells. When I realized this I saw I now had 1499 TCS on the M1 and 1 TCS on my M2. Not sure if this is TCS mod or a glitch in the transporter.
I'm going to try to reload and recreate it.
If you want to go fast, go alone.
If you want to go far, go together.

Operating System:
Windows 11 Pro 64-bit CPU: 13th Gen Intel Core i9-13900KF RAM: 32606 MBytes MBO: Gigabyte Z790 UD AC (U3E1) GPU: ZOTAC GEFORCE RTX 4080 Trinity OC NVIDIA 16 GB GDDR6 SSD: AJP600M2TB 1907 GB

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Sat, 10. Nov 07, 11:03

surferx wrote:Hi, xOne, I was transferring ecells from an M1 to my M2 and the M1 went out of transporter range. When I got back in range the transporter screen popped back up and I started transferring again. However the highlighted line had moved to the top of the freight list and now TCS was highlighted and I was transferring it instead of ecells. When I realized this I saw I now had 1499 TCS on the M1 and 1 TCS on my M2. Not sure if this is TCS mod or a glitch in the transporter.
I'm going to try to reload and recreate it.
Most definitely the transporter (or perhaps the game engine/SE bug?), there's no way my scripts could have interferred with another script like that.

1499 TCS Interfaces huh? Dude, sell them! :D

The_Tigers_Eye
Posts: 1155
Joined: Fri, 6. Feb 04, 12:09
x3tc

Post by The_Tigers_Eye » Sat, 10. Nov 07, 13:18

:o It's almost a month..is v2/0 ready yet? :P

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Sun, 11. Nov 07, 01:52

The_Tigers_Eye wrote::o It's almost a month..is v2/0 ready yet? :P
Heh, nah sorry - there's still work to do but I'm pushing hard for Christmas. I've got way more free time now than the past 3/4 months and have done nothing but scripting today - first time in ages!

That reminds me, really must do some washing and tidy the house tomorrow... :roll:

User avatar
surferx
Posts: 1180
Joined: Wed, 6. Nov 02, 20:31
x4

Post by surferx » Sun, 11. Nov 07, 05:59

x0ne wrote:
surferx wrote:Hi, xOne, I was transferring ecells from an M1 to my M2 and the M1 went out of transporter range. When I got back in range the transporter screen popped back up and I started transferring again. However the highlighted line had moved to the top of the freight list and now TCS was highlighted and I was transferring it instead of ecells. When I realized this I saw I now had 1499 TCS on the M1 and 1 TCS on my M2. Not sure if this is TCS mod or a glitch in the transporter.
I'm going to try to reload and recreate it.
Most definitely the transporter (or perhaps the game engine/SE bug?), there's no way my scripts could have interferred with another script like that.

1499 TCS Interfaces huh? Dude, sell them! :D
Hey xOne, that would be a load of creditsssss, but no way. :nö: Remember I didn't like scripting in credits to buy TCS? Selling those would be sort of related. Anyhow, I didn't think about saving my game and went into a Xenon Core sector and got whacked. :skull: Good bye to the 1499 but I still have my single on my M2 so that's all I need right? :)
I haven't been able to duplicate this bug, so oh well. Prob never happen again.
Have a good one dude. :D
If you want to go fast, go alone.
If you want to go far, go together.

Operating System:
Windows 11 Pro 64-bit CPU: 13th Gen Intel Core i9-13900KF RAM: 32606 MBytes MBO: Gigabyte Z790 UD AC (U3E1) GPU: ZOTAC GEFORCE RTX 4080 Trinity OC NVIDIA 16 GB GDDR6 SSD: AJP600M2TB 1907 GB

ZX9000
Posts: 113
Joined: Wed, 19. Sep 07, 22:15
x3

Post by ZX9000 » Mon, 19. Nov 07, 20:45

I have the same/similar problem as others reported with capped ships. more precisely, an OTAS Boreas I capped with the HCF. I'm using XTM, obviously. It had some PPC's onbaord and I complimented it to full (12 A's and 12 B's, enough to fill every slot with best PPC), but it refuses to use them even when it's just me and a K gliding slowly towards eachother. And from what I gathered over the last pages, that is due to some weird bug regarding weapons onboard at capture and that no amount of tinkering and moving stuff about will remedy it, short of destroying the ship and cheating in a new one. Which is a bummer for us that frown upon that sort of thing, even for the best of intentions :)

However, it doesn't seem to have any issue using Flaks, even though I'm as certain as you can be from memory that there were some of those onboard when I captured it as well, both A's and B's (I even killed the aforementioned K with flaks). I do observe that it seems to shift the flaks about quite a bit even when it's the only weapon it uses anyway, me having just flaks and PPC's onboard, but I figure that's just how the script behaves, and it does seem to bring the shootin' to where it's needed regardless.

So a great script, and while I won't nag you for the update, I do wonder if there is a chance the capping-issue can be resolved, if and when? I run a personal rule of not buying ships if I can steal them, so this bug is one that will haunt me for sure :wink:

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Mon, 19. Nov 07, 21:20

ZX9000 wrote:So a great script, and while I won't nag you for the update, I do wonder if there is a chance the capping-issue can be resolved, if and when? I run a personal rule of not buying ships if I can steal them, so this bug is one that will haunt me for sure :wink:
Thanks ZX9000 and sorry about the cargo issue, but like you said it's the game causing certain SE commands to act up - I just wish I'd known about it sooner.

It is avoidable though and good news, I've already fixed it for the next version. Took a while to sort, but it was code I was going to write for another feature anyway.

...as for when... when it's ready? :)

ZX9000
Posts: 113
Joined: Wed, 19. Sep 07, 22:15
x3

Post by ZX9000 » Mon, 19. Nov 07, 22:25

When it's ready is all that can be expected, it is afterall your spare time and we're lucky you have the skills and time to work on this script.

Great that it is avoidable, and that you have plans for it. Keep up the good work :thumb_up:

Zsolo007
Posts: 7
Joined: Sun, 11. Nov 07, 19:22
x3ap

Post by Zsolo007 » Tue, 27. Nov 07, 15:32

HI!

I have a big problem with your script (which is a very good one by the way). Every time i load a game it uninstalls then installs itself again, and because of this it just disappears from my ships. To put it simply: i buy your script at an EQD save, exit, reload and the script is no longer present on my ship.

Is there a way this can be solved, have you met with this "bug" before?

I have 2.0.02 + XTM 0.7.3 + and a couple of other scripts.

Thank you!

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Tue, 27. Nov 07, 15:49

Zsolo007 wrote:HI!

I have a big problem with your script (which is a very good one by the way). Every time i load a game it uninstalls then installs itself again, and because of this it just disappears from my ships. To put it simply: i buy your script at an EQD save, exit, reload and the script is no longer present on my ship.

Is there a way this can be solved, have you met with this "bug" before?

I have 2.0.02 + XTM 0.7.3 + and a couple of other scripts.

Thank you!
Sounds like the uninstall files are in your scripts folder at the same time as the rest of the plugin. Search your scripts folder for any of the following files and delete them:

setup.x0ne.TCS.uninstall.xml
x0ne.lib.null.uninstall.xml
x0ne.lib.ware.purge.xml
x0ne.TCS.func.erase.xml

Good luck, and thanks!

MJALowe
Posts: 461
Joined: Fri, 5. Jan 07, 06:27
x3

Post by MJALowe » Sun, 30. Dec 07, 10:11

didn't know if this was suggested for version 2 or not...but could you add a command that can be run on the player ship that will turn this off/on for all other ships that dont have a leave me on flag set, that way i could install this on darn near every ship and if i call in backup i can turn it off for everyone but me and my designated "turret" leaders

if turning this off is as simple as removing the ware i suppose i could right the script myself - but i wanted to make sure the idea was out there

also would be nice to have a toggle for main weapon switching - so this plugin could also handle what the appolyon arms laser switcher does *grin*, if not ill have to get that script too - that one specifically doesnt work on turrets or with

Code: Select all

 Gamma and Beta PPC
- All PSG types
- Ion Disruptors
- Custom (new) weapons 
edit:
a prioritize my target option (hotkey *grin*) would be good too, i just noticed a "certain" other script with a similar abreviation had that option *grin*

edit2: id also like to confirm that fcs mk3 and giaus dont interfer with this script - if some one knows id be happy to hear from them, i dont think it interfers but i haven't read all the script code on them or this

edit3: np, i know how RL can get ya...its been almost a year since i released IFTSOS and i still haven't gotten around to releasing any updates for it - mainly cause it works as is and any updates would be mostly cosmetic
Last edited by MJALowe on Thu, 3. Jan 08, 00:48, edited 1 time in total.

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Wed, 2. Jan 08, 20:49

Sorry mate but RL has me totally pwned atm - promise to get you a proper reply when I can...

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Mon, 7. Jan 08, 21:39

MJALowe wrote:didn't know if this was suggested for version 2 or not...but could you add a command that can be run on the player ship that will turn this off/on for all other ships that dont have a leave me on flag set, that way i could install this on darn near every ship and if i call in backup i can turn it off for everyone but me and my designated "turret" leaders

if turning this off is as simple as removing the ware i suppose i could right the script myself - but i wanted to make sure the idea was out there
That's an interesting suggestion, but I can see a couple of problems with it. The biggest being that if you stop the TCS on a ship, how does it start back up again when you want it to? You'd have to maintain an array of all TCS enabled ships somehow, and because ships can be destroyed, this array would have to be global and maintained by a global process.

I'd really prefer to keep things simple and in line with how the game generally works, and that means adding an upgrade to a ship to add functionality, and with the player being in control of what commands run on each ship (i.e. you start the turret commands you want to run).

A better way to achieve this would therefore be to have a command that sets a 'remote control' flag on a ship, then have a couple of hotkeys for activating/deactivating all in-sector flaged ships. That is very do-able, and I will certainly consider this once 2.0 is out (at present I'm not adding any more functionality - I want to get the damn thing released at some point! :)).

MJALowe wrote:also would be nice to have a toggle for main weapon switching - so this plugin could also handle what the appolyon arms laser switcher does *grin*, if not ill have to get that script too - that one specifically doesnt work on turrets or with

Code: Select all

 Gamma and Beta PPC
- All PSG types
- Ion Disruptors
- Custom (new) weapons 
I've been thinking about this myself actually, if I do it'll be after 2.0 though, but thanks for the suggestion.

MJALowe wrote:a prioritize my target option (hotkey *grin*) would be good too, i just noticed a "certain" other script with a similar abreviation had that option *grin*
All TCS commands do this by default, there's a lot more detail on the targeting priorities in the readme that came with the plugin, I'd suggest having a read of that as it should answer all of your questions.

2.0 will have extra functionality in this area though and should cater for everyones needs.

MJALowe wrote:edit2: id also like to confirm that fcs mk3 and giaus dont interfer with this script - if some one knows id be happy to hear from them, i dont think it interfers but i haven't read all the script code on them or this
That I don't know, sorry. Depends if GIAUS messes with the turrets - I don't think it does, does it?

MJALowe wrote:edit3: np, i know how RL can get ya...its been almost a year since i released IFTSOS and i still haven't gotten around to releasing any updates for it - mainly cause it works as is and any updates would be mostly cosmetic
:) Yeah RL is a pain, I'm really depressed over it right now - not done any scripting since x-mas...

MJALowe
Posts: 461
Joined: Fri, 5. Jan 07, 06:27
x3

Post by MJALowe » Tue, 8. Jan 08, 02:18

each ship has a local variable turn me off/turn me on
two hotkey/command
1st toggles variables
2nd does

Code: Select all

setup
  command is run = false

if command run
  if command is run = false
    get array of all player owned ships in sector
    set array to global variable for auto turn back on if player leaves sector
    size of array
    while size > 0
     dec size
     if ship local variable true
       turn off tcs
     else
       do nothing
     end
    end
     command is run = true
  else if command is run = true
    *same as above but turns the TCS back on
  end
end

on player ship - possibly through an al pluggin
  on sector change
    get global array of ships
    size of array
    while size > 0
      dec size
      if player ship not in same sector
        ship turn tcs on
      end
    end
    clear array and set global
*grin* two commands or hotkeys one to set the variable on the ship
one to use the variable as a toggle

and one al plugin with the player ship as [this] to turn it back on when the player leaves sector


i know its not that simple...nothing ever is

but the array would only have to be the array of the last group of ships it was run on

an upgrade could take the place of the local variable instead of having the set local variable command (reduced to one command/hotkey)

anyways...just thought since im mentally in scripting mode already id see what i could come up with to help ease the burden

and by prioritization thingy, i meant override the allowed targets - like fire on my target if can no mater what class of ship it is....if not then go to secondary *grin*

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Tue, 8. Jan 08, 03:44

I think AL code is an added complication I don't need right now - 2.0 will probably be the most complex turret plugin for X3... in fact, the current version probably is atm! :)

I'm sure you're aware of this, but there are a lot of things to consider with what you're proposing, many existing scripts would be impacted by it, even turning the TCS off would tricky - i.e. what turret commands would you start on each ship to replace the TCS ones you've just turned off, and are those commands available to that ship? See, it's not easy ;)

As for the prioritisation, your wish is my command! In other words, it's already in 2.0 :)

MJALowe
Posts: 461
Joined: Fri, 5. Jan 07, 06:27
x3

Post by MJALowe » Tue, 8. Jan 08, 04:50

um..the default equivalent, and the tcs options wouldn't be available but all others would *grin*

AL is easy....if you need a timer for something its alot better than using waits (its more accurate - in that sector changes don't reset it, less accurate in that its measured in seconds) and if all you use it for is a timer its pretty useful, check out my IFTSOS script....rather than have a globaly running script with waits i created it as an AL plugin that every 60 seconds calls the production check (which incidentally also auto installs/uninstalls the factories), the production check gets a list of all player owned pHQ (can be changed to all TL or even all Specific Ship) and checks the locals variables of those using that information to figure out what to do next, and saves any changes it makes back to those local variables (if the local isn't available it gets a default variable that i made global and is created in the setup script, and saves that to the local)

as a side note, im currently dramatically expanding IFTSOS
im adding in a management menu, which in its current state can generate several different reports and repackage the HQ (saveing all your tradeable wares that are on board, undocking all ships, and saving the IFTSOS variables) - and restore it later (after the TL its repackaged to has placed the HQ)
currently in the works is a blueprint installation menu option - with a side ability that it will add the HQs production capabilities to a ship thats running IFTSOS

think Mobile pHQ

im currently trying to figure out if its possible to create a ship that on creation is docked with another ship or station...or if im gona have to create it nearby and tell it to dock

im also intending to add a merchant fleet management system and a military fleet management system (that can interact with eachother)

eventually ill probably branch out to turret management, after i do a wingman management system, which will be after i do the military fleet management system

the currently available IFTSOS uses no commands/hotkeys at all, the update im working on currently uses only 1 command, and im gona try to keep it that way - the MD question lib is very useful for menu generation...no clutter in the logbook, so i can feel free to make a very complex menu

DaveyP
Posts: 986
Joined: Mon, 7. Nov 05, 19:06
x3tc

Post by DaveyP » Wed, 27. Feb 08, 12:25

Just started using it in my XTM game, and it's awesome :D

2 quick questions.

1) Does anyone know correct refire rate on HMG? I wanna ad this in.

2) Was using a version of X2 Gunnery Crew Commands with AEGIS, and I notice that FLAK/PPC fire seems to be about twice as fast with that plugin as XoneTCS, even when the turrets are firing straight on and the turrets don't have to track.. Since all the NPC ships are using this, I'm at a bit of a dissadvantage.

Ideas anyone?

Cheers.

Post Reply

Return to “X³: Reunion - Scripts and Modding”