oliver
  • oliver
  • 50.25% (Neutral)
  • Major Topic Starter
10 years ago
For some reason, this locomotor is causing my map to crash at loading... Only changed the speed from 60 to 30 to match the speeddamaged.

And btw, this was the original locomotor of the object "GenericTruckLocomotor", and the "SupplyTruckLocomotor" works perfectly fine.

Object ToxicSupplyTruck
  ; *** ART Parameters ***
  SelectPortrait         = SNFuelTruck_L
  ButtonImage            = SNFuelTruck

  ReplaceModule ModuleTag_01
    Draw = W3DTruckDraw ModuleTag_01_Override
      OkToChangeModelColor = Yes
    
      DefaultConditionState
        Model        = NVFuelTrk
      End

      ConditionState = REALLYDAMAGED
        Model        = NVFuelTrk_D
      End

      ConditionState = RUBBLE
        Model        = NVFuelTrk_D
      End

      TrackMarks                 = EXTireTrack.tga
      LeftFrontTireBone          = Tire01
      RightFrontTireBone         = Tire02
      MidLeftRearTireBone        = Tire03
      MidRightRearTireBone       = Tire04
      LeftRearTireBone           = Tire05
      RightRearTireBone          = Tire06
      TireRotationMultiplier     = 0.2
      PowerslideRotationAddition = 2.5
      Dust                       = RocketBuggyDust
      DirtSpray                  = RocketBuggyDirtSpray
      PowerslideSpray            = RocketBuggyDirtPowerSlide
    End
  End
  
  AddModule ModuleTag_Exhaust_Override
    Draw = W3DModelDraw ModuleTag_Exhaust
	  ConditionState        = NONE
        Model               = NVSSUPPLYTK_B
        HideSubObject       = Chassis
        ParticleSysBone     = EXHAUST01 GLATankEngineSmokeLight
        ParticleSysBone     = EXHAUST02 GLATankEngineSmokeLight
      End
    
      ConditionState        = MOVING
        Model               = NVSSUPPLYTK_B
        ParticleSysBone     = EXHAUST01 GLATankEngineSmokeHeavy
        ParticleSysBone     = EXHAUST02 GLATankEngineSmokeHeavy
      End
    End
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:FuelTruck
  ShroudClearingRange = 200
  CommandSet          = StopOnlyGenericCommandSet

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS VEHICLE SCORE

  RemoveModule ModuleTag_02
  
  AddModule ModuleTag_02
    Body = ActiveBody ModuleTag_02_Override
      MaxHealth = 500.0
      InitialHealth = 500.0
	  SubdualDamageCap = 600
      SubdualDamageHealRate = 500
      SubdualDamageHealAmount = 50
    End
  End
  
  RemoveModule ModuleTag_03
  
  AddModule ModuleTag_03_Override
    Behavior = AIUpdateInterface ModuleTag_03
	End
  End
  
  Locomotor = SET_NORMAL FuelTruckLocomotor

  ReplaceModule ModuleTag_04
    Behavior = PhysicsBehavior ModuleTag_04_Override
      Mass = 40.0
    End
  End
  
  ReplaceModule ModuleTag_05
    Behavior = SlowDeathBehavior ModuleTag_05_Override
      DeathTypes = ALL -CRUSHED -SPLATTED
      DestructionDelay = 3000
      FX     = INITIAL FX_FuelSpilling
	  FX     = FINAL FX_FuelTruckExplosion
      OCL    = FINAL OCL_ChinaFuelTruckDeathEffect
      Weapon = FINAL FuelTruckDeathWeapon
    End
  End
  
  ReplaceModule ModuleTag_06
    Behavior = FXListDie ModuleTag_06_Override
      RequiredStatus = HIJACKED
      DeathTypes = ALL -CRUSHED -SPLATTED
      DeathFX = FX_HijackerEmerge
    End
  End
  
  RemoveModule ModuleTag_07
  
  RemoveModule ModuleTag_10

  RemoveModule ModuleTag_11
  
  AddModule ModuleTag_12_Override
    Behavior = EjectPilotDie ModuleTag_12
      DeathTypes = ALL -CRUSHED -SPLATTED
      RequiredStatus = HIJACKED
      VeterancyLevels =  ALL
      GroundCreationList = OCL_HijackerEmerge
      AirCreationList = OCL_HijackerEmergeViaParachute
    End
  End
End

