Jump to content


A Whole Tutorial Of How To Add And Bone Units


2 replies to this topic

#1 Futschki

    Duh!

  • Member
  • 2835 posts

Posted 14 February 2007 - 10:42

First Of All We'll Need To Make Ready The Model ... And That Means Bonning :

1.1.1 - Open Up Ur Model
1.1.2a - Attach The Parts With Their Mothers If They Are Useless Alone ... That Means If There Are Any Thing On The Turret Other Than Housecolors Attach It To The Turret (BUT DONT ATTACH THE HOUSECOLORS) ... There Should Be Those Parts : Chassis, Turret, Barrel, Housecolors, And Treads
1.1.2b - Name The Parts As Following : The Chassis (big-part below the turret) as CHASSIS, The Turret as TURRET, The Treads As TREADS01 TREADS02 Or Attach Them With The Chassis, The Barrel As BARREL And The HouseColors As HOUSECOLOR01 HOUSECOLOR02 etc ...
1.1.3 - Link All Parts To Their Mothers ... That Means : Link The Turret And The Treads To The Chassis By Clicking On the "Select And Link" Button Then Select the Part U Want To Link To Its Mother Then Press "h" And Double-Click On The Mother-Part Do The Same For The Housecolors And Barrel ... (Link The Barrel With The Turret)
1.1.4 - When U Finish This Step press "h" then Display Subtree To Be Sure That U Linked Them right
1.1.5 - Fix The Pivot ... that means Telling The Game Where is The Top, Left, Front Of The Unit And Thats by Selecting All Objects, Then Clicking On hierarchy Then Affect Pivot Only And Then Allign To World, Red Arrow Should Be The Front, Blue Arrow Should be The Top And Green Should be The Left ... rotate the model until u have these fixed

Note : Select The Turret Then Hierarchy / Affect Pivot Only Then Center To Object ... and Like That The Turret Will Turn Correctly in-game Also Do That For Every Part Especially The chassis And The Turret

Now U Need To Add The Bones :

1.2.1 - First The Muzzle (Where The Weapon Come From) ... Create A 4-sided-sphere And Name It MUZZLE (or whatever but dont forget that name :wtfh:) And Put It In The Right Place (At The End Of The Barrel) then Link It To The Barrel
1.2.2 - Then Where The Treads Tracks Begin ... Create a 4 sided sphere again And put one in the middle of each treads Then Call it TREADSFX01 And TREADSFX02 then Link Each One To The Right Tread
1.2.3 - The Smoke Bones These Bones Are Where The Smoke Come From When The Unit Is Damaged Put It Anywhere u want but Call It SMOKE01 SMOKE02 Etc... and dont forget to link it to the right part
1.2.4 - Now For The Muzzlefx thats the fire that come from the barrel when firing take it from the crusader model then put it in the end of the model And Link It to The Barrel

Now Select All The Bones ( Muzzle, MuzzleFX, Smoke, Treadsfx ) Click On The Utilities Button ( Look Like A Hammer ) Then Un-check the Export Geometry Checkbox And Export The Model As W3D And Put It In Game Directory\Art\W3D\

Note : If U Skinned it put the skin file in game directory\Art\Textures
Note 2 : The Skin Should be *.tga or *.dds

That Should Be Everything For Bonning ... For Pics And More Infos Go To : http://www.killasmods.gamemod.net

Now For Coding :

U Need First A Bigexporter Like FinalBig Or Something Like That To Extract The INI Files U Need From INIZH.big File
Extract commandset.ini ; commandbutton.ini To (Game Directory)\Data\Ini

