Author Topic: Shield status  (Read 4623 times)

0 Members and 1 Guest are viewing this topic.

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
I don't know if this requires modifying the code or not, but could there be a way to display the percentage of shields on a ship when you target it, or the percentage of your own shield strength? This would be very useful in certain circumstances.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
You can do this with sexps and custom hud gauges
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
or scripting for that matter (this gives you better rendering options, and less hud integration though).
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
You can do this with sexps and custom hud gauges

Is there a tutorial for this?

Also would it be possible for the SCP team to make it a standard feature that's active by default?

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
I highly doubt SCP will make this a "standard feature that's active by default" simply because it's pretty simple to do with the existing tools.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Well I've never seen it done in any mod I've played...

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
That only means that no one else has needed or wanted to do it. It doesn't mean it's not doable.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Well my point was that without an example to look at I wouldn't know where to start.

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
If you want us to make your mod for you...
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
It's probably a good time to open up FRED, explore the events and sexps, and try some things out.

With SEXPs, a little guesswork should get you in the ballpark. You want to display the shields left for the ship targeted as a percentage. So, you need to capture which ship is being targeted and you need to capture it's shield status. Capturing the shield status of a ship and saving that to a variable is super easy. Anyone moderately familiar with FRED should be able to do that. However, capturing the shield status of the ship being targeted is a bit more difficult. I'll give you a hint, though. When-Argument is probably the best way to do it. I know there are tutorials on the FREDing board or on the Wiki about when-argument sexps.

Get that figured out and you'll end up with the shield percentage of the targeted ship as a variable. Use a trigger count to set the variable every frame. To display it, simply convert the variable to a string (there's a SEXP for that), and display it with a custom HUD gauge by using HUD-set-text. There are a few mods out that use custom HUD gauges (BtA Demo, JAD 2.21).. look at one of those to figure out how that works.

Scripting will be the more universal method, but I don't know enough LUA to help you there.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Thank you.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
the percentage of shields on a ship when you target it

I don't even know what it he wants here, considering that the HUD already displays information about the enemy's shields in at least 3 different ways, but apparently it's clear to everyone else. :doubt:

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
He wants to show the numerical percentage value of remaining shields. Like, with figures and stuff.
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
He wants to show the numerical percentage value of remaining shields. Like, with figures and stuff.

But that's already shown underneath the reticle, is it not?

  

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Nope, that's the percentage of hull remaining. The shield info is just the 4 things around it, which is a purely visual info and not a numerical one.
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Nope, that's the percentage of hull remaining. The shield info is just the 4 things around it, which is a purely visual info and not a numerical one.

Right. Got it. :D

 
can this modified to show the % shield left of your own ship shields per shield bank? given a ship has 4 shield banks, to know how much shields do it has left on each one of the banks? and what about absolute readouts?

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Yes it can :
You can do this with sexps and custom hud gauges
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
I'm having a bit of trouble implementing this. Can I do it all in FRED or do I need to mess with the hud_gauges.tbl?

 

Offline TwentyPercentCooler

  • Operates at 375 kelvin
  • 28
Didn't the old Freespace 1 alpha version have a percentage-based shield system display on the HUD? I seem to remember that it did. If so, I would suggest getting your hands on that mission and picking it apart to see how they did it. Might help a bit.