Smeagolsneaky
9 years ago
Hi Everyone I am a zero hour veteran who recently returned to the game truth be told I had no idea the servers had moved.

I would like to make a small naval mod to introduce buildable ships creating an exciting new online experience, in the past I have made many maps and created some simple mods however this time I will need some assistance and would appreciate the assistance and guidance of the Gurus here.

The Mod I would like to create allows the player to capture the Boss War Factory placed in the water near their base and then build a number of naval units, additional modifications will be made to infantry so they can swim and other units.

I would like to design the features to my mini mod and would listen to any tips on the feasibility of the content with just an map.ini

1. As I want build cost and construction time to function I would like to repurpose the following units so they can be constructed at the player boss War Factory.
A. American Vanilla Aurora to become battleship armed with Spectre Gunship Howitzer.
B. American Vanilla Chinook to become amphibious transport with same behaviour so it can collect supplies and transport
C. American Vanilla Advenger to become Advenger gun boat.
2. Review Infantry Locomotors and add Over Water Condition with swimming animation.
3. Review some vehicle Locomotors such as troop transport and make them amphibious.

I have reviewed many threads in this forum and have learnt allot in the past weeks, I have started this thread as I could have a variation of issues to resolve and I will be so thankful for any assistance.

To start with I have figured out the command sets and buttons for my Boss War Factory and am in the process of making the American Vanilla Aurora into a Battleship, Find my Code below. I have an error and I don't see what's wrong , So far I have replaced every module in the Aurora Code with what I had functioning for a previous battleship object I had Modded successfully.
Would greatly appreciate some review.


CommandButton Boss_Command_ConstructAmericaJetAurora
  Command       = UNIT_BUILD
  Object        = Object AmericaJetAurora
  TextLabel     = CONTROLBAR:ConstructAmericaJetAurora
  ButtonImage   = SABattleship
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = Battleship
End

Object Boss_WarFactory
  CommandSet = Boss_ChinaWarFactoryCommandSet2
  RemoveModule ModuleTag_25
  AddModule ModuleTag_25_Override
  Behavior = CommandSetUpgrade ModuleTag_25_2
   CommandSet = Boss_ChinaWarFactoryCommandSetUpgrades2
   TriggeredBy = Upgrade_ChinaMines
  End
 End
End

CommandSet Boss_ChinaWarFactoryCommandSetUpgrades2
  1 = Boss_Command_ConstructAmericaJetAurora
End

CommandSet Boss_ChinaWarFactoryCommandSet2
  1 = Boss_Command_ConstructAmericaJetAurora
End

CommandSet boatCommandSet
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End

