Author Topic: Beam Cannons  (Read 4567 times)

0 Members and 1 Guest are viewing this topic.

Offline ShadowGorrath

  • Not funny or clever
  • 211
Alright , so , I have a question .

How do you make new beam cannons ? I mean both graphically and in tbl editing . I am asking for this because I'd like to make my own beam cannons that look different than ones in-game , but I don't know how to do it . So can anyone help me please and post some kind of tutorial here ?

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Graphically: you have to create new textures for them.

Table editing: It's easy ;)

This is the table entry of the BGreen, used by Terran destroyers in FS2:

Code: [Select]
$Name: BGreen

$Model File: none ; laser1-1.pof
@Laser Bitmap:                laserglow01
@Laser Color: 0, 255, 54
; Pale green R 192 G 255 B 200
@Laser Length: 0.0
@Laser Head Radius: 0.3
@Laser Tail Radius: 0.3
$Mass:                          100.0
$Velocity:                      1600.0 ;; speed of the weapon (initially) -- may or may not change
>>>>>>$Fire Wait:                     15.0<<<<<< ;; in seconds
>>>>>>$Damage:                        2400<<<<<<<< ;; NOTE: for beam weapons this is kind of a "continuous" damage applied every few fractions of a second that the beam is on.
$Armor Factor:                  1.0
$Shield Factor:                 1.0
$Subsystem Factor:              1.0
$Lifetime:                      25.0            ;; How long this thing lives
$Energy Consumed:               0.30            ;; Energy used when fired
$Cargo Size:                    0.0              ;; Amount of space taken up in weapon cargo
$Homing:                        NO
$LaunchSnd:                     125              ;; The sound it makes when fired
$ImpactSnd:                     88              ;; The sound it makes when it hits something
>>>>>>>+Weapon Range: 4000<<<<<< ;; Limit to range at which weapon will actively target object
$Flags:                         ("Big Ship" "huge" "beam")
$Icon:                          icongun05
$Anim:                          LoadGun07
$Impact Explosion:              ExpMissileHit1
$Impact Explosion Radius:       60.0
$BeamInfo:
+Type: 0 ;; 0 - 4 are valid #'s
+Life:   4.0 ;; how long it lasts once the beam is actually firing
+Warmup:   3500 ;; warmup time in ms
+Warmdown: 3500 ;; warmdown time in ms
+Radius:   110.0 ;; muzzle glow radius in meters
+PCount: 20 ;; particles spewed every interval
+PRadius: 1.4 ;; particle radius
+PAngle: 60.0 ;; angle of the random "cone" where the particles are generated
+PAni: particleexp01 ;; particle ani
+Miss Factor: 1.0 1.1 1.1 1.7 1.4 ;; magic # - higher == miss more (only really applicable to type 0 and type 3 beams)
+BeamSound: 147 ;; the looping beam-firing sound
+WarmupSound: 154 ;; associated warmup sound
+WarmdownSound: 159 ;; associated warmdown sound
+Muzzleglow: beamglow3 ;; muzzle glow bitmap
+Shots: 0 ;; only used for TYPE 3 beams
+ShrinkFactor: 0.0 ;; what percentage of lifetime where beam starts shrinking (0.1 == 10% life left)
+ShrinkPct: 0.0 ;; what percentage of max width we subtract per second
$Section: ;; one section of the beam (you can have up to 5)
+Width: 25 ;; width of the section
+Texture: beam-red ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.0 ;; how much it flickers (0.0 to 1.0)
+Zadd: 4.0 ;; hehe
$Section: ;; one section of the beam
+Width: 30 ;; width of the section
+Texture: beam-green2 ;; texture for this section
+RGBA Inner: 160 160 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 60 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.45 ;; how much it flickers (0.0 to 1.0)
+Zadd: 3.0 ;; hehe
$Section: ;; one section of the beam (you can have up to 5)
+Width: 40.0 ;; width of the section
+Texture: beam-green ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.4 ;; how much it flickers (0.0 to 1.0)
+Zadd: 2.0 ;; hehe
$Section: ;; one section of the beam
+Width: 50.0 ;; width of the section
+Texture: beam-green3 ;; texture for this section
+RGBA Inner: 255 0 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 0 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.5 ;; how much it flickers (0.0 to 1.0)
+Zadd: 0.0 ;; hehe

Most fields are intuitive, like Fire Wait, Weapon Range and Damage. I suggest you to play around with them before modding parameters like Warmup and Warmdown(and beam sections).

Here's an example of a simple table editing:

Code: [Select]
>>>>>>>>>>>$Name: ExtraPowerfulBGreen <<<<<<<<<

