[SCR] Ring of Fire - Stealth Lasertowers (v2.31 - 29.11.09)

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
Sotanaht
Posts: 22
Joined: Mon, 30. Sep 13, 08:02
x3ap

Post by Sotanaht » Thu, 10. Oct 13, 17:33

Does this script help reduce the performance cost of lasertowers? I have a tendency to drop a mammoth and a half worth of towers on a xenon gate, but after doing this 3 times I can barely use SETA anymore in ANY sector. OOS cost is what I'm most concerned with, 600 towers tank me completely in sector but it's not too much trouble to just never visit those sectors again.

If the script is particularly effective, I might just go ahead and restart my game using it since I really don't want to go around collecting my 2-3000 lasertowers at 10 fps in a mammoth on the xenon border.

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Thu, 10. Oct 13, 18:42

when not actively engaged with hostiles, the laser towers cloak, and drop off the system ship list and no longer affect performance. (assuming you had sufficient microchips during deployment)

IS, they will appear briefly and engage enemy, then disappear when there is no longer danger.

OOS, you'll never even notice unless one of the bad guys gets close enough to target and actually hit one of the towers (then you get the "one of your ships is under attack in sector ......") but will likely be dead before you get there to kill it.

it requires special commands to make them reappear (I have never bothered with it myself, so cannot testify as to it's use)


put a Large OWP in the middle of several concentric rings and add drones and drone carrier software (DCS version 1) and you will not have to worry about rampaging Xenon, they will attack the platform and come under fire of the LT's and die like moths into the flame.

(was that what you were looking for?)

Edit: IS, that configuration is very pretty to watch in action..... like moths to a flame....

Sotanaht
Posts: 22
Joined: Mon, 30. Sep 13, 08:02
x3ap

Post by Sotanaht » Thu, 10. Oct 13, 20:31

So the cloaked (and only cloaked) towers are particularly efficient on my computer? I was actually hoping I could avoid using the cloaked because they sound a little OP, but performance trumps balance.

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Fri, 11. Oct 13, 00:24

tower vs cloaked tower, same level of power

the only 2 advantages of the cloak, 1: disappears when not needed, saving cpu resources, and second, the handy script to place them in pretty little rings.

otherwise, no difference in power
(10 towers is 10 towers... still as deadly)

Triscopic
Posts: 78
Joined: Tue, 9. Mar 04, 20:19
x3tc

Post by Triscopic » Mon, 10. Mar 14, 00:30

Just an addendum to the excellent work done by Chaos Master in fixing this script...
Chaos Master wrote:It eludes me why I didn't write which file to change :roll:

it's plugin.ring.of.fire.stealth

in lines 67 and 68 you have
$flag = [Find.Enemy] | [Find.ForceUsePos]
$hostiles = find ship: sector=$sector class or type=Moveable Ship race=null flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position

after those two lines you add:

...*snip*...

and yes, you change the version number to 232 in all the plugin.ring.of.fire.--- scripts, and the setup.ring.of.fire one

if you're new to scripting it's gonna take you a while to find all those commands (can't just type em, have to select them from a convoluted list of commands)

If you don't get it to work, pm me again tomorrow and I can (somehow) send you the changed files.
Don't really have time today ...

A slightly more all-encompassing fix is this:

Code: Select all

    $flag = [Find.Enemy] | [Find.ForceUsePos]
    $hostiles = find ship: sector=$sector class or type=Moveable Ship 

* New code here to fix enemy race detection
    $flag = [Find.ForceUsePos]
    $index = size of array $check.race.arr
    while $index > 0
      dec $index =
      $check.race = $check.race.arr [ $index ]
      if $hostiles == null
        $rel = [PLAYERSHIP] -> get relation to race $check.race
        if $rel == Foe
          $hostiles = find ship: sector=$sector class or type=Moveable Ship race=$check.race flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position
        end
      end
    end
This uses the pre-existing race array, looping through all the races to see which ones the player's current ship currently has set to "Foe" and explicitly checking for them. This means you can easily set your towers to kill Pirates, or Paranids, or Argon, etc - just set your own race relationship to Foe and your turrets will immediately start attacking them.

Note 1: All of the necessary lines of code can be copied from the same script - just browser down a few pages and you'll find all of them, so minimal scripting is required.

Note 2: It is very important to note all the files need their versions updated just as Chaos Master mentions.

Note 3: When you load a save game the towers will automatically update their script versions (they'll all decloak briefly and betty will tell you they've been updated).

Hope this helps someone.
Proudly lurking since 2004

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Tue, 11. Mar 14, 07:00

the towers do that already, attack anyone set to foe. with no further scripting necessary...

any who attacks, or has me set to foe, (I only set for one that set me to enemy, and xenon...) attacks anyone that comes to attack my station or any xenon in range, all others are ignored until they choose to attack.
(of course, then it sets that whole race as enemy and will subsequently attack any in range)
any of the fix race relations scripts will fix any overly persistent foe settings if they don't reset otherwise with the global setting (which usually works, ... usually...)

Triscopic
Posts: 78
Joined: Tue, 9. Mar 04, 20:19
x3tc

Post by Triscopic » Tue, 11. Mar 14, 10:38

For you perhaps, but, sadly, not for me; no matter what I did until I added that code, my rings only decloaked when either a Xenon or Kha'ak came in range. Once decloaked they'd attack anyone else fine, but they just wouldn't decloak for argon or pirates (both of whom I've always had set to "Foe")

Anyway CM's fixes worked for pirates but I didn't fancy hard coding my enemies list. I just hope if anyone else experiences the same issues as I did they'll find my code helpful.

(It's worth noting that the cloaked towers don't use normal race-relation detection; they are all forced into the "Friend" state to all races while cloaked - presumably so they don't shoot while invisible. They have their own custom logic for checking nearby enemies while cloaked which triggers the decloak and then corrects the race relationships so they fight properly while visible)
Proudly lurking since 2004

feygan
Posts: 147
Joined: Fri, 26. Dec 03, 18:41
x4

Post by feygan » Tue, 11. Mar 14, 14:32

I'm clearly doing something wrong with this edit to the stealth tower file as my towers do a reboot and then cloak again. However I then tried spawning a ship and setting the ownership to various enemy races, I also set it to friendly ones and alters my own friend/foe settings. However still the LT's do nothing. The only races that are targeted are the basic xenon and khaak ones.

Can someone upload the modified files so I can import them into my game please?

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Tue, 11. Mar 14, 17:58

I am not sure (since I don't manually modify the game, only install mods), but the ones I am using are :
Cheat collection AP
Drone Carrier Software (DCS)
Slipstreamdrive
Beacon Jump1
ImprovedKhaak2 v3.1
Mark 3 Trader improved
Ring of fire

a handful of ships

when the shady business assaults happened, I would get a warning,
by the time I jump there, I arrive to see the last of the invaders (jonferco or Yaki) being blown to bits or more often, the towers would be slowly re-cloaking with no evidence of the supposed attacking force.

I occasionally get issues with a race because they attack a station of mine and the cloaked towers return fire, setting up a endless wave of assaults on my property in their space.

I suspect some other script may be altering the behavior

Nemesis_87
Posts: 730
Joined: Sat, 19. Mar 11, 16:26
x3tc

Post by Nemesis_87 » Thu, 5. Jun 14, 12:49

Hi, i seem to be having a problem, im trying to deploy the ring of fire around a gate, Its doing a perfect circle but unfortinatly its not around the gate, Not like the screenshot you got anyways. Instead it seems more like the ring around saturn if you know what i mean

any help would be appreciated

Edit: Also the system im having problems in is segaris, i tried another sector and worked fine. is it due to the way the gates are positioned in segaris?

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Sat, 7. Jun 14, 18:18

the ring around the gate is tricky to deploy sometimes

once I figure the axis part, I sit my ship (the fighter I happen to be in) in front of the gate around 6k, set the freighter to start my ring of fire centered on me in concentric rings facing the gate (did this in front of the xenon gate in black hole sun, and effectively forgot about it and no longer got requests for assistance in that system.


try center the ring on the gate, and set the radius at 5k, it was supposed to behave differently in proximity to gates, but updates may have changed that behavior.

alternately, place a OWP in front of the gate and center the ring of fire on it (the owp will draw them like moths to a flame)

also, there is a charge time from the initial placement before the towers become fully functional.

to test, set up a ring of fire, let it cloak, then from outside the range, create a ship, assign it to a race that is designated as enemy, attack it so it starts attacking you, then get it to follow you into the tower field.

part of the activation sequence depends on whether the enemy ship is attacking (at least it seems so to me) the very same arrangement will defend your stations from the attacks of the groups in the shady business plot (where waves of ships from yaki or beryl attempt to destroy your assets for not choosing them in the plot)

they are defensive in nature and sometimes wont activate until hostilities begin.

(for the record, neither Yaki or Jonferco were set as enemy during the plot, but the towers still defended against them when they came to attack, I would get back just in time to see the expanding cloud of plasma and towers re-cloaking)

FYI: Ring of Fire is working in X3AP 3.1 as described (though I have not tried to place a ring directly around a gate for some time, several updates ago at least, since I prefer the wall/disk of towers placed between the gate and the rest of the sector)

Edit: it is fun watching the xenon ships exit the gate and die under the barrage of plasma beams over and over.... even took out the Q's and a J
-it was pretty to watch, almost worth it to have a few freighters on salvage duty, just remember to have them go sell the stuff occasionally

SirDeathwalker
Posts: 385
Joined: Fri, 6. Aug 10, 03:15
x4

Post by SirDeathwalker » Mon, 16. Jun 14, 19:26

I think (just by logicing it out) the missing components in the tests performed is the laser towers only attack hostile ships, as in ships that have you set to enemy, sometimes it may not be enough you consider them the enemy, maybe they have to hate you too.

try using the cheat menu to set "relation to me" setting to enemy for the test ship. (switch target to enemy vessel created for test, then set relation status to enemy, while ship is within range of array (within 5k for optimal performance))

Aquadrox
Posts: 17
Joined: Tue, 19. Sep 06, 19:09
x4

XRM version

Post by Aquadrox » Sun, 20. Mar 16, 15:52

Hi guys,

If you want I created a package to fix the bugs in XRM (for example pirates not being attacked):

https://drive.google.com/open?id=0ByJXJ ... HhJbmFMTXc


Edit: moved from X3R to X3TC script topic. X2-Illuminatus
Qui ne pete pas ou ne rote pas est voué a l'explosion

netman_123
Posts: 7
Joined: Tue, 19. Nov 13, 02:35

Post by netman_123 » Mon, 15. May 17, 00:10

For Gazz
Love the ring of fire but having serious issues getting it to work, no wake up, no help commands, does not respond to "config" commands, i read all the other posts, even tried to edit values in script's with no joy, they ignore pirates, put them in and they go off the grid, never waking up, very strange, adjusted detection to 11000 via script and regular config attempts, no joy, put them in and they never wake up, all using defaults even
really want to use this but having serious issues getting this to work, please advise

netman_123
Posts: 7
Joined: Tue, 19. Nov 13, 02:35

Post by netman_123 » Mon, 15. May 17, 04:15

Ok so i used the new scripts and they did the TRICK! Thank you sir, bonus programing!

Rikaelus
Posts: 223
Joined: Tue, 29. Nov 05, 04:03
x3

Post by Rikaelus » Sat, 2. Jun 18, 08:58

Just FYI, that latest fix (for XRM) also fixed stealth towers not decloaking to attack Yaki in my Xtended modded TC game.

-Wolfie-
Posts: 3
Joined: Sat, 28. Aug 21, 03:27

Post by -Wolfie- » Thu, 7. Apr 22, 22:49

Does anyone still have the XRM fix?

FTLasteroid
Posts: 2
Joined: Sun, 25. Oct 20, 06:13

Re:

Post by FTLasteroid » Sat, 22. Apr 23, 18:09

Triscopic wrote:
Mon, 10. Mar 14, 00:30
Just an addendum to the excellent work done by Chaos Master in fixing this script...
Chaos Master wrote:It eludes me why I didn't write which file to change :roll:

it's plugin.ring.of.fire.stealth

in lines 67 and 68 you have
$flag = [Find.Enemy] | [Find.ForceUsePos]
$hostiles = find ship: sector=$sector class or type=Moveable Ship race=null flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position

after those two lines you add:

...*snip*...

and yes, you change the version number to 232 in all the plugin.ring.of.fire.--- scripts, and the setup.ring.of.fire one

if you're new to scripting it's gonna take you a while to find all those commands (can't just type em, have to select them from a convoluted list of commands)

If you don't get it to work, pm me again tomorrow and I can (somehow) send you the changed files.
Don't really have time today ...

A slightly more all-encompassing fix is this:

Code: Select all

    $flag = [Find.Enemy] | [Find.ForceUsePos]
    $hostiles = find ship: sector=$sector class or type=Moveable Ship 

* New code here to fix enemy race detection
    $flag = [Find.ForceUsePos]
    $index = size of array $check.race.arr
    while $index > 0
      dec $index =
      $check.race = $check.race.arr [ $index ]
      if $hostiles == null
        $rel = [PLAYERSHIP] -> get relation to race $check.race
        if $rel == Foe
          $hostiles = find ship: sector=$sector class or type=Moveable Ship race=$check.race flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position
        end
      end
    end
This uses the pre-existing race array, looping through all the races to see which ones the player's current ship currently has set to "Foe" and explicitly checking for them. This means you can easily set your towers to kill Pirates, or Paranids, or Argon, etc - just set your own race relationship to Foe and your turrets will immediately start attacking them.

Note 1: All of the necessary lines of code can be copied from the same script - just browser down a few pages and you'll find all of them, so minimal scripting is required.

Note 2: It is very important to note all the files need their versions updated just as Chaos Master mentions.

Note 3: When you load a save game the towers will automatically update their script versions (they'll all decloak briefly and betty will tell you they've been updated).

Hope this helps someone.
I'm a newbie in this filed,and I don't know how to use it,could u tell or teach me how to use it?

User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [SCR] Ring of Fire - Stealth Lasertowers (v2.31 - 29.11.09)

Post by alexalsp » Sat, 22. Apr 23, 22:51

But I don’t understand one thing, if you fixed something, then why not immediately give a ready-made corrected script .... :gruebel:

Post Reply

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