;------------------------------------------------------------------
Locomotor FuelTruckLocomotor ;SupplyTruckLocomotor
  Surfaces                = GROUND
  Speed                   = 30 ;60   ; in dist/sec
  SpeedDamaged            = 30       ; in dist/sec
  TurnRate                = 60 ;90   ; in degrees/sec
  TurnRateDamaged         = 60       ; in degrees/sec
  Acceleration            = 180      ; in dist/(sec^2)
  AccelerationDamaged     = 180      ; in dist/(sec^2)
  Braking                 = 180      ; in dist/(sec^2)
  MinTurnSpeed            = 20       ; in dist/sec
  TurnPivotOffset         = -0.2
  ZAxisBehavior           = NO_Z_MOTIVE_FORCE
  Appearance              = FOUR_WHEELS
  StickToGround           = No

  AccelerationPitchLimit  = 0.1
  DecelerationPitchLimit  = 0.1
  BounceAmount = 10
  PitchStiffness = 0.6
  RollStiffness = 0.1
  PitchDamping = 0.2
  RollDamping = 0.4
  ForwardAccelerationPitchFactor = 0.1
  LateralAccelerationRollFactor = 0.1

  HasSuspension = Yes           ; Calculate 4 wheel independent suspension info.
  CanMoveBackwards = Yes        ; Can move backwards.
  MaximumWheelExtension = -0.2  ; Maximum distance the wheels will drop on the model.
  MaximumWheelCompression = 0.3 ; Maximum distance the wheel will move up into the chassis.
  FrontWheelTurnAngle = 22      ; How many degrees the front wheels can turn.
End

3D/2D Artist
Sponsor
acidbrain
10 years ago
Try this one

Object ToxicSupplyTruck
  ; *** ART Parameters ***
  SelectPortrait         = SNFuelTruck_L
  ButtonImage            = SNFuelTruck
 
  ReplaceModule ModuleTag_01
    Draw = W3DTruckDraw ModuleTag_01_Override
      OkToChangeModelColor = Yes
     
      DefaultConditionState
        Model        = NVFuelTrk
      End
 
      ConditionState = REALLYDAMAGED
        Model        = NVFuelTrk_D
      End
 
      ConditionState = RUBBLE
        Model        = NVFuelTrk_D
      End
 
      TrackMarks                 = EXTireTrack.tga
      LeftFrontTireBone          = Tire01
      RightFrontTireBone         = Tire02
      MidLeftRearTireBone        = Tire03
      MidRightRearTireBone       = Tire04
      LeftRearTireBone           = Tire05
      RightRearTireBone          = Tire06
      TireRotationMultiplier     = 0.2
      PowerslideRotationAddition = 2.5
      Dust                       = RocketBuggyDust
      DirtSpray                  = RocketBuggyDirtSpray
      PowerslideSpray            = RocketBuggyDirtPowerSlide
    End
  End
   
  AddModule
    Draw = W3DModelDraw ModuleTag_Exhaust
      ConditionState        = NONE
        Model               = NVSSUPPLYTK_B
        HideSubObject       = Chassis
        ParticleSysBone     = EXHAUST01 GLATankEngineSmokeLight
        ParticleSysBone     = EXHAUST02 GLATankEngineSmokeLight
      End
     
      ConditionState        = MOVING
        Model               = NVSSUPPLYTK_B
        ParticleSysBone     = EXHAUST01 GLATankEngineSmokeHeavy
        ParticleSysBone     = EXHAUST02 GLATankEngineSmokeHeavy
      End
    End
  End
 
  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:FuelTruck
  ShroudClearingRange = 200
  CommandSet          = StopOnlyGenericCommandSet
 
  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_CAST_REFLECTIONS VEHICLE SCORE
 
  RemoveModule ModuleTag_02
  RemoveModule ModuleTag_03
  RemoveModule ModuleTag_07  
  RemoveModule ModuleTag_10
  RemoveModule ModuleTag_11

  ReplaceModule ModuleTag_04
    Behavior = PhysicsBehavior ModuleTag_04_Override
      Mass = 40.0
    End
  End
   
  ReplaceModule ModuleTag_05
    Behavior = SlowDeathBehavior ModuleTag_05_Override
      DeathTypes = ALL -CRUSHED -SPLATTED
      DestructionDelay = 3000
      FX     = INITIAL FX_FuelSpilling
      FX     = FINAL FX_FuelTruckExplosion
      OCL    = FINAL OCL_ChinaFuelTruckDeathEffect
      Weapon = FINAL FuelTruckDeathWeapon
    End
  End
   
  ReplaceModule ModuleTag_06
    Behavior = FXListDie ModuleTag_06_Override
      RequiredStatus = HIJACKED
      DeathTypes     = ALL -CRUSHED -SPLATTED
      DeathFX        = FX_HijackerEmerge
    End
  End
   
  AddModule
    Body = ActiveBody Module_Body
      MaxHealth = 500.0
      InitialHealth = 500.0
      SubdualDamageCap = 600
      SubdualDamageHealRate = 500
      SubdualDamageHealAmount = 50
    End
   
    Behavior = AIUpdateInterface Module_AI
    End  
    Locomotor = SET_NORMAL FuelTruckLocomotor

    Behavior = EjectPilotDie Module_Eject
      DeathTypes         = ALL -CRUSHED -SPLATTED
      RequiredStatus     = HIJACKED
      VeterancyLevels    =  ALL
      GroundCreationList = OCL_HijackerEmerge
      AirCreationList    = OCL_HijackerEmergeViaParachute
    End
  End
End

Pay close attention to the addmodule parts

Greetz
Panem et kirkinses
oliver
  • oliver
  • 50.25% (Neutral)
  • Major Topic Starter
10 years ago
Why is locomotor defines inside the module? That still crashes the game.

Another thing, the slowdeath behavior doesnt load properly on the 1st game since the game was launched, have to restart the map in order to see a proper vehicle destruction (not perfect, cause the fireocl of the weapon misses some particles)... What on the actual world lol this game is so bugged.

Weapon FuelTruckDeathWeapon
  PrimaryDamage           = 100.0
  PrimaryDamageRadius     = 25.0
  SecondaryDamage         = 50.0
  SecondaryDamageRadius   = 40.0
  DamageType              = EXPLOSION         
  DeathType               = BURNED
  FireOCL                 = OCL_SmallThermobaricExplosionBurningFire
  RadiusDamageAffects     = ALLIES ENEMIES NEUTRALS
End

3D/2D Artist
acidbrain
10 years ago
You only have to use Addmodule once, add all the modules you want and voilla
I know the game is buggy sometimes but i think there is something wrong with the code somewhere.
Are you making a map.ini for a mod?
Panem et kirkinses
acidbrain
10 years ago
Here is an example

Object CivilianBunker01
 
  UpgradeCameo1 = Upgrade_AmericaBattleDrone
  UpgradeCameo2 = Upgrade_AmericaHellfireDrone 
 
  ;Add WeaponFireFXBone for the Comanche20mmCannon.
  ReplaceModule ModuleTag_01
    Draw = W3DModelDraw ModuleTag_01_Override
      OkToChangeModelColor = Yes    
      ;Day
      ConditionState = NONE
        Model         = CBBunker01
        WeaponFireFXBone = PRIMARY FIREPOINT
      End
      ConditionState = DAMAGED
        Model         = CBBunker01_D
      End
      ConditionState = REALLYDAMAGED
        Model         = CBBunker01_E
      End
      ConditionState = RUBBLE
        Model         = CBBunker01_R
      End
      ;Day garrisoned
      ConditionState = GARRISONED
        Model         = CBBunker01_G
        Animation     = CBBunker01_G.CBBunker01_G
        AnimationMode = LOOP
      End
      ConditionState = DAMAGED GARRISONED
        Model         = CBBunker01_DG
        Animation     = CBBunker01_DG.CBBunker01_DG
        AnimationMode = LOOP
      End
      ConditionState = REALLYDAMAGED GARRISONED
        Model         = CBBunker01_EG
        Animation     = CBBunker01_EG.CBBunker01_EG
        AnimationMode = LOOP
      End
    End
  End
   
  ;Upgraded armor, triggered by emp upgrade.
  ArmorSet
    Conditions = PLAYER_UPGRADE
    Armor    = GLAUpgradedStructureArmor
    DamageFX = StructureDamageFXNoShake
  End
  ;Give the bunker a Comanche20mmCannonWeapon.
  WeaponSet
    Conditions = None 
    Weapon = PRIMARY Comanche20mmCannonWeapon
  End
   
  ;Commandsets are below the object code.
  CommandSet = CivilianBunkerCommandSet
 
  VisionRange         = 200.0
  ShroudClearingRange = 350
 
  ;Add CAN_ATTACK and ATTACK_NEEDS_LINE_OF_SIGHT for use of the weapon.
  KindOf = STRUCTURE SELECTABLE IMMOBILE GARRISONABLE_UNTIL_DESTROYED CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT
 
  ;Increase health with 2000.0
  ReplaceModule ModuleTag_02
    Body = StructureBody ModuleTag_02_Override
      MaxHealth     = 4000.0
      InitialHealth = 4000.0
    End
  End
  ;Reduce ContainMax with 5.
  ReplaceModule ModuleTag_03
    Behavior = GarrisonContain ModuleTag_03_Override
      ContainMax = 5
      EnterSound = GarrisonEnter
      ExitSound  = GarrisonExit
    End
  End
   
  AddModule
    ;Add AI for use of the weapon.
    Behavior = AIUpdateInterface ModuleTag_AI
      Turret
        ControlledWeaponSlots = PRIMARY
        TurretTurnRate        = 360
        FiresWhileTurning     = Yes
      End
      AutoAcquireEnemiesWhenIdle = Yes 
      MoodAttackCheckRate        = 250
    End
    ;Add regeneration.
    Behavior = BaseRegenerateUpdate ModuleTag_BRG
      ;<No data>
    End
    ;Add ProductionUpgrade, required for object upgrades.
    Behavior = ProductionUpdate ModuleTag_PU
      MaxQueueEntries = 1
    End 
    ;Add minefield upgrade, mines are upgradeable to emp mines.
    Behavior = GenerateMinefieldBehavior ModuleTag_GMB
      TriggeredBy         = Upgrade_ChinaMines
      MineName            = ChinaStandardMine
      SmartBorder         = Yes
      AlwaysCircular      = Yes
      Upgradable          = Yes
      UpgradedTriggeredBy = Upgrade_ChinaEMPMines
      UpgradedMineName    = ChinaEMPMine
    End
    ;Add commandset upgrade, triggered by minefield upgrade.
    Behavior = CommandSetUpgrade ModuleTag_CU
      CommandSet = CivilianBunkerCommandSetUpgrade
      TriggeredBy = Upgrade_ChinaMines
    End
    ;Add armor upgrade, triggered by EMP upgrade.
    Behavior = ArmorUpgrade ModuleTag_AU
      TriggeredBy = Upgrade_ChinaEMPMines
    End
    ;Add battledrone upgrade.
    Behavior = ObjectCreationUpgrade ModuleTag_OCUBD
      UpgradeObject = OCL_AmericanBattleDrone
      TriggeredBy   = Upgrade_AmericaBattleDrone
      ConflictsWith = Upgrade_AmericaHellfireDrone
    End
    ;Add hellfiredrone upgrade.
    Behavior = ObjectCreationUpgrade ModuleTag_OCUHD
      UpgradeObject = OCL_AmericanHellfireDrone
      TriggeredBy   = Upgrade_AmericaHellfireDrone
      ConflictsWith = Upgrade_AmericaBattleDrone
    End
  End
