Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Wanderer on October 11, 2005, 12:41:50 pm

Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 11, 2005, 12:41:50 pm
I was fooling around with the table files and noted that i could get rid of the 'standard' swarms' random direction flight (that they have for the few first moments) by using the corkscrew flag with radius and twist set to zero.

However when used the same entry that from fighters secondary bank launched a corkscrew swarm of 6 warheads (with radius of 10 and twist of 7) on a turret it fired only a single warhead. However it did do the corkscrew thing, alone... Swarming from turrets works fine. It didn't matter if the turret was a singlepart (or non-fuctional multipart like old Aeolus) or functional multipart turret as it matters in primary swarm/burst case. So is it possible to get it working even with turrets?

And fix the swarm problem with singlepart turrets (firing along the their normals) as multiparts seem to work just fine with burst / pulse / primary swarm / whateveryouliketocallit option (AI even aims with every shot!)?

And does the older $SwarmWait: function work? If it does how should i use (rather where)?
I only got a handfull of debugging errors with it being placed right after the $Swarm: entry.

And i'm using 20/09 build.
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 13, 2005, 11:01:55 pm
Sorry for this: :bump:

Why won't 'corkscrew' flag work properly with any turrets but 'swarm' flag does in multipart turrets?

And is there SwarmWait: option in weapons table?

Or are all of these problems directly related to how turrets are handled in the FSOpen...

