thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
Hi, I wish to mod the technical so individual technicals gain crate upgrades by purchasing an upgrade within the technical Commandset. I currently have it working for upgrading to crateupgrade 1, but it upgrades all technicals, instead of just the one that purchased the upgrade. Also, I can't find a way to add a second upgrade, as the term Weaponset PLAYER_UPGRADE already is being used.
Sponsor
CommieDog
12 years ago

but it upgrades all technicals, instead of just the one that purchased the upgrade.

Originally Posted by: thetimn8er 


That's probably because you have the upgrade type set to PLAYER. Set it to UNIT instead. Also make sure that the command button used to purchase your upgrade is of the type UNIT_UPGRADE or it won't work.

Also, I can't find a way to add a second upgrade, as the term Weaponset PLAYER_UPGRADE already is being used.

Originally Posted by: thetimn8er 


You can't have two upgraded weapon sets. Your best bet is to have your upgrade spawn a salvage crate right on top of the Technical. The Technical should pick it up automatically.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

but it upgrades all technicals, instead of just the one that purchased the upgrade.

Originally Posted by: CommieDog 


That's probably because you have the upgrade type set to PLAYER. Set it to UNIT instead. Also make sure that the command button used to purchase your upgrade is of the type UNIT_UPGRADE or it won't work.

Also, I can't find a way to add a second upgrade, as the term Weaponset PLAYER_UPGRADE already is being used.

Originally Posted by: thetimn8er 


You can't have two upgraded weapon sets. Your best bet is to have your upgrade spawn a salvage crate right on top of the Technical. The Technical should pick it up automatically.

Originally Posted by: thetimn8er 



Thank you so much, you are very helpful 😄
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago


That's probably because you have the upgrade type set to PLAYER. Set it to UNIT instead. Also make sure that the command button used to purchase your upgrade is of the type UNIT_UPGRADE or it won't work.

Originally Posted by: CommieDog 



Hmm. According to the modulelist, Unit_upgrade doesn't exist, nor when I try it does it work... I have the upgrade Type = Unit and the button command = Unit_Upgrade and in the Code, I replace all Player_Upgrade to Unit_Upgrade concerning the weapon change... What did I do wrong?
Annihilationzh
12 years ago
Object upgrades are set in upgrade.ini, not in the individual unit.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

Object upgrades are set in upgrade.ini, not in the individual unit.

Originally Posted by: Annihilationzh 



Perhaps I am not being clear enough. I did change the upgrade type in the upgrade code


Upgrade Upgrade_TechnicalKPV
  DisplayName        = UPGRADE:QuadCannonSnipe
  Type = UNIT
  BuildTime          = 5.0
  BuildCost          = 13794
  ButtonImage = TechnicalKPV
End

And the button


CommandButton Command_UpgradeTechnicalKPV
  Upgrade       = Upgrade_TechnicalKPV
  Command       = UNIT_UPGRADE
  TextLabel     = CONTROLBAR:UpgradeChinaOverlordGattlingCannon
  ButtonImage   = TechnicalKPV
  ButtonBorderType        = UPGRADE ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:TooltipUpgradeChinaOverlordGattlingCannon
  UnitSpecificSound       = OverlordTankVoiceModeGattling
