Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Charmande on August 02, 2003, 12:17:54 pm

Title: Rear guns, side guns, ect
Post by: Charmande on August 02, 2003, 12:17:54 pm
anyone remember this... http://www.hard-light.net/forums/index.php/topic,14662.0.html

?

I was thinking (and it hurt) that someone or someones might wanna take a closer look at the Corcksrew code and maybe find out why exactly this happens.  This being weapons firing down or up... if they have no homing... and they have corkscrew properties set.

Maybe with some (severe?) tweaking of the corkscrew code, one might be able to create side guns or rear guns... which would be something we've all wanted for along time, right?

i got 3 hours of sleep.
Title: Rear guns, side guns, ect
Post by: Lynx on August 02, 2003, 03:57:53 pm
That could also be achieved by modifying the code for the firing points. Right now, they can only fire straight forward, but I don't think it should be terribly hard to do that. That would allow such guns like the "Schräge Musik". In World War 2nd some german fighters had cannons installed that were pointing upwards. They attacked allied bombers with them while they stayed under them, in the blind spot where the defense guns couldn't reach them.
Title: Rear guns, side guns, ect
Post by: Taristin on August 02, 2003, 08:10:14 pm
Or you could just cut engines, turn up, and fire... :rolleyes:
Title: Rear guns, side guns, ect
Post by: Galemp on August 02, 2003, 11:31:14 pm
I think this would be better implemented if the game paid attention to the POF's firepoint normals, so angled guns could be made on a per-model basis.
Title: Rear guns, side guns, ect
Post by: FrancisA on August 03, 2003, 02:16:51 am
This would certainly be the Right Way to do things.

The only problem with this is that the FS2 models (and probably a lot of homebrew pofs too) were designed with the expectation that the engine would ignore the firepoint normal.  Thus, many models, especially Volition ones, have normals that are reversed, and there are probably ones that are pointing all sorts of odd directions, too/

It'd probably be possible to write a small little something to give all firepoints a (0,0,1) normal, then just run a list of pofs through this.


On a related note, how much useless junk (old, ignored, or outdated stuff) is there in the pof file structure?  It seems like it might be a lot!  For example, are precalculated light points used?  Is the moment of inertia matrix used, and if so, how is it different from the center of mass vector?  We already know that the firepoint normals are ignored....
Title: Rear guns, side guns, ect
Post by: Nuke on August 04, 2003, 01:24:15 am
id like to implement gun convedrgence on ships. by default all normals on all of volitions ships are 0'0'1, all the moding tools also default the normal to 0'0'1. this means that making the game use that data would not require a massive overhaul of all the ships, just the ones that we want to have convergence on.

since someone brought it up, one problem i have with corkscrew flag is that homing is required to use it. id like a +no homing: tag to be added that will cause the missile to corkscrew without requiring homing.
Title: Rear guns, side guns, ect
Post by: FrancisA on August 04, 2003, 08:16:50 am
No, the problem is that not all normals on Volition ships ARE 0,0,1.  Take a look at some models, like the Herc II, and you'll see.  These model bugs probably got overlooked simply because the model code ignored these normal values, and used 0,0,1.

Now, it doesn't require a _massive_ overhaul of all the ships, but it does require some correction.  A python script could fix this inside of fifty lines (for example).

By "gun convergence", do you mean that the normal is skewed slightly inward, but by some fixed amount, or that the normals of all guns are variable, so that their lines of fire converge on the target, regardless of its distance from you?

If the first, I'm not sure what benefit that'd get you, because the skew would have to be so small that it'd hardly be noticable.  If the second, you can still go around ignoring all the firepoint normals, like now.

However, I think the original question was about guns that fired in different directions, like backwards and such.
Title: Rear guns, side guns, ect
Post by: Nuke on August 07, 2003, 04:03:12 pm
simple solution (from a modders perspective anyway), add a use normals flag to ships table entries, any ship with that tag will use the normals specified in the pof file, any ship without it would just do things the old way.
Title: Rear guns, side guns, ect
Post by: WMCoolmon on August 07, 2003, 11:25:58 pm
IMHO, you should just have to change the normals, not add any flags. There're already a lot of new flags, and every 32 flags multiplayer has to be broken.
My suggestion would be to include an option in the launcher to set all ship normals in a vp/directory to 0-0-1, so people can fix ship normals themselves.

