[BONUS Plug-In] Gunnery Crew turret plugin - Version 3.02

The place to discuss scripting and game modifications for X²: The Threat.

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

User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

[BONUS Plug-In] Gunnery Crew turret plugin - Version 3.02

Post by Reven »

This is getting to be a very long thread, so I am turning the opening post here into a roadmap for the whole project. This post contains: a short introduction, a list of resources for the plugin, important current news, and finally a clickable roadmap to this thread listing on what pages different discussions ocur.

Introduction
For those new to the project, this is a thread discussing a signed "bonus plugin" script that makes turrets much more effective. You can hire gunnery crews to man your turrets. It also makes some AI capital ship turrets more effective, thus making the AI more difficult to defeat in certain cirsumstances.

Resources
  • The official plugin english readme is available from my web server for those who want the latest updates or want to read what it's all about without installing the plugin.
  • Download the plugin from: http://www.egosoft.com/download/x2/bonus_en.php
  • For those who are upgrading from the earlier unsigned versions, please also download the special upgrade here and read the instructions included with it.
  • A FAQ is available - please read it before posting questions. Anyone posting a question that is covered in the FAQ will have the super-secret destruct mode activated in their gunnery plugins, causing all the turrets in ships they own to shoot their own ships. Ok, this won't happen, but you will make me sad.
News
  • 19 Dec 2004: Version 3.01 released. This fixes a bug, and tweaks other behavior. The changes were minor, but they have important effects. Read about it here (link pending).
  • 12 Dec 2004: Version 3.00 released. This is the first signed version of this plugin, finally out of beta. Yay! Read about the release here.
Thread Roadmap
  • Page 1: Information on the original private beta release.
  • Page 2: Version 1.04, the first public beta release.
  • Page 3: Version 1.93 - the third (first public) beta of version 2.
  • Page 4: Version 2 comes out of beta.
  • Page 5: Version 2.10 released.
  • Page 5: ticaki corrects Google Language's lousy German. I start trying to learn German myself. My German is even worse than Google's, if you can believe it.
  • Page 6: First plans posted for version 3, and subsequent discussion.
  • Page 7: Version 2.11 released. This is the last unsigned version.
  • Page 7: Progress report on the development of version 3.
  • Page 8-9: Miscelaneous technical discussions. D_Zorro makes first post in thread with a rather interesting photo in his signature. Number of people reading the thread triples over night.
  • Page 11: I first realize how to make the turrets fire any weapon at full speed and eliminate turret slowdown when the frame rate drops. Also discussions on why blocking area effect weapons in one direction only is not feasible.
  • Page 12: Getting close to signing...
  • Page 13: Signed version (3.00) finally released. Woo hoo!
  • Page 14Discussion about the costs and the reasonings behind them.
  • Page
    15-16
    : Mostly discussions on whether or not the costs and crew requirements are realistic. The linked to post suggests both the cost and crew are very unrealistic. A page 16 post suggests that X² capital ships aren't large enough to hold the number of crew the plugin requires. My response is also on page 16.
  • Page 17: Upcoming changes announced to address some concerns.
  • Page 18: Misc. discussions, mostly about costs.
  • Page 19: Burianek locks a bunch of other threads and posts links to them. I make this roadmap to better stear people new to the thread.
Original
The actual original contents of this post are lost in antiquity. But, the gist was to announce the project and to ask for people who could help test it.
Last edited by Reven on Tue, 21. Dec 04, 00:52, edited 12 times in total.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum
User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV »

PM me a link to the script with a rm of conditions you'd like testing :)
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses
Johnn
Posts: 77
Joined: Wed, 6. Nov 02, 20:31
x3

Post by Johnn »

:) I dont mind testing scripts as ive been through quite a few latley.
So if you let me know what you are looking for ill test it for you.
I have nearly every ship in the game so I could try it on all of them.
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven »

If this script catches on, the Argon Titan is going to see an increase in interest. Auto-weapon selection is deadly with IonD's. :twisted:
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum
Halconnen
Posts: 831
Joined: Sun, 22. Feb 04, 12:55
x3tc

Post by Halconnen »