EDIT: The option was +SwarmWait after the $Swarm, not $SwarmWait:. :ick:
Title: Corkscrew and swarm with turrets?
Post by: StratComm on October 13, 2005, 11:05:40 pm
Could it by any chance be limiting to the number of firepoints available?  (Even if it's not, all the missiles may be launching from the same firepoint, and since corkscrew weapons launch in such close time with one another you may be mistaking the entire swarm for one).  The corkscrew flag is strange at best when not used exactly as its intended, so I'm really not sure what to tell you.
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 13, 2005, 11:21:14 pm
No i don't think so. I used the corkscrew option on missiles fired from one of the HTLd Aeolus' top turrets (has two firepoints) and only one missile was launched. And also i could make out two missiles fired with swarm option from different singlepart turret so do not think that i could have missed the other 5 missiles missing from the 'corkscrew turret'.

EDIT: I do think i'll miss any of these options too much anyhow. Just stumbled to it and wondered if it is possible to fix. I have some uses from swarmwait or other such option but nothing that i can not live without....
Title: Corkscrew and swarm with turrets?
Post by: deep_eyes on October 14, 2005, 12:02:32 am
if u thought thats something..... i use to fire 8 to 12 Helios torpedos like they were Tornadoes... they had taht corkscrew velocity so the AAA beans and turrets almost more than often MISSED! and it was homing to lol
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 14, 2005, 02:21:23 am
This is sort of connected to this thread so:

Are there any other than visual function for the turret rotation speed option in the turret subsystem entry in table files? I took these screenshots:(http://koti.mbnet.fi/vekkup/FS2/Pics/screen0014.jpg)

 (http://koti.mbnet.fi/vekkup/FS2/Pics/screen0016.jpg)

As you propably can see the turret in the left fires quite oddly. As soon as target is within its range it start to shoot despite having barrels pointing at different direction. Also when turrets change their target they fire off from their 'barrel line', until the barrels catch up with the shooting direction.

BTW I think i can partially solve this by using '+weapon range:' but it won't fix the problem itself. Or if the turret rotation is for the visual effects only then there is nothing to be fixed.
Title: Corkscrew and swarm with turrets?
Post by: Prophet on October 14, 2005, 02:42:01 am
Quote
Originally posted by Wanderer
As you propably can see the turret in the left fires quite oddly. As soon as target is within its range it start to shoot despite having barrels pointing at different direction. Also when turrets change their target they fire off from their 'barrel line', until the barrels catch up with the shooting direction.

Has been a problem ever since first day FS2 hit the stores...
Why haven't anyone brought this up for the SCP to fix? Damn.
Title: Corkscrew and swarm with turrets?
Post by: Raptor on October 15, 2005, 05:02:33 am
It can be sort of fixed by putting 'Swarm:#' in the weapons table.  Then each bolt flies along the weapons normals at the time of firing.  (I've done this with all my mutli-part turrets.  Requires extra table entries to cover all versions though, Ie single, twin, triple, and quad mounts)

Of course, this means the first shot (or few shots, depending on  the weapons ROF) will always go off into deep space far away from the target...

And why have the SCP not done anything about this?  Because they spend all their time messing with fancy 'oh la la' graphics, and won't touch the turret code, the one section that REALLY needs to be reworked, with a 24 foot pike.  Even while wearing a hazmat suit.

But that's just my opinon:nervous:
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 15, 2005, 05:45:15 am
Thanks for the tip! I'll try that... As the multipart turrets are otherwise purely cosmetic that might just do the trick. :mad: , just realized that i'll then need different table entries even for single and multipart turrets (+different entries for different multipart turrets) as swarm didn't really function with singlepart turrets.

I also put something about this to Mantis. Mostly just a remainder for the coders to take notice. I guess they will complain about how difficult the AI or turret code is and then leave it at that... :nervous: But even that it is better than nothing.
Title: Corkscrew and swarm with turrets?
Post by: Goober5000 on October 15, 2005, 12:39:04 pm
Quote
Originally posted by Raptor
And why have the SCP not done anything about this?  Because they spend all their time messing with fancy 'oh la la' graphics, and won't touch the turret code, the one section that REALLY needs to be reworked, with a 24 foot pike.  Even while wearing a hazmat suit.
Graphics are only the most visible feature.  A lot more has been done under the hood.

And for your information, WMCoolmon has spent a great deal of time reworking the turret code.  So please get your information straight before you post.
Title: Corkscrew and swarm with turrets?
Post by: WMCoolmon on October 15, 2005, 01:48:29 pm
It's actually something of a sore point to me, as I tried to set things up so that turrets would fire more than one mounted weapon and then noone seemed to care. Right now they'll only pick the first weapon to aim, but if other weapons will be in the area they should fire those as well.

This seems a little beyond me but I can take a guess as to how it might happen based on what I remember of the code...turrets don't seem to start firing once they're exactly lined up. Instead, they do something with a dot product to figure out whether they're in the immediate area.

If the turret is figuring that it's inside the dot product area, so it starts firing, but is using the desired vector, I might be able to fix that. But vectors + matrices aren't something that I totally understand, despite reading a website or three with an 'intro' to them...
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 15, 2005, 01:50:50 pm
Do not meddle in the affairs of coders, for they are soggy and hard to light... er ...subtle and quick to anger...

Sorry, i just couldn't help myself ;).

And i'm sorry if i offended anyone with the above postings. You (the whole SCP lot) are doing awesome job with the code. As the turret code currently causes some odd happenings i decided to take at least some sort of action and gained what i hoped to get (at least some sort of solution to the problem). I really hope you can figure out the turret code but i also realize that it might not be on top of the priority list.
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 16, 2005, 02:03:26 am
I'm not sure how it really works and what are the limitations within the code but if it uses vectors and the dot product would it then be possible to convert the code to use cos(a,b)=dot(a,b)/(|a||b|) and use the cos to determine if the turret fires.

dot(a,b)/(|a||b|) = (ax bx + ay by + az bz ) / (sqrt( ax^2 + ay^2 + az^2 ) sqrt( bx^2 + by^2 + bz^2 ))
x, y and z are coordinates in above and a is vector from turret to target and b is turrets barrels alignment vector.

Dot product area? I must be out of my league, i though dot product is a thing used mainly to check angles between two vectors.
Title: Corkscrew and swarm with turrets?
Post by: StratComm on October 16, 2005, 02:09:58 am
Quote
Originally posted by WMCoolmon
It's actually something of a sore point to me, as I tried to set things up so that turrets would fire more than one mounted weapon and then noone seemed to care. Right now they'll only pick the first weapon to aim, but if other weapons will be in the area they should fire those as well.

This seems a little beyond me but I can take a guess as to how it might happen based on what I remember of the code...turrets don't seem to start firing once they're exactly lined up. Instead, they do something with a dot product to figure out whether they're in the immediate area.

If the turret is figuring that it's inside the dot product area, so it starts firing, but is using the desired vector, I might be able to fix that. But vectors + matrices aren't something that I totally understand, despite reading a website or three with an 'intro' to them...


Changing that is definitely going to change the way the Fenris works.  Probably the Aeolus and Hecate as well (flak).  Not that it shouldn't be done, but the side effects need to be fully evaluated.

Dot product is being used as a measure of the closeness of the angles, yes.  WMC is refering to the limit at which the turret considers its target inside it's firing cone.  It's fairly analogous to the way FOV works for a stationary turret AFAIK.
Title: Corkscrew and swarm with turrets?
Post by: Nuclear1 on October 16, 2005, 01:34:35 pm
Quote
http://koti.mbnet.fi/vekkup/FS2/Pics/screen0016.jpg


Slightly off-topic: is there some new texturing for the Hyperion and Chimera that Stratt released that's different from that on his website, or are those different textures?
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 16, 2005, 01:58:05 pm
Those are from Stratcomm's Fleetpack. Raynor, Chimera, Bellerephon, Hyperion and Sparta all in high poly versions (that tend to crash my ModelView). From what i remember those are similar to models found on his webpage but with higher polies, new textures and everything...

And in my package some of the debris have bad geometry (fly through stuff) and Raynor's missile batteries have a bit off-placed firingpoints.
Title: Corkscrew and swarm with turrets?
Post by: StratComm on October 16, 2005, 02:30:10 pm
Quote
Originally posted by Wanderer
Those are from Stratcomm's Fleetpack. Raynor, Chimera, Bellerephon, Hyperion and Sparta all in high poly versions (that tend to crash my ModelView). From what i remember those are similar to models found on his webpage but with higher polies, new textures and everything...

And in my package some of the debris have bad geometry (fly through stuff) and Raynor's missile batteries have a bit off-placed firingpoints.


Since search is borked, I'll post a link to the original thread.

http://www.hard-light.net/forums/index.php/topic,31128.0.html

If you can ID the bad objects I can take another look at the models and try to fix it.  I can't promise much, but I'd be willing to take another look.
Title: Corkscrew and swarm with turrets?
Post by: Ransom on October 16, 2005, 03:00:19 pm
Speaking of which, is there any chance the Titan might be released some time soon?
Title: Corkscrew and swarm with turrets?
Post by: StratComm on October 16, 2005, 03:57:07 pm
Ah yes, I'd completely forgotten that I hadn't released it.  I'm not 100% satisfied with the fighterbay openings, but it's as ready for release as it'll probably be for a while.  It should use materials also included in the fleet pack, but if there's something missing let me know.

titan.zip (http://www.duke.edu/~cek6/titan.zip)
Title: Corkscrew and swarm with turrets?
Post by: Raptor on October 17, 2005, 07:44:54 am
Quote
Originally posted by Goober5000
Graphics are only the most visible feature.  A lot more has been done under the hood.

And for your information, WMCoolmon has spent a great deal of time reworking the turret code.  So please get your information straight before you post.


Sorry. I found it hard to keep up with you guys when I was visiting everyday. Now it's only once twice a week...

I don't know what you guys have been up to lately.  Nearly everything in the SCP Thread goes right over my head. :confused:

Plus I'm kind of stuck with version 3.6.6 IIRC.  Anything newer just refuses to run. :ick:

So again, sorry, but I've found it hard to follow you guys.  Maybe when 3.7 comes, you'll put a simply worded txt document in with it, explaining all the changes in plain english?:nod:
Title: Corkscrew and swarm with turrets?
Post by: Goober5000 on October 17, 2005, 03:03:13 pm
Quote
Originally posted by Raptor
Maybe when 3.7 comes, you'll put a simply worded txt document in with it, explaining all the changes in plain english?:nod:
What's wrong with the readme.txt file that's been posted with every single SCP release since the source came out?

Granted it's not always up-to-date, and I don't think it includes the turret features, but it includes a whole bunch of other features that you should know about.  And the majority of them are non-graphical.
Title: Corkscrew and swarm with turrets?
Post by: Raptor on October 18, 2005, 08:56:24 am
Quote
Originally posted by Goober5000
What's wrong with the readme.txt file that's been posted with every single SCP release since the source came out?

Granted it's not always up-to-date, and I don't think it includes the turret features, but it includes a whole bunch of other features that you should know about.  And the majority of them are non-graphical.


The last builds I tried didn't have any readme file IIRC...

I have now got a later build working, sort of...

I'll try the latest build again...

EDIT: Oh man, I didn't realise you HAD released 3.6.7  I'll try that ASAP.
Title: Corkscrew and swarm with turrets?
Post by: WMCoolmon on October 18, 2005, 01:19:24 pm
:lol:
Title: Corkscrew and swarm with turrets?
Post by: Raptor on October 21, 2005, 07:59:08 am
Okay, 3.6.7 does work.  It throws up a whole heap of error messages, but if click 'okay' with them all, I can still play.  Even with that 'ghost' mouse cursor:wtf:

Could I humbly ask one of you (Goober and/or WMCoolmon) to answer the following?  It's my 'wish list'.  I don't know any other way to post what I want to know...:nervous:

1) Max number of subobjects: Want is the new limit?
I guess it's now far more that 110 (vanilla FS2), but just what is the new limit?

2) Max number of Turrets: Can we have 100+ turrets per ship?
If so, would each turret entry have three digits? Ie the first one would be turret001

3) Turrets firing all firepoints at once: Can it be done?
I tried using $shots: #  No effect.
$Swarm: #
+SwarmWait: 0
Had no effect either
With 2 number of weapons defined per turret, I sometimes saw 1 shot being fired per turret, and sometimes 2 from the same firepoint:wtf:

4) Turrets fire at rate in tbl file
Turrets appear to only fire at some minuim rate even when the firewait in the tbl file is lower.  can this be looked at?

5) Max number of turrets engaging single target raised
[Suggestion] Could this be scaled per target type?  So the current 3-4 limit for fighters, with 6-8 for cruisers, 12-16 for corvettes, 24-32 for capitals?
(wants to see a ship draw up alongside hostile vessel and unleash entire 40+ gun broadsides:D )

