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

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?

Post Reply

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