Code Monkey home page Code Monkey logo

zerosyntax-highlight's Introduction

ZeroSyntax-Highlight

ZeroSyntaxLogo128

Introduction

ZeroHour-Highlight is a simple syntax highlighter for map.ini files in Command & Conquer Generals Zero Hour. This project aims to provide a simple and easy syntax highlighting to help find errors, structure and understand the map.ini file. The project will firstly focus on supporting map.ini files which works in the basegame (not modded). With this said, the highligher have mostly been tested in Zero Hour, but should work in vanilla (none zero hour).

Showcase

Normal syntax highlighting in vscode

image

ZeroSyntax Highlighting

image

Contributing

For contributing to this project you will need to fork the repository to get your own copy. In you own copy you can change and manipulate the program. When you are satisfied with your solution you create a Pull Request and an administator will look at it. Should there be any issues with the submitted code a comment will be left on the Pull Request and will first be accepted when all issues have been fixed.

License

This projct is under the MIT LICENSE

Suggestions

As this is my first open-source project, if you have any ideas or suggestions please write to me on eithre Discord or mail. (Discord might be better)

Questions

Discord: ViTeXFTW#6644
Mail: [email protected]

zerosyntax-highlight's People

Contributors

s215521 avatar vitexftw avatar

Watchers

 avatar

zerosyntax-highlight's Issues

Recognize Rank # class

image

Rank 3
  RankName                      = INI:RankLevel3
  SkillPointsNeeded             = 1750
  SciencesGranted               = SCIENCE_Rank3
  SciencePurchasePointsGranted  = 2
End

Recognize PlayerTemplate class

image

PlayerTemplate FactionAmerica
 IntrinsicSciences    = SCIENCE_AMERICA SCIENCE_CHINA SCIENCE_Pathfinder
 ProductionCostChange = AirF_AmericaVehicleChinook -16.66%
 ProductionCostChange = AmericaVehicleChinook -33.28%
 ProductionCostChange = AmericaVehicleTomahawk 25%
 ProductionCostChange = AmericaVehicleComanche -16.66%
 ProductionCostChange = AmericaTankAvenger -25%
 ProductionCostChange = AmericaVehicleSentryDrone -43.75%
 ProductionCostChange = AmericaInfantryRanger -33.15%
 ProductionCostChange = AmericaInfantryPathfinder -16.65%
 ProductionCostChange = AmericaVehicleMedic -16.65%
 ProductionCostChange = SupW_AmericaJetAurora 50%
 ProductionCostChange = AmericaJetRaptor -28.55%
 ProductionCostChange = AirF_AmericaJetStealthFighter -20%
 ProductionCostChange = AmericaParticleCannonUplink -50%
 PurchaseScienceCommandSetRank1  = SCIENCE_UNITEDFACTIONS_USA_CommandSetRank1
 PurchaseScienceCommandSetRank3  = SCIENCE_UNITEDFACTIONS_USA_CommandSetRank3
 PurchaseScienceCommandSetRank8  = SCIENCE_UNITEDFACTIONS_USA_CommandSetRank8
 SpecialPowerShortcutCommandSet  = UNITEDFACTIONS_SpecialPowerShortcutUSA
 SpecialPowerShortcutButtonCount = 11
End

Recognize AudioEvent class

Have ZeroSyntax-Highlight recognize AudioEvents

AudioEvent RangerVoiceSelect
  Sounds = iransea iranseb iransec iransee iransef 
  Control = random
  Volume  = 90
  Type = ui voice player
End

Recognize Weather class

Make ZeroSyntax-Highlight capture Weather class and properties.

Weather
   SnowEnabled = no ; enable/disable snow on the map.
   SnowTexture = ExSnowFlake.tga ;texture used for each snow particle.
   SnowBoxDimensions = 200 ; width/height of box around camera containing snow.
   SnowBoxDensity = 1 ; amount of snow particles per world-unit. Raise to increase particle count.
   SnowFrequencyScaleX = 0.0533 ;speed of side-to-side wave movement.
   SnowFrequencyScaleY = 0.0275 ;speed of side-to-side wave movement. 
   SnowAmplitude = 5.0 ;amount of side-to-side movement. 
   SnowVelocity = 4.0 ;speed at which snow falls
   SnowPointSize = 1.0 ;scale the size of snow particles.
   SnowMaxPointSize = 64.0 ; maximum pixel size of point sprite particles (min-spec requires <= 64).
   SnowMinPointSize = 0.0 ; minimum pixel size of point sprite particles.
  
   ;Some video cards can't do hardware accelerated particles.  Set this
   ;setting to "no" in order see what emulation will look like.  Use the
   ;SnowQuadSize setting to make it look similar to PointSprite version.
   SnowPointSprites = yes ;set to "no" for point-sprite emulation.
   SnowQuadSize = 0.5 ;scale the size of snow particles when using point-sprite emulation.
End

Recognize SpecialPower class

Make ZeroSyntax-Highlight capture SpecialPower class and properties.

SpecialPower SuperweaponArtilleryBarrage
  Enum                = SPECIAL_ARTILLERY_BARRAGE
  ReloadTime          = 300000   ; in milliseconds. min is 2x door/open close time!
  RequiredScience     = SCIENCE_ArtilleryBarrage1
  InitiateSound       = FireArtilleryCannonSound
  PublicTimer         = No
  SharedSyncedTimer   = Yes
  ViewObjectDuration  = 30000
  ViewObjectRange     = 250
  RadiusCursorRadius  = 125
  ShortcutPower       = Yes     ;Capable of being fired by the side-bar shortcut.
  AcademyClassify     = ACT_SUPERPOWER ;Considered a powerful special power that a player could fire. Not for simpler unit based powers.
