Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Rheyah on August 05, 2013, 07:50:41 am
-
Hiya.
I'm writing the tables for my own personal mod at the moment using a combination of the BP turret fixes (credited) and a new armour system applied to every ship in the game. However I'm running into a few difficulties with actually using the tables. I'm only changing three properties:
- adding "check hull" flags to avoid ships shooting through their own hull
- increasing capital ship hitpoint values
- adding armor types
As a comparison piece (and not intended to provide debugging material) here is an equivalent pair of tbm entries. The first works fine. The second doesn't:
$Name: @GTC Fenris
+nocreate
+Tech Description:
XSTR("Totally underrated. Not too many of them left these days but they run like a charm with a proper bit of care and attention. In case you haven't realised, the Shetland is one of these. She's a beauty and I won't have a word said against her, no matter what the duct tape says. Don't take on one of these without bombers or another cap ship. Watch the rear beams. Torpedoes only scar them. Bombs, beams or seige cannons do much better - Waters", -1)
$end_multi_text
$Hitpoints: 40000
$Armor Type: Cruiser
$Subsystem: turret01, 2, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret02, 3, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret03, 2, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret04, 2, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret05, 2, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret06, 2, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret07, 2, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret08, 2, 5.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret09a-01-main, 8, 10.0
$Flags: ( "check hull" )
+noreplace
$Name: @GTT Argo
+nocreate
+Tech Description: XSTR( "These things are nasty and there are a lot of them about these days. Originally a marine transport IIRC but nowadays you have three or four megacorps with a few shipyards a piece churning these things out. No two are ever the same. Some merc groups even use them like mini-cruisers. Bring torpedoes or call in the Zeusi for these things - W", -1 )
$Hitpoints: 27000
$Armor Type: Hardened
$Subsystem: turret01, 5, 20.0
$Flags: ( "check hull" )
+noreplace
$Subsystem: turret02, 5, 20.0
$Flags: ( "check hull" )
+noreplace
What's confusing me even more is that while the Argo, the sentry guns and the entire Vasudan and Shivan data entries are broken, the later, created records ones are perfectly fine. Would seperating the Vasudan and Shivan ships out into their own tbms solve this?
-
Tried that. No effect. I have literally no idea what's wrong.
-
I think you forgot an $end_multi_text after the tech description on the latter. That might be enough to break the parser.
-
My god I've been looking for that forever. Thanks!
-
No problem. :) Did it work, tho?
-
$end_multi_text is absolutely vital. Without it, the parser is unable to determine when a piece of text meant to be parsed as a string ends, and treats the entirety of the table entry as part of the description, until it runs out of buffer space.
-
It turns out I've missed a few of them out and I suspect the parser is doing exactly what The E said. So I'm going through each file with a fine toothed comb and seeing what I missed.
-
Thanks guys! Working perfectly now. Will be more careful with my tbms in future :)