Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: diamondgeezer on March 29, 2003, 02:53:59 am

Title: HUD gagues
Post by: diamondgeezer on March 29, 2003, 02:53:59 am
Right, well thanks to Goober's tinkering we now have ships with more than two primary and/or three secondary banks. However, using this setup screws up one's weapons gague. I've tried making it taller, but I must confess I don't really know what I be doing with HUD stuff. Thus, could we have a volunteer to make some new, uber-large HUD gagues to deal with this stuff, or possibly have the game resize the gagues to fit?
Title: HUD gagues
Post by: Sesquipedalian on March 29, 2003, 03:00:20 am
Actually, the weapons display builds itself out of component bitmaps, sticking in a second or third copy of one of them as needed to make mor or less space.  So all that needs to be done for that is a smidgen of code to make it do so.

Tha harder question is how to make the weapon selection keys work.  The best running theory on that is to change the way the keys work from a forward/backward cycling system to a system where eack bank has its own toggle key.
Title: HUD gagues
Post by: diamondgeezer on March 29, 2003, 03:05:18 am
Perhaps, but even modern jet fighters often require the pilot to cycle through weapon pylons. I suppose it depends on whether or not your fighter has twenty weapon banks - I'm only aiming for six :)
Title: HUD gagues
Post by: Sesquipedalian on March 29, 2003, 03:18:46 am
The secondaries aren't a problem because only one of them can be selected at a time.  Those keys can be left to cycle as they do now (I was unclear about that before).  The difficulty is with the primaries:

Right now, the player can have a maximum of two primary banks, firing in a total of three combinations:

1,0
0,1
1,1

If we have three primary banks, the number of firing cominations grows to seven (assuming one bank is always active):

1,0,0
1,1,0
0,1,0
0,1,1
0,0,1
1,0,1
1,1,1

That many key presses to get the desired firing combination would be annoying, and contribute greatly to pilots getting slagged while having to pay too much attention to cycling through them all to find the right one.  Instead, it was suggested that each of the three banks have a toggle key, so that one could turn on or off any one of them without worrying about the other two.  It would work quite well, from the player's perspective.
Title: HUD gagues
Post by: diamondgeezer on March 29, 2003, 03:21:55 am
Ah, I see. Furry muff :)
Title: HUD gagues
Post by: Bobboau on March 29, 2003, 03:24:26 am
and would screw with a lot of code that says primarys linked == all primary weapons will fire, currently most of the code looks to see wich bank you have selected (and int I beleve) or if you have primaries linked, there are vast swaths of code that will have to be rewriten for this
Title: HUD gagues
Post by: Sesquipedalian on March 29, 2003, 03:27:53 am
Hence I say "It would work quite well, from the player's perspective."  I suspected it would be a coding nightmare. ;)
Title: HUD gagues
Post by: Spicious on March 29, 2003, 03:29:59 am
Quote
Originally posted by Bobboau
and would screw with a lot of code that says primarys linked == all primary weapons will fire, currently most of the code looks to see wich bank you have selected (and int I beleve) or if you have primaries linked, there are vast swaths of code that will have to be rewriten for this

You better get started;)
Title: HUD gagues
Post by: Bobboau on March 29, 2003, 03:59:29 am
how about if we just cycle through the weapons one at a time and then link all three if the ship has three
so it would be something like
1,0,0
0,1,0
0,0,1
1,1,1
that would not be... as much of a nightmare
Title: HUD gagues
Post by: diamondgeezer on March 29, 2003, 06:11:05 am
Er... well how about starting small, and getting the HUD gagues to display properly for ships with lots of weapon banks?

Oh, and of course the other buggerish thing is that FRED only displays four weapon slots. Presumably, weapon editing would need to be done in Wordpad :blah:
Title: HUD gagues
Post by: Sesquipedalian on March 29, 2003, 09:00:46 am
Well, as I recall, the way the primaries work right now is this:

