Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: boewolf on October 29, 2006, 06:35:00 am

Title: The number of primary banks
Post by: boewolf on October 29, 2006, 06:35:00 am
Using the fs2_open_367.exe build can a bomber have three different primary cannons on a player flyable bomber?
I have run a few searches and didn't find what I was looking for.
Title: Re: The number of primary banks
Post by: karajorma on October 29, 2006, 07:04:23 am
A more important question is why in hell are you using 3.6.7 when you can get the far more stable and all round better 3.6.9 RC 7 from the recent builds forum?

As for your question, that was asked recently but I can't remember the reply. A search should turn up the thread though.
Title: Re: The number of primary banks
Post by: asyikarea51 on October 29, 2006, 07:09:43 am
Can a bomber have three different primary cannons on a player flyable bomber?

Possible, but your guns will fire slow when linked. And three primaries is the limit... I tried four on a capital ship turret and things went screwy in a debug build.
Title: Re: The number of primary banks
Post by: Wanderer on October 29, 2006, 07:41:13 am
IIRC...

Turrets can have upto 10 firepoint per turret with current builds... it was 4 earlier

Primaries are limited to 2 banks for player ships and 3 for AI only ships
Secondaries are limited to 3 banks for player and 4 per AI only ships
Title: Re: The number of primary banks
Post by: asyikarea51 on October 29, 2006, 07:57:32 am
you mean 10 guns per turret in the tables? :wtf:

or 10 places where the turreted gun's projectile can come out from? I'm :confused:...

I think I tried three primaries before; it works, but the guns fired really slow when linked together (as is the case when you link weapons). For four secondaries, I definitely remember trying it... it works fine, just that the player can't switch banks...
Title: Re: The number of primary banks
Post by: Wanderer on October 29, 2006, 08:04:48 am
With firepoints I mean the places defined in model file's (pof) turret properties as the places where the projectile can come out from the turret.
Title: Re: The number of primary banks
Post by: asyikarea51 on October 29, 2006, 11:23:56 pm
Point taken

so it's
10 places where the turreted gun's projectile can come out from

:)
Title: Re: The number of primary banks
Post by: Taristin on October 30, 2006, 12:34:56 am
Erm. Primary gun banks were made dynamic like last year, were they not? Because I've had ships with 3+ primaries...
Title: Re: The number of primary banks
Post by: asyikarea51 on October 30, 2006, 01:15:19 am
:confused:

Fighters?

But on a player-controlled fighter, the gun RPM is like (http://209.85.12.236/5024/118/emo/bangwall.gif)... then again I had 4 primaries in a capship turret once and it worked with a normal build, but debug acted up so I cut it down to three...

:confused:
Title: Re: The number of primary banks
Post by: Tolwyn on November 08, 2006, 02:26:21 am
Primaries are limited to 2 banks for player ships and 3 for AI only ships

I guess player ship with 3 primaries in Saga is a miracle :)
Title: Re: The number of primary banks
Post by: Wanderer on November 08, 2006, 03:12:14 am
Dunno that then... i just read the max values from the code...

code/globalincs/globals.h
Code: [Select]
// from ship.h
#define MAX_PLAYER_PRIMARY_BANKS       2
#define MAX_PLAYER_SECONDARY_BANKS     3
#define MAX_PLAYER_WEAPONS                     (MAX_PLAYER_PRIMARY_BANKS+MAX_PLAYER_SECONDARY_BANKS)


// from model.h
#define MAX_SHIP_PRIMARY_BANKS         3
#define MAX_SHIP_SECONDARY_BANKS       4
#define MAX_SHIP_WEAPONS                       (MAX_SHIP_PRIMARY_BANKS+MAX_SHIP_SECONDARY_BANKS)
Title: Re: The number of primary banks
Post by: karajorma on November 08, 2006, 04:35:27 am
Except for this piece of code in hudtarget.cpp (which might be an oversight) MAX_PLAYER_PRIMARY_BANKS isn't used anywhere in the code.

