[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
Ferenczy66
Posts: 142
Joined: Sat, 14. May 11, 07:09
x3tc

Post by Ferenczy66 » Sun, 30. Dec 12, 02:07

probley means I should turn off "Bounce" also....yes?

Solved....

Had to be OOS and order my M7 to deploy them....works like a charm.

:twisted:

Anuke
Posts: 137
Joined: Mon, 25. Oct 10, 02:41

Post by Anuke » Thu, 3. Jan 13, 07:02

Lt's are not uncloaking for what I am guessing is just spawned ships. Unfortunatly this makes them unrelyamble for defending against the pirates spawned by STO and some XRM and military response spawns. Is there any way to get the Lt.'s to see these types of enemies?

Thanks gazz
What GoD taketh away, Cycrow giveth back.

Chaos Master
Posts: 67
Joined: Wed, 22. Sep 04, 20:17
x2

Post by Chaos Master » Sat, 5. Jan 13, 21:20

I set up 36 cloaked LTs on the south gate in Atreus' Clouds and another 36 at the north gate of Farnham's Legend.
They work like a charm IS, but OOS they don't even decloak.

Running AP with XRM and a bunch of other mods.

/Edit:
hm, weird, they're not uncloaking at all anymore.
At least not for pirates...

/Edit2:
They just uncloaked IS for some Khaak that I lured into range.
But they'll happily ignore pirate ships ...

/Edit3:
did some further testing
when I spawn in Xenon or Kha'ak ships they uncloak and destroy them in less than a second IS and OOS
but Pirate 'patrols' just get ignored even though they appear red for me and are set to enemy in my global settings.
I haven't had any luck spawning in pirates though.
If I select pirates as the owner race, the ship turns out to be boron???
I checked the owner race of one of the ignored pirate ships though, and it says 'Pirate'

Since Pirates are the only reason I'm putting up towers in this location in the first place, this is kind of annoying :S

/Edit4:
figured out why scripted pirates turned out as other races, they're undercover.
Turned undercover off and they appear red, but LTs still don't uncloak.
Appears like they just ignore Pirates


/Edit5:

I now made a workaround, added the following after these two lines:


$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

if $hostiles < 1
$flag = [Find.ForceUsePos] // what does that even do?
$hostiles = find ship: sector=$sector class or type=Moveable Ship race=Pirates flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position
end

once the towers were updated by making them decloak and recloak with a xenon or kha'ak, they now kill pirates too.
It's not the best way to do it, since it hard-codes pirates as foes, but for me it works :)

/Edit6:

didn't test it correctly ...
still doesn't work :(


/Edit7:

finally got it to work...
didn't think you'd have to update the version number for the updates to take effect ....

also changed
'if $hostiles < 1' to 'if $hostiles == null'
dunno if it would work with the '< 1' version, but don't really care.

if anyone wants to mimic that workaround, don't forget to increase the version number in setup.ring.of.fire, that's the crucial one, but it doesn't appear with the other script files in the script editor because it starts with an s, not a p (that's why I always overlooked it :roll:)

pirates now getting fried as they should 8)
Last edited by Chaos Master on Thu, 31. Jan 13, 21:00, edited 1 time in total.
---

User avatar
HoPLoN
Posts: 35
Joined: Tue, 19. Oct 10, 07:09

Post by HoPLoN » Wed, 30. Jan 13, 21:06

Chaos Master wrote:I set up 36 cloaked LTs on the south gate in Atreus' Clouds and another 36 at the north gate of Farnham's Legend.
They work like a charm IS, but OOS they don't even decloak.

Running AP with XRM and a bunch of other mods.

/Edit5:

I now made a workaround, added the following after these two lines:


$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

if $hostiles < 1
$flag = [Find.ForceUsePos] // what does that even do?
$hostiles = find ship: sector=$sector class or type=Moveable Ship race=Pirates flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position
end