Or, the POF version # could be advanced and the normals on older POFs ignored (as usual).
Title: Rear guns, side guns, ect
Post by: Galemp on August 07, 2003, 11:56:28 pm
Or we could include models with fixed firepoints in the media VP and make it mandatory.
Title: Rear guns, side guns, ect
Post by: FrancisA on August 08, 2003, 12:03:11 am
Two problems.

One: not sure about the legality of distributing trivially-modified Volition data.  (I.e., I'm pretty sure it's not legal.)

Two: It's stupid to give out megabytes upon megabytes of stuff when maybe no more than 50 bytes per fighter model need changing.


It reeks of a hack, but a tbl flag is probably a better way to deal with this.  Least amount of effort, most effective, eliminates duplicated data, backward compatable, etc, with minor cost in code cruftiness.
Title: Rear guns, side guns, ect
Post by: LAW ENFORCER on August 08, 2003, 01:37:17 pm
whatever, we need guns that point diffrent ways and convergene why? cos its new!! we NEED it!:p :rolleyes:

Really it would be useful for, like, tons of fighters that are just asking for backwards firing missiles (anyone wanna get asspect seeking based on normals rather than ship direction?:D )
Title: Rear guns, side guns, ect
Post by: FrancisA on August 08, 2003, 02:04:34 pm
One side of me sees this feature being used only sparingly.  And it would get very tiresome if it were used alot.

The other side is driven mad by the fact that there is this data in the pof that is never being used.  Further, at least for gunpoints, this is an easy feature to add.  (For missle points it'll probably be harder, because of the "locking" code.  At the very least it will have to fire missiles the way missle turrets fire missles: without locking.)
Title: Rear guns, side guns, ect
Post by: Nuke on August 08, 2003, 02:28:44 pm
i think we will need to tweak the fire control code so we could have more weapons banks. possibly implement tertiary slots as well. it would look kinda crappy to have guns firing in multiple directions in one bank. for convergence all this stuff is not nessisary, but if we want to have aft guns and stuff like that then it is required. it would also be cool if we could get a rearview rendering in the targeting box as well, complete with aft lead indicator.
Title: Rear guns, side guns, ect
Post by: Lightspeed on August 08, 2003, 05:34:43 pm
nah, no rear view.

And putting aspect missiles in the back slot could simply make them useless -- they lock on the target you have selected (so its in front of you) and theyll fire, try to turn and lose the lock... After all they're 'video locked' so you should only be able to use heat seeking and dumbfire missiles on any rear slots.

I think rear firing missiles could be somewhat useful whereas things like side guns are pretty useless.

As for the # of banks. Yes, it would be useful to be able to have more than 2 banks -- take a look at the seraphim bomber for example. It has 3 Primary Weapon Banks. The player can take the ship, will not be able to use one of the weapon banks though. :)
Title: Rear guns, side guns, ect
Post by: Flipside on August 08, 2003, 05:44:56 pm
Well, I suppose what we really need is a 'Mine' tag for models, where you can specify activation radius, blast range/force etc ;) That way you would have a really good use for rear missile launchers ;) (yes, I know you can do that with Sexp's, but if you ever flew an anti 'mine' mission in Xwing or the like, you'd know how long it would take to do it properly :D )

Flipside
Title: Rear guns, side guns, ect
Post by: LAW ENFORCER on August 08, 2003, 05:46:15 pm
I was hoping to have a gunship with side fireing "SunStorm" Photon Charges from the side at cap ships...

side guns/missiles WILL be useful to someone, trust me:yes:
Title: Rear guns, side guns, ect
Post by: StarGunner on August 09, 2003, 06:21:08 pm
Quote
Originally posted by LAW ENFORCER
I was hoping to have a gunship with side fireing "SunStorm" Photon Charges from the side at cap ships...

side guns/missiles WILL be useful to someone, trust me:yes:


Yes this is what I need for my total convertion alonge with a wav  like flag that makes the Beam cannon effect Curve in an arch but still hit the other ship for me Gothin Lightning anti-capship gun.