View Issue Details

IDProjectCategoryView StatusLast Update
0005236The Dark ModScript/Defpublic15.05.2020 13:15
Reporterjoebarnin Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOS10OS Version10.1.18362
Product VersionTDM 2.07 
Summary0005236: In scripting, string variables are limited to 127 characters
DescriptionI've been doing some script coding, and it looks like there is a maximum length for string variables in scripts: 127 characters. Any strings longer than that get truncated. The specific thing I was trying to do was dynamically create a readable in the middle of a mission, based on what the player had done to that point. I'm basically assembling the content of the readable based on several conditions. The readable turns out to be a long string, which gets truncated in this case.
Steps To ReproduceRun attached map - one readable is in DarkRadiant, and one is created dynamically in the main() method of the script. In game, note that the readable sheet that gets created via the script has truncated content. This is because the content is set via a spawnArg ('page1_body') in the script program, and thus the string is truncated.
Additional InformationBest fix - change scripting to allow unlimited string lengths.
Second best fix - change the maximum to a much larger number, say 2000 characters.
TagsNo tags attached.

Activities

joebarnin

joebarnin

02.05.2020 20:52

reporter  

readabletest.xd (757 bytes)   
readables/readabletest/readabletest
{
	precache
	"num_pages"	: "1"
	"page1_title"	:
	{
		""
	}
	"page1_body"	:
	{
		"A sheet created in DR using an XData. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. "
	}
	"gui_page1"	: "guis/readables/sheets/sheet_paper_hand_nancy.gui"
	"snd_page_turn"	: "readable_page_turn"
}
readabletest.xd (757 bytes)   
readabletest.map (29,177 bytes)   
Version 2
// entity 0
{
"classname" "worldspawn"
"editor_drLastCameraPos" "-389.476 -151.07 5.589"
"editor_drLastCameraAngle" "28.8 31.2 0"
// primitive 0
{
brushDef3
{
( 0 0 1 -428.875 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.875 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 1 -420.875 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 0 1 -420.875 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 3
{
brushDef3
{
( 0 0 1 -420.875 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -522 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 4
{
brushDef3
{
( 0 0 1 -420.875 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 5
{
brushDef3
{
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 412.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 6
{
brushDef3
{
( 0 0 1 -428.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 7
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -514.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 8
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 9
{
brushDef3
{
( 0 1 0 -506.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -72 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 10
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 11
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 498 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 12
{
brushDef3
{
( 0 0 1 -428.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 13
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 14
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -521.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 15
{
brushDef3
{
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -72 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 16
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -522 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 17
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 505.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 18
{
brushDef3
{
( 0 1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 19
{
brushDef3
{
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 20
{
brushDef3
{
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -72.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 21
{
brushDef3
{
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -522 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 22
{
brushDef3
{
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 23
{
brushDef3
{
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 56 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 24
{
brushDef3
{
( 0 0 1 -428.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 25
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 26
{
brushDef3
{
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -72 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 27
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -522.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 28
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514.125 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -521.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 29
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 30
{
brushDef3
{
( 0 0 1 -428.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 31
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 32
{
brushDef3
{
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -72 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 1 64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 33
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -522 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 34
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -521.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 513.625 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
// primitive 35
{
brushDef3
{
( 0 0 1 -420.75 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 63.86328125 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 1 0 -506 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 0 -1 -64 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 0 -1 0 -514 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( 1 0 0 505.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
( -1 0 0 -513.5 ) ( ( 0.0520833320915699 0 0 ) ( 0 0.0520833320915699 0 ) ) "textures/darkmod/wood/boards/dark_rough" 0 0 0
}
}
}
// entity 1
{
"classname" "light"
"name" "light_1"
"origin" "-37 38.375 89.25"
"light_center" "0 0 0"
"light_radius" "320 320 320"
}
// entity 2
{
"classname" "info_player_start"
"name" "info_player_start_1"
"origin" "-53 62.125 -64"
"angle" "90.000000"
}
// entity 3
{
"classname" "atdm:readable_immobile_paper01"
"name" "atdm_readable_immobile_paper01_1"
"origin" "5.125 62.125 -55.9934"
"rotation" "1 0 0 0 1 0 0 0 1"
"inv_name" "test"
"xdata_contents" "readables/readabletest/readabletest"
}
readabletest.map (29,177 bytes)   
readabletest.script (799 bytes)   
void main()
{
sys.setSpawnArg("gui_page1", "guis/readables/sheets/sheet_paper_hand_nancy.gui");
sys.setSpawnArg("page1_body", "A sheet created using a script. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. ");
sys.setSpawnArg("num_pages", "1");
sys.setSpawnArg("origin",'45.125 62.125 -55.9934');
entity testnote = sys.spawn("atdm:readable_immobile_paper01");
}
readabletest.script (799 bytes)   
joebarnin

joebarnin

02.05.2020 20:54

reporter   ~0012446

Discussed in this thread: https://forums.thedarkmod.com/index.php?/topic/9082-newbie-darkradiant-questions/&do=findComment&comment=446553
joebarnin

joebarnin

03.05.2020 15:09

reporter   ~0012449

Attached is a complete test case as a single zip with appropriate subfolders.
readabletest.zip (16,245 bytes)
joebarnin

joebarnin

05.05.2020 00:19

reporter   ~0012455

New test case. When the mission starts, you are standing in front of a table. The switch on the left creates a sheet using script code, where the content of the readable is in a spawnarg ("page1_body"). You can see that the content is truncated at 127 characters. The switch on the right creates a sheet, where the content is in an XD file (readabletest.xd). All of the script code is in readabletest.script.
readabletest-2.zip (30,674 bytes)
stgatilov

stgatilov

05.05.2020 03:47

administrator   ~0012456

Last edited: 05.05.2020 03:47

View 2 revisions

Nice issue, but unlikely to be fixed.
String is passed everywhere as 128-byte chunk. There is a lot of low-level code which works only with fixed-size arguments.

I think the only workaround is to spawn the GUI without text, then concatenate the text to it dynamically, while holding the resulting string in C++ code.
I guess it is not possible now, but possible to implement.
duzenko

duzenko

05.05.2020 07:25

developer   ~0012458

Last edited: 05.05.2020 07:28

View 2 revisions

@joebarnin
what about hypothetical "appendSpawnArg" function?
You start with a short string with a call to setSpawnArg, then call appendSpawnArg a few times dynamically to build your long text?
Would it work for you or you need something more flexible?

An alternative: use spawn arg accessors in setSpawnArg. I.e.
setSpawnArg("page1_body", "Some text to start with.");
setSpawnArg("page1_body", "${page1_body} More text to follow.");
duzenko

duzenko

05.05.2020 08:21

developer   ~0012459

Last edited: 05.05.2020 08:22

View 2 revisions

Will this work for you?
https://ibb.co/YTTqZ8c

void createFromScriptString()
{
    sys.setSpawnArg("gui_page1", "guis/readables/sheets/sheet_paper_hand_nancy.gui");
    sys.setSpawnArg("page1_body", "A sheet created with long string in a script. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. ");
    sys.setSpawnArg("some_more", "He's dead, Jim\n");
    sys.setSpawnArg("page1_body", "page1_body: ${page1_body}\ngui_page1: ${gui_page1}\n${some_more}${some_more}${some_more}");
    sys.setSpawnArg("num_pages", "1");
    sys.setSpawnArg("origin",'41.375 94 -21.5244');
    sys.setSpawnArg("inv_name","script string");
    entity testnote = sys.spawn("atdm:readable_mobile_paper01");
}
duzenko

duzenko

05.05.2020 08:24

developer   ~0012460

At revision: 8713
stgatilov

stgatilov

05.05.2020 10:56

administrator   ~0012461

I think you should discuss such change on dev forums first.
stgatilov

stgatilov

15.05.2020 13:06

administrator   ~0012519

Well, forums thread did not get much attention...
Let's consider it a kind of result =)

By the way, I have checked that no FMs released to date contain "${" (two characters as substring) in scripts, and neither do stock script.
duzenko

duzenko

15.05.2020 13:15

developer   ~0012520

Did you notice there are two threads regarding this?
https://forums.thedarkmod.com/index.php?/topic/20365-script-string-length-128-workaround/&tab=comments#comment-446786
https://forums.thedarkmod.com/index.php?/topic/20366-script-strings-limited-to-127-characters/&tab=comments#comment-446789
But generally, yeah, only @joebarnin cares about this, and this change seems to do what they want

Issue History

Date Modified Username Field Change
02.05.2020 20:52 joebarnin New Issue
02.05.2020 20:52 joebarnin File Added: readabletest.xd
02.05.2020 20:52 joebarnin File Added: readabletest.map
02.05.2020 20:52 joebarnin File Added: readabletest.script
02.05.2020 20:54 joebarnin Additional Information Updated View Revisions
02.05.2020 20:54 joebarnin Note Added: 0012446
03.05.2020 15:09 joebarnin Note Added: 0012449
03.05.2020 15:09 joebarnin File Added: readabletest.zip
05.05.2020 00:19 joebarnin Note Added: 0012455
05.05.2020 00:19 joebarnin File Added: readabletest-2.zip
05.05.2020 03:47 stgatilov Note Added: 0012456
05.05.2020 03:47 stgatilov Note Edited: 0012456 View Revisions
05.05.2020 07:25 duzenko Note Added: 0012458
05.05.2020 07:28 duzenko Note Edited: 0012458 View Revisions
05.05.2020 08:20 duzenko Assigned To => duzenko
05.05.2020 08:20 duzenko Status new => assigned
05.05.2020 08:21 duzenko Note Added: 0012459
05.05.2020 08:22 duzenko Note Edited: 0012459 View Revisions
05.05.2020 08:24 duzenko Status assigned => resolved
05.05.2020 08:24 duzenko Resolution open => fixed
05.05.2020 08:24 duzenko Note Added: 0012460
05.05.2020 10:56 stgatilov Note Added: 0012461
15.05.2020 13:06 stgatilov Note Added: 0012519
15.05.2020 13:15 duzenko Note Added: 0012520