once the towers were updated by making them decloak and recloak with a xenon or kha'ak, they now kill pirates too.
It's not the best way to do it, since it hard-codes pirates as foes, but for me it works :)

/Edit7:

finally got it to work...
didn't think you'd have to update the version number for the updates to take effect ....

also changed
'if $hostiles < 1' to 'if $hostiles != null'
dunno if it would work with the '< 1' version, but don't really care.

if anyone wants to mimic that workaround, don't forget to increase the version number in setup.ring.of.fire, that's the crucial one, but it doesn't appear with the other script files in the script editor because it starts with an s, not a p (that's why I always overlooked it :roll:)

pirates now getting fried as they should 8)
I am running XRM with Ap , and have the same problem .

Which script exactly should I put these code lines ?
Can you give some more instructions ?

When you say to update you mean to change setup.ring.of.fire and write version 232 instead of 231 ?

sorry I dont know much about scripting :/

Thanks
Go tell the Spartans , stranger passing by , that here ,obedient to Spartan Law, we lie .

Chaos Master
Posts: 67
Joined: Wed, 22. Sep 04, 20:17
x2

Post by Chaos Master » Thu, 31. Jan 13, 21:06

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

if $hostiles == null
$flag = [Find.ForceUsePos]
$hostiles = find ship: sector=$sector class or type=Moveable Ship race=Pirates flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position
end


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 ...
---

User avatar
HoPLoN
Posts: 35
Joined: Tue, 19. Oct 10, 07:09

Post by HoPLoN » Thu, 31. Jan 13, 22:39

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

if $hostiles == null
$flag = [Find.ForceUsePos]
$hostiles = find ship: sector=$sector class or type=Moveable Ship race=Pirates flags=$flag refobj=[THIS] maxdist=$sensor.range maxnum=1 refpos=$scan.position
end


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 ...
Thank you so much for quick response and help :wink:
So i guess you just cant use Notepad to edit the xml files , huh ?
I tried doing that but its obvious the text is in a different format from what you typed in here .

I ll send you a PM with my email, I would appreciate if you send them over as a zip file whenever convenient .

Would be a nice idea if Gazz could host the changed files for AP/XRM usage too . Just an idea , so we all dont have to poke Chaos to get them heheh
Thanks again :)
Go tell the Spartans , stranger passing by , that here ,obedient to Spartan Law, we lie .

Chaos Master
Posts: 67
Joined: Wed, 22. Sep 04, 20:17
x2

Post by Chaos Master » Fri, 1. Feb 13, 05:27

yeah, you can't just edit them with notepad
there is a lot going on under the hood that you'd need to do when trying to edit it with notepad ...

and the problem with an official release is that Gazz would have to figure out, just why they don't attack pirates even though you set them to foe.

My workaround just has the LTs attack pirates, period, so players who want to be friendly with pirates would have a hard time using this script...

Either way, I found that LTs in XRM are a bit OP and I used this script only to fence off the argon and boron sectors around argon prime, because it just doesn't make any sense that pirates can roam freely in that part of the universe.
---

User avatar
HoPLoN
Posts: 35
Joined: Tue, 19. Oct 10, 07:09

Post by HoPLoN » Fri, 1. Feb 13, 12:02

Chaos Master wrote:yeah, you can't just edit them with notepad
there is a lot going on under the hood that you'd need to do when trying to edit it with notepad ...

and the problem with an official release is that Gazz would have to figure out, just why they don't attack pirates even though you set them to foe.

My workaround just has the LTs attack pirates, period, so players who want to be friendly with pirates would have a hard time using this script...

Either way, I found that LTs in XRM are a bit OP and I used this script only to fence off the argon and boron sectors around argon prime, because it just doesn't make any sense that pirates can roam freely in that part of the universe.
I tried an xml editor and...
I failed miserably hahaha

I know they are a bit OP , so I try to use them in small numbers , like 6-10 only . Dont want to zap whole incursions out , before they even have a chance to say "boo" :)

And anytime I wanna be friendly with pirates , I will just revert to 231 version and be done with it .