Object AmericaJetAurora

  ; *** ART Parameters ***
  SelectPortrait         = SABattleship_L
  ButtonImage            = SABattleship
  
  UpgradeCameo1 = None
  UpgradeCameo2 = None
  
 ReplaceModule ModuleTag_01
  Draw              = W3DModelDraw ModuleTag_01_Override ; Boat

    ExtraPublicBone = LIGHT02BASE
    ExtraPublicBone = TURRET02

    DefaultConditionState
    ;ConditionState       = NONE
      Model              = avbattlesh
      Animation          = avbattlesh.avbattlesh
      AnimationMode      = LOOP
      Turret             = Turret01
      TurretPitch        = TurretEL01
      TurretArtAngle     = 180  ; this turret has art pointed 180 degrees backward
      AltTurret          = Turret02
      AltTurretPitch     = TurretEL02
      WeaponFireFXBone   = PRIMARY Tur1Muzzle
      WeaponRecoilBone   = PRIMARY Tur1Barrel
      WeaponFireFXBone   = SECONDARY Tur2Muzzle
      WeaponRecoilBone   = SECONDARY Tur2Barrel
      WeaponLaunchBone   = TERTIARY Tur2Muzzle
      WeaponFireFXBone   = TERTIARY Tur2Muzzle
      WeaponRecoilBone   = TERTIARY Tur2Barrel
      ParticleSysBone   = TreadFX02 BattleShipWaterRipples
      ParticleSysBone   = TreadFX03 BattleShipWaterRipples
      ParticleSysBone   = TreadFX04 BattleShipWaterRipples
    End

    ConditionState  = OVER_WATER
      Model         = AVBattleSh
      ParticleSysBone = TreadFX02 AmphibWaveRest
    End

    ConditionState = MOVING OVER_WATER
      Model             = avbattlesh
      Animation         = avbattlesh.avbattlesh
      AnimationMode     = LOOP
      ParticleSysBone   = Mist01 AmphibMist
      ParticleSysBone   = TreadFX01 AmphibWave
      ParticleSysBone   = TreadFX02 AmphibWave
      ParticleSysBone   = TreadFX03 AmphibWave
      ParticleSysBone   = TreadFX04 AmphibWave
      ParticleSysBone   = TreadFX05 AmphibWave
    End

    ConditionState      = DAMAGED
      Model             = avbattlesh_D
      Animation         = avbattlesh_D.avbattlesh_D
      AnimationMode     = LOOP
      ParticleSysBone   = SmokeS01 SpectreGunshipFireLarge
      ParticleSysBone   = SmokeS01 SootySmokeColumn
      ParticleSysBone   = SmokeS02 FireFactionSmall
      ParticleSysBone   = SmokeS02 SmokeFactionSmall
      ParticleSysBone   = SmokeS03 SpectreGunshipFireLarge
      ParticleSysBone   = SmokeS03 SootySmokeColumn
      ParticleSysBone   = SmokeS04 FireFactionLarge
      ParticleSysBone   = SmokeS04 FireFactionLarge
      ParticleSysBone   = SmokeS05 FireFactionMedium
      ParticleSysBone   = SmokeS05 SmokeFactionMedium
      ParticleSysBone   = TreadFX02 BattleShipWaterRipples
      ParticleSysBone   = TreadFX03 BattleShipWaterRipples
      ParticleSysBone   = TreadFX04 BattleShipWaterRipples
    End

    ConditionState      = DAMAGED MOVING OVER_WATER
      Model             = avbattlesh_D
      Animation         = avbattlesh_D.avbattlesh_D
      AnimationMode     = LOOP
      ParticleSysBone   = SmokeS01 SpectreGunshipFireLarge
      ParticleSysBone   = SmokeS01 SootySmokeColumn
      ParticleSysBone   = SmokeS02 FireFactionSmall
      ParticleSysBone   = SmokeS02 SmokeFactionSmall
      ParticleSysBone   = SmokeS03 SpectreGunshipFireLarge
      ParticleSysBone   = SmokeS03 SootySmokeColumn
      ParticleSysBone   = SmokeS04 FireFactionLarge
      ParticleSysBone   = SmokeS04 FireFactionLarge
      ParticleSysBone   = SmokeS05 FireFactionMedium
      ParticleSysBone   = SmokeS05 SmokeFactionMedium

      ParticleSysBone   = Mist01 AmphibMist
      ParticleSysBone   = TreadFX01 AmphibWave
      ParticleSysBone   = TreadFX02 AmphibWave
      ParticleSysBone   = TreadFX03 AmphibWave
      ParticleSysBone   = TreadFX04 AmphibWave
      ParticleSysBone   = TreadFX05 AmphibWave
    End

    ConditionState      = REALLYDAMAGED
      Model             = avbattlesh_D1
      Animation         = avbattlesh_D1.avbattlesh_D1
      AnimationMode     = LOOP

      ParticleSysBone   = HOUSECOLOR01 FireStormBranch1
      ParticleSysBone   = HOUSECOLOR01 airCarrierSmoke
      ParticleSysBone   = FireM01 SpectreGunshipFireLarge 
      ParticleSysBone   = FireM01 SootySmokeColumn
      ParticleSysBone   = FireS01 FireFactionSmall 
      ParticleSysBone   = FireS01 SmokeFactionSmall
      ParticleSysBone   = FireS02 FireFactionLarge
      ParticleSysBone   = FireS02 SmokeFactionLarge
      ParticleSysBone   = SmokeM01 FireFactionMedium 
      ParticleSysBone   = SmokeM01 SmokeFactionMedium
      ParticleSysBone   = SmokeM02 airCarrierJet01Explosion 
      ParticleSysBone   = SmokeM02 SmokeFactionMedium
      ParticleSysBone   = SmokeM03 FireFactionMedium;front deck
      ParticleSysBone   = SmokeM03 SmokeFactionMedium
      ParticleSysBone   = SmokeM04 FireFactionLarge 
      ParticleSysBone   = SmokeM04 SmokeFactionLarge
      ParticleSysBone   = SmokeS01 FireFactionMedium 
      ParticleSysBone   = SmokeS01 SmokeFactionMedium
      ParticleSysBone   = SmokeS02 FireFactionMedium 
      ParticleSysBone   = SmokeS02 SmokeFactionMedium
      ParticleSysBone   = SmokeS03 FireStormBranch2 
      ParticleSysBone   = SmokeS03 SootySmokeColumn
      ParticleSysBone   = SmokeS04 FireStormBranch3 
      ParticleSysBone   = SmokeS01 OilSlime
      ParticleSysBone   = SmokeS01 OilPuddle

      ParticleSysBone   = TreadFX02 BattleShipWaterRipples
      ParticleSysBone   = TreadFX03 BattleShipWaterRipples
      ParticleSysBone   = TreadFX04 BattleShipWaterRipples
    End
    ConditionState      = REALLYDAMAGED MOVING OVER_WATER
      Model             = avbattlesh_D1
      Animation         = avbattlesh_D1.avbattlesh_D1
      AnimationMode     = LOOP

      ParticleSysBone   = HOUSECOLOR01 FireStormBranch1
      ParticleSysBone   = HOUSECOLOR01 airCarrierSmoke
      ParticleSysBone   = FireM01 SpectreGunshipFireLarge 
      ParticleSysBone   = FireM01 SootySmokeColumn
      ParticleSysBone   = FireS01 FireFactionSmall 
      ParticleSysBone   = FireS01 SmokeFactionSmall
      ParticleSysBone   = FireS02 FireFactionLarge
      ParticleSysBone   = FireS02 SmokeFactionLarge
      ParticleSysBone   = SmokeM01 FireFactionMedium 
      ParticleSysBone   = SmokeM01 SmokeFactionMedium
      ParticleSysBone   = SmokeM02 airCarrierJet01Explosion 
      ParticleSysBone   = SmokeM02 SmokeFactionMedium
      ParticleSysBone   = SmokeM03 FireFactionMedium
      ParticleSysBone   = SmokeM03 SmokeFactionMedium
      ParticleSysBone   = SmokeM04 FireFactionLarge 
      ParticleSysBone   = SmokeM04 SmokeFactionLarge
      ParticleSysBone   = SmokeS01 FireFactionMedium 
      ParticleSysBone   = SmokeS01 SmokeFactionMedium
      ParticleSysBone   = SmokeS02 FireFactionMedium 
      ParticleSysBone   = SmokeS02 SmokeFactionMedium
      ParticleSysBone   = SmokeS03 FireStormBranch2 
      ParticleSysBone   = SmokeS03 SootySmokeColumn
      ParticleSysBone   = SmokeS04 FireStormBranch3 
      ParticleSysBone   = SmokeS01 OilSlime
      ParticleSysBone   = SmokeS01 OilPuddle

      ParticleSysBone   = Mist01 AmphibMist
      ParticleSysBone   = TreadFX01 AmphibWave
      ParticleSysBone   = TreadFX02 AmphibWave
      ParticleSysBone   = TreadFX03 AmphibWave
      ParticleSysBone   = TreadFX04 AmphibWave
      ParticleSysBone   = TreadFX05 AmphibWave
    End

    ConditionState = RUBBLE
      Model         = avbattlesh_D1
      ParticleSysBone = TreadFX01 airCarrierShockWave
      ParticleSysBone = TreadFX01 airCarrierOilSlick 
      ParticleSysBone = Dum_Turret JetFireLarge
      ParticleSysBone = Dum_Turret BeaconSmokeFFFFFF 
      ParticleSysBone = Dum_Turret airCarrierFinalDeathSplash
      ParticleSysBone = Tower AmphibWaveRest
    End
    AliasConditionState = RUBBLE OVER_WATER
    AliasConditionState = RUBBLE MOVING OVER_WATER
    AliasConditionState = REALLYDAMAGED RUBBLE
    AliasConditionState = REALLYDAMAGED RUBBLE MOVING OVER_WATER
  End

    OkToChangeModelColor = Yes
  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Battleship
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 180.0 
  ShroudClearingRange = 600
  Prerequisites
    None
    ;Object = AmericaAirfield
    ;Object = AmericaStrategyCenter
  End
  BuildCost           = 2500
  BuildTime           = 30.0          ;in seconds     
  WeaponSet
    Conditions = None 
    Weapon             = PRIMARY    SpectreHowitzerGun
    Weapon             = SECONDARY  SpectreHowitzerGun
    AutoChooseSources    = PRIMARY   FROM_SCRIPT FROM_PLAYER FROM_AI
    AutoChooseSources    = SECONDARY FROM_SCRIPT FROM_PLAYER FROM_AI
  End
  ArmorSet
    Conditions      = None
    Armor           = StructureArmorInternetCenter
    DamageFX        = TankDamageFX
  End

  ExperienceValue = 200 200 400 400   ;Experience point value at each level
  ExperienceRequired = 0 200 400 800  ;Experience points needed to gain each level
  IsTrainable = Yes                   ;Can gain experience
  CrusherLevel           = 3  ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles
  CrushableLevel         = 3  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet        = boatCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect = BattleshipVoiceSelect
  VoiceMove = BattleshipVoiceMove
  VoiceGuard = BattleshipVoiceMove
  VoiceAttack = BattleshipVoiceAttack
  SoundAmbient = BattleshipAmbientLoop
  SoundAmbientRubble    = NoSound
  UnitSpecificSounds
    VoiceCreate          = BattleshipVoiceSelect
    SoundEject           = NoSound
    VoiceEject           = NoSound
    Afterburner          = NoSound
    VoiceLowFuel         = NoSound
    VoiceGarrison        = NoSound
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS VEHICLE BOAT SCORE TRANSPORT
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_02_Override
    MaxHealth          = 4000.0
    InitialHealth      = 4000.0
  End
 End

