Author Topic: Struggling with tbms. Can anyone help?  (Read 2032 times)

0 Members and 1 Guest are viewing this topic.

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Struggling with tbms. Can anyone help?
Was hoping those of you with .tbm experience might be able to help me out for a minute;

I'm trying to create as an experiment a small mini-mod that runs off of the newer FSPort, and when active makes modifications to Port's ship.tbl using a .tbm file (Sol0-shp.tbm, which contains only a #ship entries section with entires and an #end tag). It mostly moves around the order of ships on the list and gives them new tech descriptions (using +nocreate where applicable), but also renames a few (by making copied entries under the new name; I left the old entries in too to try and ensure compatibility) and changes the loadout options or turret weapons on ships. I set it up in its own folder with a mod.ini that sets the following multimod entries:

primarylist = fsport_mediavps;
secondarylist = fsport,mediavps_3612;


Alas, when I try to run the mod I get no errors, but my changes seem to be ignored by the system and it uses the normal FSPort ships order and loadouts.

I have an understanding of .tbl coding and was using the .tbm wiki article and other mod's tbms as examples, so I'm feeling confident that its not a problem in the file (though perhaps i'm wrong) and suspect I've either missed a step in the tbm process or my multi mod settings above are wrongly orderd.

Can anyone see or think where I've goofed (knowing me its probably something blindingly obvious :lol:)? I'd appreciate any help.

Cheers
Also goes by 'Murasaki-Tatsu' outside of Hard-Light

UEF fanboy. Rabid Imagination.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Struggling with tbms. Can anyone help?
.tbm files do not change the order things are loaded in.  Table entries will always appear first followed by .tbm entries determined by load hierarchy. 

As for renaming ships why not just use alt name (or alt class or whatever that is) in the mission?
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Re: Struggling with tbms. Can anyone help?
.tbm files do not change the order things are loaded in.  Table entries will always appear first followed by .tbm entries determined by load hierarchy.  
I'm afraid you've lost me a bit there. What i want to change is the order the ships are listed in the tech room database or in FRED (so the Faustus for example appears lower down on the list, and so new entries can be between existing ones if they are arranged such in the tbm). Is that what you mean? If that's the case then i'll probably need to have a whole table file instead of a tbm in the campaign.

Quote
As for renaming ships why not just use alt name (or alt class or whatever that is) in the mission?
Because i wanted the different name to appear on entries in the tech room (for example, i wanted to call the Medical Faustus "GTM Deadelus", which if i remember right Dark had its name as on his website when he made the model).
Also goes by 'Murasaki-Tatsu' outside of Hard-Light

UEF fanboy. Rabid Imagination.

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Struggling with tbms. Can anyone help?
You cannot change the order they appear in FRED or the tech room without making your own table.  That order is determined by the order ships are loaded.  ships.tbl first then .tbm files so .tbm entries always appear either in the place of the original ship if it's a replacement or at then end if it's a new entry. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Struggling with tbms. Can anyone help?
.tbm files do not change the order things are loaded in.  Table entries will always appear first followed by .tbm entries determined by load hierarchy.  
I'm afraid you've lost me a bit there. What i want to change is the order the ships are listed in the tech room database or in FRED (so the Faustus for example appears lower down on the list, and so new entries can be between existing ones if they are arranged such in the tbm). Is that what you mean? If that's the case then i'll probably need to have a whole table file instead of a tbm in the campaign.

Quote
As for renaming ships why not just use alt name (or alt class or whatever that is) in the mission?
Because i wanted the different name to appear on entries in the tech room (for example, i wanted to call the Medical Faustus "GTM Deadelus", which if i remember right Dark had its name as on his website when he made the model).

If all you are doing is changing the name for the ship class in mission then you need to be doing what FUBAR-BDHR is trying to get at which is instead of using tbl/tbm what you want to do is place a Medical Faustus into your mission in FRED-> double click the ship to bring up the ship editor -> click the alt ship class button under the assist %, and player ship controls and use that editor to set up the alternative class in mission.

If it's critical to get the tech room entry and that it is in a certain position then you need to
1- create your own mod folder (\Freespace 2\T-Mans Port Mod\data\tables),
2- copy port's ship table into the tables folder your new mod folder,
3- add a mod.ini to the "T-Mans Port Mod" folder.  
4- the Mod.ini needs to reference port (the game will follow port's mod.ini to load the MVP/PortMVP folders if I remember correctly, if not then add them).  
5- Now you can edit the copy of the ships table in your mod folder to your hearts content inserting the new ship between the ships you want it to show up between without risking directly braking port or another mod that refers to port.  

the new table file will override port's table but only when your new mod is selected as the mod in the games launcher.  

I strongly suggest leaving all port files alone as this method requires no editing of any files within the port/portMVP mod folders and the team will probably not thank you if you come to them with a problem down the line and it turns out to be directly or indirectly due to your modification of their files.
« Last Edit: September 12, 2010, 06:50:15 pm by headdie »
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: Struggling with tbms. Can anyone help?
I don't mean to hijack but I have a question about TBMs too that is slightly related to this... only slightly. You can ignore this if you wish but I just wanted to shout it out.

I wanted to add a ship to the existing MediaVP 3.6.12 mod using a TBM, copied and pasted a brand new ship entry, but it didn't appear in the game. When I edited the tbl it did enter the game as expected. I kinda wanted to use a TBM to simply insert the model for viewing and observation purposes without having to deal with a bloated ship.tbl file. Is there something I need to do to insert a ship model using tbm that I am missing?
I have created a masterpiece.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Struggling with tbms. Can anyone help?
As always in these matters, it would help greatly if you would post that tbm.
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

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Struggling with tbms. Can anyone help?
general advice would be if you want to add a new ship your best way to do it would be to create a mod folder structure like I recommended to T-man but also add a models and maps folder.


you want the folders highlighted in green above present (ignore the text files)

put any new texture files in the maps folder, the new model into the models folder but instead of copying any ship tables you create a tbm for your new ship in the tables folder.  when you create of copy the mod.ini just have it referencing the version of MediaVPs to keep complications down (Though I suggest not bothering with referencing Media Vps to begin with to minimise complications and add them once you know it works).  in your launcher select your new mod and you should be good to go, remember to use a debug build of the .exe to catch any errors. you can find the log in freespace 2\data, often times just looking through the log will tell you where you need to look to fix a problem.

when creating the -shp.tbm file you need #Ship Classes at the start of the file and it needs to finish with #end
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: Struggling with tbms. Can anyone help?
As always in these matters, it would help greatly if you would post that tbm.

u...uhh... nevermind... I checked my files again and it appears my problems were naught... Sorry for the messup...
I have created a masterpiece.

  

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Re: Struggling with tbms. Can anyone help?
As always in these matters, it would help greatly if you would post that tbm.
Here it is, though i think FUBAR-BDHR has hit the nail on the head of the problem pretty much; sounds like tbms can't do all i thought they could (i did wonder why the new BP ships were ordered a little oddly, Karuna being miles away from the other UEF ships etc). Making it a full tbl as Headdie suggested should work, i just thought i'd give tbm's a go to try and reduce clutter. Sorry for the confusion people.

EDIT: Uh? why's the file tbm.tbm? I was changing the file type not adding to the name. Corrected. Bloody Vista. :lol:

[attachment deleted by admin]
« Last Edit: September 13, 2010, 03:22:31 am by T-Man »
Also goes by 'Murasaki-Tatsu' outside of Hard-Light

UEF fanboy. Rabid Imagination.