Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Tempest on April 28, 2007, 07:40:33 pm

Title: Ships.tbl tech description string limit - bump it?
Post by: Tempest on April 28, 2007, 07:40:33 pm
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.
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: taylor on April 28, 2007, 10:43:07 pm
It's already 4096, and it was 1500 in retail FS2.  Where are you getting 1024 from?
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: Tempest on April 29, 2007, 11:25:46 am
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.
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: asyikarea51 on April 29, 2007, 11:30:47 am
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:
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: taylor on April 29, 2007, 11:44:14 am
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?
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: Tempest on May 02, 2007, 02:45:42 pm
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?
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: taylor on May 02, 2007, 02:59:01 pm
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.
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: Tempest on May 02, 2007, 03:04:32 pm
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.
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: Turey on May 03, 2007, 03:07:30 am
Have to ask: Any semicolons?
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: Prophet on May 03, 2007, 03:34:09 am
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...
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: karajorma on May 03, 2007, 09:36:48 am
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.
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: Prophet on May 03, 2007, 10:05:02 am
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...
Title: Re: Ships.tbl tech description string limit - bump it?
Post by: Tempest on May 03, 2007, 06:50:57 pm
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.