Author Topic: Problems with muzzle flash  (Read 2291 times)

0 Members and 1 Guest are viewing this topic.

Problems with muzzle flash
I am trying to add a muzzle flash to some of my costume weapons but when I try to run FSO it crashes and gives me an error about the music.tbl. :wtf:

#Muzzle flash types

;; small muzzle flash
$Mflash:
+name:         mflash_small      ;; whatever you want to name it

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   1.0
+blob_radius:   6.0               

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   4.5
+blob_radius:   4.0               

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   6.0
+blob_radius:   3.0               

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   8.5
+blob_radius:   3.0               

;; Flak muzzle flash
$Flakf:
+name:         Flak_Flash      ;; whatever you want to name it

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   1.0
+blob_radius:   6.0               

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   4.5
+blob_radius:   4.0               

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   6.0
+blob_radius:   3.0               

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   8.5
+blob_radius:   3.0               

;; blue muzzle flash
$Bflash:
+name:         Blue_Flash      ;; whatever you want to name it

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   1.0
+blob_radius:   6.0               

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   4.5
+blob_radius:   4.0               

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   6.0
+blob_radius:   3.0               

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   8.5
+blob_radius:   3.0               
#end
Si Vis Pacem Para Bellem
         "If you wish for peace, prepare for war."

 

Offline Odyssey

  • Stormrider
  • 28
Problems with muzzle flash
[color=cc9900]Have you tried the debug build of FSO? That ought to tell you the problem.[/color]

 
Problems with muzzle flash
I ran a debug build. These are the errors it gave me.

Warning: mflash.tbl(21):
Error: Required token = [#end], found [$Flakf:] .

File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Parse\PARSELO.CPP
Line: 378

Call stack:
------------------------------------------------------------------
    required_string()    mflash_game_init()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e814c7()
------------------------------------------------------------------

Warning: mflash.tbl(23):
Error: Required token = [#end], found [+name:         Flak_Flash      ] .

File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Parse\PARSELO.CPP
Line: 378

Call stack:
------------------------------------------------------------------
    required_string()    mflash_game_init()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e814c7()
------------------------------------------------------------------

Warning: mflash.tbl(26):
Error: Required token = [#end], found [+blob_name:      Red Muzzle               ] .

File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Parse\PARSELO.CPP
Line: 378

Call stack:
------------------------------------------------------------------
    required_string()    mflash_game_init()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e814c7()
------------------------------------------------------------------

Warning: mflash.tbl(28):
Error: Required token = [#end], found [+blob_offset:   1.0 ] .

File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Parse\PARSELO.CPP
Line: 378

Call stack:
------------------------------------------------------------------
    required_string()    mflash_game_init()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e814c7()
------------------------------------------------------------------

Warning: mflash.tbl(29):
Error: Required token = [#end], found [+blob_radius:   6.0               ] .

File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Parse\PARSELO.CPP
Line: 378

Call stack:
------------------------------------------------------------------
    required_string()    mflash_game_init()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e814c7()
------------------------------------------------------------------

Warning: Error: Unable to find required token [#end]

File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Parse\PARSELO.CPP
Line: 485

Call stack:
------------------------------------------------------------------
    mflash_game_init()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e814c7()
------------------------------------------------------------------

Error: Unable to parse music.tbl!  Code = 1.

File:e:\languages\visual studio projects\visual c++\fs2_open\code\gamesnd\eventmusic.cpp
Line: 1157

Call stack:
------------------------------------------------------------------
------------------------------------------------------------------

This is the 1_30 build
Si Vis Pacem Para Bellem
         "If you wish for peace, prepare for war."

 
Problems with muzzle flash
So no one has any idea what is wrong? :nervous:
Si Vis Pacem Para Bellem
         "If you wish for peace, prepare for war."

 

Offline diamondgeezer

Problems with muzzle flash
Muzzle flashes are something of a new technology. Peeps prolly not used to using them yet

 

Offline Unknown Target

  • Get off my lawn!
  • 212
  • Push.Pull?
Problems with muzzle flash
Wait wait, when did this get put in?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Problems with muzzle flash
Quote
Originally posted by Jonathan_S47
I ran a debug build. These are the errors it gave me.

Warning: mflash.tbl(21):
Error: Required token = [#end], found [$Flakf:] .

File:E:\Languages\Visual Studio Projects\Visual C++\fs2_open\code\Parse\PARSELO.CPP
Line: 378

Call stack:
------------------------------------------------------------------
    required_string()    mflash_game_init()    game_init()    WinMainSub()    WinMain()    WinMainCRTStartup()    kernel32.dll 77e814c7()
------------------------------------------------------------------
 


I recently spent a couple of hours Debugging the MG tables using Fred2_OpenGL so I know that kind of error quite well (even though I was seeing it's relatives in the ships and weapons tables not the muzzle flash table. :)

What this error means is that the parser was expecting to find a line beginning with #end in it and instead found $flakf. While something similar puzzled me for a while I eventually figured out  that in my case I hadn't got anything incorrect in the tables but some fields were in the wrong order.

If you can't find any documentation on the order things should go in the only thing you can do is try moving the $flakf line about a bit until things work.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Problems with muzzle flash
Ok I figured out what the problem was. I thought the $Mflash: that started the original entirey was just part of the naming system. Turns out that it was identifying the entry as a muzzle flash so the $Flakf and $Bflash entries that I made were invalid. I changed them to $Mflash and it is working now.

UT: Freespace 2 always had muzzle flash. Only the flak guns use them though.
Si Vis Pacem Para Bellem
         "If you wish for peace, prepare for war."

 

Offline Deepblue

  • Corporate Shill
  • 210
Problems with muzzle flash
Mind posting the table entry you used and some screen shots? :D
« Last Edit: February 21, 2004, 07:14:38 pm by 944 »

 
Problems with muzzle flash
Well, here is what the correct table entries look like.

#Muzzle flash types

;; small muzzle flash
$Mflash:
+name:         mflash_small      ;; whatever you want to name it

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   1.0
+blob_radius:   6.0               

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   4.5
+blob_radius:   4.0               

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   6.0
+blob_radius:   3.0               

+blob_name:      expmissilehit1               ;; anim name, offset from muzzle, radius
+blob_offset:   8.5
+blob_radius:   3.0               

;; Flak muzzle flash
$Mflash:
+name:         Flak_Flash      ;; whatever you want to name it

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   1.0
+blob_radius:   6.0               

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   4.5
+blob_radius:   4.0               

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   6.0
+blob_radius:   3.0               

+blob_name:      Red Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   8.5
+blob_radius:   3.0               

;; blue muzzle flash
$Mflash:
+name:         Blue_Flash      ;; whatever you want to name it

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   1.0
+blob_radius:   6.0               

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   4.5
+blob_radius:   4.0               

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   6.0
+blob_radius:   3.0               

+blob_name:      Blue Muzzle               ;; anim name, offset from muzzle, radius
+blob_offset:   8.5
+blob_radius:   3.0               


#end

As for the screen shots, I don’t have any place to host then right now.
Si Vis Pacem Para Bellem
         "If you wish for peace, prepare for war."

  

Offline Deepblue

  • Corporate Shill
  • 210
thanks. :D