Author Topic: Suggestion for a new feature (HUD distance info in Multitargets)  (Read 10078 times)

0 Members and 1 Guest are viewing this topic.

Offline ARSPR

  • Preys On Mantis
  • 29
Suggestion for a new feature (HUD distance info in Multitargets)
While using Function Keys Multitarget feature, you get a light grey box arround these targets but you get no info of them. I think DISTANCE info in HUD would be great, (more info could be too much one). Now you only get it for out of view targets. This can make more realistic spying missions where you can't get close to enemy fighters/crafts. (I can't imagine a "real" spacecombat computer not telling you which is the closer one).

I think this feature could be triggered by a flag in a similar way as "-targetinfo".
« Last Edit: April 08, 2006, 08:07:02 am by ARSPR »
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Suggestion for a new feature (HUD distance inf
-targetinfo won't work for multitargets? Huh. That should be fixed.

It would also be neat if multitargets had an itty-bitty lead indicator, like just a little dot like Freelancer, just in case. Asteroids are a good example of when you would need it.
But that's a different request.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Suggestion for a new feature (HUD distance info in Multitargets)
I like this idea, so I took a crack at it.  Very easily done, fortunately.  In HUDtarget.cpp, do a search for "if ( OBJ_INDEX(targetp)" [no quotes].  Inside that section, replace the draw_bounding_brackets line with these two lines:
Code: [Select]
float dist = hud_find_target_distance(targetp, Player_obj);
draw_bounding_brackets(x1-5,y1-5,x2+5,y2+5,5,5,dist,OBJ_INDEX(targetp));

Though ASPR is right, more than just distance can be too much info... and since multitarget groups are usually set up by wing, it isn't as essential.  So if that is the general consensus, get rid of the OBJ_INDEX(targetp) argument from above and we're set.

Perhaps there could be more done to this to tidy it up... the ship info is a little too close to the white brackets, and dist is calculated twice in the function.  Plus the white brackets show up on the ship that is actually selected, is this desired?

I like the lead indicator idea too, so I'll bang on that when I have time.  :hammer:

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Suggestion for a new feature (HUD distance inf
We should be signing you up so you can commit your own changes :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Just before I read your posting I thought " Where is this guy's SCP avatar?!?". ;)



@Backslash I send you the final version of the request you've requested soon... Hopefully this week.
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Heh heh.  Thanks!  I'm flattered, but don't assume too much about my programming skills  ;)  I took a bunch of classes in university, so know enough to experiment with things, but I still don't know the very advanced stuff.  (I couldn't get the thing to compile without a friend's help. :ick:)  So far you'll notice most of my changes involve already-existing code.  Like this one, I just looked at how the asteroids show the distance, then applied it to the multitargets.

That said, there's still a lot that can be done with that sort of slicing, eh?  I'd love to help in any way I can.  Where do I sign up?  :D


BTW, where can I find out more about this multitarget?  I only recently discovered it.  Can't find anything about it in the wiki.  For FREDing, is there a general standard of what to assign hotkeys to, besides of course Alpha wing?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Suggestion for a new feature (HUD distance inf
Yep. You can assign default hotkeys in FRED and you can set them up yourself by pressing (IIRC) the F3 key in mission.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Keep in mind that the same style of distance tracking is used for player-detonated missiles, and those have the same color as multitargetted ships. (So they would look identical)
-C

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Yeah the player-detonated missiles and these look similar, but eh, it's not like you don't know you have a player-detonated missile out there.

Would you believe I had never realized what the F3 menu was for??  BOY missions are going to be different now.  :yes:

Here's a test build with Galemp's reticle idea... (not so tiny though)
http://www.qeyleb.net/files/fs2_open_r.exe
What I did was make a function similar to hud_show_lead_indicator, but passed an object targetp.  Then removed the secondary weapon checks and the hud_set_iff_color bits.  Then that function is called from the same place as mentioned above.  More details and source upon request.

I rather like this result.  Makes it much easier to, for example, spray a whole wing of bombers (or pesky heavy fighters) that I'm trying to dissuade from attacking a target.  Gave me a few ideas too, on how to expand the multitarget idea... to see what I could do, I added a new command, Select Target's Wing, which I've bound to the W key on my setup.  Try it out!

Well so far this is easier than I thought.  Yeah, let me know who to contact or what to do to sign up :-)

 