There are actually three banks for primaries when it looks like two.  On a Herc II, for example, bank 1 includes firepoints 1 and 2, bank 2 includes firepoints 3 and 4, and bank 3 includes firepoints 1, 2, 3, and 4.  So the cycling in the primaries is actually just like the cycling in the secondaries, except bank 3 includes the firepoints of the other two instead of having its own.

Thus, when all apparent banks are linked under the current system, that just means bank 3 is selected, does it not?  

The toggle-key idea really only needs to use a little bit of logic for telling the engine which bank to switch to.  Say by default that apparent bank 1 is on and the other two apparent banks are off (1,0,0 -- we'll call that real bank 1).  Then the player presses the toggle for apparent bank 3.  The engine then switches to real bank 6 (1,0,1) because it knows it needs a real bank just like the last one except with apparent bank 3 included.  Then suppose the player toggles apparent bank 1 off.  Now we switch to real bank 5 (0,0,1).  Then the player toggles apparent bank 2 on.  Now we switch to real bank 4 (0,1,1).  It shouldn't take a very complicated system to set this up.

However, I don't know what else might be affected or need to be done...
Title: HUD gagues
Post by: diamondgeezer on March 29, 2003, 09:23:00 am
Dagnammit, stop hijacking my thread! Fix0r the the HUD gague thing right now!

:mad:;)
Title: HUD gagues
Post by: Sesquipedalian on March 29, 2003, 09:42:16 am
It wouldn't do you any good until the rest is taken care of too.
Title: HUD gagues
Post by: diamondgeezer on March 29, 2003, 12:43:51 pm
Any excuse with you lot, isn't it?
Title: HUD gagues
Post by: Solatar on March 29, 2003, 12:51:00 pm
Well.....it is a good excuse...
Title: HUD gagues
Post by: LtNarol on March 29, 2003, 05:52:56 pm
I'd suggested it some time ago, for primaries, I think it'd be best to have a cycle key that goes forward and one that goes backward, these will toggle between 4 choices (or 5 if your have 4 banks): bank 1 only, bank 2 only, bank 3 only (bank 4 only), all banks.  Separately available could be individual bank toggle keys, so as to not break the old system too much.

To resolve the obvious conflicts between toggle keys and cycling keys, just have the forward cycling key automatically start at bank 1 if multiple banks are selected, and have the backward cycling key automatically start at the last bank if multiple banks are selected.
Title: HUD gagues
Post by: Goober5000 on March 29, 2003, 06:57:02 pm
Quote
Originally posted by Bobboau
how about if we just cycle through the weapons one at a time and then link all three if the ship has three
so it would be something like
1,0,0
0,1,0
0,0,1
1,1,1
that would not be... as much of a nightmare


The only thing I tinkered with was the weapon selection function.  And this is exactly how I did it. :nod: So you can select more than the standard amount of weapons, but that's all you can do. ;)
Title: HUD gagues
Post by: Sesquipedalian on March 29, 2003, 08:13:25 pm
Problem with that is, what if I am carrying a Maxim, a Circe, and an Akheton SDG, and am engaging fighters?  I need both my Maxim and Circe firing together, but I certainly don't want the SDG wasting my energy reserves!  I really don't think the simple cycle method will suffice here.
Title: HUD gagues
Post by: diamondgeezer on March 29, 2003, 08:15:20 pm
To be honest, the primaries aren't bothering me, as my fighter only uses a single bank. What I wanted to simulate was six under-wing hardpoints, with a bank (and thus a selection slot) for each. Since secondary banks aren't linked, all that would seem to need doing is getting the weapons gague to be a tad bigger. Or perhaps having a system whereby all the banks carrying the same weapon were merged, thus two banks with 20 harpoons each would simply read '40 Harpoon', or something.
Title: HUD gagues
Post by: CP5670 on March 29, 2003, 11:53:18 pm
I personally think that the idea of having a toggle key for each weapon would work the best. Or maybe three keys, two of which select (next and previous) which weapon is to be toggled and the third used for the toggle, but that would likely need some extra interface graphics to show which weapon is selected to be toggled.