That sounds cool. Sadly I haven't got enough time to test scripts atm.

But I think I know another feature that would be interesting to see. AFAIK turrets only start to turn towards an enemy, when the enemy ship enters the turrets fireing arc. Would it be possible to make the turrets turn, before the ships enter the arc?
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven »

This is very hard to do. From what I understand, some other scripters have done this, but I'm not sure how they have.

The problem, is there is no scripting command to determine if a ship is in a turret's firing arc - just a yes no is this target in 'range' (which means is it in range and in the firing arc). It would theoretically be possible to do this using the trig library I wrote, but the amount of overhead would be huge.

Instead, what my script does is switch the turrets to the lightest gun they can mount (and that you have on board) before turning them. This significantly increases your turn rate.

The funny thing is, though, is there is no requirement for you to turn your turret before shooting. The only reason the current scripts do this is as a limitation to the player. If my script simply ignored the turret turning commands, I could still fire on whatever ships I wanted. The "turret" wouldn't be facing them, but the lasers in the turret would instantly turn and shoot.

I'm not going this far in my script as this would make it impossible to get signed. I think I'm already pushing the envelope of acceptability by switching to lighter guns for turret tracking.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum
User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse »

I'm willing to test, my 8 hour SETA session last night just garnered me a nice 41 mil, so I may be in range of getting my first destoyer, as well as testing this out on my Osprey. Let me know how I can help =]
User avatar
DeadlyDa
Posts: 1883
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa »

OK...I'm up for it.

I currently run AS.Turret.Guard on a couple custom ships.

I have a test bed where I can test with M3's, M6's, and a custom M0 (Front guns, 6 turrets, 24 guns)...all fully or partially loaded, as needed.

Send a PM with the link...and don't forget to let me know what conditions you are most interested in testing for.
frymaster
Posts: 3008
Joined: Wed, 6. Nov 02, 20:31
x4

Post by frymaster »

DEFINATELY up for this. The 2 destroyers I use are an Odysseus and a Ray, both of which would benefit from this.

couple of questions:

I notice there was no mention in the priority list of missiles, would there be a "missile defence" option for this script? for one thing, missiles have a different preferred weapon hierarchy (psg and iond still at the top, but the IREs and so on become much more useful)

Also, does the script change its behavior OOS ie PSG is not that effective, collateral damage doesn't apply etc.

VERY nice idea, if you need more testers I am willing to help
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven »

frymaster wrote:I notice there was no mention in the priority list of missiles, would there be a "missile defence" option for this script? for one thing, missiles have a different preferred weapon hierarchy (psg and iond still at the top, but the IREs and so on become much more useful)
I have provisions in the script already for selecting the optimum CIWS (close in weapon system - military jargon for anti-missile guns) gun. I am still playing with this, and haven't yet made a decision on whether to incorporate this or not. At the moment I am actually favouring a different script that you would attach to a ship's extra command slot that would use mosquito missiles to intercept incoming missiles that are a threat. However, I haven't rules out a combination of anti-missile rockets and point defense gunnery.

If I do go with making the script handle missiles as well, the weapon choice will be based first on WMD's (IonD/PSG are both extremely effective against missiles), and then next based on whatever gun you have available with the fastest refire rate.
frymaster wrote:Also, does the script change its behavior OOS ie PSG is not that effective, collateral damage doesn't apply etc.
OOS this script is irelevant. If you look on any out of sector ship, you'll notice that no turret scripts are running. The game doesn't use turret scripts for OOS combat. For in-sector combat, the system switches out to the default gun, which will always be the gun with the most OOS combat rating, whenever it isn't engaging.
frymaster wrote:VERY nice idea, if you need more testers I am willing to help
I haven't heard back yet from many of the testers so far, but I've used it for a couple days now with no lockups, so I believe the script is safe. Therefore, I'll open it up to public testing.

So far I've used it on a Split Elephant (it's wonderful there because the turrets only have 1 gun slot each, so switching between IonD and HEPT triples the turret's effective kill rate), a Teladi Albatross, and an Argon Titan. It turns the Titan into a Khaak M2/M1 killing machine. As long as the Khaak capital ship is approaching you, so you can get into IonD/PSG range quickly, you're set to go. I may call this script RAID, cuz it kills bugs dead. :)

