AdrianeMapMaker
8 years ago
I want a normal structure to be added into a another structure via upgrade:

That can:
died if the placeholder structure died - like overlord did into its upgrade

NeededModule that i think i need:
Draw = W3DModelDraw
GrantUpgradeCreate (i want this upgrade created already - with exception - in construction

-is there any needed

Note: this is my Unfinished work ; fusing pure bone model to another model and wanna try it using how upgrade works - logic.
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Sponsor
SkyMix_RMT
8 years ago
Is this for a map.ini or a mod?
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
AdrianeMapMaker
8 years ago
mod
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




SkyMix_RMT
8 years ago
You can merge two structures together by using 2 draw modules. I have no ideia how to make it an upgrade though.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
acidbrain
8 years ago
You could use the POWER_PLANT_UPGRADED condition for the upgrade, here is an example, it is a helibase i made some time ago and i upgraded it with a patriotbattery, i didnt attach the patriotbattery to a bone, i placed it on the right coordinates in gmax/renx so it pops up at the side of the main building...
UserPostedImage
UserPostedImage

Upgrade.ini, CommandButton.ini, CommandSet.ini & DrawModule for PatriotBattery

;--- Upgrade.ini ---
Upgrade Tnk_Upgrade_AmericaHeliPadDefense
  DisplayName        = UPGRADE:HeliPadDefense
  Type               = OBJECT
  BuildTime          = 10.0
  BuildCost          = 800
  ButtonImage        = Tnk_AmericaHeliPadDef
  UnitSpecificSound  = OverlordExpansion
End

;--- CommandButton.ini ---
CommandButton Tnk_Command_UpgradeAmericaHeliPadDefense
  Command          = OBJECT_UPGRADE
  Upgrade          = Tnk_Upgrade_AmericaHeliPadDefense
  TextLabel        = CONTROLBAR:UpgradeTnk_AmericaHeliPadDefense
  ButtonImage      = Tnk_AmericaHeliPadDef
  ButtonBorderType = UPGRADE ; Identifier for the User as to what kind of button this is
  DescriptLabel    = CONTROLBAR:ToolTipTnk_AmericaUpgradeHeliPadDefense
End

;--- CommandSet.ini ---
CommandSet Tnk_AmericaHeliPadCommandSet
   1 = Tnk_Command_ConstructAmericaVehicleComanche
   3 = Tnk_Command_ConstructAmericaVehicleBlackhawk
   7 = Command_UpgradeComancheRocketPods
  11 = Tnk_Command_UpgradeAmericaHeliPadDefense
  13 = Command_SetRallyPoint
  14 = Command_Sell 
End

;--- DrawModule for PatriotBattery ---
;--------------Patriot Defense Upgrade--------------
    Draw = W3DModelDraw ModuleTag_Defense
    OkToChangeModelColor = Yes

    DefaultConditionState
      Model            = ABHeliPad_DEF
      Turret           = TURRET01
      TurretPitch      = TURRETEL
      WeaponLaunchBone = PRIMARY   WeaponA
      WeaponLaunchBone = SECONDARY WeaponA
      WeaponLaunchBone = TERTIARY  WeaponA
      WeaponFireFXBone = PRIMARY   WeaponA
      WeaponFireFXBone = SECONDARY WeaponA
      WeaponFireFXBone = TERTIARY  WeaponA
      HideSubObject    = CHASSIS HOUSECOLOR01 HOUSECOLOR02 TURRET01 TURRETEL OBJECT01
    End
    AliasConditionState = DAMAGED
    AliasConditionState = REALLYDAMAGED
    AliasConditionState = NIGHT
    AliasConditionState = NIGHT DAMAGED
    AliasConditionState = NIGHT REALLYDAMAGED
    AliasConditionState = SNOW
    AliasConditionState = SNOW DAMAGED
    AliasConditionState = SNOW REALLYDAMAGED
    AliasConditionState = NIGHT SNOW
    AliasConditionState = NIGHT SNOW DAMAGED
    AliasConditionState = NIGHT SNOW REALLYDAMAGED

    ConditionState = POWER_PLANT_UPGRADED
      Model            = ABHeliPad_DEF
      ShowSubObject    = CHASSIS HOUSECOLOR01 HOUSECOLOR02 TURRET01 TURRETEL
    End
    AliasConditionState = POWER_PLANT_UPGRADED NIGHT

    ConditionState = POWER_PLANT_UPGRADED DAMAGED
      Model            = ABHeliPad_DEFD
      ShowSubObject    = CHASSIS HOUSECOLOR01 HOUSECOLOR02 TURRET01 TURRETEL
      ParticleSysBone  = SmokeS01 SmolderingSmoke
      ParticleSysBone  = SmokeS02 SmolderingSmoke
      ParticleSysBone  = FireS01 SmolderingFire
      ParticleSysBone  = FireS02 SmolderingFire
    End
    AliasConditionState = POWER_PLANT_UPGRADED NIGHT DAMAGED

    ConditionState = POWER_PLANT_UPGRADED REALLYDAMAGED
      Model            = ABHeliPad_DEFE
      ShowSubObject    = CHASSIS HOUSECOLOR01 HOUSECOLOR02 TURRET01 TURRETEL
      ParticleSysBone  = SmokeS01 SmolderingSmoke
      ParticleSysBone  = SmokeM01 SmokeFactionMedium
      ParticleSysBone  = FireS01 SmolderingFire
      ParticleSysBone  = FireM01 FireFactionMedium
    End
    AliasConditionState = POWER_PLANT_UPGRADED NIGHT REALLYDAMAGED
  
    ConditionState = POWER_PLANT_UPGRADED SNOW
      Model            = ABHeliPad_DEFS
      ShowSubObject    = CHASSIS HOUSECOLOR01 HOUSECOLOR02 TURRET01 TURRETEL OBJECT01
    End
    AliasConditionState = POWER_PLANT_UPGRADED NIGHT SNOW

    ConditionState = POWER_PLANT_UPGRADED SNOW DAMAGED
      Model            = ABHeliPad_DEFDS
      ShowSubObject    = CHASSIS HOUSECOLOR01 HOUSECOLOR02 TURRET01 TURRETEL OBJECT01
      ParticleSysBone  = SmokeS01 SmolderingSmoke
      ParticleSysBone  = SmokeS02 SmolderingSmoke
      ParticleSysBone  = FireS01 SmolderingFire
      ParticleSysBone  = FireS02 SmolderingFire
    End
    AliasConditionState = POWER_PLANT_UPGRADED SNOW NIGHT DAMAGED

    ConditionState = POWER_PLANT_UPGRADED SNOW REALLYDAMAGED
      Model            = ABHeliPad_DEFES
      ShowSubObject    = CHASSIS HOUSECOLOR01 HOUSECOLOR02 TURRET01 TURRETEL OBJECT01
      ParticleSysBone  = SmokeS01 SmolderingSmoke
      ParticleSysBone  = SmokeM01 SmokeFactionMedium
      ParticleSysBone  = FireS01 SmolderingFire
      ParticleSysBone  = FireM01 FireFactionMedium
    End
    AliasConditionState = POWER_PLANT_UPGRADED SNOW NIGHT REALLYDAMAGED
  End

  ;---------------------------------
  ;Normal energy consumption
  EnergyProduction    = -1

  ;Energy consumption when upgraded
  EnergyBonus         = -3
  ;---------------------------------

  ;PowerPlantUpgrade module
  Behavior = PowerPlantUpgrade ModuleTag_Def02
    TriggeredBy = Tnk_Upgrade_AmericaHeliPadDefense
  End

  ;allows this object to act as an (upgradeable) power supply,    
  ;this enables the POWER_PLANT_UPGRADED conditionstate
  Behavior = PowerPlantUpdate ModuleTag_Def03
    ;RodsExtendTime = integer -> milliseconds e.g. 5000 for 5 seconds
  End

What is handy about the POWER_PLANT_UPGRADED conditionstate is that you can increase the power consumption if you ugrade the main model with an object that uses power, also used it for a transformator upgrade for a gattling bunker but for power supply instead, the gattling bunker becomes independent of powerplants when it is upgraded with a transformator...
It is possible to make the upgrade model rise from the ground or roof or whatever if you use the RodsExtendTime parameter in the PowerPlantUpdate module and make an animation in gmax/renx, you can use the POWER_PLANT_UPGRADING conditionstate.
UserPostedImage

Cheers and have fun
Panem et kirkinses
SkyMix_RMT
8 years ago
That was very helpful acidbrain, thank you very much, this gave me ideias!
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
AdrianeMapMaker
8 years ago
Btw Thankssssssssssssssss!!!! - is there any like the overlord portable structure logic can i use it in building?
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage