Author Topic: New weapon wont work..  (Read 5936 times)

0 Members and 1 Guest are viewing this topic.

New weapon wont work..
Hi guys, I'v made a new ballistic fighter weapon for the shivans, but when I give them to them they dont use it, just their missiles. But when I put it on an terran or vasudan ship, it works.
I'v been all over FreeSpace Wiki and tried different things but with no result... any guesses?

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: New weapon wont work..
Yes. I guess it would help if you would post that weapon's tbl entry.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 
Re: New weapon wont work..
Of course.. (stupid me)

$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: laser2
@Laser Glow: laser1_2_glow
@Laser Color: 00, 173, 220
@Laser Color2: 00, 173, 220
@Laser Length: 4.7
@Laser Head Radius: 1.3
@Laser Tail Radius: 1.3
$Mass: 0.06
$Velocity: 1800.0 ;; speed of the weapon (initially) -- may or may not change
$Fire Wait: 0.12 ;; in seconds
$Damage: 45
$Armor Factor: 0.9
$Shield Factor: 0.7
$Subsystem Factor: 0.9
$Lifetime: 2.0 ;; How long this thing lives
$Energy Consumed: 0.0 ;; Energy used when fired
$Cargo Size: 0.001 ;; Amount of space taken up in weapon cargo
$Homing: NO
$LaunchSnd: 163 ;; The sound it makes when fired
$ImpactSnd: 85 ;; The sound it makes when it hits something
$Rearm Rate:                        100
+Weapon Range:                        100000 ;; Limit to range at which weapon will actively target object
$Flags: ("in tech database" "cycle" "stream" "shudder" "ballistic")
$Icon: icon_cylonkew
$Anim: icon_cylonkew
$Muzzleflash: raider_muzzle
$FOF: .5
$Shots: 1

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: New weapon wont work..
Did you run debug build? Did the debug build give any warnings, errors, or notifications? Can we see the log file (fs2_open.log)?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: New weapon wont work..
have you set $pcargo size just under the default primary bank?
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: New weapon wont work..
ballistic weapons need ammo. Did you add pbank capacity to the ships using the weapon (in ships.tbl)?

