Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: djmcbell on March 25, 2004, 02:44:09 pm

Title: Help creating a fighter - URGENT PLEASE
Post by: djmcbell on March 25, 2004, 02:44:09 pm
Hey people. New user here with a bit of a problem.

At the moment I'm in a group at uni making a Freespace 2 mod. We have various models, all work OK and all are able to be fired by the computer, but NOT by the player.

I have followed various tutorials which have told me how to implement turret objects and the like, which is fine, and edit the tbl file, which is fine, but the player, when in control of these models, cannot shoot. There are no weapons in the weapon slots.

I'm sorry to be a pain, but will someone please tell me where I'm going wrong. Here's a brief description of what I do -

1 - import the model into a pof (with a turret in the model, actually as a subObject)

2 - go into the PCS and get the turret working with the Turret tab (this normally happens automatically due to the SubObject name)

3 - go into the ships.tbl and add the turret as a subsystem, and then after that add the default primary weapons again

4 - test and it all works fine, apart from there are no weapons for the player to fire.

Thanks for your time.
Title: Help creating a fighter - URGENT PLEASE
Post by: StratComm on March 25, 2004, 02:56:55 pm
Player ships have no control over turrets.  What you should be adding rather than a turret subsystem and submodel is adding gun and missile points.  There's an extensive FAQ on the subject, which can be accessed from the signature of the member here Karajorma or I think through the HLP Wiki that should help you.
Title: Help creating a fighter - URGENT PLEASE
Post by: Darkage on March 25, 2004, 02:57:07 pm
From what i can tell you didn't created firing points for the primary weapons in pcs. You must create firing point in order to make a fighter shoots its primary weapons.
Title: Help creating a fighter - URGENT PLEASE
Post by: djmcbell on March 25, 2004, 03:23:49 pm
Hmm... I've tried creating the gun/missile firing points (already did them in the turrets of course) but that seems to stop the computer controlling the other ships firing its weapons at all.

Unless I'm going about it the wrong way (which I probably am)

In any case, thanks for the help and pointing me in the right direction guys!
Title: Still not working...
Post by: djmcbell on March 25, 2004, 03:34:29 pm
Sorry - have tried adding gun/missile points (with the firing points) and it doesn't seem to be working. I'm including the extract from the tbl file just in case, the stuff about the turret (which is the only major thing I changed) is at the bottom, last two lines -

Quote
$Name:                          Space Police Ship
$Short name:            Police
$Species:                       Terran
+Type:                          XSTR("Space Superiority", -1)
+Maneuverability:       XSTR("Excellent", -1)
+Armor:                         XSTR("Light", -1)
+Manufacturer:          XSTR("Triton / Mekhu", -1)
+Description:         XSTR( " ", -1)
$end_multi_text
+Tech Description:
XSTR("Gah. This isn't working. Damn you vile... erm... weapons.", -1)
$end_multi_text
+Length:          16 m
+Gun Mounts:      4
+Missile Banks:   1
$POF file:                      sffighter.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:        ( "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" "Targeting Laser")
$Allowed Dogfight PBanks:        ( "Subach HL-D" "Prometheus D" )
$Default PBanks:        ( "Subach HL-7" "Prometheus R" )
$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:             8
$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
$Subsystem:                   turret01,      3.0, 2.0
$Default PBanks:        (       "Shivan Mega Laser" "Shivan Heavy Laser" )
Title: Help creating a fighter - URGENT PLEASE
Post by: djmcbell on March 25, 2004, 05:17:35 pm
Aha - just managed to find the turreting FAQ. Hopefully the answers lie within.

But it's too late and I can't be bothered at the moment. Will give it a look tomorrow.
Title: Help creating a fighter - URGENT PLEASE
Post by: Flipside on March 25, 2004, 05:43:50 pm
Why is there another DefaultPbanks right at the end of the code? I'm not sure about FS2, but it's confused me ;)
Title: Help creating a fighter - URGENT PLEASE
Post by: StratComm on March 25, 2004, 05:46:35 pm
Problem 1: unless you specifically need the turret for rear coverage, ditch it.  The description of this thing as a police craft doesn't sound like something that should need a turret.