End

Panem et kirkinses
oliver
  • oliver
  • 50.25% (Neutral)
  • Major Topic Starter
10 years ago
You could say that, but is only a unit addition/change for a mission, replace the ToxicSupplyTruck to a ChinaFuelTruck (from contra)... I could simple make small mod for it (which I have done just to check if everything works perfectly, which it did, but in map.ini those 2 things are bugged), but that will be troublesome because it will cause missmatches online.
3D/2D Artist
acidbrain
10 years ago
Well, i ran into trouble in the past also with implementing new models in a map.ini, just make a small mod and pack it in a big file, much easier and modding gives you more freedom than map.ini.
Panem et kirkinses
oliver
  • oliver
  • 50.25% (Neutral)
  • Major Topic Starter
10 years ago
I know, but for pvp people, they have to remove the file everytime they want to play online.. That is why I am trying the map.ini way.

But yh, just no worth it.. The special effect of the slowdeath behavior is messed up, a lot of particles don't load properly.. I'll just make a mini-mod mission. Thank you for your time
3D/2D Artist
acidbrain
10 years ago
Make a second shortcut to generals.exe and add a switch.
"C:\Program Files (x86)\EA Games\Command & Conquer The First Decade\Command & Conquer(tm) Generals Zero Hour\generals.exe" -modname.BIG
Panem et kirkinses
acidbrain
10 years ago
Here  is some more info about commandline arguments.
Panem et kirkinses
oliver
  • oliver
  • 50.25% (Neutral)
  • Major Topic Starter
10 years ago
That will be tricky, cause it is a mini mod for a mod (ROTR), which uses a launcher.
3D/2D Artist
acidbrain
10 years ago
Maybe you can make an addition to the mod?, take the file with the fueltruck and mold it into your own thingy
Panem et kirkinses
acidbrain
10 years ago
Or change your plans..:P
Panem et kirkinses