$Default PBanks:            ( "Cannon" )
$pbank capacity: (25)
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: New weapon wont work..
Ahhhhh! Im so stupid, of course! Thanks a million guys!  :D

 
Re: New weapon wont work..
Ok, i tried to make my new weapon THE only weapon that the terrans use, but I keep getting these errors: Error: Required token = [#End], [$Subsystem:], [Name], or [$Template], found [$Allowed PBanks:     (Mec-a].


Here is the table:

$POF file:                      fighter2t-02.pof
$Detail distance:            (0, 80, 300, 900)
$Show damage:               YES
$Density:                       1
$Damp:                          0.25
$Rotdamp:                       0.4
$Max Velocity:               0.0, 0.0, 55.0                  ;; in x/y/z -- z only specified forward.  use special tokens for backward movement
$Rotation time:               3.8, 4.2, 3.8
$Rear Velocity:               0.0
$Forward accel:               3.6
$Forward decel:               1.3
$Slide accel:               0.0
$Slide decel:               0.0
$Expl inner rad:            25.0
$Expl outer rad:            75.0
$Expl damage:               25.0
$Expl blast:               1000.0
$Expl Propagates:            NO         ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed:            0.0         ;; speed shockwave expands at, 0 means no shockwave
$Allowed PBanks:            ( "MEC-A6" )
$Allowed Dogfight PBanks:              ( "MEC-A6" )
$Default PBanks:            ( "MEC-A6" )
$PBank Capacity:        ( 2 )
$Allowed SBanks:            ( "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Infyrno" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "TAG-A" "TAG-B" )
$Allowed Dogfight SBanks:         ( "Harpoon D" "Infyrno D" "Tornado D" "Piranha" )
$Default SBanks:            ( "Harpoon" "Hornet" )
$SBank Capacity:            ( 80, 100 )
$Shields:                  610
$Shield Color:            100 100 255
$Power Output:               3.0
$Max Oclk Speed:            65.0
$Max Weapon Eng:            150.0
$Hitpoints:                     275
$Flags:                         ( "player_ship" "default_player_ship" "fighter")
$AI Class:                      Captain
$Afterburner:               YES
   +Aburn Max Vel:            0.0, 0.0, 120.0
   +Aburn For accel:         0.75
   +Aburn Fuel:            400.0
   +Aburn Burn Rate:         55.0
   +Aburn Rec Rate:         19.0
$Countermeasures:            25
$Scan time:                     2000
$EngineSnd:                  126                   ;; Engine sound of ship
$Closeup_pos:               0.0, 0.0, -30
$Closeup_zoom:               0.5
$Shield_icon:               shieldft-02
$Ship_icon:                     iconfighter2t-02
$Ship_anim:                     ssfighter2t-02
$Ship_overhead:               loadfighter2t-02
$Score:                     100
$Trail:
   +Offset:      0 -6.91 -6.07
   +Start Width:   0.25
   +End Width:   0.05
   +Start Alpha:   1.0
   +End Alpha:   0.0
   +Max Life:   1.0
   +Spew Time:   120
   +Bitmap:   Contrail01
$Subsystem:                     sensors,                                10,0.0
$Subsystem:                     communications, 10,0.0
$Subsystem:                     weapons,                                10,0.0
$Subsystem:                     navigation,                     10,0.0
$Subsystem:                     engine,                         35,0.0

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: New weapon wont work..
...Can you post the tbl? You have posted the error....
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 
Re: New weapon wont work..
... and just the ship tbl...
Sig nuked! New one coming soon!

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: New weapon wont work..
You probably forgot to add a " or , somewhere in the table.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: New weapon wont work..
The error pretty much states what was wrong...

It found a syntax error somewhere in the ships table (or tbm) files in use by detecting line starting with $Allowed PBanks:     (Mec-a where it shouldn't have been. Search the table file(s) for that and you should be able to see what went wrong.
Do not meddle in the affairs of coders for they are soggy and hard to light

 
Re: New weapon wont work..
Well, its not just the PBanks, its the whole ship. Line 181 starts at $Allowed PBanks:

But I cant find anything wrong whit it...



=====>> TERRANS <<=======
$Name:                          GTF Ulysses
$Short name:            TFight
$Species:                       Terran
+Type:                          XSTR("Space Superiority", 2939)
+Maneuverability:       XSTR("Excellent", 2940)
+Armor:                         XSTR("Light", 2941)
+Manufacturer:          XSTR("Triton / Mekhu", 2942)
+Description:         XSTR( " ", 2943)
$end_multi_text
+Tech Description:
XSTR("Affectionately nicknamed 'The Bat' by its pilots, the GTF Ulysses is a well-designed craft that has had a far longer useful life than its engineers ever imagined. Developed jointly by Terran and

Vasudan contractors, the Ulysses was first deployed near the end of the Great War. Its excellent maneuverability and high top speed give it an agility that pilots love, but at a cost of thin armor and a

small secondary weapon loadout. The Ulysses is a better choice for offensive missions than defensive ones.", 2944)
$end_multi_text
+Length:          16 m
+Gun Mounts:      4
+Missile Banks:   1
$POF file:                      fighter01.pof
$Detail distance:       (0, 80, 300, 900)
; $ND:                      42 42 244
$Show damage:           YES
$Density:                       1
$Damp:                          0.1
$Rotdamp:                       0.35
$Max Velocity:          0.0, 0.0, 70.0                  ;; in x/y/z -- z only specified forward.  use special tokens for backward movement
$Rotation time:         3.0, 2.6, 5.0
$Rear Velocity:         0.0
$Forward accel:         2.0
$Forward decel:         1.5
$Slide accel:           0.0
$Slide decel:           0.0
$Expl inner rad:        25.0
$Expl outer rad:        55.0
$Expl damage:           15.0
$Expl blast:            1000.0
$Expl Propagates:       NO                                                      ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed:       0.0                                             ;; speed shockwave expands at, 0 means no shockwave
$Allowed PBanks:       ( "MEC-A6" )
$PBank Capacity:                 ( 2 )
$Allowed Dogfight PBanks:        ( "MEC-A6" )
$Default PBanks:                 ( "MEC-A6" )
$Allowed SBanks:                 ( "Rockeye" "Tempest"  "Hornet" "Tornado" "Hornet#Weak" "Harpoon" "Harpoon#Weak" "EMP Adv." "TAG-A" )
$Allowed Dogfight SBanks:        ( "Tempest D"  "Hornet D" "Harpoon D" )
$Default SBanks:                 ( "Harpoon" )
$SBank Capacity:                 ( 40 )
$Shields:                       380
$Shield Color:      100 100 255
$Power Output:          2.0
$Max Oclk Speed:        94.0
$Max Weapon Eng:        80.0
$Hitpoints:                     180
$Flags:                         ( "player_ship" "default_player_ship" "fighter" "in tech database")
$AI Class:                      Captain
$Afterburner:           YES
   +Aburn Max Vel: 0.0, 0.0, 150.0
   +Aburn For accel:       0.7
   +Aburn Fuel:            300.0
   +Aburn Burn Rate:       50.0
   +Aburn Rec Rate:        25.0
$Countermeasures:       25
$Scan time:                     2000
$EngineSnd:       128                   ;; Engine sound of ship
$Closeup_pos:           0.0, 0.0, -22
$Closeup_zoom:          0.5
$Shield_icon:           shield-f01
$Ship_icon:                     iconfighter01
$Ship_anim:                     ssfighter01
$Ship_overhead: loadfighter01
$Score:             100
$Trail:
   +Offset:      -7.75 -2.8 0.75
   +Start Width:   0.25
   +End Width:   0.05
   +Start Alpha:   1.0
   +End Alpha:   0.0
   +Max Life:   1.0
   +Spew Time:   60
   +Bitmap:   Contrail01
$Trail:
   +Offset:      7.75 -2.8 0.75
   +Start Width:   0.25
   +End Width:   0.05
   +Start Alpha:   1.0
   +End Alpha:   0.0
   +Max Life:   1.0
   +Spew Time:   60
   +Bitmap:   Contrail01
$Subsystem:                     communication,  10, 0
$Subsystem:                     navigation,             10, 0
$Subsystem:                     weapons,                        20, 0
$Subsystem:                     sensors,                        10, 0
$Subsystem:                     engines,                        35, 0

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: New weapon wont work..
is MEC-A6 how the it appears in the  $name line of the weapon

also

$PBank Capacity:                 ( 2 )  goes directly after the $default pbank like with the secondary banks
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 
Re: New weapon wont work..
Thank you. Got it to work.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: New weapon wont work..
The order of tables are really important as you just witnessed. Place one line in the wrong order and the whole table is broken.
If you are not sure what lines goes where check the wiki entries on weapons.tbl and ships.tbl (http://www.hard-light.net/wiki/index.php/Weapons.tbl for example) and check in what order they are listed there.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: New weapon wont work..
Ok, using the same tread here so you dont get pissed by a load of them...

Anyways, I was trying to get the flak to spew "shots" in all directions upon detonation (subach HL-7). Well I got it to do that but now the flak explodes at the same range all the time, very close to the ship. Is there anyway to fix this?

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: New weapon wont work..
Can we see the table entry of the weapon in question?
Do not meddle in the affairs of coders for they are soggy and hard to light

 
Re: New weapon wont work..
Quote
Can we see the table entry of the weapon in question?





$Name:                     Standard Flak
$Model File:               none            ;; flak weapons are invisible until they hit or explode, so this doesn't really matter   
$Mass:                     0.2
$Velocity:                  2500.0               ;; really fast - like AA fire
$Fire Wait:                  0.3               ;;
$Damage:                  10
$Blast Force:                    45.0
$Inner Radius:               30.0                                    ;; radius at which damage is full
$Outer Radius:               60.0                                    ;; max radius for attenuated damage
$Shockwave Speed:            0.0                                     ;; velocity of shockwave.  0 for none.
$Armor Factor:               1.0
$Shield Factor:               1.0
$Subsystem Factor:            0.2
$Lifetime:                  2.5
$Energy Consumed:            0.0
$Cargo Size:               1.0
$Homing:                  NO
$LaunchSnd:                  116
$ImpactSnd:                  117
+Weapon Range:               2000         ;; Limit to range at which weapon will actively target object
$Flags:                     ("Big Ship" "Flak" "particle spew" "cycle" "same turret cooldown" "Spawn Subach HL-7, 14" "smart spawn")
$Icon:                     iconmissile06
$Anim:                     LoadMissile04
$Impact Explosion:            explo3
$Impact Explosion Radius:      50.0
$Muzzleflash:               mflash_small
$Pspew:
   +Count:   50
   +Time:   1
   +Vel:      0
   +Radius:   50.0
   +Life:   4.0
   +Scale:   20.0
        +Bitmap: Flak_trail

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: New weapon wont work..
holly !!!! thats a subach uber shotgun 14 shots per burst at 0.3 second delay meaning you get hit just over 3 times a second with is over 500 damage points per second and that is without the flack damage

another point is you have upped the velocity from 700 to 2500 this is meters per second so at your maximum range it takes less than a second to go from firing to hitting you also you have halved the range over the original which will make it seem like its exploding close to the firing ship

I would say that your problem is in the balance of the weapon's speed and range. I think you will probably have problems with damage capability as well

put this into perspective
GTF Erinyes has 325 hits and 500 shields
GTVA standard Anti Fighter Beam Shots     3
Damage per second                             77
Damage per pulse                                     193 (total)
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art