Problem 2: I still don't think you're looking at the right fire points.  You need the section of PCS or ModelView called "Guns," not "Turrets".  Fire points for fighters must be grouped into banks, and all points have to be oriented forward.

The table looks fine.  I would suggest using :V: ships as a reference when setting up things like guns though.

Flipside: that definition is for the turret (I thought it was wrong too, but it should actually be ok) and looks strange because the tables always have it tabbed over.  Not sure if the parsing takes tabs into account, but I doubt it.
Title: Help creating a fighter - URGENT PLEASE
Post by: Flipside on March 25, 2004, 06:04:48 pm
Ah yes, I see it now, thanks Stratcomm :D
Title: Help creating a fighter - URGENT PLEASE
Post by: StratComm on March 25, 2004, 06:12:43 pm
You know, if a mission exists with that ship in it, and he didn't at least open and re-save it, it may actually have AI fighters flying unarmed.  That could explain why they don't shoot, though I somehow doubt it.  The problem lies in the model, which is a little hard for us to diagnose without actually being able to look at it.
Title: Help creating a fighter - URGENT PLEASE
Post by: karajorma on March 25, 2004, 06:34:31 pm
Quote
Originally posted by djmcbell
Aha - just managed to find the turreting FAQ. Hopefully the answers lie within.


Probably not unless it's your turrets that are the problem.

The problem appears to be with your Gun points not your turrets.

Have a look at bobbaou's PCS tutorial. Especially the bit about gun points. You can find it here (http://freespace.volitionwatch.com/blackwater/fstut/fstut_index01.htm)

Oh and since no one else has done it

:welcome:
Title: Help creating a fighter - URGENT PLEASE
Post by: Darkhill on March 25, 2004, 08:29:38 pm
...sorry...
Title: Help creating a fighter - URGENT PLEASE
Post by: StratComm on March 25, 2004, 08:47:10 pm
Wrong thread :p

If an admin sees that, please move it to the appropriate thread.
Title: Help creating a fighter - URGENT PLEASE
Post by: Darkhill on March 25, 2004, 08:51:33 pm
Yah, not sure what happened on that one, I replied to my topic.  Fixing it myself now.
Title: Help creating a fighter - URGENT PLEASE
Post by: StratComm on March 25, 2004, 08:53:14 pm
Interesting... looks like the boards hiccuped.  Never a good sign.
Title: Help creating a fighter - URGENT PLEASE
Post by: Setekh on March 26, 2004, 04:40:35 am
Welcome to HLP, djmcbell. Let us know if you get anywhere with those turrets.

:welcome:
Title: Help creating a fighter - URGENT PLEASE
Post by: djmcbell on March 26, 2004, 05:15:32 am
Thanks for the welcome.

And now... back to the evil that is Freespace 2 modding!
Title: Help creating a fighter - URGENT PLEASE
Post by: djmcbell on March 26, 2004, 05:25:31 am
Holy cr*p!!

Well that was weird. I could'a sworn I tried that before.

Basically, I put the gun firepoint back in, and it worked (I DID try it before).

What I DIDN'T try before, that StratComm suggested (many thanks StratComm) was re-opening the mission and saving it. It appears that that seems to have solved it.

Mwuhahaha... now I just need to wait for the rest of my group to send me their models, and the modding can properly get underway.

Many thanks for the help guys!
Title: Help creating a fighter - URGENT PLEASE
Post by: Setekh on March 26, 2004, 05:58:42 am
Quote
Originally posted by djmcbell
Thanks for the welcome.

And now... back to the evil that is Freespace 2 modding!


No prob. But remember, modding is not the enemy here. We are modders - the enemies of modding are what's evil. ;)