Author Topic: Ships.tbl tech description string limit - bump it?  (Read 3061 times)

0 Members and 1 Guest are viewing this topic.

Offline Tempest

  • 28
  • The Star Wars Conversion
    • The Fate of the Galaxy - SWC
Ships.tbl tech description string limit - bump it?
I'm being hassled by the tech description string size limit in the ships.tbl. It'd be really nice if it could be bumped from 1024 to 2048, besides, they're just strings anyway, so I can't see any harmful downsides from bumping it. I doubt it'd be very hard to change, either.
"... and the klingons also were the soviet's space program. i mean can you really believe that a bunch of communist farmers can make rockets like that?"
-Axem

My photobucket: with all my shiny new stuff on it! http://s118.photobucket.com/albums/o116/Tempest_77/

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Ships.tbl tech description string limit - bump it?
It's already 4096, and it was 1500 in retail FS2.  Where are you getting 1024 from?

 

Offline Tempest

  • 28
  • The Star Wars Conversion
    • The Fate of the Galaxy - SWC
Re: Ships.tbl tech description string limit - bump it?
I got an error when my strings are too large- it said something about the buffer size and 1024. I'm sure that the tech descriptions are the problems- shortening them takes away the error and everything works fine. It's not a HUGE deal, but maybe we could implement dynamic string sizes or something? I don't need this too much-after all, it's not like people actually go through and read the descriptions of every ship.
"... and the klingons also were the soviet's space program. i mean can you really believe that a bunch of communist farmers can make rockets like that?"
-Axem

My photobucket: with all my shiny new stuff on it! http://s118.photobucket.com/albums/o116/Tempest_77/

 

Offline asyikarea51

  • 210
  • -__-||
Re: Ships.tbl tech description string limit - bump it?
after all, it's not like people actually go through and read the descriptions of every ship.

Believe it or not, I do that sometimes. Maybe that's why I end up typing out descriptions that are far too long... :doubt:

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Ships.tbl tech description string limit - bump it?
It is dynamic, sort of, the limit is just on how much to try and parse for the description, but not necessarily the description length.  But like I said, that limit is 4k, and if you need more than that then something is wrong with you.  :P

Where is the error from, and what exactly did it say?  Was it during game launch, or in FRED?  It could be a localization thing, did you put XSTR() on it?

 

Offline Tempest

  • 28
  • The Star Wars Conversion
    • The Fate of the Galaxy - SWC
Re: Ships.tbl tech description string limit - bump it?
It's kind of weird now- running a release build will not crash the game, and for the most part everything works fine, but after a while it starts to cut off entries after just a few lines. I've got about twenty entries, with many of them being 4 good paragraphs, and it won't complain until it cuts off the last few, each at only a few lines. One entry even reads the XSTR(" part of it, which makes me believe there is something seriously wrong with something...I can post the exact message later, since I'm not at my computer.
The error happens, in a debug build, at program start when it parses the ships.tbl. And, I am using XSTR() things. I don't think FRED has problems with it, although I can test it later.
The length of a typical one is 2500 characters, including spaces. Is that too much?
"... and the klingons also were the soviet's space program. i mean can you really believe that a bunch of communist farmers can make rockets like that?"
-Axem

My photobucket: with all my shiny new stuff on it! http://s118.photobucket.com/albums/o116/Tempest_77/

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Ships.tbl tech description string limit - bump it?
The length of a typical one is 2500 characters, including spaces. Is that too much?
Not for the description itself, but I was thinking that the localization code might have a smaller limit still.  Try taking off the XSTR() part, since then it won't try to localize, and see if that makes it work better.

And send me the problem ships.tbl (or just one entry) that demonstrates the problem and I'll see if I can't get it worked out.

 

Offline Tempest

  • 28
  • The Star Wars Conversion
    • The Fate of the Galaxy - SWC
Re: Ships.tbl tech description string limit - bump it?
I'll try that. But it seems that the problem compounds. For example, if an entry is cut off, shortening previous entrieswill make it go back to full size. I'll post an entry or the table when I get home.
"... and the klingons also were the soviet's space program. i mean can you really believe that a bunch of communist farmers can make rockets like that?"
-Axem

My photobucket: with all my shiny new stuff on it! http://s118.photobucket.com/albums/o116/Tempest_77/

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Re: Ships.tbl tech description string limit - bump it?
Have to ask: Any semicolons?
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 

Offline Prophet

  • 210
  • The know-it-all
Re: Ships.tbl tech description string limit - bump it?
That was my first thought also...

It's annoying. I always seem the forget that little feature and end up shrieking "WTF where's my tech entry/briefing I spent half an hour writing you son of a blender!!!" Then I remember, bang head on table and start again...
I'm not saying anything. I did not say anything then and I'm not saying anything now. -Dukath
I am not breaking radio silence just cos' you lot got spooked by a dead flying ****ing cow. -Sergeant Harry Wells/Dog Soldiers


Prophet is walking in the deep dark places of the earth...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ships.tbl tech description string limit - bump it?
The odds are that the entry is still there. :)

At least for missions files the game ignores everything after the closed bracket but it still remains in the file.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Prophet

  • 210
  • The know-it-all
Re: Ships.tbl tech description string limit - bump it?
The odds are that the entry is still there. :)
I know... But I find that the result is usually better on the second write trought... :D
I have learned to remember "the feature" since I started actually writing scripts, in which case the text is already rewritten half a dozen times...
I'm not saying anything. I did not say anything then and I'm not saying anything now. -Dukath
I am not breaking radio silence just cos' you lot got spooked by a dead flying ****ing cow. -Sergeant Harry Wells/Dog Soldiers


Prophet is walking in the deep dark places of the earth...

  

Offline Tempest

  • 28
  • The Star Wars Conversion
    • The Fate of the Galaxy - SWC
Re: Ships.tbl tech description string limit - bump it?
I feel really dumb now- it WAS the semicolons! BAH! Evil semicolons! I can get all the entries to show up full size now- but the table still crashes debug builds. I don't know...why.
"... and the klingons also were the soviet's space program. i mean can you really believe that a bunch of communist farmers can make rockets like that?"
-Axem

My photobucket: with all my shiny new stuff on it! http://s118.photobucket.com/albums/o116/Tempest_77/