Offline neoterran

  • 210
Re: Suggestion for a new feature (HUD distance info in Multitargets)
dude backslash needs a SCP badge, don't cha think?
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Suggestion for a new feature (HUD distance inf
What say you, Backslash? :)

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Backslash DO JOIN SCP NOW !!!. And please submit your code changes to WinCVS or SCP crew. (WinCVS hasn't got multitarget HUD distance info included yet).

Just one tweak about HUD distance info in multitarget. The multitargeted AND targeted ship has now two distances one over the other making a mess. Could you code to show just one? As the multitarget box is bigger, I would leave the multitarget one (white one) but making it take the target colour (green, red or whatever). Also check that this target distance is drawn over the rest of multitargets distances as it currently does.

Great job  :yes:

And now a noob question. What do the points you get on the upper right corner of the target box mean? I've notice you get from one to four.
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline Shade

  • 211
Re: Suggestion for a new feature (HUD distance inf
Those points are the number of other friendlies attacking the target.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Thank you, Shade.

And to Backslash: I think an easier way to fix the two distance overlayed info in the Targeted and Multitargeted ship could be just coding not drawing multitarget box and distance (the white one) for this ship.

The only problem with your exe is that as multitargets now have aiming point, you've made me change my joystick bindings to have a direct button to "Targeting target's wing" and I'm still not used to it ...  ;)
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Suggestion for a new feature (HUD distance inf
What say you, Backslash? :)
We fight!
...uh I mean, yes please!  So, where do I start?  I'll do my best to not screw everything up  :p

Good points ARSPR.  Can't believe I missed that, I did think of it.  Should be a simple fix.  I have a few other tweaks to do too.  Including a fix for one thing I may have broken but I'm not sure if anyone ever used -- as far as I understand, hotkey group 8 was a virtual group that prevented the ship from showing up on the hotkey list menu during the briefing (I guess so you don't spoil the surprise, "omg a sathanas" or whatever).  Anyone know about this?

the 'problem' you mention, is hard to fix  :D  Really, I think this feature will really change the feel of defense missions, change in a good way I mean.  About that, I have a question on what would be preferred: When you push Shift-F5 (through Shift-F12), it assigns the selected ship to that hotkey, a la X-wing.  (Only recently did I discover this.  It is awesome.)  My question: When a wing is selected with my new way, should the whole wing be then assigned to that F5 hotkey if Shift-F5 is pushed?  Or just the one ship actually selected?

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Suggestion for a new feature (HUD distance info in Multitargets)
I rather like this result.  Makes it much easier to, for example, spray a whole wing of bombers (or pesky heavy fighters) that I'm trying to dissuade from attacking a target.  Gave me a few ideas too, on how to expand the multitarget idea... to see what I could do, I added a new command, Select Target's Wing, which I've bound to the W key on my setup.  Try it out!

As you have asked for them, here you have more suggestions about possible Multitargeting improvements:

1. Showing multitarget distance and aiming point should be optional. As you are modifying the behaviour of "retail" FS2, purist players could prefer not to enable these features that are giving you some advantage. I think the best way is to enable them through a launcher flag. "Target target's wing" can be left always enabled as you can always avoid using it if you want. Nevertheless I would rename "Target Target's Wing" to "Multitarget Target's wing" to make a clear difference.



2. Turning some cycling targeting actions in multitargeting ones. The next targeting actions:
+ Next escort ship.
+ Next / Previous Uninspected Cargo
+ Next / Previous Hostile Bomb or Bomber
would be great if they are converted in multitarget ones. You'll get ALL ships/bombs of their kind in a similar way Function Keys work with their assigned group. Like the previous feature it would be enabled through Launcher Flag as some people may want to avoid them. Or if you don't want to code a launcher flag, code these actions as new targeting ones (so you could bind E to "Target Next escort ship" or to "Multitarget Next Escort ship", or even use another key binding for the last one).

Also, it would be great that the multitargeted group kept updating in real time. I mean if NEW escort ships appear (or whatever), they would be automaticaly added to the multitargeted ones. This autoupdate would be specially useful for tracking enemy bombs (these are the items that re-appear more frequently). This autoupdate would continue working till you target any other kind of ship outside of the group. I mean that if you change your target with any action, ("Ship in reticle" or "Next Target" or whatever), but it is still a ship within the multitargeted group, the autoupdate should continue working.

Also if some ship keeps in play BUT doesn't attach to the selected group anymore, (example: the cargo you have just scanned), it should disapear from the multitargeted group and then your target should move to next target.



3. Turning "Target Nearest xxx" behaviour into "Target Next xxx" and making it multitarget. The next targeting actions:
+ Closest Attacking Ship
+ Target's Nearest Attacker
can be converted in multitargeting ones as 2.. In this way the first time you press their action key, you will get the nearest xxx. But after then, you will get the next ship of group. Also like 2. you should code a launcher flag to enable this feature or you could code new actions if it is easier. And like the former one, the autoupdate would be great.

Maybe, the behaviour of autoupdate will need to be slightly different with ships that keep playing but not in the group. I mean, if you start attacking one of the attackers of a friendly ship, and then this ship just change its objetive to yourself, it has no point to delete it as a target or multitarget. So autoupdate should add ships BUT not remove them, just when you press the action key again the full group should be recreated.




Well, these are YOUR TASKS for the May exam, and you have 1h 30min to finish them. But as they are really easy, it will only take you about 30min. If you can code the three ones you'll get an "A" (10 in Spain). ;)

(In fact, I would do it myself, but I just don't waste my time with such little, easy and stupid changes).  :eek: :eek2: :nervous:



My question: When a wing is selected with my new way, should the whole wing be then assigned to that F5 hotkey if Shift-F5 is pushed?  Or just the one ship actually selected?

My opinion is them all, BUT again if you are changing Retail FS2 behaviour, use a Launcher Flag to enable it. (I mean, if you have a multitargeted group and then you assign them to another Fxx key, what does NOW happen? Do you add the full group or just your targeted ship?).

Nevertheless personally I don't normally use Shift+Fxx. I prefer to plan my groups through F3 window.


« Last Edit: April 22, 2006, 02:42:15 am by ARSPR »
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Suggestion for a new feature (HUD distance info in Multitargets)
I have fixed the small issue with the two distance indicators.  File updated.

I will work on making things optional with a -multitarget flag to turn them on.

Great ideas!  I like all of them!  I'll do what I can.  Some are quite complicated, but I am interested in them myself too.  Autoupdate may be a little difficult unless I can call such a function every time something arrives.
My question: When a wing is selected with my new way, should the whole wing be then assigned to that F5 hotkey if Shift-F5 is pushed?  Or just the one ship actually selected?
My opinion is them all, BUT again if you are changing Retail FS2 behaviour, use a Launcher Flag to enable it. (I mean, if you have a multitargeted group and then you assign them to another Fxx key, what does NOW happen? Do you add the full group or just your targeted ship?).
Currently, it just adds / removes the targeted ship.  (And if you do it to a ship that is already in that group, it will remove it.)  I'll probably make it add / remove the whole wing if -multitarget is on.  Though, hypothetical case:  Aries 2 is in group F8.  I multiselect Aries wing and push Shift-F8.  Should all of Aries wing be put into F8, or all of Aries wing but Aries 2 removed?

Hmm, I wonder if I could make the Shift-F(keys) update the lists in the F3 window...

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Hmm, I wonder if I could make the Shift-F(keys) update the lists in the F3 window...

I haven't tried it but doesn't it happen now?  :confused: I thought F3 window was just another interface to Fxx groups, I mean if you add something to F7, (it doesn't matter how), it would show in F3 window.

I will try your new build ASAP but maybe I'm not going to be able to do it till Thursday.  :sigh:

PLEASEEEE, join SCP and merge your changes with CVS ASAP. SCP crew DOES a great effort keeping FS2 updated and any talented help is always good news.
« Last Edit: April 25, 2006, 01:38:45 am by ARSPR »
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Suggestion for a new feature (HUD distance inf
Backlash is in but he doesn't have CVS access just yet what with someone parking their car in Inquisitor's living room and all.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Suggestion for a new feature (HUD distance info in Multitargets)
Another suggestion before trying the new build: if it is not done and it is easy can you make multitargeting aiming point smaller (about half size)? I feel even normal targeting aiming point is too big but as you only have one it actually doesn't matter. But a lot of big white circles are annoying and as you don't have missile info, a little circle will be enough.
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio