Author Topic: Adding items to ship_info and ships.tbl  (Read 2800 times)

0 Members and 1 Guest are viewing this topic.

Offline r0nin

  • 24
    • http://mywebpages.comcast.net/r0nin/
Adding items to ship_info and ships.tbl
:confused:I've been having a problem recently with the source, and I'm wondering if anyone knows what I might be missing.

It would be very nice to be able to add completely new flags/items to the ships.tbl.  This would allow me to keep up with certain information about the ship types for the Robotech mod that I would have to hardcode otherwise (such as if a certain ship type is transformable)

I have tried adding a new member to the ship_info struct, then adding lines to the ship parsing code, but I must be missing something.  When I compile, if I'm lucky enough not to get a link error, Fred2 will go down like an Iraqi fighter pilot :D on execution!

Are any of the other mods out there adding flags/items to the ships.tbl?  How are you managing to get it to work?  Any help would be greatly appreciated (I'm pulling my hair out over this [expletive deleted]:mad:...)!!!
"Have code, will travail..."
Member of the Robotech FS2 Mod.
http://www.robotechlan.com/freespace2/

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Adding items to ship_info and ships.tbl
I'd also like to hear about weapon flags
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline r0nin

  • 24
    • http://mywebpages.comcast.net/r0nin/
Alright, I've been reading posts left and right on here about how such-and-such mod was going to change this and that in the ships.tbl, etc.  There has to be someone in here who has done it!  Or is everyone else baffled, too?:confused:

Someone let me know one way or another, so that I can know how it's done or that no one knows how to do it...
"Have code, will travail..."
Member of the Robotech FS2 Mod.
http://www.robotechlan.com/freespace2/

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Adding items to ship_info and ships.tbl
did you ever figure this out
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline r0nin

  • 24
    • http://mywebpages.comcast.net/r0nin/
Well, I had two options.  I could try to figure out how to do it, spending all those hours of investigation and trial-and-error, and perhaps discover a way to add things in a nice, neat way to the source code.  Or I could spend those hours actually putting in the features I wanted, using hardcoding (instead of the much neater and more flexible method of using tables) and much sloppier coding methods.  Which do you think I did?;)

Seriously, though, I figured I would be better off hardcoding the stuff we need for the Robotech mod, as it should be easy to switch over to tables if anybody figures out how.  I think the real problem lies in the Fred2 code, not the FS2 code, but I can't find what is crashing it.

Obviously, no one else can, either...:(
"Have code, will travail..."
Member of the Robotech FS2 Mod.
http://www.robotechlan.com/freespace2/

 

Offline r0nin

  • 24
    • http://mywebpages.comcast.net/r0nin/
Well, I did fiddle around with this some more, and I did succeed at doing something with it.  I still can't add sections to the ships, but I did figure out how to add on to the end of the ships.tbl.  I copied some code in the parsing section of ship.cpp to set up a fourth read of the ships.tbl and packed the info it read into a completely new object that I created.  So I can add info to the table, just not to the ship object itself...
"Have code, will travail..."
Member of the Robotech FS2 Mod.
http://www.robotechlan.com/freespace2/

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Adding items to ship_info and ships.tbl
not a big deal actually, as soon as it works... :nod:
SCREW CANON!

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Adding items to ship_info and ships.tbl
I had some problems adding some stuff to the polymodel structure, it didn't work untill I added it on to the end
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline r0nin

  • 24
    • http://mywebpages.comcast.net/r0nin/
Adding items to ship_info and ships.tbl
How did you do it?  I added on my new parameter to the end of the ship object, and still got a biiiiig crash...
"Have code, will travail..."
Member of the Robotech FS2 Mod.
http://www.robotechlan.com/freespace2/

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Adding items to ship_info and ships.tbl
I'm really not that familiar with code and the related problems, but I wanted to ask anyway.

Could the problem by any chance be that the new section you have added is not present on all of the ships?  It seems like there is a lot in table that is commented useless (only included so to not break the parser) in the tables.  Have you tried making a ships.tbl that only contains one actual ship and testing your build of the code with that?
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Adding items to ship_info and ships.tbl
well the thing is, this is the actual ship object (for lack of a better word), not the polymodel, not the ship table data, but the ship in it's highest state that can be diferentiated from any other object type (like asteroids or fireballs), so table changes isn't going to directly affect anything you do to the ship structure, the ship_info struct on the other hand probly would be affected by table changes,
for the record what I changed was the poly_model struct, I have tried changeing something in the ship struct (an index for nameplates) and it ended baddly
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together