$Model File: none ; laser1-1.pof
@Laser Bitmap:                laserglow01
@Laser Color: 0, 255, 54
; Pale green R 192 G 255 B 200
@Laser Length: 0.0
@Laser Head Radius: 0.3
@Laser Tail Radius: 0.3
$Mass:                          100.0
$Velocity:                      1600.0 ;; speed of the weapon (initially) -- may or may not change
>>>>>>>$Fire Wait:                     30.0<<<<<<<< ;; in seconds
>>>>>>>$Damage:                        1200<<<<<<<< ;; NOTE: for beam weapons this is kind of a "continuous" damage applied every few fractions of a second that the beam is on.
$Armor Factor:                  1.0
$Shield Factor:                 1.0
$Subsystem Factor:              1.0
$Lifetime:                      25.0            ;; How long this thing lives
$Energy Consumed:               0.30            ;; Energy used when fired
$Cargo Size:                    0.0              ;; Amount of space taken up in weapon cargo
$Homing:                        NO
$LaunchSnd:                     125              ;; The sound it makes when fired
$ImpactSnd:                     88              ;; The sound it makes when it hits something
>>>>>>>+Weapon Range: 4000<<<<<<< ;; Limit to range at which weapon will actively target object
$Flags:                         ("Big Ship" "huge" "beam")
$Icon:                          icongun05
$Anim:                          LoadGun07
$Impact Explosion:              ExpMissileHit1
$Impact Explosion Radius:       60.0
$BeamInfo:
+Type: 0 ;; 0 - 4 are valid #'s
+Life:   4.0 ;; how long it lasts once the beam is actually firing
+Warmup:   3500 ;; warmup time in ms
+Warmdown: 3500 ;; warmdown time in ms
+Radius:   110.0 ;; muzzle glow radius in meters
+PCount: 20 ;; particles spewed every interval
+PRadius: 1.4 ;; particle radius
+PAngle: 60.0 ;; angle of the random "cone" where the particles are generated
+PAni: particleexp01 ;; particle ani
+Miss Factor: 1.0 1.1 1.1 1.7 1.4 ;; magic # - higher == miss more (only really applicable to type 0 and type 3 beams)
+BeamSound: 147 ;; the looping beam-firing sound
+WarmupSound: 154 ;; associated warmup sound
+WarmdownSound: 159 ;; associated warmdown sound
+Muzzleglow: beamglow3 ;; muzzle glow bitmap
+Shots: 0 ;; only used for TYPE 3 beams
+ShrinkFactor: 0.0 ;; what percentage of lifetime where beam starts shrinking (0.1 == 10% life left)
+ShrinkPct: 0.0 ;; what percentage of max width we subtract per second
$Section: ;; one section of the beam (you can have up to 5)
+Width: 25 ;; width of the section
+Texture: beam-red ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.0 ;; how much it flickers (0.0 to 1.0)
+Zadd: 4.0 ;; hehe
$Section: ;; one section of the beam
+Width: 30 ;; width of the section
+Texture: beam-green2 ;; texture for this section
+RGBA Inner: 160 160 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 60 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.45 ;; how much it flickers (0.0 to 1.0)
+Zadd: 3.0 ;; hehe
$Section: ;; one section of the beam (you can have up to 5)
+Width: 40.0 ;; width of the section
+Texture: beam-green ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.4 ;; how much it flickers (0.0 to 1.0)
+Zadd: 2.0 ;; hehe
$Section: ;; one section of the beam
+Width: 50.0 ;; width of the section
+Texture: beam-green3 ;; texture for this section
+RGBA Inner: 255 0 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 0 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.5 ;; how much it flickers (0.0 to 1.0)
+Zadd: 0.0 ;; hehe

I have changed the parameters mentioned above(Damage, Fire wait and Weapon Range). Fire wait is 1/2 of the original, Damage and Weapon Range are 2x the original. I used many "<" and ">" to underline the changes(don't add them!).

Many good informations are accessible from the Wiki :)
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 ShadowGorrath

  • Not funny or clever
  • 211
Hey , thanks . That helped a lot  :)

Now for the graphical part - how do I create textures for them ? I tried myself , but failed miserably .

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Try to modify existant textures. Extract them from the Media VPs with VP View and use a program like Photoshop to play around with them :)

Remember to give your modified textures new names. Modify the table entry accordingly :)
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 Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
I don't have the mediavps  :sigh:

But if anyone can upload them somewhere , I'd try to modify them .

And I tried that link , it only made me confused about the retexturing part  :p

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Well, if you want to practice...you can extract the original textures from Retail FS2 and modify them :)
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 ShadowGorrath

  • Not funny or clever
  • 211
I tried . And failed .

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
What do you intend for "failed"? FS doesn't accept your modified textures or...you don't find the results satisfying? In the second case, just don't give up ;)
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 ShadowGorrath

  • Not funny or clever
  • 211
I meant FS didn't like the changes so they didn't work  :D

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
I see. What ahve you done, exactly? Have you changed format, resolution or stuff like that?
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 ShadowGorrath

  • Not funny or clever
  • 211
No . Format and etc. was the same . I think . I only drew a testing beam effect . But it didn't work - loaded a dull red beam , without any power up animation and etc. That's why I need a tutorial . Usually I self learn stuff , but this time I totally failed in this .

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Where did you place the modified texture? You should create a mod folder for it ;)
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 ShadowGorrath

  • Not funny or clever
  • 211
D:\Games\Freespace2\BeamModtest\Data\Effects

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
At this point, I have no clue on what your problem is related with :blah:
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 ShadowGorrath

  • Not funny or clever
  • 211
I think it's because of bad format in which  saved the "new beam textures" . So that's why I asked for some kind of tutorial . I want to know how exactly to make new beam textures and table edit .

The things I need to know about the beam textures : what size do I need to make the textures , what EXACT format do I need to save it ( I am using GIMP 2.2 , and it has options for each format , I dunno which to choose ) and etc.

  

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
I suggest you to play around with the entries, then work on the textures...
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

 
http://www.hard-light.net/wiki/index.php/Weapons.tbl
+
read the tbl file a few times to get the feel of it, make a simple beam (1 section) and play with the tbl, testing how each modification changes the beam. It worked for me, and it's pretty much fun (I even came up with a Command&Conquer 3-ish railgun, but I'll keep it a secret how to do it :P)

As for textures, still didn't try.
'Teeth of the Tiger' - campaign in the making
Story, Ships, Weapons, Project Leader.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
While working just save the textures/effects as TGA images (truevision targa without RLE). And always use power of two textures - the height and width (number of pixels) should be among the numbers you get with 'power of two'. That is something like 256 x 256 is ok, as is 128 x 512 etc. For basic beam texture either 128 x 128 or 256 x 256 should be adequate. Also leave the alpha away for now.

What format did you try?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
PCX . And that is the problem !   :D

Is there any way I can use DDS format ? TGA is too slow on my PC .