Keep in mind that the script does not yet have an automatic update system, which I will add soon. This means that when the actual release is made, you will have to go to each ship this script is installed on and halt it and restart it. So, don't deploy this TOO widely until the autoupdate is in place.

The url to download this is ftp://ftp.excelcia.org/x2/scripts/GunneryCrews101.zip.

Thanks, BTW, to JV who pointed me to the reseource to use to make sure this script doesn't conflict with other published script's command slot usage.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13130
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Add new ideas for script commands to this thread like the "If ship in fireing arc" one mentioned above. It wouldnt hurt for a few more commands.
Come watch me on Twitch where I occasionally play several of the X games
User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse »

Was one of the original testers, and let me tell you, this script is wonderful! My Osprey is now deadlier than ever. Well worth the ingame 2 mil purchase price. My only beef is that its only available in Argon Prime as my primary base of operations is over in the Unknown Sector immediatly east of Wastelands. Makes for a long voyage. Maybe make it available in Omicron Lyrae dock as well?

Other than that, my turrets can generally kill on the first pass of an enemy instead of taking a few passes to whittle them down. And this is with the NeedForSpeed pack installed, which means this thing is even deadlier against fast targets than the regular scripts =]

Another plus: when attacking a pirate base and letting the fighters come to me, I no longer hear a bunch of "threats" from them anymore because I kill them all to quickly for them to yell at me! This alone is worth the 2 mil IMO ;)

Great script Reven, definately go for signing, this one helluva addition to my ship.
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven »

It will definitely be available in more places in the final release. Omicron Lyrae is definitely my first choice for an added location, given its prominence in Argon's ship design.

Eventually, my hope is to have this item available only through BBS missions - but I am still waiting on my level 5 access to be able to develop those.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum
The Great Stonk
Posts: 498
Joined: Tue, 23. Mar 04, 16:30
x3tc

Post by The Great Stonk »

Reven wrote:It will definitely be available in more places in the final release. Omicron Lyrae is definitely my first choice for an added location, given its prominence in Argon's ship design.

Eventually, my hope is to have this item available only through BBS missions - but I am still waiting on my level 5 access to be able to develop those.
ouch, id personally like to see this as a buyable piece of kit, sort of a fight comand software mkiii (combine it with the already existent unsigned fcsmk3 perhapse if it gets signed) or perhapse 'turret comand software mk1'

costing a rather large whack naturally. 8) cant have all those poor wannabe m6 pilots beating my pride and joy now can we 8)
ticaki
Posts: 4861
Joined: Wed, 6. Nov 02, 20:31
x3

Post by ticaki »

1. No init.* scripts... use setup.*
2. use a XML ID higher than 1000
3. *.init.* No good idea to add the ware only in one EQD on a Custom-Map nobody can use your script. plz use the placement lib from the trader.
4. there is no wait randomly in the outer loop

oh i'm too tired more tomorrow :)

and a suggest... turn the turret to the next enemy if all enemys out of rang.

Greets ticaki
Zur Zeit nicht aktiv
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven »

ticaki wrote:1. No init.* scripts... use setup.*
2. use a XML ID higher than 1000
3. *.init.* No good idea to add the ware only in one EQD on a Custom-Map nobody can use your script. plz use the placement lib from the trader.
4. there is no wait randomly in the outer loop
There is a random wait inside that cannot be avoided. There are 3 conditions - either the ship is in dock, in which case there is a 8 to 12 second wait, the ship is not in dock and there are no enemies in range of the turret, in which case there is a .4 to .6 second wait, or there are ships in range, in which case a wait isn't appropriate.
ticaki wrote:and a suggest... turn the turret to the next enemy if all enemys out of rang.
This is a very bad idea. Consider this - you have 2 enemies approaching an M2, one slightly behind the other. One of your turrets will be facing this enemy and the "preturn" will be a good idea. But 5 of your turrets will not be facing this enemy, and will try to turn to face it, but will not be able to, so will turn to full extension in one direction. Suddenly enemy number 2 appears in one of the turret's line of site, and that turret has to turn from full extension toward #1 to point to #2. You are actually adding time to the target aquisition, because most of your turrets will be out of position. Instead of doing this, I switch to a lighter gun for target aquisition, which makes all turret tracking faster.


