View Full Version : Max mod nation description length?
Stavis_L
September 30th, 2009, 12:34 PM
Does anyone know if there's a maximum length for the #descr command for nation modding, and if so, what that limit is?
My description keeps getting chopped off, and I'm not sure if it's due to bad formatting or exceeding a length limit; I know I'm well short of various vanilla nation description lengths, and it's not breaking at a "usual" length like 1024 chars or anything (not in front of the game at the moment, but it's something like 650 chars where it's cutting off for me presently.)
Also, the mod manual describes the syntax as
#descr "<nation name>"
, but I assume the correct syntax is just
#descr "<description text>"
as it seems to not like the 2nd argument.
...and, as long as I'm here, anyone aware of character limits for the other modding name/brief/descr(ription)/summary commands?
Burnsaber
September 30th, 2009, 01:43 PM
Do you have a quote of some sort in the description text, perhaps closed with (") signs? I've had that happen to me many times.
Stavis_L
September 30th, 2009, 04:55 PM
No, no stray double-quotes. I'm using a programming font to make sure things like that stand out (but I verified with a character search.) There is a single-quote in the text, but it's not aligned with the break.
lch
October 3rd, 2009, 05:47 AM
Here are the limits for nation modding:
#name: 36 characters
#epithet: 36 characters
#flag: 2500 characters (for the filename)
#descr: 2500 characters
#summary: 500 characters
#brief: 500 characters
These limits are from the parser, per-nation. There might also be a global limit to the descriptions as well, I think I ran into that myself when preparing combined mods for my mod nation games.
Burnsaber
October 3rd, 2009, 06:03 AM
These limits are from the parser, per-nation. There might also be a global limit to the descriptions as well, I think I ran into that myself when preparing combined mods for my mod nation games.
Nein! Nooo! Eiii! Inte!
First I learn that there's a limit on added spells and I had to scrap all sorts of cool ideas for the CPCS. Now max lenght descriptions (I hit the character limit often) can limit mod compactibility! Ugh. I'll have to learn to write more to the point I guess.
Tomorrow I'll learn that there is a limit on mod-image pixels and I'll have to make all my sprites 50% smaller.
Foodstamp
October 3rd, 2009, 11:10 AM
Here are the limits for nation modding:
#name: 36 characters
#epithet: 36 characters
#flag: 2500 characters (for the filename)
#descr: 2500 characters
#summary: 500 characters
#brief: 500 characters
These limits are from the parser, per-nation. There might also be a global limit to the descriptions as well, I think I ran into that myself when preparing combined mods for my mod nation games.
I play with a TON of mod nations enabled at the same time and I have not noticed a global limit. It may be possible I have not hit the cap yet and if that is the case, it must be VERY high.
lch
October 3rd, 2009, 11:30 AM
I play with a TON of mod nations enabled at the same time and I have not noticed a global limit. It may be possible I have not hit the cap yet and if that is the case, it must be VERY high.
The game doesn't crash in that case, it just doesn't include the nation descriptions anymore. If I recall correctly then first all the new unit and then spell descriptions are added, and then the nation descriptions. When preparing one all-mod-nations megagame I ran into each of these limitations, which required me to shorten some of the description texts. I'd have to look through old IRC logs to be able to tell specifics. It was a couple of patches ago, too, though, so the situation might be better now.
Burnsaber, there are limitations to everything, everywhere. :)
Foodstamp
October 3rd, 2009, 05:30 PM
Well that makes me sad in the pants. I imagine by the time I retire, I will have every nation spot loaded with mod nations ;). I can do without descriptions I guess :D
Stavis_L
October 7th, 2009, 09:50 PM
Here are the limits for nation modding:
#name: 36 characters
#epithet: 36 characters
#flag: 2500 characters (for the filename)
#descr: 2500 characters
#summary: 500 characters
#brief: 500 characters
These limits are from the parser, per-nation. There might also be a global limit to the descriptions as well, I think I ran into that myself when preparing combined mods for my mod nation games.
Hrm...well, I replaced my text with a block of lorem ipsum, and it seems that #descr (for nations) is actually limited to only 999 characters. However, some of the vanilla nations (e.g. LA Caelum) clearly exceed this, so perhaps you found the size of the in-game buffer, and something else is trimming the input to a smaller length prior to display?
I've only got my one mod that I'm working on installed, so it's presumably not a global limit being exceeded.
Perhaps I should report this as a bug?
lch
October 8th, 2009, 03:12 AM
Hrm...well, I replaced my text with a block of lorem ipsum, and it seems that #descr (for nations) is actually limited to only 999 characters.
JK has a habit of limiting things at the value 999 (ex.: spell slots, damage), so it may very well be that input strings are limited by that amount.
However, some of the vanilla nations (e.g. LA Caelum) clearly exceed this, so perhaps you found the size of the in-game buffer, and something else is trimming the input to a smaller length prior to display?
As I said, I looked at the parser, but maybe the input from mods is indeed limited artificially by a greater amount than what the ingame limits are, yes.
Perhaps I should report this as a bug?
It's not a bug, you just found out the real limit. There will always be a limit, anyway.
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.