[Script]RS.Turret Defence

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

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

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Tue, 13. Jun 06, 15:44

'Fleet Command' will have 3 *new* turret commands

-Aggressive
-Defensive
-Basic

the Agr. and Def. are both the same script (wich is a new and much improved version of this script) using diff. arguments
(the agr. will find 'new targets' the def. wont .. the agr. can be set to not care about 'friendly fire' the def. always cares)

the basic is just a similair script but without the 'weapon switching' ..


also note .. a 'feature' of the script-commands I use is that the playerships turrets usually very quickly install 'smaller weapons' (kinda like a 'cap feature') ..
dont want this .. simply dont pilot the ship yourself or dont load 'small weapons' ... (I pers. like this .. as your turrets do not shoot to kill .. but shoot to damage ... :idea: )


also note that no matter what you do or use (without modding).. an M2 will never be very good in taking down fighters (as it is have had penty reports that an AI M1/M2 was very capable of clearing sector while IS .. so for 'destruction' you might wanna hand over control to the AI (as in not being in the ship))


G

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Tue, 13. Jun 06, 17:16

Fleet Command?

Is that a different script from the Turret Defense or does it have Turret Defense included.

If the caps can mount FLAK's, they can hurt fighters very well, specially the bFLAK's. :)
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Wed, 14. Jun 06, 12:49

Jakesnake5 wrote:Fleet Command

that will be a script-set doing a lot ..
it will replace ES' scripts (think move to sector/dock at/protect/ etc etc)
and a bunch of new commands designed to help you run your empire and move your fleet around .... etc etc ...

and simply said 'about' anything I have or will make will become a part of FC .. (at least at some point ...)



G

jmdorropio
Posts: 42
Joined: Sat, 8. Apr 06, 11:34
x3

Post by jmdorropio » Wed, 21. Jun 06, 10:32

I use this great script, the 3.15, but the script do something strange, when i dont have enemies around and i'm close to some gate, all my ships start firing to the gate and never stop. I think is the script who do that, someone see the same on yours games ?


Mods i have instaled :
EMP 1.4 and Capital Rebalance by Galaxy613

Scripts instaled :
RS.TurretDefencev3.15
ACC : Anarkis Carrier Commands 1.23
KhaakHunter script
BountyHuntersGuild-V2.60-07.02.2006.spk
RaceMilitary-V1.03-22.03.2006.spk
Extra_Missions_Pack_v1.20.spk
StevioWeaponsDealer-V1.22-04.06.2006.spk
StevioShipyard-V1.11b-30.05.2006.spk
StevioCombatFabs-V2.82-02.03.2006.spk
convoyb1.spk
OvertuneBBS-V1.41.spk
cheats1.2.spk

Ships :
M2 Titan and TL Elephant

Weapons :
Because my Capital ships have the RS.TurretDefencev3.15 script, they choose the GPPC (Titan) and the BPPC (Elephant) to attack the gates.
I think is because the weapons range, i dint try to put close to the gate and see if they change weapons.
The turrets are to Attack all enemies.

Sectors were this happen :
Only in enemies sectors.

Actions :
They hit the very center of the gate, but only if the weapons range can hit the gate, if the weapons cant hit, the ships dont move closer to the gate. Thats why i think is your script who have this bug.
And the turrets only hit when no enemies are in range, the gates allways are the last target.

Note :
First i think is the ACC : Anarkis Carrier Commands 1.23 script have this bug but now i think maybe is the RS.TurretDefencev3.15 script have this bug, what you think ?

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Wed, 21. Jun 06, 12:44

I'll have a looksee tomorrow ..



G

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Wed, 21. Jun 06, 13:48

If its anything like X2's determination that the gates belong to the sectors owning race, it might be ES's bug.

Would mean in Pirate sectors, the gates would be classed as Pirates.

Never know.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Wed, 21. Jun 06, 23:49

as it is the gates of a sector belong to the sector-owner ...

so theoraticly this could be possible ...
(but if so it should most likelly happen just as well when using the original turret commands ..)



G

jmdorropio
Posts: 42
Joined: Sat, 8. Apr 06, 11:34
x3

Post by jmdorropio » Thu, 22. Jun 06, 09:59

So, is not a bug ?

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Thu, 22. Jun 06, 15:41

jmdorropio wrote:So, is not a bug ?

nope .. its a bug ..


I just realised what is causing it .. the player tracking aim ..

easilly fixed ...:D


G

User avatar
rhohltjr
Posts: 310
Joined: Sat, 13. Dec 03, 21:27
x3tc

Post by rhohltjr » Tue, 27. Jun 06, 22:24

This script will replace the "Turret attack enemies" command.
When you install this than when you use the "Turret attack enemies" command you will use this script.
Just installed it and made sure script'er is going but all I get is
an unrelated Missile Defence command not the Turret attack enemies.