6) Turrets not firing though ships hull
I know someone (Goob? Bob?) created a 'hacked' attempt at this, but it was ditched because of issuses about certain missions (IMHO it would the missions that were wrong in that case, since they were depending on something that should not happen IFL)
Maybe make it a command flag?

7) Player ship turrets make sounds
I want to hear that my own turrets are working!

8) Player turrets default to defensive fire
When flying shp with turrets, I've noticed that the turrets only target your curret target (except when the target is friendly), even when ouf FOV or range.  Can this be looked at?

As an aside, I've been expermenting with that 'initial Turret postion' stuff, and it appears to have altered the normals for the affected turrets.  I saw turrets not firing at a ship when it was clearly in their normal FOV :wtf:  Will try again to be sure.

I'm not trying to be difficult or arguementative, but this is the sort of thing I wish to know/see in game.
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 21, 2005, 08:14:59 am
4) Can be sort of fixed by giving "same turret cooldown" flag for the turret weapons.

BTW $Swarm: 1 'hackfix' doesn't work with flaks as flak weapons seem to ingore the swarm option. :(
Title: Corkscrew and swarm with turrets?
Post by: Nuke on October 21, 2005, 08:31:02 am
ive been beggin for turret upgrades from day one. so im pretty much up on them. il adress what i can.

