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

0 Members and 1 Guest are viewing this topic.

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
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.


Wasn't that takashi?

 

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?
Did the torpedo keep the shields?
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 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?
Kamikaze flag ftw!
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?
Did the torpedo keep the shields?

No. It might even have made it easier to hit.


On the topic of adding features, how hard could it really be to add another legal flag to the Subsystem flags field which automatically destroys the ship when the subsystem is destroyed (without having to have SEXPs)?
« Last Edit: February 24, 2008, 11:28:59 am by Snail »

 

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?
SEXPs work fine. And what if you don't want a ship to blow up after the destruction of a certain subsystem?
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
On the topic of adding features, how hard could it really be to add another legal flag to the Subsystem flags field which automatically destroys the ship when the subsystem is destroyed (without having to have SEXPs)?

Harder than telling the FREDder to not be so ****ing lazy and just use a SEXP.
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?
Actually, that seems kind of useful if you wanted to consistently make a 'cockpit' subsystem for fighters that would blow the thing up (kill the pilot, fry the electronics, reactor goes critical). Could add some variety to things.
-C

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: custom HP for missiles/torpedos?
The feature that I always though would be nice is a way to tell if a player shot down a bomb and be able to assign a point score to the bombs.  Also tracking bomb kills in player stats would be nice.  Kind of a way to reward a player for playing good defense. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

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?
It would be useful in a StarLancer MOD.
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 Koth

  • 28
  • Join the NTF! We have cookies!
Re: custom HP for missiles/torpedos?
Slightly related question: Is there a limit on how many flags a ship or a weapon can have?
The Signature is a Nuke!

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: custom HP for missiles/torpedos?
Slightly related question: Is there a limit on how many flags a ship or a weapon can have?

From what I saw in the code, there is none, though eventually you will run out of memory (that's not likely to happen any time soon though).

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
Slightly related question: Is there a limit on how many flags a ship or a weapon can have?

Practically, once we hit 32 flags we have to add a new section (Which is why each ship in the mission file have a Flags() and a Flags2() section). Apart from that I can't think of one.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Polpolion

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

:(

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: custom HP for missiles/torpedos?
What about dampening for missiles? Is that even remotely possible?

Actually there is a roation dampening number that is automatically set to 0 but could become a weapons.tbl option the same way custom hitpoints could.  Not sure about speed though.

EDIT: Speed can be dampened too.

Does anyone know the significance of this like of code from weapon.cpp:

Code: [Select]
objp->shield_quadrant[0] = wip->damage;
« Last Edit: February 28, 2008, 07:40:30 pm by blowfish »

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: custom HP for missiles/torpedos?
EDIT: Double post.  Whoops! :nervous:
« Last Edit: February 28, 2008, 07:39:18 pm by blowfish »

 

Offline Polpolion

  • The sizzle, it thinks!
  • 211
Re: custom HP for missiles/torpedos?
With my 4 weeks of c++ classes, I am going to conjecture that the line applies the weapons damage to whatever shield quadrant objp might be pointing to, assuming it is a pointer at all, and completely disregarding whatever "wip" is.


Damn. The hardest part of trying to learn how to code the SCP is figuring out what the hell all those variables/pointers/abbreviated prefixes/classes/whatever are. BTW, any tips on learning that, aside from just sitting down and reading the entire code?

EDIT: Nevermind, I should probably just learn how to program first. :p
« Last Edit: February 28, 2008, 08:03:24 pm by thesizzler »

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: custom HP for missiles/torpedos?
objp stands for object pointer, wip stands for weapon info pointer (pointer to weapon_info struct)
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
Does anyone know the significance of this like of code from weapon.cpp:

Code: [Select]
objp->shield_quadrant[0] = wip->damage;

My guess would be that it's some kind of error which has been hidden by the fact that weapons can't have shields. The current version was added by Phreak but is merely a change from this

Code: [Select]
objp->shields[0] = wip->damage;
I can't think why a weapon's damage would be stored in the shield array. You should get that info out of Weapons_info when you need it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Steam
    • Something
Re: custom HP for missiles/torpedos?
Damn. The hardest part of trying to learn how to code the SCP is figuring out what the hell all those variables/pointers/abbreviated prefixes/classes/whatever are. BTW, any tips on learning that, aside from just sitting down and reading the entire code?
That's kind of the conundrum I was faced with when I started playing around with downloading/compiling the source.  I've taken a few C/++-related classes, so I feel like I probably have enough technical knowledge to make at least a tiny contribution to the project...but after looking at that mass of files and directories, I realized that, even were I to pick what seemed like a relatively minor bug in Mantis and try to start working on it, I'd have no idea at all where to go.  I suspect that the only way to get anywhere is to just grit your teeth and start hopping between files.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: custom HP for missiles/torpedos?
You can pick up a good amount of how the game works from just looking at the structs in object.h, ship.h and weapon.h

Many of the variables ending in p are a pointer to to an object in one of the arrays from those files. sip = Ship_info pointer, wip = Weapon_info pointer etc. Your IDE probably has a way to leap to the definition of any variable easily, use it.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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