Code: [Select]
04330: for ( i = 0; i < num_to_test; i++ )
04331: {
04332: bank_to_fire = (swp->current_primary_bank + i) % MAX_PLAYER_PRIMARY_BANKS;
04333:
04334: // calculate the range of the weapon, and only display the lead target indicator
Title: Re: The number of primary banks
Post by: Goober5000 on November 08, 2006, 12:22:11 pm
Oops.  You're probably right.

Support for additional weapons has been added in a series of small changes that began almost since the code was first released.  All ships should now be able to use three primaries and four secondaries.
Title: Re: The number of primary banks
Post by: karajorma on November 08, 2006, 01:05:58 pm
Well when Wanderer posted I just grepped the code cause I knew I hadn't seen MAX_PLAYER_PRIMARY_BANKS previously even though I've fixed bugs in bits of the code where I would have expected to see it. When I only saw one occurence I got very suspicious but I didn't have time to check it out then so I just posted instead :)
Title: Re: The number of primary banks
Post by: Nuke on November 08, 2006, 05:58:38 pm
many nukemod ships have 3 primary banks, but i wish they were higher for things like gunboats. i wouldnt mind having 4 and 4.

*edit*
just tested it, and 4 secondary banks work, mut it breaks the secondary select control /. any chance of fixing that?
Title: Re: The number of primary banks
Post by: taylor on November 08, 2006, 09:25:54 pm
I say that we just remove the MAX_PLAYER_* ones and stick to the MAX_SHIP_* versions instead.  Maybe there is a reason to still keep those player specific versions, but I have no idea what that reason might be.  I assume that might have been more of a support or keyboard config issue than anything else, since obviously the difference in player specific bank support is directly tied to the control config setup.  Having them linked would be the only main issue, but I think that there has already been one or more discussions which have resolved that question.  We can get around it though so I don't think it's a big deal.

i wouldnt mind having 4 and 4.
We can't change it without breaking pilot files though.  We'll be able to bump it later if everyone can actually agree on what to bump it to.  Personally I'd like to leave it as it is, and implement something like gun pods.  That would give you the option of using multiple weapon setups.  We would just add a control option to switch pods and then you get a new set of weapons.  Although it would be more work to actually code, I think that might actually be easier to handle than increasing the max weapon count much beyond what it is now.
Title: Re: The number of primary banks
Post by: Goober5000 on November 09, 2006, 12:49:49 am
I say that we just remove the MAX_PLAYER_* ones and stick to the MAX_SHIP_* versions instead.  Maybe there is a reason to still keep those player specific versions, but I have no idea what that reason might be.

It was a temporary measure until the 3-primary feature was finished.  WMC beat me to it, though, so I didn't bother to go through and see if all the #defines were changed. :)

I had planned to fix that tonight, but I need to get to sleep. :nervous: I'll get to it later.
Title: Re: The number of primary banks
Post by: asyikarea51 on November 09, 2006, 02:59:19 am
just tested it, and 4 secondary banks work, but it breaks the secondary select control. any chance of fixing that?

Yep, tested this too some time back and got the same error.

I'm not using R1's Claymore Mark II anymore though. :sigh: Gotta wait a long time till INF SCP comes out...

Gun pods? Something like the X games or Starlancer...? Sounds interesting for a campaign involving "hero" ships... :D <--- evil grin :lol:
Title: Re: The number of primary banks
Post by: WMCoolmon on November 09, 2006, 03:11:06 am
I don't like the weapon pod idea as a workaround - it forces all mods into the same set of weapon selection, when it could be solved properly by setting up the code to handle the number of banks dynamically. Even if the data structure still used statically-sized arrays, it'd make it possible to easily bump the number of possible weapons.
Title: Re: The number of primary banks
Post by: Nuke on November 09, 2006, 04:13:44 pm
gunpods, to a degree, can already be done with the vwep system. but they still require a bank to act as a mount point. ive been adding alot of external secondary hardpoints lately, and with much success. some other vwep features would be cool, like rocket pods, or enabling normals on the firing points of vwep models.

of course with all those weapons i think we need to rethink weapon select, at least for primaries. with missiles its fairly yeay to switch as you dont have to go through a link cycle. with 4 primaries, perhaps have each weapon on a toggle (number keys!), so you can enable or disable a certain bank via a toggle (giving more linking options).

or perhaps table-defined groups. you can link all weapons within a group, but not between them. so if i have 2 forward guns and one side fire gun, i can link the forward guns without wasting energy on the side gun. like have a $primary groups: ( 0 1 3) (2 3) (2), which would set up 3 groups, first group would have banks 0,1, and 3, ect (i know you hate it when we do that :D). you probibly woundnt need any new controls here. the , key will cycle the indevidual weapons without linking (sorta like secondary select). and using the . key would cycle the groups in linked mode.
Title: Re: The number of primary banks
Post by: Trivial Psychic on November 11, 2006, 10:21:57 pm
Sounds like its time to resurrection tertiary weapons and equipment.