Greets ticaki[/quote]
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum
ticaki
Posts: 4861
Joined: Wed, 6. Nov 02, 20:31
x3

Post by ticaki »

Reven wrote:...
1. i mean a short wait randomly 5 to 10 on the bottom :)
2. you right... but what is with turn the turret to next enemy if no turret find a target.
3. don't changing weapon to turn the turret fast... looks like a cheat or exploit...

Greets ticaki
Zur Zeit nicht aktiv
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven »

ticaki wrote:3. don't changing weapon to turn the turret fast... looks like a cheat or exploit...
I'm afraid I disagree on this point quite strenuously. I hope this isn't a condition to getting this script signed. If it is, I will wait to get the results of my poll before I nerf the script in this manner.

The main reason I don't feel this is cheating or an exploit, is that rapid weapon changing is absolutely required in any turret script that wants to have intelligent weapon selection. The reason is, there is no scripting command to determine whether or not a target would be in range of a turret if that turret were using a specific weapon. You have to switch the turret to using that weapon, and then use "is enemy in range of turret".

Because of this, my script MUST change the turret guns to all the different classes of weapons each iteration in order to determine if it can use that weapon.

What am I supposed to do at turret aiming time? Switch the gun to the heaviest gun so the turret is slowest? I think this is not particularly fair.

It is quite possible to fire a turret weapon without turning it at all. The turret guns are decoupled from the turret camera. You can shoot at anything within a turret's arc without aiming first. If I were to do that, I would agree that I am using an exploit. Or if I were to unload all the guns from a turret before turning it. However, given that I must change weapons just to tell if it's possible to use the given weapon, I see nothing wrong with leaving the lightest gun possible in the turret when done.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum
ticaki
Posts: 4861
Joined: Wed, 6. Nov 02, 20:31
x3

Post by ticaki »

Disclaimer: I understand all what you write but my english isn't that good that i can tell you all what i think... :)

I know you must change the weapons... but i don't like the idea of changing weapons "only" for faster turn a turret...

hm what is with a little delay? I mean your script testing all weapon and if you change one really (not only for find the best one) the script waits for 1500ms ... more realistic or?
I want a discussion about this point!

Greets ticaki ;)
Zur Zeit nicht aktiv
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven »

Forgetting turrets for the moment, let's look at a player in a fighter.

Now, the player in the fighter doesn't need to switch guns to know when the enemy is in range of a certain gun - it's pretty obvious from the range of the enemy from your ship. The main guns (for the most part) aren't up to 1.5 kilometers from your cockpit.

So, a player is in a Nova and if fighting an enemy ship. Using the '1' and '2' keys, you can perform almost instantaneous weapon switches in a fighter, and you can keep switching as many times as you want. A human switching guns who is keeping good track of what order the guns come in can realisticly switch guns in under a tenth of a second (depending on how many times you have to cycle the weapons to get to the gun you want).

This argues for the fact that weapon switching in a ship is a semi-automatic mechanical process. That there is machinery in the ship that can switch guns very quickly.

It's true you can't do this in a turret, but is this because the larger ships with turrets lack the same gun switching machinery as a small fighter has for it's main gun? I don't think so - it is just because there are no game interfaces - no "hoy keys" for the player to do it.

What I envision is occuring is that with this script, I am "hiring" specialized crews to man my turrets. I have real people sitting in my turrets at a console that has a trigger, and buttons for several different weapon types. I envision they are sitting there able to switch weapons with the same speed as a person who is flying a fighter.

I do not believe rapid gun switching in a large ship is contrary to the spirit of the game.

I would be willing to limit the script to large ships, though, with perhaps some delays in place for M6's to simulate that they don't have as much room for high-speed mechanical gun exchanging machinery for their turrets as M2s, M1s and TLs do.

Is this an acceptable compromise?
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum

Return to “X²: The Threat - Scripts and Modding”