Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: mmm99 on December 11, 2011, 04:33:09 am

Title: custom beam table help
Post by: mmm99 on December 11, 2011, 04:33:09 am
hi

need some help with a custom beam table i have tried to put in.

i have placed the entry immidiatly before the vasudan beam entries. i cannot see what is wrong with the entry but it doesnt turn up in fred.

here it is

Code: [Select]
$Name: Spurple

$Model File: none ; laser1-1.pof
@Laser Bitmap:                laserglow01
@Laser Color: 128, 0, 128
; pale purple R 128 G 0 B 128
@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:                     10.0 ;; in seconds
$Damage:                        210 ;; 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:                      3.5            ;; 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:       40.0
$BeamInfo:
+Type: 0 ;; 0 - 4 are valid #'s
+Life:   3.5 ;; how long it lasts once the beam is actually firing
+Warmup:   1500 ;; warmup time in ms
+Warmdown: 3000 ;; warmdown time in ms
+Radius:   65.0 ;; muzzle glow radius in meters
+PCount: 25 ;; 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.3 1.3 1.3 1.4 ;; magic # - higher == miss more (only really applicable to type 0 and type 3 beams)
+BeamSound: 146 ;; the looping beam-firing sound
+WarmupSound: 151 ;; associated warmup sound
+WarmdownSound: 158 ;; associated warmdown sound
+Muzzleglow: thrusterglow01 ;; 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: 10 ;; width of the section
+Texture: beam-white ;; texture for this section
+RGBA Inner: 128 0 128 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 190 0 200 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: 20 ;; width of the section
+Texture: beam-white ;; texture for this section
+RGBA Inner: 190 0 200 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 190 0 200 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: 25.0 ;; width of the section
+Texture: beam-white ;; texture for this section
+RGBA Inner: 190 0 200 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 190 0 200 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: 30.0 ;; width of the section
+Texture: beam-white ;; texture for this section
+RGBA Inner: 128 0 128 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 190 0 200 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

; Bright light green R 137   G 252   B 96
; High Energy Green R 102 G 255 B 0
; Puke pale green R 192 G 255 B 200
; Forest Green R 2 G 142 B 18
; White Streek Green Tint R 215 G 249 B 219
; purple r 128 g 0 b0 

(http://koti.mbnet.fi/reiler/FunkyFreeSpaceStuff/code.png)

any help is apreciated
Title: Re: custom beam table help
Post by: MatthTheGeek on December 11, 2011, 05:02:22 am
1) Please post your code with [code ] tags.

2) Please post a log (http://www.hard-light.net/forums/index.php?topic=56279.msg1180359#msg1180359) when reporting issues.

3) Are you sure you selected your mod with the launcher and pressed ok before launching FRED ?
Title: Re: custom beam table help
Post by: Cyborg17 on December 11, 2011, 05:11:16 am
I just applied your code into a .tbm, and without any changes, your weapon showed up.  It also shows up in mission (though it's not purple).
Title: Re: custom beam table help
Post by: headdie on December 11, 2011, 07:13:28 am
Firstly is this in the main weapons table for Freespace 2?

Secondly can you attach the file so I can have a look at the whole thing

Thirdly what type of ship are you trying to use this with?
Title: Re: custom beam table help
Post by: mmm99 on December 12, 2011, 03:42:24 am
sorry about the code tags never used it before(did try though)

not a log posting issue

I did select mod and press ok

thats good it turned  and i am working on the purple bit.

the entry was made straight into the retail freespace weapons table not tbm (dont know if that makes a difference.

theres the table file.

its a theoraticle next gen beam weapon could be mounted on a leviathan more likely a aeolas or your theoraticle next gen cruiser.

[attachment deleted by a basterd]
Title: Re: custom beam table help
Post by: headdie on December 12, 2011, 04:25:06 am
Firstly I am going to point you towards http://www.hard-light.net/wiki/index.php/Ships_and_General_Mod_Creation please read through it all.

Specifically to this issue.

With tbl files only one can exists of each type at once, additional tables of the same type are ignored.  Next a tbl has to follow a set naming convention, in this case weapons.tbl is the only file name that is accepted by the engine, anything else is ignored.

The next point and a massive one is please, please, please don't change retail files until you know what you are doing and save any changes so that they don't overwrite the retail version, the vast majority of mods use retail files, especially tables some where along the line.

Now about tbm files, these, combined with mod folders are a newbie's best friend, they allow for small files to be created to change existing elements of the game or add new ones, like your weapon without making any permanent changes to anything else it covered in the link above. 

For this case in the mod folder create a text file called something like Spurple-wep.tbl (the "-wep.tbm" is important as this tells freespace that the file is a weapons tbm), then with the file open start the file "#primary weapons" (without the speech marks) paste your entry next and stick #end at the bottom of the file.  Save and run
Title: Re: custom beam table help
Post by: mmm99 on December 12, 2011, 04:33:26 am
your a legend headie thanks

showed me how much of a noob i am

I have edited things like hmtl before from star wars empire at war and they were alot easyer to add things to.

thanks i will read the article you posted (i had looked at the modding section of the wiki before attempting table editing).

thanks for the hints with tbm's
Title: Re: custom beam table help
Post by: mmm99 on December 22, 2011, 04:23:09 am
just another question probably a noob question but i didn't see any mention of it in the wiki

but what does this note mean after the rgba inner and outer?

$Section:                        ;; one section of the beam
      +Width:               35.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

just wondering
Title: Re: custom beam table help
Post by: The E on December 22, 2011, 05:13:12 am
Both RGBA Inner and Outer do not do anything, and have never done anything except for some period in :v: development. They can be safely left out.
Title: Re: custom beam table help
Post by: mmm99 on December 22, 2011, 05:16:45 am
cool thanks