End

Recognize ParticleSystem class

image

ParticleSystem HALOPowerPlantControlRodsGlow
  Priority 	  = CRITICAL
  Shader 	  = ADDITIVE
  Type 		  = PARTICLE
  ParticleName 	  = EXLnzFlar5.tga
  AngleZ 	  = 0.00 0.00
  AngularRateZ 	  = 0.00 0.00
  AngularDamping  = 1.00 1.00
  VelocityDamping = 1.00 1.00
  Gravity 	  = 0.00
  Lifetime 	  = 30.00 30.00
  SystemLifetime  = 0
  Size 		  = 7.00 7.00
  StartSizeRate   = 0.00 0.00
  SizeRate 	  = 4.00 5.00
  SizeRateDamping = 0.90 0.92
  Alpha1          = 0.00 0.00 0
  Alpha2          = 0.25 0.25 5
  Alpha3          = 0.00 0.00 30
  Alpha4          = 0.00 0.00 0
  Color1          = R:255 G:255 B:25 0
  Color2          = R:0 G:0 B:0 30
  Color3          = R:0 G:0 B:0 0
  Color4          = R:0 G:0 B:0 0
  ColorScale      = 0.00 0.00
  BurstDelay      = 10.00 10.00
  BurstCount      = 1.00 1.00
  InitialDelay 	  = 0.00 0.00
  DriftVelocity   = X:0.00 Y:0.00 Z:0.00
  VelocityType 	  = ORTHO
  VelOrthoX 	  = 0.00 0.00
  VelOrthoY 	  = 0.00 0.00
  VelOrthoZ 	  = 0.00 0.00
  VolumeType      = LINE
  VolLineStart    = X:-7 Y:5 Z:30
  VolLineEnd      = X:-7 Y:5 Z:30
  IsHollow 	  = Yes
  IsGroundAligned = Yes
End

Recognize FXList class

Be aware of all the subblocks in fxlist like ParticleSystem, Sound, ViewShake ...

image

FXList WeaponFX_LaserBombDetonation
  ParticleSystem 
    Name   = LaserBombFlare1
    Offset = X:0.0 Y:0.0 Z:4.0
  End
  ParticleSystem 
    Name   = LaserBombFlare2
    Offset = X:0.0 Y:0.0 Z:4.0
  End
  ParticleSystem 
    Name = LaserBombRing
  End
  ViewShake 
    Type = NORMAL
  End
  TerrainScorch
    Type = RANDOM 
    Radius = 50
  End
  Sound
    Name = LaserBombPulse
  End
  Sound
    Name = LaserBombBlast
  End
End

Recognize Armor class

image

Armor SuperEmperorTankArmor
  Armor = DEFAULT            100%
  Armor = SMALL_ARMS          10%
  Armor = GATTLING            10%
  Armor = COMANCHE_VULCAN     10%
  Armor = EXPLOSION           92%
  Armor = STEALTHJET_MISSILES 40%
  Armor = AURORA_BOMB        125%
  Armor = ARMOR_PIERCING      55%
  Armor = TOPPLING            50%
  Armor = INFANTRY_MISSILE    40%
  Armor = JET_MISSILES        40%
  Armor = FLAME               15%
  Armor = RADIATION           15%
  Armor = POISON               5%
  Armor = SNIPER               0%
  Armor = LASER                0%
  Armor = HAZARD_CLEANUP       0%
  Armor = SUBDUAL_MISSILE      0%
  Armor = SUBDUAL_VEHICLE     50%
  Armor = SUBDUAL_BUILDING     0%
  Armor = SURRENDER            0%
  Armor = KILL_PILOT           0%
  Armor = MELEE                0%
  Armor = MOLOTOV_COCKTAIL     0%
  Armor = PARTICLE_BEAM       20%
  Armor = FALLING              0%
End

Recognize Upgrade class

Upgrade Upgrade_AmericaRadar
    DisplayName        = UPGRADE:Radar
    Type               = OBJECT
    BuildTime          = 10.0
    BuildCost          = 500
    ButtonImage        = SARadarUpgrade
    ResearchSound      = NoSound ;Doesn't need a sound because this upgrade is granted immediately!
    AcademyClassify    = ACT_UPGRADE_RADAR
End

Recognize Weapon class

Make ZeroSyntax-Highlight capture Weapon class and properties.

Weapon MarauderTankGun
  PrimaryDamage = 60.0
  PrimaryDamageRadius = 5.0
  ScatterRadiusVsInfantry = 10.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 170.0
  MinTargetPitch = -15                         ; we may not target anything outside of this pitch range
  MaxTargetPitch = 15                          ; ditto
  DamageType = ARMOR_PIERCING
  DeathType = NORMAL
  WeaponSpeed = 300                           ; dist/sec 
  WeaponRecoil = 10                            
  ProjectileObject = MarauderTankShell
  FireFX = WeaponFX_GenericTankGunNoTracer
  VeterancyFireFX         = HEROIC WeaponFX_HeroicGenericTankGunNoTracer
  ProjectileDetonationFX = WeaponFX_GenericTankShellDetonation
  FireSound = MarauderTankWeapon
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 2000        ; time between shots, msec
  ClipSize = 0                    ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0              ; how long to reload a Clip, msec

  ; note, these only apply to units that aren't the explicit target 
  ; (ie, units that just happen to "get in the way"... projectiles
  ; always collide with the Designated Target, regardless of these flags
  ProjectileCollidesWith = STRUCTURES WALLS 
End

Recognize DialogEvent class

Have the ZeroSyntax-Highlight DialogEvents correctly:

DialogEvent EvaGLA_DetectedNuke
  Filename =  egdenuk.wav  
End

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.