Author Topic: Weapon.tbl et sound tbl questions  (Read 839 times)

0 Members and 1 Guest are viewing this topic.

Weapon.tbl et sound tbl questions
Hi all,

First of all , i've read carefully the hardlight freespace2 wiki tables section carefully,
Given that information i got two problem i can't manage to solve for now.
I use the 3_6_10-20071028T build for now
The first one councerne the subspace missile system, so as i ve read , on the ssm.tbl i got this :
Quote
;; subspace missile strike definition

"$SSM:
   +Weapon:Tpunishment
   +Count: 5
   +WarpRadius: 100
   +WarpTime: 3
   +Radius: 1000
   +Offset: 1500
#end
and in the weapons.tbl the given nam missile looks like this :
Quote
; ----------------------------------------------------------------------------------
; Tyranic fury missile
;
$Name:               @TFury
+Title:               XSTR(TmwI Tyranic Fury)
+Description:
XSTR(
"Standard Issue
Fire and Forget")
$end_multi_text
+Tech Title:            XSTR("Tyranik Fury Missile")
+Tech Anim:               Tech_GTM_MX-64_Rockeye
+Tech Description:
XSTR(
"The TMWI Fury is a deadly fast and accurate missile, a new generation coming in the

Tyranic army the Tyranic Fury will certainly make his prove on the heat of the battle"
$end_multi_text
$Model File: rockeye.pof
$Mass:                              5.0
$Velocity:                           350.0
$Fire wait:                           5.0
$Damage:                           80
$Blast Force:                           400
$Inner Radius:                           20
$Outer Radius:                           40
$Shockwave Speed:                        0.0
$Armor Factor:                           1.0
$Shield Factor:                           0.1
$Subsystem Factor:                        1.0
$Lifetime:                           10.0
$Energy Consumed:                        0.0
$Cargo Size:                           4.0
$Homing:                           YES
   ;; the following indented fields are only required when $Homing is YES
   +Type:                        ASPECT         

                           ;; Legal: HEAT,

ASPECT
   +Turn Time:                     0.30
   +Min Lock Time:                  3.0            

                           ;; Minimum lock

time (in seconds)
   +Lock Pixels/Sec:               60                       

                ;; Pixels moved per sec while locking
   +Catch-up Pixels/Sec:            100               

                        ;; Pixels moved per sec

while catching up
   +Catch-up Penalty:               30          

$Local SSM:
+Warpout Delay:                     500.0
+Warpin Delay:                     500.0
+Stage 5 Velocity:                  80.0
+Warpin Radius:                     50.0
+Lock Range:                     500.0      
$LaunchSnd:                        87         

                                 

;; The sound it makes when fired
$ImpactSnd:                        88         

                                 

;; The sound it makes when it hits something
$FlyBySnd:                        -1
$Rearm Rate:                           4.0
$Flags:                             ("player allowed"

"No Dumbfire" "local ssm")
$Trail:
+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

When with that tables entry i launch the game, i got the error :
Error:Required token = [#End] or [$Name], found [$Local SSM:]
So i think i'm wrong somewhere with my local ssm, but i don't see where exactly???



Ok now the second problem is about thruster and sound,
in the sound table i fill some empty entry (175 176 and 177) and in my ships.tbl thruster settings i wrote this :

Quote
$Thruster:
+Used for: ( "pitch down" "slide down"  )
+Position: (-0.000000 1.000001 12.700002)
+Normal: ( -0.000000 1.500001 12.700002)
+Texture: Plasmathrust
+Radius: 0.25
+Length: 0.5
+StartSnd: 175
+LoopSnd: 176
+StopSnd: 177

my sound tbl entry are :
Quote
$Name:   175   thrusterV1start.wav,   0, 0.50, 1,  50, 400 ;Debut Thrust
$Name:   176   thrusterV1loop.wav,   0, 0.50, 1,  50, 400 ;Boucle Thrust
$Name:   177   thrusterV1end.wav,   00, 0.50, 1,  50, 400

my sounds are 22khz 16bit mono (same format i use for my gatling sound that works pretty well already)
so with that sounds when i play the game, if i move my joytsick, the game crash without message.
Does filling in empty entry a bad way to include new sound? should i better replace an existing entry instead?

Thanks for your help guys  :(

$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Weapon.tbl et sound tbl questions
First SSMs are not the same as local SSMs.

Second as stated several times in the wiki the order of the table entries is actually very, very important. You seem to have placed the 'local SSM' field after 'Homing' field and before 'launchsound' field - and the parser does not expect to find that particular entry from that location. See http://www.hard-light.net/wiki/index.php/Weapons.tbl - in your table the local SSM field would go to the very end of that entry, after $Impact Explosion Radius:            5.0 .

As for thruster sounds...  I haven't personally tried those - it might be possible that there is only the parsing code there but nothing else... Have you tried running debug build?
Do not meddle in the affairs of coders for they are soggy and hard to light

 
Re: Weapon.tbl et sound tbl questions
Ok thanks you for your reply!
i knew there is a order to respect in the table but i didn't know where i should place my ssm entry.
For the sound i will try to replace an existing sound to give a try, that worked for my main thruster ship so it should work for the directional thruster :)

About ssm and local ssm, if i want to use just a local ssm i just need to remove my entry in the ssm.tbl right?

i ll try


« Last Edit: November 23, 2007, 04:30:47 am by Reprobator »
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Weapon.tbl et sound tbl questions
If you want to use just the local SSMs then you have no need for the SSM.tbl entry.
Do not meddle in the affairs of coders for they are soggy and hard to light

 
Re: Weapon.tbl et sound tbl questions
Thank you very much,  that works pretty well now!
except that the bomb seems to randomly miss the target, however that kind of torpedo would be to powerfull if it was 100% accurate  ;7

So now i ll take a loock about sound problem
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1