Jump to content

[ZH/How to] Adding Red Guard Bayonet

1 reply to this topic

#1 Cattman2236

    Freelance Photoshop Artist

  • Gold Member
  • 970 posts
  • Projects: Massive Destruction: First Encounter

Posted 05 March 2008 - 20:29

Ok since there is nothing on adding this simple feature i thought i would write my first ever Zero Hour tutorial lol, So bare with me :P

Anyways lets begin, The files you will need to edit:

InfantryGeneral.ini (I didnt add the bayonet to this guy as his red guard already 0wns but it`s up to you)

So let`s Begin:

First open up either China/Infantry/Nuke/Tank and look for the Red Guards weaponset and replace the weaponset with the one posted:

	Conditions = None 
	Weapon = PRIMARY RedguardMachineGun
	Weapon = TERTIARY RedguardBayonet

(The reason it has to be in the TERTIARY slot is due to it being on bone c from what i am lead to believe)

Make sure you save your work and then open up the CommandSet.ini and search for the Red Guards command set and replace it with this:

CommandSet ChinaInfantryRedguardCommandSet
   1 = Command_ChinaInfantryRedguardSwitchToMachineGun
   2 = Command_ChinaInfantryRedGuardCaptureBuilding
   3 = Command_ChinaInfantryRedguardBayonet
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop

Save you work and continue now to CommandButton.ini and add these buttons to the bottom of the ini file (at least you know where the buttons are then)

CommandButton Command_ChinaInfantryRedguardSwitchToMachineGun
  Command				 = SWITCH_WEAPON
  WeaponSlot			  = PRIMARY
  TextLabel			   = CONTROLBAR:RedGuardMachineGun
  ButtonImage			 = SSMachineGun
  ButtonBorderType		= ACTION
  DescriptLabel		   = CONTROLBAR:ToolTipSwitchToRedGuardMachineGun

CommandButton Command_ChinaInfantryRedguardBayonet
  Command				 = FIRE_WEAPON
  WeaponSlot			  = TERTIARY
  TextLabel			   = CONTROLBAR:Bayonet
  ButtonImage			 = SSBayonet
  CursorName			  = StabAttack
  InvalidCursorName	   = StabAttackInvalid
  ButtonBorderType		= ACTION
  DescriptLabel		   = CONTROLBAR:ToolTipChinaRedGuardFireBayonet

There is no need to worry about putting the tooltips and such into your CSF/STR file as ZH already has them in :D
(Also you can add CHECK_LIKE to the options list of the Bayonet Button ,But i found that to be really buggy for some reason so it`s up to you if you add it)

Now open the Weapon.ini and search for the Bayonet weapon (yeah its already in-game but i added a few extras) and replace it with this:

Weapon RedguardBayonet
  PrimaryDamage = 10000.0		&#59; always kills target in one hit
  PrimaryDamageRadius = 0.0	  &#59; 0 primary radius means "hits only intended victim"
  AttackRange = 2.0
  DamageType = MELEE
  DeathType = NORMAL
  WeaponSpeed = 999999.0		 &#59; dist/sec (huge value == effectively instant)
  ProjectileObject = NONE
  FireFX = NONE
  FireSound = HeroUSAKnifeAttack
  DelayBetweenShots = 1900	   &#59; time between shots, msec
  ClipSize = 0				   &#59; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0			 &#59; how long to reload a Clip, msec
  PreAttackDelay = 1400
  PreAttackType = PER_ATTACK&#59; Do the delay each time we attack a new target

And that is it!! Congrats you have given the Red Guard his trusty bayonet back, Just move your cursor over enemy infantry and have fun!!

For an extra little bit of spice why not add a sound when you click the bayonet button? Or when you attack someone? For that i will leave to you to decide. I hope this was helpfull and happy modding ;)
Posted Image
Posted Image

#2 vullnetyy


  • Member
  • 15 posts

Posted 03 May 2008 - 15:55

thnx m8 this inspired me to change some other stuff in generals
Lieutenant Sofia: Establishing battlefield control... Stand by...
Incoming Transmission...
Yuri: Games are made to be modified, just like rules are made to be broken!
Transimission ended...
-Battle Control Online-
Posted Image
Posted Image

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users