ApexMods Posted January 8, 2012 Share Posted January 8, 2012 Searched the forums and FAQs to no avail, so here it goes. I'm somewhat astonished at the seemingly arbitrary size limit for GR mission/gametype scripts (.gtf). I thought I had it pinned down a while back and made a note of it, but recently encountered the dreaded file corruption resulting from passing the size limit at different byte lengths. Had a look at just the size of the <scriptCompiled> and <scriptSource> parts to correct for different briefing and objective text length, but it still doesn't seem to make sense. Sometimes a script would work up to a size of over 120,000 bytes (data size, not size on disk), sometimes it would start failing around just 114,000 bytes. Played around with different variable labels etc. but to no avail. If anyone has an insight into the exact limitations at play here, please share. Thanks. Quote Link to comment Share on other sites More sharing options...
Tinker Posted January 8, 2012 Share Posted January 8, 2012 Not sure of the exact limit, seems to vary. But in general, my scripts have had this issue over 200kb in size. What you can do is edit the mission in notepad and remove some zones that are not needed for now and also the sound effects. Can add them back in once all is done. Quote Link to comment Share on other sites More sharing options...
RileyFletcher_01 Posted January 8, 2012 Share Posted January 8, 2012 I don't think I've gotten any missions that big. My biggest is 69kb. As Tinker says, when you start nearing 200, you're getting into danger of losing it. Quote Link to comment Share on other sites More sharing options...
ApexMods Posted January 8, 2012 Author Share Posted January 8, 2012 Weird thing is I can edit larger scripts in IGOR just fine (dunno the exact size there), but anything bigger than about 115,000 bytes (combined data for source and compiled) crashes GR itself. Quote Link to comment Share on other sites More sharing options...
Zeealex Posted January 8, 2012 Share Posted January 8, 2012 i suppose it would depend on the size of the map and how what exactly the scripts are, if you had a script nearly full of continue ifs it's most likely going to crash. Quote Link to comment Share on other sites More sharing options...
ApexMods Posted January 8, 2012 Author Share Posted January 8, 2012 No, Alex, I'm talking about just the scripts (game type files, GTF) here, without being attached to any maps. Quote Link to comment Share on other sites More sharing options...
Zeealex Posted January 8, 2012 Share Posted January 8, 2012 aah, i see, sorry, i'll shut up now XD Quote Link to comment Share on other sites More sharing options...
Tinker Posted January 8, 2012 Share Posted January 8, 2012 For the gtf files, the largest I have seen was from Hantrox, Mission HX. Stands at 121,557. Maybe he had the same issue? I can only make an opinion that he could of kept going with that script. Quote Link to comment Share on other sites More sharing options...
ApexMods Posted January 8, 2012 Author Share Posted January 8, 2012 Yep, that's one of the largest out there. I think I'm getting close to figuring this out. Looks like the raw source data needs to be less than 65,536 bytes (64K) for the script to compile successfully. Sadly the only way to measure this is AFTER you save the script. Harntrox came pretty close, with 64,596 bytes source data in his SP/COOP HX Mission. For the script I'm currently working on I'm way above 64K source data and have to jump through all sorts of hoops to get the size down. Going nuts over here... Quote Link to comment Share on other sites More sharing options...
Tinker Posted January 9, 2012 Share Posted January 9, 2012 Yep you seem to be right with this. I picked 1 of my missions that was 212kb in size, removed all zones, plans, actors, all placed stuff, etc, until it was 110kb. Added more scripting only, it has same issue around 119kb. I believe you can script it to unlimited size from what I have tested, however, you cannot save or close Igor until you are finished. Quote Link to comment Share on other sites More sharing options...
ApexMods Posted January 11, 2012 Author Share Posted January 11, 2012 Yes, you can script in IGOR to unlimited size, and you can save the script - but it will not load again in IGOR and it will crash GR upon launch, once the script source data - the one that goes between the <scriptSource> tags in GTF and MIS files - is over 64K (65,536 bytes). You can measure the current size of the script source by having your text editor count the number of characters between those tags. Everything up to 65,536 is fine, one character/byte more and the script will end up corrupted - unplayable and uneditable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.