End
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
As well as in the vehicle code where ever Weaponset_Player_Upgrade was

    ConditionState = WEAPONSET_UNIT_UPGRADE
      IdleAnimation = UITech_SKL.UITech_STA 0 6
      IdleAnimation = UITech_SKL.UITech_IDA
      IdleAnimation = UITech_SKL.UITech_IDB
      AnimationMode = ONCE
      ShowSubObject = 50Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX02
      WeaponFireFXBone = PRIMARY Muzzle02
      WeaponLaunchBone = PRIMARY Muzzle02
    End

    ConditionState = WEAPONSET_UNIT_UPGRADE RUBBLE MOVING TURRET_ROTATE
      Animation = None
      HideSubObject = UITech-SKN
      ShowSubObject = 50Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX02
      WeaponFireFXBone = PRIMARY Muzzle02
      WeaponLaunchBone = PRIMARY Muzzle02
    End

    ConditionState = MOVING WEAPONSET_UNIT_UPGRADE
      Animation = UITech_SKL.UITech_MVB
      AnimationMode = LOOP
      ShowSubObject = 50Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX02
      WeaponFireFXBone = PRIMARY Muzzle02
      WeaponLaunchBone = PRIMARY Muzzle02
    End

    ConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE
      Animation = UITech_SKL.UITech_TNA
      AnimationMode = LOOP
      ShowSubObject = 50Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX02
      WeaponFireFXBone = PRIMARY Muzzle02
      WeaponLaunchBone = PRIMARY Muzzle02
    End
    AliasConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE MOVING
    AliasConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE FIRING_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE BETWEEN_FIRING_SHOTS_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE RELOADING_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE MOVING FIRING_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE TURRET_ROTATE MOVING RELOADING_A

    ConditionState = WEAPONSET_UNIT_UPGRADE FIRING_A 
      Animation = UITech_SKL.UITech_ATA
      AnimationMode = LOOP
      ShowSubObject = 50Cal
      WeaponMuzzleFlash = PRIMARY MuzzleFX02
      WeaponFireFXBone = PRIMARY Muzzle02
      WeaponLaunchBone = PRIMARY Muzzle02
    End

    ; AliasConditionState is a new keyword that says,
    ; "give me another ConditionState exactly like the previous
    ; one, except with different conditions". Useful when you
    ; have several states that are the same with only different condition bits.
    AliasConditionState = WEAPONSET_UNIT_UPGRADE BETWEEN_FIRING_SHOTS_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE RELOADING_A

    ; these aliases handle the moving-between-shots case. (we can't actually move-and-fire at the same time.).
    AliasConditionState = WEAPONSET_UNIT_UPGRADE MOVING FIRING_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE MOVING BETWEEN_FIRING_SHOTS_A
    AliasConditionState = WEAPONSET_UNIT_UPGRADE MOVING RELOADING_A
  End
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

  WeaponSet
    Conditions = UNIT_UPGRADE
    Weapon = PRIMARY MarauderTankGun
  End

Excuse my triple post, I can't find a way to post the code on one post
Annihilationzh
12 years ago
Upgrade Upgrade_TechnicalKPV
  DisplayName        = UPGRADE:QuadCannonSnipe
  Type               = OBJECT
  BuildTime          = 5.0
  BuildCost          = 13794
  ButtonImage = TechnicalKPV
End[/code][code=plain]CommandButton Command_UpgradeTechnicalKPV
  Upgrade       = Upgrade_TechnicalKPV
  Command       = OBJECT_UPGRADE
  TextLabel     = CONTROLBAR:UpgradeChinaOverlordGattlingCannon
  ButtonImage   = TechnicalKPV
  ButtonBorderType        = UPGRADE ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:TooltipUpgradeChinaOverlordGattlingCannon
  UnitSpecificSound       = OverlordTankVoiceModeGattling
End

You don't need WEAPONSET_UNIT_UPGRADE in the unit code.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

You don't need WEAPONSET_UNIT_UPGRADE in the unit code.

Originally Posted by: Annihilationzh 



How do I specify the condition then? ConditionState = Weaponset_Object_Upgrade? I need to specify the condition so that I can change the showobject to 50cal
CommieDog
12 years ago
You're not going to be able to have the code distinguish between two upgraded weapon sets. That's why I suggested spawning a salvage crate instead.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

You're not going to be able to have the code distinguish between two upgraded weapon sets. That's why I suggested spawning a salvage crate instead.

Originally Posted by: CommieDog 



Right, ok, but if I just have one upgrade for a specific vehicle, what code would be needed to not effect other vehicles of the same type?
Annihilationzh
12 years ago
I answered this in post #9.

How do I specify the condition then? ConditionState = Weaponset_Object_Upgrade


WEAPONSET_PLAYER_UPGRADE
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

I answered this in post #9.
WEAPONSET_PLAYER_UPGRADE

Originally Posted by: Annihilationzh 



It works now thanks! Sorry for such a long topic, I'm new to modding.
CommieDog
12 years ago

You're not going to be able to have the code distinguish between two upgraded weapon sets. That's why I suggested spawning a salvage crate instead.

Originally Posted by: thetimn8er 



Right, ok, but if I just have one upgrade for a specific vehicle, what code would be needed to not effect other vehicles of the same type?

Originally Posted by: CommieDog 


Switch the upgrade's type from PLAYER to UNIT.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

You're not going to be able to have the code distinguish between two upgraded weapon sets. That's why I suggested spawning a salvage crate instead.

Originally Posted by: CommieDog 



Right, ok, but if I just have one upgrade for a specific vehicle, what code would be needed to not effect other vehicles of the same type?

Originally Posted by: thetimn8er 


Switch the upgrade's type from PLAYER to UNIT.

Originally Posted by: CommieDog 



Thanks 😄