PDA

View Full Version : ConTEXT highlighter for IceCC decompiled Iscript


Praecipitator
09-10-2007, 5:36 PM
I thought i'll give IceCC another try, but i don't like to edit scripts with just notepad, without synthax highlighting. So i just copypasted the keywords from the manual into a highlighter file for ConTEXT (http://www.context.cx/). If some of you use both ConTEXT and IceCC: what do you think of it? especially the colour of the animation types. and, i had no idea what file extension i should use, so I just said *.bin.txt, but it does not work. Have you a better idea for an extension?

the keywords are based on both the PDF manual and the txt file added by shadowflare (?). Tested with IceCC 1.3 (http://shadowflare.samods.org/dwnload.html#IceCC), hope this is the most up-to-date version.

another thing: i set it as case-sensitive to make context able to tell the CastSpell animation and the castspell command apart. this means it will not highlight gndattkinit or GndattkInit and so on

edit: this is for Notepad++:
<UserLang name="IScript" ext="ice">
<Settings>
<Global caseIgnored="no" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">000000</Keywords>
<Keywords name="Folder+">.headerstart</Keywords>
<Keywords name="Folder-">.headerend</Keywords>
<Keywords name="Operators"></Keywords>
<Keywords name="Comment">1 2 0#</Keywords>
<Keywords name="Words1">IsId Type Unused1 Unused2 Init Death GndAttkInit AirAttkInit SpAbility1 GndAttkRpt AirAttkRpt SpAbility2 GndAttkToIdle AirAttkToIdle SpAbility3 Walking Other BurrowInit ConstrctHarvst IsWorking Landing LiftOff Unknown18 Unknown19 Unknown20 Unknown21 Unknown22 Unknown23 Unknown24 Burrow UnBurrow Unknown27 WalkingToIdle SpecialState1 SpecialState2 AlmostBuilt Built WorkingToIdle WarpIn CastSpell Unused3 InitTurret Disable Enable</Keywords>
<Keywords name="Words2">playfram playframtile sethorpos setvertpos setpos wait waitrand goto imgol imgul imgolorig switchul __0c imgoluselo imguluselo sprol highsprol lowsprul uflunstable spruluselo sprul sproluselo end setflipstate playsnd playsndrand playsndbtwn domissiledm attackmelee followmaingraphic randcondjmp turnccwise turncwise turn1cwise turnrand setspawnframe sigorder attackwith attack castspell useweapon move gotorepeatattk engframe engset __2d nobrkcodestart nobrkcodeend ignorerest attkshiftproj tmprmgraphicstart tmprmgraphicend setfldirect call return setflspeed creategasoverlays pwrupcondjmp trgtrangecondjmp trgtarccondjmp curdirectcondjmp imgulnextid __3e liftoffcondjmp warpoverlay orderdone grdsprol __43 dogrddamage&#x0D;&#x0A;</Keywords>
<Keywords name="Words3">[NONE]</Keywords>
<Keywords name="Words4"></Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT" styleID="1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="2" />
<WordsStyle name="NUMBER" styleID="4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER1" styleID="14" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
</Styles>
</UserLang>
You'll have to add this to userDefineLang.xml in the notepad++ directory, between <NotepadPlus> and </NotepadPlus>

DemonicArchon
09-12-2007, 10:57 PM
Hmm..What you did is odd...When eidting the iscripts, (granted i use notepad, and it could be..but shouldn't be different) After done editing, save the file as *.txt....Afterwards, when you go to compile your iscript it's just ISCRIPT.bin ...Just like the file you started with..Or am i missing something??

Praecipitator
09-13-2007, 6:47 AM
it's just to make the editing part a little easier.
here's a screenshot:
http://www.picupload.net/t-a8e76deef03ebbcac4f950aebf8476bd.gif (http://www.picupload.net/f-a8e76deef03ebbcac4f950aebf8476bd.gif)

BroodKiller
09-13-2007, 8:33 AM
Notepad++ FTW!

Praecipitator
09-13-2007, 10:06 AM
i'll try this one
edit: for php editing, notepad++ seems to pwn very much, thx, but I'll keep editing iscript with context, at least until i know how to make custom highlighters for notepad++

Praecipitator
09-13-2007, 11:05 AM
*push*
added highlighter for Notepad++ as well