Thanx again for this nice modification and help ,
one thing that I realy like about X3 so many years , is the awesome community .
Word :!:
Go tell the Spartans , stranger passing by , that here ,obedient to Spartan Law, we lie .

Anuke
Posts: 137
Joined: Mon, 25. Oct 10, 02:41

Post by Anuke » Sat, 2. Feb 13, 21:00

This is awesome. I can't wait to try it. But first I have a more pressing matter. And since you appear to have some luck thinking your way around this problem I need your help with another. Scripting conflict.
Codea has ships follow you in a formation. Other ships that follow you have a different follow script (standard). The codea ships will not join you in a point to point jump (provided by advanced hyperdrive) but the standard follower will. Can you help me figure out how to fix this
What GoD taketh away, Cycrow giveth back.

Chaos Master
Posts: 67
Joined: Wed, 22. Sep 04, 20:17
x2

Post by Chaos Master » Sun, 3. Feb 13, 02:09

will CODEA followers follow you in a normal jump?
if not there's not much you can do, if yes, then you'd have to fiddle with the codea follower script.
Either way, since this has nothing todo with this script, I doubt this is the right place to ask for help (it is unlikely that anybody here can help you out, I certainly can't, since I don't use CODEA nor the hyperdrive and am unfamiliar with how the scripts work).
The way you described your problem, I would guess you should ask for help in the CODEA thread.
---

Anuke
Posts: 137
Joined: Mon, 25. Oct 10, 02:41

Post by Anuke » Mon, 4. Feb 13, 04:30

Do I start on the blank "line 69"?
Where do I find "if"?
Why don't "home" and "end" buttons do what the editor says they do?
You weren't lying when you said it was complicated. Any more direction would be lovely.
What GoD taketh away, Cycrow giveth back.

bbgun77
Posts: 87
Joined: Tue, 18. Nov 08, 07:38
x4

Post by bbgun77 » Wed, 6. Feb 13, 09:07

THX!!! Chaos Master!

They back on line!

Its sample use c v and END,u can copy and edit line 69 to new line.and edit null to select race to Pirates .

so they back and kick badguys ass!

Antonslavick2
Posts: 1
Joined: Sat, 3. Nov 12, 01:54
x3tc

Post by Antonslavick2 » Sun, 3. Mar 13, 12:30

I think the download link is broken i keep getting this when i click the link

-------------------------------------------------------------------------------------

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, hostmaster@vgp.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

superstylin
Posts: 13
Joined: Fri, 13. Apr 12, 00:29
xr

Post by superstylin » Thu, 18. Apr 13, 05:43

Is there a download of the modified stealth script file?

MUCH appreciated :)

User avatar
Krewzur
Posts: 725
Joined: Mon, 16. Jun 08, 20:14
x4

Post by Krewzur » Sat, 4. May 13, 05:49

I've been using this script alongside XRM with the Advanced Universe Pack in X3AP.

The only scripts I have are XRM + Bonus Pack.

When deploying LT's they don't seem to deploy properly around the modded gates, they just end up all over the place. (AUP basically turns all gates into Trans-Orbital Accelerators i think)

Is this because Ring of Fire doesn't detect TOA's as "special objects"?

And has anyone found a way around it?

I've looked at the script myself but I haven't modded for a long time and I can't remember what i need to change to get it to recognize the TOA's as special objects.

EDIT: When selecting one of these gates the script does not ignore the X,Y,Z argument, which confirms that they are not being detected as "special objects"?

I've also tested it with different radius's ranging from the default 1600 out to 5000. Also tested with different numbers of LT's (5, 10 and 50). The result was the same for all tests.
Corsair 400c // Intel i7 8700k // H100i v2 // ASUS Maximus X Code // ASUS 1080ti Strix OC // 2x8GB Corsair Vengeance 3200MHz // Samsung 960 Evo 250GB // 960GB SanDisk Ultra II // Corsair RM850i

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

Post Reply

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