|
Modding Tutorials Information and tutorials related to modding BF2. |
![]() |
|
Thread Tools | Display Modes |
![]() |
#1 |
Join Date: Mar 2009
Posts: 92
![]()
Location: Shelby TWP, Michigan
|
![]()
Currently been making a simple Syntax highlighter for Battlefield 2's different text files, this is the work so far.
![]() Uploaded with ImageShack.us I know it is not much, but it should highlight most functions, basic logical operations are orange, same with run commands, most objects. and other functions found for objects are blue, most rendering functions are green. Sound, undergrowth, overgrowth, LevelSettings, CollisionManager is Purple. rem makes the whole line red. It is still a wip, any suggestions i will try to implement. add this code in between <NotepadPlus> and </NotepadPlus> in Code:
<Drive>:\Documents and Settings\<CURRENT USER>\Application Data\Notepad++\userDefineLang.xml If there is already a <UserLang> </UserLang> inside the .xml, add it right after the </UserLang> Code:
<UserLang name="Battlefield2Syn" ext="BF2"> <Settings> <Global caseIgnored="no" /> <TreatAsSymbol comment="no" commentLine="no" /> <Prefix words1="yes" words2="yes" words3="yes" words4="yes" /> </Settings> <KeywordLists> <Keywords name="Delimiters">000000</Keywords> <Keywords name="Folder+"></Keywords> <Keywords name="Folder-"></Keywords> <Keywords name="Operators"></Keywords> <Keywords name="Comment">1 2 0rem</Keywords> <Keywords name="Words1">gameLogic. GameLogic. else ObjectTemplate Object. CombatArea object. console. </Keywords> <Keywords name="Words2">renderer texturemanager objectdrawer Material ViewDistance AlphaRef SwayScale PatchSubdivide Lighting Mesh Texture RandomSizeScale Density Variation TerrainColorScale Skew GeneralHeight TypeSwayScale terrain. GeometryTemplate</Keywords> <Keywords name="Words3">run if endIf cpname Type Include include </Keywords> <Keywords name="Words4">Undergrowth. UndergrowthEditable. LevelSettings Overgrowth SpawnPoint heightmap sound. Sound. Sound CollisionManager. </Keywords> </KeywordLists> <Styles> <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="5" /> <WordsStyle name="KEYWORD2" styleID="6" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="5" /> <WordsStyle name="KEYWORD3" styleID="7" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="5" /> <WordsStyle name="KEYWORD4" styleID="8" fgColor="FF00FF" bgColor="FFFFFF" fontName="" fontStyle="5" /> <WordsStyle name="COMMENT" styleID="1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="COMMENT LINE" styleID="2" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="NUMBER" styleID="4" fgColor="000000" 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> |
![]() |
Last edited by ben748; 2010-06-07 at 19:46..
![]() |
![]() |
#3 |
Retired - Project Manager
![]() ![]() |
![]()
Yeah, I've got one if you want... I see every now and then a missing term, but meh, it's good enough.
![]() Code:
<NotepadPlus> <UserLang name="BF2 Script" ext="con tweak inc ai"> <Settings> <Global caseIgnored="yes" /> <TreatAsSymbol comment="no" commentLine="no" /> <Prefix words1="yes" words2="no" words3="yes" words4="no" /> </Settings> <KeywordLists> <Keywords name="Delimiters">"00"00</Keywords> <Keywords name="Folder+">if</Keywords> <Keywords name="Folder-">endIf</Keywords> <Keywords name="Operators">[ ] =</Keywords> <Keywords name="Comment">1beginrem 2endrem 0rem</Keywords> <Keywords name="Words1">admin. ai. aiPathfinding. aiSettings. aiStrategy. aiStrategicArea. AIStrategicArea. aiTemplate. aiTemplatePlugIn. animationBundle. animationManager. animationSystem. animationTrigger. animationValueHolder. AudioSettings. bf2Engine. BitStream. buffermanager. chat. CollisionCheck. collisionLog. CollisionManager. CombatArea. CombatAreaManager. commander. commanderInterface. commanderMenu. config. console. ControlMap. debug. debugCounterManager. decalManager. demo. Editor. envmapManager. fileChangeManager. fileManager. game. gameLogic. GameLogic. gameServerSettings. GeneralSettings. GeometryTemplate. GlobalSettings. heightmap. heightmapcluster. hemiMapManager. hudBuilder. hudItems. hudManager. ingameHelp. InputDevices. itemSelection. LevelSettings. levelsList. lightManager. Lightmanager. lightmapGeneration. LightmapSettings. LightSettings. localplayer. localProfile. mapList. MapList. Material. materialManager. memory. minimap. nametags. network. networkableInfo. Object. object. objectDrawer. objectManager. ObjectSpawnerDef. objectTemplate. ObjectTemplate. Overgrowth. OvergrowthType. Particles. particleSystemManager. physics. player. portal. profile. profiler. pythonHost. radio. radioInterface. radioVehicleInterface. ragDoll. rainManager. raStats. Renderer. renderer. reservedSlots. resourceManager. scoreboard. scoreManager. SettingsManager. shadermanager. shadowManager. skinnedMeshRenderer. skyDome. Skydome. Sound. sound. spawnManager. squad. squadInterface. squadLeader. squadLeaderInterface. squadManager. squadMenu. staticMeshRenderer. sv. swiffHost. terrain. terrainCuller. texturemanager. triggerManager. Undergrowth. undergrowthEditable. UndergrowthEditable. undergrowthEditableMaterial. undergrowthEditableType. Vars. vars. VideoSettings. voip. weatherManager. windManager.</Keywords> <Keywords name="Words2">AirPlayerInputControlMap AnimatedBundle Armament Armor BasicInfo BottomLeftAnimate BottomLeftStatic BottomRightAnimate BottomRightStatic BundledMesh Camera ControlInfo ControlPoint ControlPointInfo DefaultAmmoComp DefaultAnimationComp DefaultAnimationCompDefaultZoomCompSound DefaultCollisionComp DefaultDetonationComp DefaultFollowComp defaultGameControlMap DefaultPenetrateComp defaultPlayerInputControlMap DefaultProjSoundComp DefaultRicochetComp DefaultSoundComp DefaultZoomComp EffectBundle EnvMap ExplosivesFireComp ForwardTrigger GenericFireArm GenericProjectile Global GrapplingHookRope GrapplingHookRopeContainer HandFireArmsInfo HelicopterPlayerInputControlMap Heightmap HeighmapCluster HookLink IdleTrigger InfantryPlayerInputControlMap IngameHud LadderContainer LandPlayerInputControlMap Mesh MessageTrigger Mobile MovementTrigger ObjectSpawner Physical PlayerControlObject Point PoseTrigger RandomTrigger ReplenishingAmmoComp RopeLink RotationalPoint SeaPlayerInputControlMap SimpleObject SingleFireComp SoldierBasedRecoilComp SoldierDeviationComp Sound Spawnpoint StaticMesh StickyCollisionComp StrategicObject SupplyObject SwitchMessageTrigger SpawnPoint Terrain TerrainEditable ThrownAnimationComp ThrownFireComp TopLayer Trigger Triggerable TriggerableTarget TurnTrigger Unit VehicleHud WeaponHud ZiplineContainer ZiplineRope</Keywords> <Keywords name="Words3">AND BF2Editor CRD_NONE CRD_UNIFORM EQUAL ID NOT OR c_ host v_ else</Keywords> <Keywords name="Words4">include Include run Run alias</Keywords> </KeywordLists> <Styles> <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD2" styleID="6" fgColor="0080FF" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD3" styleID="7" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD4" styleID="8" fgColor="FF8080" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="COMMENT" styleID="1" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="COMMENT LINE" styleID="2" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="OPERATOR" styleID="10" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="DELIMINER1" styleID="14" fgColor="FF0080" 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> <UserLang name="BF2 Atlas" ext="tai tac lst"> <Settings> <Global caseIgnored="yes" /> <TreatAsSymbol comment="no" commentLine="no" /> <Prefix words1="no" words2="no" words3="no" words4="no" /> </Settings> <KeywordLists> <Keywords name="Delimiters">000000</Keywords> <Keywords name="Folder+"></Keywords> <Keywords name="Folder-"></Keywords> <Keywords name="Operators">"</Keywords> <Keywords name="Comment">1 1 2 0#</Keywords> <Keywords name="Words1">group</Keywords> <Keywords name="Words2">border format height miplevels width</Keywords> <Keywords name="Words3">tga dds</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="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD2" styleID="6" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="KEYWORD3" styleID="7" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <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="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" /> <WordsStyle name="OPERATOR" styleID="10" fgColor="FF0080" 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> </NotepadPlus> |
![]() |
|
![]() |
![]() |
![]() |
#4 |
Join Date: Jun 2008
Posts: 296
![]() |
![]()
Updated userdefinedlanguages.xml for notepad 6.2.3 (afaik, the xml presented here doesntwork for newer versions)
Code:
<NotepadPlus> <UserLang name="bf2" ext="tweak con ai" udlVersion="2.0"> <Settings> <Global caseIgnored="yes" allowFoldOfComments="no" forceLineCommentsAtBOL="no" foldCompact="no" /> <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> </Settings> <KeywordLists> <Keywords name="Comments" id="0">00rem 01* 02 03 04</Keywords> <Keywords name="Numbers, additional" id="1"></Keywords> <Keywords name="Numbers, prefixes" id="2">0x</Keywords> <Keywords name="Numbers, extras with prefixes" id="3">A B C D E F a b c d e f</Keywords> <Keywords name="Numbers, suffixes" id="4"></Keywords> <Keywords name="Operators1" id="5">[ ] =</Keywords> <Keywords name="Operators2" id="6"></Keywords> <Keywords name="Folders in code1, open" id="7">if</Keywords> <Keywords name="Folders in code1, middle" id="8"></Keywords> <Keywords name="Folders in code1, close" id="9">endif</Keywords> <Keywords name="Folders in code2, open" id="10"></Keywords> <Keywords name="Folders in code2, middle" id="11"></Keywords> <Keywords name="Folders in code2, close" id="12"></Keywords> <Keywords name="Folders in comment, open" id="13"></Keywords> <Keywords name="Folders in comment, middle" id="14"></Keywords> <Keywords name="Folders in comment, close" id="15"></Keywords> <Keywords name="Keywords1" id="16">admin. ai. aiPathfinding. aiSettings. aiStrategy. aiStrategicArea. AIStrategicArea. aiTemplate. aiTemplatePlugIn. animationBundle. animationManager. animationSystem. animationTrigger. animationValueHolder. AudioSettings. bf2Engine. BitStream. buffermanager. chat. CollisionCheck. collisionLog. CollisionManager. CombatArea. CombatAreaManager. commander. commanderInterface. commanderMenu. config. console. ControlMap. debug. debugCounterManager. decalManager. demo. Editor. envmapManager. fileChangeManager. fileManager. game. gameLogic. GameLogic. gameServerSettings. GeneralSettings. GeometryTemplate. GlobalSettings. heightmap. heightmapcluster. hemiMapManager. hudBuilder. hudItems. hudManager. ingameHelp. InputDevices. itemSelection. LevelSettings. levelsList. lightManager. Lightmanager. lightmapGeneration. LightmapSettings. LightSettings. localplayer. localProfile. mapList. MapList. Material. materialManager. memory. minimap. nametags. network. networkableInfo. Object. object. objectDrawer. objectManager. ObjectSpawnerDef. objectTemplate. ObjectTemplate. Overgrowth. OvergrowthType. Particles. particleSystemManager. physics. player. portal. profile. profiler. pythonHost. radio. radioInterface. radioVehicleInterface. ragDoll. rainManager. raStats. Renderer. renderer. reservedSlots. resourceManager. scoreboard. scoreManager. SettingsManager. shadermanager. shadowManager. skinnedMeshRenderer. skyDome. Skydome. Sound. sound. spawnManager. squad. squadInterface. squadLeader. squadLeaderInterface. squadManager. squadMenu. staticMeshRenderer. sv. swiffHost. terrain. terrainCuller. texturemanager. triggerManager. Undergrowth. undergrowthEditable. UndergrowthEditable. undergrowthEditableMaterial. undergrowthEditableType. Vars. vars. VideoSettings. voip. weatherManager. windManager.</Keywords> <Keywords name="Keywords2" id="17">AirPlayerInputControlMap AnimatedBundle Armament Armor BasicInfo BottomLeftAnimate BottomLeftStatic BottomRightAnimate BottomRightStatic Bundle BundledMesh Camera ControlInfo ControlPoint ControlPointInfo DefaultAmmoComp DefaultAnimationComp DefaultAnimationCompDefaultZoomCompSound DefaultCollisionComp DefaultDetonationComp DefaultFollowComp defaultGameControlMap DefaultPenetrateComp defaultPlayerInputControlMap DefaultProjSoundComp DefaultRicochetComp DefaultSoundComp DefaultZoomComp EffectBundle EnvMap ExplosivesFireComp ForwardTrigger GenericFireArm GenericProjectile Global GrapplingHookRope GrapplingHookRopeContainer HandFireArmsInfo HelicopterPlayerInputControlMap Heightmap HeighmapCluster HookLink IdleTrigger InfantryPlayerInputControlMap IngameHud LadderContainer LandPlayerInputControlMap Mesh MessageTrigger Mobile MovementTrigger ObjectSpawner Physical PlayerControlObject Point PoseTrigger RandomTrigger ReplenishingAmmoComp RopeLink RotationalBundle RotationalPoint SeaPlayerInputControlMap SimpleObject setusestitchedlods SingleFireComp SoldierBasedRecoilComp SoldierDeviationComp Sound Spawnpoint StaticMesh StickyCollisionComp StrategicObject SupplyObject SwitchMessageTrigger SpawnPoint Terrain TerrainEditable ThrownAnimationComp ThrownFireComp TopLayer Trigger Triggerable TriggerableTarget TurnTrigger Unit VehicleHud WeaponHud ZiplineContainer ZiplineRope</Keywords> <Keywords name="Keywords3" id="18">AND BF2Editor CRD_NONE CRD_UNIFORM EQUAL ID NOT OR c_ host v_ else</Keywords> <Keywords name="Keywords4" id="19">include Include run Run alias</Keywords> <Keywords name="Keywords5" id="20"></Keywords> <Keywords name="Keywords6" id="21"></Keywords> <Keywords name="Keywords7" id="22"></Keywords> <Keywords name="Keywords8" id="23"></Keywords> <Keywords name="Delimiters" id="24">00&quot;00&quot;00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords> </KeywordLists> <Styles> <WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="COMMENTS" styleID="1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="LINE COMMENTS" styleID="2" fgColor="00FF00" bgColor="FFFFFF" fontName="Arial Black" fontStyle="1" nesting="67109632" /> <WordsStyle name="NUMBERS" styleID="3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS1" styleID="4" fgColor="0080FF" bgColor="FFFFFF" fontName="Arial" fontStyle="1" nesting="0" /> <WordsStyle name="KEYWORDS2" styleID="5" fgColor="0080FF" bgColor="FFFFFF" fontName="" fontStyle="7" nesting="0" /> <WordsStyle name="KEYWORDS3" styleID="6" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="7" nesting="0" /> <WordsStyle name="KEYWORDS4" styleID="7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS5" styleID="8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS6" styleID="9" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS7" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="KEYWORDS8" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="OPERATORS" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN CODE1" styleID="13" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="7" nesting="0" /> <WordsStyle name="FOLDER IN CODE2" styleID="14" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="FOLDER IN COMMENT" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS1" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS2" styleID="17" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS3" styleID="18" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS4" styleID="19" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS5" styleID="20" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS6" styleID="21" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS7" styleID="22" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> <WordsStyle name="DELIMITERS8" styleID="23" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" /> </Styles> </UserLang> </NotepadPlus> ![]() |
![]() |
|
![]() |
![]() |
![]() |
Tags |
bf2, notepad, script, scriptnotepad, syntax |
Thread Tools | |
Display Modes | |
|
|