Jump to content
SubSpace Forum Network

Recommended Posts

Posted

Something I've just been thinking about... and I'll write it before I forget it...

 

This was inspired by how Freespace 2 makes its weapons... probably several other games use that too

 

Basically, you'd have a weapon 'table' that defines each weapon types used in a particular arena. For each weapon defined, there would be some basic settings, like the type (projectile, lock-on missile, beam, debris), speed/trajectory settings (acceleration, speed, heat-seeking/homing capability, wave trajectory, random trajectory...), the graphics/animations (for firing, the missile itself, the trail, etc) , some particular weapons could have some other settings, like the size of a beam weapon, its glow color and intensity... Of course, the damage settings (direct damage, splash damage, the shrapnel to use)

The shrapnel to use would simply be a reference to another weapon, making awesome weapons possible... Like you fire a big bomb, it blows up with multiple smaller bombs, which then blow up with shrapnel.

 

Here's an example of some weapons from the weapons table of Freespace 2:

 

Subach HL-7 (low-power laser)

$Name: @Subach HL-7

+!@#$%^&*le: XSTR("GTW Subach HL-7", -1)

+Description:

XSTR(

"Standard Issue

Level 3 Hull Damage

Level 2 Shield Damage", -1)

$end_multi_text

+Tech !@#$%^&*le: XSTR("Subach HL-7", -1)

+Tech Anim: Tech_Subach_HL-7

+Tech Description:

XSTR(

"The Subach-Innes HL-7 is a xaser weapon, firing an intense, highly focused beam of x-ray emissions. Until the Shivans appeared with their shield technology, these weapons were considered an unnecessary and costly extravagance. But Great War dogfights against Shivan craft quickly taught the Allies that their ships didn't stand a chance unless they could punch through shields. The HL-7 works superbly against shields of all varieties and has become the standard issue Primary weapon for all Terran fighters and bombers.", -1)

$end_multi_text

$Model File: none

; The following fields (preceded by @) are only required for laser

; rendering, which requires that "Model File:" be none.

; These are the same values that used to be hard-coded:

@Laser Bitmap: newglo9

@Laser Glow: 2_laserglow03

@Laser Color: 250, 0, 0

@Laser Color2: 0, 0, 250

@Laser Length: 10.0

@Laser Head Radius: 0.90

@Laser Tail Radius: 0.90

$M!@#$%^&*: 0.2

$Velocity: 450.0 ;; speed of the weapon (initially) -- may or may not change

$Fire Wait: 0.2 ;; in seconds

$Damage: 15

$Armor Factor: 0.9

$Shield Factor: 0.7

$Subsystem Factor: 0.3

$Lifetime: 2.0 ;; How long this thing lives

$Energy Consumed: 0.20 ;; Energy used when fired

$Cargo Size: 0.0 ;; Amount of space taken up in weapon cargo

$Homing: NO

$LaunchSnd: 76 ;; The sound it makes when fired

$ImpactSnd: 85 ;; The sound it makes when it hits something

+Weapon Range: 100000 ;; Limit to range at which weapon will actively target object

$Flags: ("in tech database" "player allowed" "stream")

$Icon: iconSD4

$Anim: SD4

$Impact Explosion: none

 

Rockeye (heat-seeking missile)

$Name: @Rockeye

+!@#$%^&*le: XSTR("GTM MX-64 Rockeye", -1)

+Description:

XSTR(

"Standard Issue

Fire and Forget", -1)

$end_multi_text

+Tech !@#$%^&*le: XSTR("GTM MX-64 Rockeye", -1)

+Tech Anim: Tech_GTM_MX-64_Rockeye

+Tech Description:

XSTR(

"The GTM MX-64 Rockeye is a faster, more accurate, larger payload version of the MX-50 that was in service at the beginning of the Great War. The missile developed as a result of experimentation by engineers at some of STX Exploration's most isolated mining operations, in the systems of Laramis and Luyten 726-BA. Advances in remote-controlled explosive devices were used by GTVA engineers to improve the old MX-50s. The heat-seeking MX-64 Rockeye is now a standard loadout for Terran fighter craft.", -1)

$end_multi_text

$Model File: rockeye.pof

$M!@#$%^&*: 5.0

$Velocity: 190.0

$Fire Wait: 0.5

$Damage: 45 ;; damage applied when within inner radius

$Blast Force: 200.0

$Inner Radius: 20.0 ;; radius at which damage is full

$Outer Radius: 40.0 ;; max radius for attenuated damage

$Shockwave Speed: 0.0 ;; velocity of shockwave. 0 for none.

$Armor Factor: 1.0

$Shield Factor: 0.8

$Subsystem Factor: 0.8

$Lifetime: 10.0

$Energy Consumed: 0.0 ;; Energy used when fired

$Cargo Size: 4.0 ;; Amount of space taken up in weapon cargo

$Homing: YES

;; the following indented fields are only required when $Homing is YES

+Type: HEAT ;; Legal: HEAT, ASPECT

+Turn Time: 0.85

+View Cone: 100.0 ;; See 70/2 = 35 degrees from ahead to maintain lock.

$LaunchSnd: 87 ;; The sound it makes when fired

$ImpactSnd: 88 ;; The sound it makes when it hits something

$FlyBySnd: -1

$Rearm Rate: 4.0 ;; number of missiles/sec that are rearmed

$Flags: ("in tech database" "player allowed") ;;

$Trail: ;; Trail cannot be set if Exhaust is set

+Start Width: 0.4 ;; Width of trail nearest missile

+End Width: 0.1 ;; Width of trail before it "evaporates"

+Start Alpha: 1.0

+End Alpha: 0.0

+Max Life: 0.2 ;; how many seconds before trail disappears

+Bitmap: newmiss3 ;; Bitmap used to draw trail

$Icon: iconMX-64

$Anim: mx64

$Impact Explosion: ExpMissileHit1

$Impact Explosion Radius: 5.0

 

I just noticed the sounds (Launch sound, Impact sound, Flyby sound)... these would be good to have too

 

Then, for the ships, we'd just need to set which weapons are allowed on each ship, on which slot (primary, secondary...) , an ammo count, and some other info related to the ship. That would take out everything that is related to the weapons from the ship settings; thus simplifying, imo.

 

In Freespace's case, these tables are simple text on the client-side, but I guess these things would be on the server-side for us, and the server would send only important info to the clients or something

 

 

 

Anyway... just wanted to get this off my head smile.gif

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...