2: turret names dont seem to be relevant as far as the game goes but autogen seems to cap at 99 turrets.

4: there was a flag implemented for this, to make turrets fire at the rate of fire of the weapon. i believe it was "same turret cooldown". btw does that hackfix really work or is it just a myth?

5: somone adress this, id like to see 30 or so of ssj's dante's beam turrets fire all at once. it would be hella cool :D

7: it does, just not very loud. this is to avoid annoying the **** out of the player. its louder if your in external view.

8: would be nice to be able to have turret commands so you can tell it what to shoot at or how to behave. or to be able to patch fire control to the weapon trigger.

and a few of my own:

9: GATLING TURRETS (http://www.game-warden.com/nukemod-cos/Images/turrrent.gif)
sorry couldnt resist
after all i went through the trouble of making mr gatling smiley to poplarize the concept of gatling turrets so youre pretty much sure im serious about my request .

10: i dont know if anyone noticed but if you put a type 4 beam on a multipart turret the beam would follow the turret normal perfectly down its bore, the downside is it cant really hit anything worth a damn. fix this

11: on single part missile turrets, make it so the missile will completely travel the length of the normal before homing, it would be more asthetically pleasing.

12: just do a damn lobotomy on the turret code and replace it with something better. ive seen turret code done better in quake c by 2-bit modders. it shouldnt be that hard. if youre worried about balence throw in a "-advanced turrets" option. this has been my stance sence day one.
Title: Corkscrew and swarm with turrets?
Post by: Raptor on October 21, 2005, 10:06:10 am
Quote
Originally posted by Nuke

2: turret names dont seem to be relevant as far as the game goes but autogen seems to cap at 99 turrets.


Well, ATM it would only affect the Basestar I'm working on. It has 132 turret ATM, but I can lose 60 of those without loss of firepower (have 20 'turrets' each with 4 firepoints - and a custom weapon - than 80 single firepoint turrets)

Quote

7: it does, just not very loud. this is to avoid annoying the **** out of the player. its louder if your in external view.


I've never heard it.  If the sounds do play, then the voloume needs turing up! IMHO. command flag again?

Quote

and a few of my own:

9: GATLING TURRETS (http://www.game-warden.com/nukemod-cos/Images/turrrent.gif)
sorry couldnt resist
after all i went through the trouble of making mr gatling smiley to poplarize the concept of gatling turrets so youre pretty much sure im serious about my request .


Oh that reminds me, I fotgot one.  Have more firepoints per turret.  Currently we're limited to four.  For a gatling gun with six barrels, thats a problem...

Rarely used I know, but it would be nice to have the option...

Quote

10: i dont know if anyone noticed but if you put a type 4 beam on a multipart turret the beam would follow the turret normal perfectly down its bore, the downside is it cant really hit anything worth a damn. fix this


That's kind of important to me, as that's kind of how I was planing on doing the Basestars mega pulsars...
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 21, 2005, 11:53:57 am
Quote
Originally posted by Nuke
4: there was a flag implemented for this, to make turrets fire at the rate of fire of the weapon. i believe it was "same turret cooldown". btw does that hackfix really work or is it just a myth?


I'm not sure to which one are you referring to but in my experience both the 'same turret cooldown' and the trick of giving multipart turrets swarm flag work quite fine.

But both have their downsides. With the 'same turret cooldown' difficulty level no longer influences the turrets ROF (IIRC it does so without the flag). And to function (forcing the weapon to fire only on the barrel line) the swarm requires a fully functional multipart turret (for example non-HTL Aeolus has atleast one non functional). In singlepart or nonfunctional multipart turrets weapons with swarm flag fires only on their normals. And swarm doesn't work with flak.
Title: Corkscrew and swarm with turrets?
Post by: CaptJosh on October 21, 2005, 12:19:49 pm
But a gatling gun only fires out of one barel at a time. It shouldn't need 6 firepoints. The barrels spin past the chamber. A single firepoint that would line up with the barrel as it spins past should do it, assuming that's not actually harder to do than increasing the firepoints and using fire rates.
Title: Corkscrew and swarm with turrets?
Post by: Fade Rathnik on October 21, 2005, 02:39:33 pm
if you watch vids of rotory cannon firing you may notice that all bullets fired dont fallow the same path some times a shell is fired a split second early or late which can give the bullet stream a little spread and more organic form, if you just have the one fire point you cant emulate this aspect; but with many fire points, a spin and fire time variance(wouldent need much in either) you can make a steam of projectiles that look  whole lot meaner and nastier than a simple perfect steam.

If you doubt me, go find the gatling gun vids from spiked humor they'll prove my point.
Title: Corkscrew and swarm with turrets?
Post by: CaptJosh on October 21, 2005, 02:48:39 pm
The dispersal pattern of a modern gatling gun is primarily due to recoil from being fired. We're not talking about an old post American Civil War era gatling gun that was as inaccurate as it was unreliable.

Any gatling guns used in space are going to be a development of weapons like the minigun, which is as accurate as the person or mechanism pointing it at the targets to be serviced, as long as those targets are within effective range. In the case of a person, it's not that hard to aim, just watch the solid line of tracers. It looks like what they thought rayguns would look like in old science fiction movies and serials. Conversely, this does make it easy to pinpoint the source of fire, but damn! It's a trip to watch, man.
Title: Corkscrew and swarm with turrets?
Post by: StratComm on October 21, 2005, 02:48:41 pm
Because you're obviously going to notice that in a combat space sim :rolleyes:.

Of course I still believe you're not going to notice it if a barrel isn't spinning either.
Title: Corkscrew and swarm with turrets?
Post by: Nuke on October 21, 2005, 07:09:23 pm
have you seen the main gatling gun on the rumrunner, its the size of a house, i doubt you could miss it. when it comes to eye candy its not that you see it that matters, its that you can see it.its like those bunny things in the first unreal :D. everything that makes for gatling gun behavior is already implemented (deflection angles for example), we just need the animation of the spinning barrel. perfect fire/rotation syncronization is not that important to me because the screen refresh rate is not suffietient for you to see it anyway.spinning barrel code already exists in the vwep system, they just need to make it possible to apply to turrets.

anyway back to the subject of the hackfix, what i want to do is make it so my single part missile turrets fire straight down the barrel all the way to the normal before they start homing. i dont like the way they leave the barrel at an unrealistic angle. would the hack fix fix that?
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 22, 2005, 02:25:06 am
Yes, to some extent. I had a discussion about this some time ago and it seems that from secondary banks (on fighter) missiles fly directly on the normal for 1/4 (or was 1/2 second) after which they turn to home on the target. There was even discussion about making this value changable by table editing as a bit longer values would perhaps be better for slow secondaries.

Same can be achieved with $Swarm flag and turrets. Multiparts fire straight along ther barrel line and single parts on their normals.Turrets fire if the target is within turrets FOV and set weapon range. If the multipart turret happens to be pointing to a wrong direction then it start firing to the wrong direction as it begings to turn towards the target. That is with all weapons with $Swarm: 1 hack fix (or with greater Swarm values).

I even run quick tests with this and it works ok.

With swarm flag the homing turret secondaries however wobble a bit (set missiles to have a very narrow trail to see it properly or alternatively no trail at all or very wide to hide it) and also tables should be changed so that missile can actually home on to a target which is so far from it (Heat seekers homing cone) and also so that it can turn to the target (turntime/lifetime adjustments). Missiles also seems to have a kind of split-second pause after the launch phase and the homing phase but i do not find these problematic.
Title: Corkscrew and swarm with turrets?
Post by: Wanderer on October 22, 2005, 05:58:13 am
I decided to do some little checking with beams and multipart turrets. Type 2 beams didn't even fire. Type 0, 1, 3 and 4 fired nicely. Types 0, 1 and 3 didn't bother to fire on the turret's barrel line. Type 4 fires constantly on the turrets barrel line even if the turret is rotating (kind of a combining effects from types 0 and 1 = standard heavy beam and slasher).

Type 4 seems to respect $lifetime: and $velocity: entries quite much. Weapon range entry (+range: entry under the standard beam entry) didn't seem to influence firing distance but rather the hitting and effects range. Lifetime x velocity gives you it's maximum range where it start to fire and high velocity causes AI to take very little lead on the target (improving the accuracy). So if you want to have an accurate type 4 beam in multipart turret with range of 10 000 just set the velocity to 100 000 and lifetime to 0.1. That should solve the accuracy issue. I got the too high accuracy limited by both slow turret rotation and by assigning the weapon with lower velocity. Too low +range: setting causes beam to 'dissipate' prematurely but i think this effect has much to offer (it is not used to its fullest extent, Homeworld 2 type pulsars and pulsar gunships kind a popped into my mind from the dissipation effect).

I didn't test the other types of beams with different velocities or weapon ranges.