By the way, what about secondary banks? Does the latest fs2_open support 5 banks like some of the Shivan bombers have?
Title: HUD gagues
Post by: Sesquipedalian on March 30, 2003, 03:03:59 am
Fred2 gave space for 3 primaries and 4 secondaries for non-player ships.  If this has been expanded beyond that, I know nothing about it.  It would mean some changes have to be made in Fred, too.  

Personally, I don't think the primaries should be expanded beyond 3 apparent banks -- it just gets too messy, not to mention ridiculously overpowered as far as play balance goes.  For that matter, I should think four secondary banks ought to be more than enough for any one bomber for any one mission.  I mean, five banks?  One could put some of everything in there!  Good missions make Alpha 1 not be a one man show; having five secondary banks would work counter to that. :no::blah:
Title: HUD gagues
Post by: CP5670 on March 30, 2003, 03:18:29 am
ack, typo there; I meant 4 banks, sorry. Five would indeed be rather excessive, but that can be offset by having each bank fairly small (somewhat like the Myrmidon, with many small banks). Same goes with the primary banks; just have them fire only one or two shots each. Actually, I personally am satisfied with the usual two primaries and three secondaries for normal purposes; the only reason I would like to see this stuff is to be able to fly some of those Shivan heavy bombers for fun. :D
Title: HUD gagues
Post by: Sesquipedalian on March 30, 2003, 04:05:42 am
Re: typo: Ah. :)

Even with few firing points (for primaries) or small sizes (for secondaries), having that many banks would be bad, I think, not so much because of having too much firepower (heck, one can increase that to stupidly high proportions now), but because of too much diversity on a single fighter.  More multi-tasking on one ship = less need for distinctive ships = boring missions.

Edit: But I think we are in agreement about this issue, anyway...
Title: HUD gagues
Post by: ##UnknownPlayer## on March 30, 2003, 07:27:54 am
Can I suggest a simple solution of how we should toggle through weapons? How about we keep the current key to select through the primary weapons, but assign a new key that determines whether or not they're to be fired when you pull the trigger - its neat, its effective, and it doesn't require remembering a whole lot of keys.

On top of this, we could also assign keys 1-5 say to remembering preset primary configurations.
Title: HUD gagues
Post by: diamondgeezer on March 30, 2003, 08:37:53 am
I wouldn't be using a large number of secondary banks to abuse my power. Pay more attention to me :)

Quote
Originally posted by diamondgeezer
What I wanted to simulate was six under-wing hardpoints, with a bank (and thus a selection slot) for each.  
Title: HUD gagues
Post by: SKYNET-011 on March 30, 2003, 11:01:37 am
How about using the number keys for the banks?

So number 1 would toggle weapon 1 on\off, and so on.
Title: HUD gagues
Post by: Sesquipedalian on March 30, 2003, 01:23:10 pm
Quote
Originally posted by ##UnknownPlayer##
Can I suggest a simple solution of how we should toggle through weapons? How about we keep the current key to select through the primary weapons, but assign a new key that determines whether or not they're to be fired when you pull the trigger - its neat, its effective, and it doesn't require remembering a whole lot of keys.

On top of this, we could also assign keys 1-5 say to remembering preset primary configurations.
Actually, having a simple toggle for each apparent bank means a grand total of three keys instead of two.  "," "." and "m" for example.  Combining the toggle and cycle systems would just make things messy.
Title: HUD gagues
Post by: diamondgeezer on March 31, 2003, 07:16:11 am
*cries* (http://www.gamers-forums.com/smilies/otn/sad/mecry.gif)

But all I asked for was a bigger weapons gague! Pleeeaaase!!!!!1
Title: HUD gagues
Post by: Nico on March 31, 2003, 07:19:13 am
:lol: