Author Topic: custom HP for missiles/torpedos?  (Read 8829 times)

0 Members and 1 Guest are viewing this topic.

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • FLAMES OF WAR
custom HP for missiles/torpedos?
Will that be in 3.6.10? :blah:
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: custom HP for missiles/torpedos?
I was wondering the same thing meeself.

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: custom HP for missiles/torpedos?
Would be awesome for subspace cruise missiles, or skipper (wing commander fanbois rejoice) missiles!
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: custom HP for missiles/torpedos?
Well there are already local Local SSM.

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: custom HP for missiles/torpedos?
I know that :D anyone played project sylpheed? It has missiles the length of battleships lol
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
Will that be in 3.6.10? :blah:

No.

And ten out of ten for moving from simply asking for a feature respectfully to asking why it won't be in 3.6.10 as if it's some sort of failing from the SCP to have not included it the second you thought of it.


EDIT : Actually since you're a coder why don't you do it? Here's your starting point.

weapon_create() contains this little snippet of code

   if (wip->wi_flags & WIF_BOMB){
      objp->hull_strength = 50.0f;
   } else {
      objp->hull_strength = 0.0f;
   }

There you go. Add the table function and test heavily in both multiplayer and single player until you've proved beyond a reasonable doubt that you haven't introduced any bugs.
« Last Edit: February 23, 2008, 10:51:09 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: custom HP for missiles/torpedos?
It would be cool if we could also have shields for bombs, but maybe I'm asking for too much.

EDIT: I just looked at the code, and adding custom HP to a bomb wouldn't be too hard ( I'm not even going to look at sheilds ).  Would it look something like this?:

weapon.h
Code: [Select]
typedef struct weapon_info {
...
float max_hull_strength;
...
}

weapon.cpp
Code: [Select]
void init_weapon_entry(int weap_info_index) {
...
wip->max_hull_strength = 0.0f
...
}

int parse_weapon(int subtype, bool replace) {
...
if(optional_string("$Hitpoints:"))
{
stuff_float(&wip->max_hull_strength);
if (wip->hitpoints < 0.0f)
{
Warning(LOCATION, "Max hull strength on %s '%s' cannot be less than 0.  Defaulting to 0.\n", info_type_name, wip->name, wip->max_hull_strength);
wip->max_hull_strength = 0.0f;
}
}
...
}

int weapon_create( vec3d * pos, matrix * porient, int weapon_type, int parent_objnum, int group_id, int is_locked, int is_spawned) {
...
if (wip->wi_flags & WIF_BOMB){
if (wip->max_hull_strength <= 0.0f) {
objp->hull_strength = 50.0f;
} else {
objp->hull_strength = wip->max_hull_strength;
}
} else {
objp->hull_strength = 0.0f;
}
...
}

Forgive me if this is incomplete/buggy/flat out wrong, I am really a n00b programmer who is used to working with high-level, object-oriented APIs in GUI based apps (in Objective-C or Java), and I am not set to test this.
« Last Edit: February 23, 2008, 12:36:56 pm by blowfish »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
Seems about right. I'd assumed that would be all there was to it when I noticed the code I posted above and clipped it to my things to do list. I'd probably have replaced this if

Code: [Select]
if (wip->max_hull_strength <= 0.0f)
with an assertion since in the usual running of the game there's no way that value should be negative due to the way the parse code was written and if something else is changing the value I'd rather know about it than silently fix it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: custom HP for missiles/torpedos?
Does that mean we will get custom HP for bombs sometime in the near future? ;)

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
If people want to test it, sure. I see no reason not to.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline JGZinv

  • 211
  • The Last Dual! Guardian
    • The FringeSpace Conversion Mod
Re: custom HP for missiles/torpedos?
Baxslash and myself had come up with the concept a few months ago
for a few different variants of the SSM, in some cases including shields.

However we just decided to use a "ship" (as a missile/bomb) with tweaked
attributes and scripted events. 

But this will probably make it easier now.  :)
True power comes not from strength, but from the soul and imagination.
Max to PCS2 to FS2 SCP Guide
The FringeSpace Conversion Mod

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • FLAMES OF WAR
Re: custom HP for missiles/torpedos?
If people want to test it, sure. I see no reason not to.


YAaaaay!!
but honestly, it's not like this is a new idea. I recall seeing this idea thrown about for years.

Hooray for the SCP team! They bring us much goodies! :D :D :D :D
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
I know it's not a new idea. The fact I've had it on my todo list for ages proves that. But the simple fact is that unless you have reason to believe someone was working on it acting like it should be in 3.6.10 is a quick way to piss off the coders.
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: custom HP for missiles/torpedos?
Especially given that you claim to be working on some kind of 50-page project based on the SCP to prove that you understand the code and that you deserve a degree, but then you have people explain the code to you because you don't want to actually learn how to code.

It's kind of hard to feel sympathetic for someone who's openly professed to taking advantage of the people who actually do the work for the degree, so that they can try to BS their professors and devalue the degree that they're getting.
-C

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: custom HP for missiles/torpedos?
I thought the plural of "torpedo" was "torpedoes".
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • FLAMES OF WAR
Re: custom HP for missiles/torpedos?
Especially given that you claim to be working on some kind of 50-page project based on the SCP to prove that you understand the code and that you deserve a degree, but then you have people explain the code to you because you don't want to actually learn how to code.

It's kind of hard to feel sympathetic for someone who's openly professed to taking advantage of the people who actually do the work for the degree, so that they can try to BS their professors and devalue the degree that they're getting.

Actually, I decided to make a engine instead of modifying an existing one. It's crap, but it works and I'm happy. And I'm not trying to get a degree for programing..computer sciences ecompases much more than just coding.
« Last Edit: February 23, 2008, 04:55:43 pm by TrashMan »
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Re: custom HP for missiles/torpedos?
Wouldn't bombs need more sophisticated collision detection anyway? Right now the coordinate of (0,0,0) within the bomb model must be within the radius of a primary weapons shot for the bomb to blow up, right?
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline Polpolion

  • The sizzle, it thinks!
  • 211
Re: custom HP for missiles/torpedos?
What about dampening for missiles? Is that even remotely possible?

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: custom HP for missiles/torpedos?
What about dampening for missiles? Is that even remotely possible?

Next thing we know we have bombs with turrets. :p

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Re: custom HP for missiles/torpedos?
The Venom cruise missile has a turret :P

One second... what if we use a normal model(with shields) as bomb? Is it going to keep the shields? There are a few screenshots of Erynies torpedoes and other interesting stuff somewhere.
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito