Hard Light Productions Forums

Community Projects => The FreeSpace Upgrade Project => Topic started by: killface on December 19, 2008, 12:03:53 am

Title: 3.6.10 and ships.tbl
Post by: killface on December 19, 2008, 12:03:53 am

Hey all,

Just downloaded the VPs for 3.6.10.  Everything looks FANTASTIC all of a sudden.  But here's my problem.  I made a bunch of changes to ships.tbl, but those changes no longer seem to work in-game.  I have the .tbl file in the mediavps directory with the 3.6.10 stuff.  But no dice.  Anyone have a hunch as to what is going on?

Keep up the awesome work, you guys.

-killface
Title: Re: 3.6.10 and ships.tbl
Post by: eliex on December 19, 2008, 12:40:14 am
Did you put the tbl. file in /mediavps/data/tables folder?
Title: Re: 3.6.10 and ships.tbl
Post by: Wanderer on December 19, 2008, 02:29:48 am
What did you change and for which ships?
Title: Re: 3.6.10 and ships.tbl
Post by: Droid803 on December 19, 2008, 04:36:41 pm
Make a tbm that overwrites the MVPs, I guess. That's what I had to do. :P
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 19, 2008, 05:25:22 pm

Tried moving the tbl file to data/tables.  It actually caused a crash, so undid that.

I changed names, speeds, weapons, everything.  Really gutted all of those tables, and now none of them are having any effect at all.

Droid, how do you go about making a .tbm file that overrides the MVPs?  I used VPVIEW to took at the tbms in the MVPs and there didn't seem to be anything in particular I could hack...
Title: Re: 3.6.10 and ships.tbl
Post by: Droid803 on December 19, 2008, 05:28:48 pm
Well, read up on Modular Tables (http://www.hard-light.net/wiki/index.php/Modular_Tables), make a xxxx-shp.tbm and copy-and paste your changes there. (Be sure to use +nocreate on things that aren't additions).
You're going to have to put it somewhere (most likely mediavps/data/tables, or your own mod).
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 19, 2008, 05:42:19 pm

What's the "xxxx" in that equation?  The wiki article makes it seem like it can be anything, is that right?
Title: Re: 3.6.10 and ships.tbl
Post by: Droid803 on December 19, 2008, 06:12:10 pm
Yep, it can be anything you like.
Given that it is a valid file name, of course.
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 20, 2008, 12:27:09 am

OK, but from what I'm reading, it seems like tbm files merely let you modify or extend existing ship entries.  How do I ADD or RENAME a ship?
Title: Re: 3.6.10 and ships.tbl
Post by: FUBAR-BDHR on December 20, 2008, 12:55:25 am
Same way you would using a table. 
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 20, 2008, 01:06:55 am
This is driving me bat****!  So I copy and pasted a renamed ship from my old ships.tbl into a file called xxxx-shp.tbm.  I have this modular table in the mod folder, in its data subfolder, and in the main freespace 2 folder for good measure.  No matter what I do or where I put this file, I CANNOT get the renamed ship to show up in Fred2 or in the game.  BUT, if I run fred2 3.6.9...everything still works.  WTF???  What am I doing wrong?
Title: Re: 3.6.10 and ships.tbl
Post by: Wanderer on December 20, 2008, 02:51:30 am
Can you post the contents of the tbm (as well as the name of the file) here? (use code tags for example)
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 20, 2008, 02:31:32 pm

Alright.  This is file "Alpha-wep.tbm", the example shown on the wiki page.  This DOES work for me:

#Primary Weapons
$Name:              @Subach HL-7
     +nocreate
$Velocity:         650.0   
$Trail:
     +Start Width:      0.4
     +End Width:        0.0
     +Start Alpha:      0.35
     +End Alpha:        0.0
     +Max Life:         0.2
     +Bitmap:           Contrail
#End

And THIS is "Alpha-shp.tbm", my attempt to import a made-up ship for the purposes of testing.  It's located in the same folder as the example above, /data/tables.  This DOES NOT work for me:

#Ship Classes
$Name:                          CIF Spitfire
$Short name:                    TFight2t-03
$Species:                       Terran
+Type:                          XSTR("Interceptor", 2981)
+Maneuverability:               XSTR("High", 2982)
+Armor:                         XSTR("Average", 2983)
+Manufacturer:                  XSTR("Rock in the Sky Defense", 2984)
+Description:               XSTR(" ", 2985)
$end_multi_text
+Tech Description:
XSTR("Blah", 2986)
$end_multi_text
+Length:                  17 m
+Gun Mounts:               1
+Missile Banks:               2
$POF file:                      fighter2t-03.pof
$POF target LOD:      0
$Detail distance:            (0, 80, 300, 900)
$Show damage:               YES
$Density:                       1
$Damp:                          0.20
$Rotdamp:                       0.40
$Max Velocity:               0.0, 0.0, 195.0                  ;; in x/y/z -- z only specified forward.  use special tokens for backward movement
$Rotation time:               3.5, 3.5, 3.5
$Rear Velocity:               0.0
$Forward accel:               1.8
$Forward decel:               1.3
$Slide accel:               0.0
$Slide decel:               0.0
$Glide: YES
$Expl inner rad:            50.0
$Expl outer rad:            150.0
$Expl damage:               50.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:            ( "CMI 71-KEC" "CMI 71-KECWEAK" "CMI 71-KECMISS" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" )
$Allowed Dogfight PBanks:         ( "MorningStar D" "Prometheus D" "Maxim D" "Circe" "UD-D Kayser" )
$Default PBanks:            ( "CMI 71-KEC" "CMI 71-KEC" )
$PBank Capacity:            ( 1000, 1000 )
$Allowed SBanks:            ( "CDC Stinger"  "Tempest" "Harpoon" "Trebuchet" "Stiletto II" "Infyrno" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "TAG-A" "TAG-B" )
$Allowed Dogfight SBanks:         ( "Tempest D" "Harpoon D"  "Tornado D" )
$Default SBanks:            ( "CDC Stinger" "Harpoon" )
$SBank Capacity:            ( 5, 5 )
$Shields:                          0
$Shield Color:            100 100 255
$Power Output:               20.0
$Max Oclk Speed:            218.0
$Max Weapon Eng:            150.0
$Hitpoints:                        295
$Flags:                         ( "player_ship" "default_player_ship" "fighter" )
$AI Class:                      Captain
$Afterburner:               YES
   +Aburn Max Vel:         0.0, 0.0, 531.0
   +Aburn For accel:       0.8
   +Aburn Fuel:            330.0
   +Aburn Burn Rate:       40.0
   +Aburn Rec Rate:        1.0
$Countermeasures:         15
$Scan time:                 2000
$EngineSnd:               126                   ;; Engine sound of ship
$Closeup_pos:            0.0, 0.0, -30
$Closeup_zoom:            0.5
$Shield_icon:            shieldft-03
$Ship_icon:                 iconfighter2t-03
$Ship_anim:                 ssfighter2t-03
$Ship_overhead:            loadfighter2t-03
$Score:                  14
$Max decals:         10
$Trail:
   +Offset:      6.51 -1.76 -3.37
   +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
$Trail:
   +Offset:      -6.51 -1.76 -3.37
   +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
$Trail:
   +Offset:      0 -4.30 -5.08
   +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
#End
Title: Re: 3.6.10 and ships.tbl
Post by: Wanderer on December 21, 2008, 04:30:16 am
Have you enabled more ships? As there is a limit for ship classes in the game and after all the various fs2 ships there is not much room left (there is room for couple of ships though). Also did you actually enable the ship in the mission file?
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 21, 2008, 11:11:49 am

Yeah, the ship is among those listed in the mission file.  The bigger issue is, that when I open FRED2 or Freespace 2 3.6.10 versions, neither program recognizes ANY changes I've made to ships.tbl or the tbm file.  Nothing I add, delete or edit has an effect, it's just pulling stuff straight off the original, unedited versions and I can't figure out why.
Title: Re: 3.6.10 and ships.tbl
Post by: Wanderer on December 21, 2008, 12:05:11 pm
Use the launcher to select debug build.  Run your mod/mission (just enter the mission and quit). Find 'fs2_open.log' file from the data directory of the main freespace dir. Post it here (prefereably with code tags).
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 21, 2008, 01:02:56 pm
OK, apparently the log file is too large to attach?!?!  (1435 KB) I didn't even get into the mission anyway, it just crashed on the attempt.  The log file does seem rather large, though, I'm not sure what can be gleaned from it.  Is it supposed to be 2100 pages long when pasted into Word?  I doubt it.  I'd love to post the code tags, but, uh, what are those and how do I find them?   :P
Title: Re: 3.6.10 and ships.tbl
Post by: Droid803 on December 21, 2008, 01:04:28 pm
They're [-code-] (minus the dashes)
Title: Re: 3.6.10 and ships.tbl
Post by: Jeff Vader on December 21, 2008, 01:18:09 pm
Or alternatively one of the buttons above all the smilies. The one that has a #.
Title: Re: 3.6.10 and ships.tbl
Post by: Wanderer on December 21, 2008, 01:22:56 pm
Or make use of pastebins

like... http://www.hard-light.net.pastebin.com/
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 21, 2008, 01:27:20 pm

It's too big for pastebin too.  Why is this file so damn huge?  I literally have no idea what to be looking for in this Bible-length file to post here. 
Title: Re: 3.6.10 and ships.tbl
Post by: chief1983 on December 21, 2008, 01:34:43 pm
Do you have a debug_filter.cfg or something similar in the folder with that log file?  It would possibly be spitting out parse information along with everything else, which can make it huge.  If not I have no idea, unless you grabbed the wrong file by mistake.
Title: Re: 3.6.10 and ships.tbl
Post by: killface on December 21, 2008, 01:39:55 pm

Here's the contents of the debug.cfg file.  Anything I should change?

+General
+General
+General
+Parse
+Error
+BmpMan
+Paging
+Network
+BmpFastLoad
+Fred routing
+SEXP
+Maps
+OpenGL
+SHADER-DEBUG
+Sound
+Model
+AB TRAIL
+Particles
Title: Re: 3.6.10 and ships.tbl
Post by: Wanderer on December 21, 2008, 01:50:10 pm
You might as well remove the debug_filter.cfg until you really need it.
Title: Re: 3.6.10 and ships.tbl
Post by: chief1983 on December 21, 2008, 09:19:51 pm
Not necessarily, just make it -Parse instead of +Parse.  None of the others should blow it up that much.  Parsing is probably 90 or 95% of the log.
Title: Re: 3.6.10 and ships.tbl
Post by: killface on March 29, 2009, 07:29:11 pm

Sorry to resurrect this old thread, guys, but I'm still having issues renaming existing ships using .tbm files.  Could someone maybe paste an example of a tbm entry that would do that?

Thanks all,

killface
Title: Re: 3.6.10 and ships.tbl
Post by: chief1983 on March 30, 2009, 12:42:49 am
I'm confused.  A ship is essentially what it is based on its name.  If you change its name, it's a new ship.  The name is basically the 'key' that is used to refer to it.  You'd have to create a full duplicate of the ship's entry with the new name, and then change every reference to that ship to use the new name in a mission.  Does that make sense?
Title: Re: 3.6.10 and ships.tbl
Post by: nvsblmnc on March 30, 2009, 02:20:52 am
Have you set FRED up to use the mvp folder as well?  If you'e not seeing ship changes in FRED, it may be pointing to the wrong mod.
Title: Re: 3.6.10 and ships.tbl
Post by: Herra Tohtori on March 30, 2009, 03:02:47 am
Do you see the new ship (and weapon) in F3 Ship Lab? That's what I would use for testing whether the ship is in-game or not.

For example, copypasting Ulysses entry into a TBM and replacing the name with GTF Odysseus would basically duplicate the Ulyssesm, but as a new ship called "Odysseus". When you get that working, you can start editing the stats, change it's model and other stuff.

One thing you might want to check... make sure that your tables don't end up as filename-shp.tbm.txt. That can sometimes happen... and windows' default behaviour hides the known file extensions so you end up seeing just filename-shp.tbm. You can (and should, IMHO) disable the extension hiding feature anyway, but you can check the actual full file name via the command line interface (you just need to navigate to the directory and then use the dir command to check what the extension of the file really is.
Title: Re: 3.6.10 and ships.tbl
Post by: killface on April 03, 2009, 04:04:42 pm

nvsblmnc...how do I set FRED up to use the MVP folder?  I think that might be a big part of this because yes, ever since switching to 3.6.10 I have not been able to see my changes to ships.tbl in FRED.

Herra Tohtori...it seems that the file extensions are alright, but thanks for the advice, I hadn't thought of that.
Title: Re: 3.6.10 and ships.tbl
Post by: Mongoose on April 03, 2009, 04:54:39 pm
nvsblmnc...how do I set FRED up to use the MVP folder?  I think that might be a big part of this because yes, ever since switching to 3.6.10 I have not been able to see my changes to ships.tbl in FRED.
You'll have to create a Windows shortcut to FRED2, then right-click on it and hit Properties.  Under the Shortcut tab, in the Target dialog box, add "-mod mediavps" (without the quotes) after the file path.  You can repeat this for any other mod folders you want FRED2 to have access to.
Title: Re: 3.6.10 and ships.tbl
Post by: killface on April 03, 2009, 05:21:47 pm

Alright, sweet, I can see the table changes in FRED now.  But a bizarre new error popped up when I tried to run one of the old missions:

Error: Can't open model file <laser1-1.pof>
File: modelread.cpp
Line: 1995


Call stack:
------------------------------------------------------------------
    fs2_open_3_6_10r-20090322_r5114.exe 004b2ab5()
------------------------------------------------------------------

???
Title: Re: 3.6.10 and ships.tbl
Post by: killface on April 03, 2009, 05:34:21 pm

Ok, nevermind, seems I simply had to remove all references to that nonexistent .pof file?  Strange how it was never a problem before.