:? :? :?
Didn't we used to have the ability to block people on this forum that annoy us?

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Wed, 28. Jun 06, 02:22

It doesn't add a turret command, it superceeds one thats already there. It'll usually be the first one below 'None'.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

User avatar
Unknown object 003
Posts: 195
Joined: Thu, 17. Nov 05, 18:08
x3tc

Post by Unknown object 003 » Thu, 29. Jun 06, 16:33

Great script! Works even better than AEGIS for X3.

Cheers

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Thu, 29. Jun 06, 16:52

wait for me to upload the newest version (I'm going to release the commands I actually designed for FC .. hopefully tomorrow ..)


and about aegis .. the fun thing is this is basicly the same as aegis ..
however aegis for X3 is doing things like aegis for X2 did .. and I'm using *new* X3 commands .. and you just experianced the diff. between the 2 ..;)
(also my script isnt tied to 'liberaries' so it can be used in modified games)



G

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Thu, 29. Jun 06, 20:11

RS, you know how to give your scripts their own turret commands right?

Though, that does require using a text file (44xxxx... etc) to define them.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

Saint-Ashley
Posts: 1267
Joined: Sat, 3. Dec 05, 03:40
x4

Post by Saint-Ashley » Thu, 29. Jun 06, 20:17

I beleive RS used the default cmd's to alow the AI better control of their own weapons. Instead of a AI (Race) Cap ship fireing off PPC's at fighters. :roll:

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Thu, 29. Jun 06, 20:23

Yes, but default weapons control for player npc's is missile defense. So you'd have to change it anyway

@RS
What command slots does FC use? I need to know if Exodus is going to conflict. It already conflicts with several scripts ATM.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

sdack
Posts: 1071
Joined: Wed, 26. Jan 05, 22:24
x3

Re: [Script]RS.Turret Defence

Post by sdack » Sat, 1. Jul 06, 19:12

I have a few thoughts, which could lead to an improvement of your script.
Red Spot wrote:...
This script tries to keep the ships energy level up,
but as shields and/or hull might go down energy becomes less of a priority.
When the ships energy is low it will start firing in 'pulses',
meaning it will fire a few shots at a time making sure the energy level isnt going 'critical'.
1.) Why do you link laser energy with a ship's hull and shields?

Once a best weapon for a target has been selected all energy should be made available for this weapon so it can destroy the target. It is that target that lowers your shields and hull and therefore you want to destroy it (at any time and at any cost).
The only waste of energy that can occur here is through misses. The misses however stand in a close relation to a target's distance (as well its size and acceleration). So energy saving should only be linked with i.e. a target's distance.

You must allow the ship to run low on energy at some point in time since it is a scenario, which can occur (i.e. when there are too many enemies). Any other greediness for energy will "fire back" on you if it is not meant to avoid misses. Ponder about this for a second.
... Set the missile fire probability over 80% and the turret doesnt care about 'friendly fire',
2.) Why the link between missile fire probability and a turret to determine if a player allows for friendly fire?

I would avoid this alltogether and leave it to the player to remove any of the dangerous weapons from his ship prior to using your turret script. Placing such a weapon in a cargo bay will then be seen by the player similiar to mounting it.

The missile fire probability should really only be used together with missiles. This then will avoid conflicts with your script and others, perhaps a missile script.
Mass Drivers are a 'special' among 'the specials'. ...
it would simply waste ammo wich could be needed an other time.
3.) The use of mass drivers is IMHO not well explained ...

Last things first ... the amount of ammo is a factor, which has to be taken care of by the player at all time. Adding logic that takes care of this just partially, but not fully (and probably never can) might not be in the interest of all players. Again, running out of ammo is a scenario, which can occur. Saving ammo while a target suggests a mass driver is best applied with it could again back fire. Ships can hold rather large ammounts of ammo for this weapon and - from my point of view - usually do not run out of it too quickly. But, I have not fully understood your description of the logic on when it is being mounted ...

This means it will see if any other turret is tracking a target and will check if it can 'combine fire'.
4.) Does this happen for any type of target? What are the conditions for a "can combine turrets"?
I.e.: Will an M2 point with up to 3 turrets (<=> 24 weapons) at an M5 while there is just 1 ISE but lots of PIKs available?? ;)
This delay will make sure less energy is wasted on 'long range fire' where it could be more effective in closer range.
See 1.)
it will drain energy at a pretty good pass, but will never let it go 'critical' while shields and hull are up.
Not to repeat myself, but experience is that as soon as shields and hull go down, the ship should have turned all available energy into fire power and that this power should be on the way to the target that is causing my shields and hull to go down. :idea:

Sven
---------------------------
---------------------------

User avatar
Liath
Posts: 185
Joined: Sun, 25. Dec 05, 08:16
x4

low-end computer problem or RS.TD?

Post by Liath » Sat, 1. Jul 06, 19:54