RemoveModule ModuleTag_03 ;  removed we want sink behaviour
  AddModule  ModuleTag_03_Overide
  Behavior = SlowDeathBehavior ModuleTag_03_Sink ;sink behaviour
    DeathTypes = ALL
    SinkDelay = 3000
    SinkRate = 2     ; in Dist/Sec
    DestructionDelay = 15000
    FX = INITIAL FX_CarpetBomb
    OCL = MIDPOINT OCL_GenericCarFloatDebris
    FX = MIDPOINT WeaponFX_DEMO_SCUDMissileDetonationExplosive ;FX_TrainWreckSplash
    FX = FINAL FX_LastBubble
  End
End

  RemoveModule ModuleTag_04 ; eject pilot removed


  ;Behavior = PhysicsBehavior ModuleTag_05 (Mass Module Commented to avoid duplicate)
   ; Mass = 500.0
 ; End

 RemoveModule ModuleTag_06 ;Advanced training module removed

  RemoveModule ModuleTag_07
  AddModule ModuleTag_07_Override
  Behavior = AIUpdateInterface ModuleTag_07_Override ;replace jet behavior this is a ship now
    Turret
      TurretTurnRate     = 80
      TurretPitchRate    = 80
      FirePitch          = 20            ; Instead of aiming pitchwise at the target, it will aim here
      AllowsPitch        = Yes
      RecenterTime       = 5000       ; how long to wait during idle before recentering
      ControlledWeaponSlots = PRIMARY
      NaturalTurretAngle = 180  ; this turret points backwards normally
    End
    AltTurret
      TurretTurnRate     = 80
      TurretPitchRate    = 80
      FirePitch          = 20          ; Instead of aiming pitchwise at the target, it will aim here
      AllowsPitch        = Yes
      RecenterTime       = 5000     ; how long to wait during idle before recentering
      ControlledWeaponSlots = SECONDARY
    End
    TurretsLinked = Yes
  End
  Locomotor = SET_NORMAL BasicBoatLocomotor

  RemoveModule ModuleTag_Armor01 ;countermeasures armor upgrade removed


  RemoveModule ModuleTag_10 ;countermeasures upgrade removed 
   
  ;Behavior = FlammableUpdate ModuleTag_21   (Commented out as we dont want duplicate catch fire module)
  ;  AflameDuration = 5000         ; If I catch fire, I'll burn for this long...
  ;  AflameDamageAmount = 3       ; taking this much damage...
 ;   AflameDamageDelay = 500       ; this often.
 ; End

  RemoveModule ModuleTag_22; replace with this smoke
  AddModule ModuleTag_22_Override
  Behavior             = TransitionDamageFX ModuleTag_DamageSmoke
    DamagedParticleSystem1 = Bone:Dum_Turret RandomBone:Yes PSys:SootySmokeTrail
    DamagedFXList1 = Loc: X:0 Y:0 Z:1 FXList:FX_BattleMasterDamageTransition
    ReallyDamagedParticleSystem1 = Bone:Dum_Turret RandomBone:Yes PSys:SpectreGunshipFireLarge
    ReallyDamagedParticleSystem2 = Bone:Dum_Turret RandomBone:Yes PSys:SootySmokeColumn
    ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_JetBigDamageTransition
    RubbleParticleSystem1 = Bone:TreadFX01 RandomBone:No PSys:airCarrierOilSlick
  End
 End
  Geometry               = BOX
  GeometryMajorRadius    = 200.0
  GeometryMinorRadius    = 20.0
  GeometryHeight         = 40
  GeometryIsSmall        = No
  Shadow                 = SHADOW_VOLUME
End
  Smeagols Naval Mod Wake Island V1.zip (97kb) downloaded 7 time(s).
Sponsor
Gameanater
9 years ago
Welcome to the forums! Hope you'll find yourself at home here with a small but great community. 😄

https://cnc-online.net/en/ 

I'm out of practice with Zero Hour and modding it, so I'm not really sure what's up with your Aurora-Battleship code. In fact this is even harder for me to figure out since it looks like you're doing map.ini modding.

http://www.cnclabs.com/downloads/details.aspx?id=274 
Maybe you could find some useful stuff in there.


You said you're getting an error with your Aurora-Battleship unit. What's the specific error message in crashlog.txt? (I think that's the right .txt file)
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.