2.1.1 - Open Up Notepad
2.1.2 - Paste This Code : And Read The Comments ( After ";" )
;------------------------------------------------------------------------------
Object AmericaNewUnit&#59; <------------- Here Is The Name Of The Unit NAme It Whatever U Want 

 &#59; *** ART Parameters ***
  SelectPortrait		 = SACLeopard_L  &#59; <---------- The Image Of The Unit when u select it
  ButtonImage			= SACLeopard	&#59; <---------- The Image That Show When U Build It At The Warfactory 
  
  UpgradeCameo1 = Upgrade_AmericaBattleDrone			  &#59;
  UpgradeCameo2 = Upgrade_AmericaScoutDrone			   &#59; 
  UpgradeCameo3 = Upgrade_AmericaHellfireDrone			&#59; <-- Here Are The Upgrades That The Unit Could Be Upgraded With
  UpgradeCameo4 = Upgrade_AmericaAdvancedTraining		 &#59;
  UpgradeCameo5 = Upgrade_AmericaCompositeArmor		   &#59;
  
  Draw = W3DTankDraw ModuleTag_01
	DefaultConditionState
	  Model			   = AVLeopard					 &#59; <-- The Model Name &#40; without .w3d ... Obviously &#58;P &#41;
	  Turret			  = Turret						&#59; <-- What Did U Call The Turret ??? put it here &#58;D
	  WeaponFireFXBone	= PRIMARY TurretMS			  &#59; <-- Where The Weapon Come From ... U called it Muzzle Remember ? &#58;D ... so u should now call it here Muzzle
	  WeaponRecoilBone	= PRIMARY Barrel				&#59; <-- The Barrel ... What Did u call it in the model ??? Put here its name
	  WeaponMuzzleFlash   = PRIMARY TurretFX			  &#59; <-- The Fire That Comes From The Barrel When Firing 
	  WeaponLaunchBone = PRIMARY TurretMS				 &#59; <-- Where The Weapon Come From ... U called it Muzzle Remember ? &#58;D ... so u should now call it here Muzzle
	End
	ConditionState	   = REALLYDAMAGED
	  Model			  = AVLeopard_D					&#59; <-- Damaged Model Name
	End
	ConditionState	   = RUBBLE
	  Model			  = AVLeopard_D					&#59; <-- Very Damaged Model Name
	End

	TrackMarks		   = EXTnkTrack.tga
	TreadAnimationRate	  = 2.0 &#59; amount of tread texture to move per second
	TreadDriveSpeedFraction = 0.3 &#59; fraction of locomotor speed below which treads stop moving.
	TreadPivotSpeedFraction = 0.6 &#59; fraction of locomotor speed below which we allow pivoting.
	OkToChangeModelColor = Yes
  End

 &#59; ***DESIGN parameters ***
  DisplayName	  = OBJECT&#58;Crusader&#59; <-- Csf Stuff When U Put The Cursor On The Unit
  Side				   = America  &#59; <-- Which Side It Belongs to
  EditorSorting		  = VEHICLE  &#59; <-- What Is It ? Infantry ? Tank ? Vehicle ?
  TransportSlotCount	 = 3
  WeaponSet
	Conditions		   = None 
	Weapon			   = PRIMARY CrusaderTankGun&#59; <-- Here Is The Weapon It Will Use ... Extract The Weapon.ini From The INIZH.big If U want To Change
  End
  ArmorSet
	Conditions		   = None
	Armor				= TankArmor			  &#59; <-- The Armor That The Unit Use ... Extract The Armor.ini From The INIZH.big If U want To Change
	DamageFX			 = TankDamageFX
  End

  BuildCost			  = 900  &#59; <-- How Much It Costs 
  BuildTime			  = 10.0		 &#59; <-- How Much Time It Takes To Be Built &#40;In seconds&#41;	
  VisionRange			= 150		  &#59; <-- the Range Of The Guard Button
  ShroudClearingRange = 300			 &#59; <-- how much does it see when moving 
  Prerequisites
	Object = AmericaWarFactory		  &#59; <-- What Does It Need To Be Built
  End
  ExperienceValue		= 100 100 200 400&#59;Experience point value at each level
  ExperienceRequired	 = 0 200 300 600&#59;Experience points needed to gain each level
  IsTrainable			= Yes &#59;Can gain experience
  CrusherLevel		   = 2 &#59;What can I crush?&#58; 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel		 = 2 &#59;What am I?&#58;		0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet			 = AmericaTankCrusaderCommandSet
  
 &#59; *** AUDIO Parameters ***
  VoiceSelect		   = CrusaderTankVoiceSelect&#59;
  VoiceMove			 = CrusaderTankVoiceMove  &#59;
  VoiceGuard			= CrusaderTankVoiceMove  &#59;   What Are The Sounds It Uses ... Extract The Speech.ini if U want To Change
  VoiceAttack		   = CrusaderTankVoiceAttack&#59;
  SoundMoveStart		= CrusaderTankMoveStart  &#59;
  SoundMoveStartDamaged = CrusaderTankMoveStart  &#59;
  UnitSpecificSounds
   &#59; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
	VoiceCreate		 = CrusaderTankVoiceCreate
	VoiceEnter			 = CrusaderTankVoiceMove
	TurretMoveStart	 = NoSound
	TurretMoveLoop	  = TurretMoveLoop
	SoundEject		  = PilotSoundEject
	VoiceEject		  = PilotVoiceEject
	VoiceCrush		  = CrusaderTankVoiceCrush
  End

 &#59; *** ENGINEERING Parameters ***
  RadarPriority		  = UNIT
  KindOf				 = PRELOAD SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT CAN_CAST_REFLECTIONS VEHICLE SCORE
  
  Body				   = ActiveBody ModuleTag_02
	MaxHealth	   = 480&#59; <-- Its Health
	InitialHealth   = 480&#59; <-- Its Health When U Build It

   &#59; Subdual damage &#34;Subdues&#34; you &#40;reaction defined by BodyModule&#41; when it passes your max health.
   &#59; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own.
	SubdualDamageCap = 960
	SubdualDamageHealRate = 500
	SubdualDamageHealAmount = 50
  End

  Behavior = AIUpdateInterface ModuleTag_03
	Turret
	  TurretTurnRate	   = 180&#59;60   // turn rate, in degrees per sec
	  ControlledWeaponSlots= PRIMARY								   &#59; What Are The Weapon This Turn rate For
	End
	AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor			= SET_NORMAL CrusaderLocomotor				 &#59; Its Locomotor &#40; The Way It Moves &#41;
  Behavior = PhysicsBehavior ModuleTag_04
	Mass				 = 50.0
  End

  Behavior = ObjectCreationUpgrade ModuleTag_05
	UpgradeObject = OCL_AmericanBattleDrone
	TriggeredBy   = Upgrade_AmericaBattleDrone
	ConflictsWith = Upgrade_AmericaScoutDrone Upgrade_AmericaHellfireDrone
  End
  Behavior = ObjectCreationUpgrade ModuleTag_06
	UpgradeObject = OCL_AmericanScoutDrone
	TriggeredBy   = Upgrade_AmericaScoutDrone
	ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaHellfireDrone
  End
  Behavior = ObjectCreationUpgrade ModuleTag_20
	UpgradeObject = OCL_AmericanHellfireDrone
	TriggeredBy   = Upgrade_AmericaHellfireDrone
	ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaScoutDrone
  End
  Behavior = ProductionUpdate ModuleTag_07
	MaxQueueEntries = 1; So you can&#39;t build multiple upgrades in the same frame
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_08
	TriggeredBy   = Upgrade_AmericaAdvancedTraining
	AddXPScalar   = 1.0&#59;Increases experience gained by an additional 100%
  End
  Behavior = MaxHealthUpgrade ModuleTag_09
	TriggeredBy   = Upgrade_AmericaCompositeArmor
	AddMaxHealth  = 100.0
	ChangeType	= ADD_CURRENT_HEALTH_TOO  &#59;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

 &#59; Turret fly off death
  Behavior = SlowDeathBehavior ModuleTag_10
	DeathTypes = ALL -CRUSHED -SPLATTED
	ProbabilityModifier  = 50
	DestructionDelay  = 500
	DestructionDelayVariance  = 100
	FX  = INITIAL  FX_GenericTankDeathEffect
	OCL = MIDPOINT OCL_GenericTankDeathEffect
	FX  = FINAL	FX_GenericTankDeathExplosion
	OCL = FINAL	OCL_CrusaderTurret
  End

 &#59; Catch fire, and explode death
  Behavior = SlowDeathBehavior ModuleTag_11
	DeathTypes = ALL -CRUSHED -SPLATTED
	ProbabilityModifier  = 50
	DestructionDelay  = 2000
	DestructionDelayVariance  = 300
	FX  = INITIAL  FX_CrusaderCatchFire
	OCL = FINAL	OCL_GenericTankDeathEffect  
	FX  = FINAL	FX_GenericTankDeathExplosion
  End

  Behavior				 = TransitionDamageFX ModuleTag_12
	ReallyDamagedParticleSystem1 = Bone&#58;Smoke RandomBone&#58;Yes PSys&#58;SmallLightSmokeColumn
	ReallyDamagedFXList1 = Loc&#58; X&#58;0 Y&#58;0 Z&#58;0 FXList&#58;FX_BattleMasterDamageTransition
  End

  Behavior = DestroyDie ModuleTag_13
	DeathTypes = NONE +CRUSHED +SPLATTED
  End

 &#59; A crushing defeat
  Behavior = FXListDie ModuleTag_14
	DeathTypes = NONE +CRUSHED +SPLATTED
	DeathFX = FX_CarCrush
  End

  Behavior = CreateObjectDie ModuleTag_15
	DeathTypes = NONE +CRUSHED +SPLATTED
	CreationList = OCL_CrusaderTank_CrushEffect
  End

  Behavior					= CreateCrateDie ModuleTag_CratesChange
   CrateData			 = SalvageCrateData
  &#59;CrateData			 = EliteTankCrateData
  &#59;CrateData			 = HeroicTankCrateData
  End

  Behavior = EjectPilotDie ModuleTag_17
	GroundCreationList = OCL_EjectPilotOnGround
	AirCreationList = OCL_EjectPilotViaParachute
	ExemptStatus = HIJACKED
	VeterancyLevels =  ALL -REGULAR&#59;only vet+ gives pilot
  End

  Behavior = MaxHealthUpgrade ModuleTag_18
	TriggeredBy   = Upgrade_AmericaCompositeArmor
	AddMaxHealth  = 100.0
	ChangeType	= ADD_CURRENT_HEALTH_TOO  &#59;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

  Behavior = FlammableUpdate ModuleTag_21
	AflameDuration = 5000		&#59; If I catch fire, I&#39;ll burn for this long...
	AflameDamageAmount = 3	  &#59; taking this much damage...
	AflameDamageDelay = 500	  &#59; this often.
  End

  Geometry			   = BOX  &#59; Could be Cylinder Or Sphere
  GeometryMajorRadius	= 15.0
  GeometryMinorRadius	= 10.0
  GeometryHeight		 = 10.0	 
  GeometryIsSmall		= Yes	
  Shadow = SHADOW_VOLUME
  ShadowSizeX = 45 &#59; minimum elevation angle above horizon. Used to limit shadow length