Hey,

- I've downloaded and used this script for a time now, and while I can say that generally the concept is good, I'm having a few small but serious issues with the script:

- When I set it to A.a.E. it will switch the weapons as it should, but for some odd reason 80% of the time it refuses to *fire* the weapons :| It may be related to my computer just barely scratching by on the min specs, but considering that other scripts seem to be working fine, I'm not 100% sure.

- I have IDs in the hold, but they are never used? Quite annoying when I haven't got a single non-enemy ship in range, and there is no chance of friendly frag happening. I'm not sure if psg's would be used, though, since I hate em (my comp can't handle the 'hit rate' and drops to <1fps).


- Something I'm wonderign about, though.... people keep talking about AEGIS in X3, but I've never seen the command to use it, or even it being sold! I've even tried cheating AEGIS into my hold and some MPs... and no AEGIS :| Am I missing something???

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Sat, 1. Jul 06, 22:21

Jakesnake5 wrote:RS, you know how to give your scripts their own turret commands right?

Though, that does require using a text file (44xxxx... etc) to define them.

er ... you do know how to open a door ..?? ..... :roll:



Jakesnake5 wrote:Yes, but default weapons control for player npc's is missile defense. So you'd have to change it anyway

@RS
What command slots does FC use? I need to know if Exodus is going to conflict. It already conflicts with several scripts ATM.

-again ... er ... :D .. is that so ?? ...
-sorry but I wont release anything from FC untill its finished .. the only reason I'm about to release the turret-scripts is because of a minor bug in the current script .. and why fix something if you already have a better new script ready .. (check the text-file that comes with the new scripts and check the commands to get an *idea* about whats used or altered .. but also note that this can very well change before a final release ..)




sdack ...


1) and how should you script that ?? .. if you can write the logic for it .. I would be happy to incorp. it ........
1.1)energy saving is already happening on distance as you can read in the readme (delay! .. see your "point 5")
1.2)gimme control over "hit" and "miss" and you *might* have a point here ..

2) doesnt work .. and adding a "1 or 0" argument is worse than how I do it now (imo)...
(I hope you realise that this only has effect when you activate the turret(s) .. so after activation you can do with the MFP what you want ..)


3)MDs are no longer a "special" in the new scripts ...
the game decides what weapons to use on what target .. and this will change when the targets hull and/or shields go down (the ship starts using smaller weapons).. specially on the playership (auto-cap function!!)
and this is the reason my script can operate without a lib. ..
(I used to "force" MDs in the turrets .. but in the end I find it "double coding" so I removed it .. in the end I cant control the use of MDs for 100% so why make the script more complex without a good reason)


4)doesnt matter ... with an M2 you wont miss but want the firepower .. with an M5 the turrets will combine fire so even a good pilot has serious problems avoiding "all" fire (on test-runs I have been killed 10 out of 10 times when trying to make a few runs on an enemy M2 when flying an M5.. so the results speak for themself..) ... (imo this makes the diff. between shooting 20 min. at an M5 and not being able to kill it with your M2 and "blast away" for a second and bye bye scout)


5)see 1 ... :P

6)is it me or are you now just repeating the quoted part in other worths ..?? ......




Liath ..

1.1)have you tried firing the turrets manually ..??
1.2)are you sure my script is running (can be confusing as I used/altered a "vanilla" command)
1.3)note that 'tracking' times are pretty short so *perhaps* it may end up being a problem a laggy rigs ....

2)that the games finds other weapons better for the target .. also note that IDs have a pretty short range .. so in the end they simply arent the *best* available weapons .. (also note .. I've reported a bug on the Tech. Forum about IDs .. they wont always show themself when fired (they dont show the "flash" .. only the impact effect) .. so it could very well be that they have been used but you havent seen it ...)



G

User avatar
Liath
Posts: 185
Joined: Sun, 25. Dec 05, 08:16
x4

Post by Liath » Sun, 2. Jul 06, 01:18

1.1/2) I've switched to the turrets and fired them (had to hit "U" to turn off AP)... and the turrets are automagically switching weapons, which they did not do before, so I'm sure your script is working fine there. (BTW, when the turrets are on auto, they always aim at the ship, and not the MARS reticule... that is why it misses 90% of the time...). If I remove your scripts, (and start a new game / or set all the turrets on all my ships--rather start a new game!!), then the turrets don't autoselect weapons... but they do fire the ones that are mounted :P

1.3) Kinda with 1.2/3... but when I'm manually looking at the turret, or usign the monitor to erm... 'monitor' it, it seems to track fine, other than the problem stated above.

2) That explains alot!! Though I wonder if its possible to use your own 'selection' and kick the default weapon selections...?

Guessing that the ID is pretty much crap on an M1-2/TL then? Fighters usually don't get in range of shorter range weapons, so the only real use I have seen might be for missile defence.

Post Reply

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