106
News / Re: First non-TI-BASIC game on TI-Nspire OS 3.0
« on: April 13, 2011, 03:44:44 pm »
Here's how I made the .tns file:
- Create a blank document
- Create a Problem1.xml file, containing the following (without any line breaks, except in the script itself):
<?xml version="1.0" encoding="UTF-8" ?><prob xmlns="urn:TI.Problem" ver="1.0" pbname=""><sym></sym><card clay="0" h1="10000" h2="10000" w1="10000" w2="10000"><isDummyCard>0</isDummyCard><flag>0</flag><wdgt xmlns:sc="urn:TI.ScriptApp" type="TI.ScriptApp" ver="1.0"><sc:mFlags>0</sc:mFlags><sc:value>-1</sc:value><sc:script>Lua script goes here (with appropriate character entities replacing the five characters < > " ' &)</sc:script></wdgt></card></prob> - Use 7-zip to create a zip file containing Problem1.xml
- Concatenate the beginning of the blank document, up to the end of Document.xml (at offset 0x170), with the zip file. (OS 3.0 requires Document.xml to be encrypted, but thankfully Problem*.xml can still be unencrypted.)