End


Note :If U Want To Understand Each Module ... Download Chris' Module List It's Good :wtfh:

2.1.3 - Now Save That As Anything.ini And put it in game directory\data\ini\object
2.1.4 - Now Open Commandset.ini And Search For : CommandSet AmericaWarFactoryCommandSet :
CommandSet AmericaWarFactoryCommandSet
  1  = Command_ConstructAmericaTankCrusader
  2  = Command_ConstructAmericaVehicleTomahawk
  3  = Command_ConstructAmericaVehicleHumvee
  4  = Command_ConstructAmericaVehicleMedic
  5  = Command_ConstructAmericaVehiclePaladin
  6  = Command_ConstructAmericaVehicleSentryDrone
  7  = Command_ConstructAmericaVehicleAvenger
  8  = Command_ConstructAmericaVehicleMicrowave
  9  = Command_UpgradeAmericaSentryDroneGun
  10 = Command_ConstructNewUnit&#59; <------------------------------ Add This And Call It Watever U want And Copy It
  11 = Command_UpgradeAmericaTOWMissile
  13 = Command_SetRallyPoint
  14 = Command_Sell
End


2.1.5 - Now Open CommandButton.ini And Add This Anywhere :
CommandButton Command_ConstructNewUnit&#59; <------------ Paste The Name U Used Here
  Command	   = UNIT_BUILD		  &#59; <------------ What Type is this button ? Build ? Upgrade ?   
  Object		= AmericaNewUnit	  &#59; <------------ Put Here The Name Of The Object U Put In The Anything.ini Remember &#58;D 
  TextLabel	 = CONTROLBAR&#58;ConstructAmericaTankCrusader&#59; <------- CSF Stuff
  ButtonImage   = SACLeopard		  &#59; <------- Its Cameo
  ButtonBorderType		= BUILD&#59; Identifier for the User as to what kind of button this is
  DescriptLabel		   = CONTROLBAR&#58;ToolTipUSABuildCrusader&#59; <------- CSF Stuff
End


Also If U Need More Infos About The Codes Read Bob's tutorial

Now Ure Done :wtfh: ... If Uve Done All This Right U Should Have Everything Running OK unless I made Any Error And I Hope Not :wtfh:
I hope U Appreciate This Tutorial It Took Me A While To Make :wtfh:
Posted Image

#2 Indigo

    Professional

  • Member
  • 352 posts
  • Projects: Ripping-off Counstrike1.6 player models for GenZH infantry.

Posted 05 March 2007 - 15:24

Damn, I like this tutorial but I'm such a dumb fuck that I wish there are pictures on this tut :locky:

Edited by Indigo, 05 March 2007 - 15:25.

Posted Image

...and I don't know what to do...'cause I'll never be with you...

#3 Futschki

    Duh!

  • Member
  • 2835 posts

Posted 05 March 2007 - 18:35

click here for pics
Posted Image



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users