Jump to content


Photo

"This unit cannot receive this upgrade"

upgrade

Best Answer JUS_SAURON, 27 May 2020 - 09:50 PM

I think the hero code needs 

 

Behavior = ProductionUpdate  ProductionUpdateModuleTag

  GiveNoExp = Yes

End 

 

Try changing the upgrade to Upgrade_IsengardHeavyArmor instead of Upgrade_TrueAlphaWarg

Then purchase the Heavy Arnor and see if you can now upgrade your Hero 

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 OneV

OneV
  • Members
  • 53 posts

Posted 27 May 2020 - 08:35 PM

Hi, I have been trying to add a purchasable upgrade to my new hero that changes its model and adds some attributes at level 5; however, for some reason I keep getting this message in the game "this unit cannot receive this upgrade"

upgrade.ini

Upgrade Upgrade_TrueAlphaWarg
Type = OBJECT
Tooltip = TOOLTIP:AlphaWarg
DisplayName = Upgrade:AlphaWargUpgrade
ButtonImage = BuildingNoArt
BuildCost = ALPHA_WARG_UPGRADE_BUILDCOST
BuildTime = ALPHA_WARG_UPGRADE_BUILDTIME
Cursor = WeaponUpgrade
;StrategicIcon = AptStrategicUnitUpgradeBannerCarrier
UpgradeFX = FX:EvilLevelUpFX
RequiredObjectFilter = NONE
End

commandbutton.ini

CommandButton Command_PurchaseUpgradeTrueAlphaWarg
Command = OBJECT_UPGRADE
Options = NEED_UPGRADE CANCELABLE OK_FOR_MULTI_SELECT
Upgrade = Upgrade_TrueAlphaWarg
NeededUpgrade = Upgrade_ObjectLevel5
TextLabel = CONTROLBAR:PurchaseUpgradeTrueAlphaWarg
ButtonImage = BGFortress_IvoryTower ;;,;; TEMPORARY
ButtonBorderType = UPGRADE
DescriptLabel = CONTROLBAR:ToolTipPurchaseUpgradeTrueAlphaWarg
InPalantir = Yes ;,; No
LacksPrerequisiteLabel = TOOLTIP:LackAlphaLevel5
End
  •  
     

    Here is where it should change the model, which it does if a remove the purchasable upgrade required:

    Behavior = ModelConditionUpgrade ModuleTag_ModelAlphaWarg
    TriggeredBy = Upgrade_ObjectLevel5 Upgrade_TrueAlphaWarg
    AddConditionFlags = USER_2
    Permanent = Yes
    RequiresAllTriggers = Yes
    End
    Behavior = AttributeModifierUpgrade ModuleTag_AlphaWargBonus
    StartsActive = No
    TriggeredBy = Upgrade_TrueAlphaWarg
    AttributeModifier = TrueAlphaWargBonus
    AttributeModifierAffectsSelf = Yes
    End

    Besides that i did not add anything to this hero's ini. I must be missing something. Somehow, I need to tell the game that this upgrade can be purchased by this unit/hero. I tried removing the required prerequisite in the commandbutton, but still the button is inactive in the game. I would really appreciate any suggestions on how to make that upgrade available to this unit. 


Edited by OneV, 27 May 2020 - 08:36 PM.


#2 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 27 May 2020 - 08:42 PM

Does the object ever get to level 5 ?

in experience file , does it get the upgrade Upgrade_ObjectLevel5 at level 5 ?

try removing the 

NeededUpgrade = Upgrade_ObjectLevel5 and 

NEED_UPGRADE

 

for testing to see if it can get it at level 1 



#3 OneV

OneV
  • Members
  • 53 posts

Posted 27 May 2020 - 09:18 PM

Does the object ever get to level 5 ?

in experience file , does it get the upgrade Upgrade_ObjectLevel5 at level 5 ?

try removing the 

NeededUpgrade = Upgrade_ObjectLevel5 and 

NEED_UPGRADE

 

for testing to see if it can get it at level 1 

Yes, it gets Uprade_ObjectLevel 5. Everything was working just fine until I tried adding another required upgrade that actually costs money. I also tried removing  NEED_UPGRADE and NeededUpgrade = Upgrade_ObjectLevel5.  It did not help. I feel like I did not add something to the hero ini that should have been added.



#4 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 27 May 2020 - 09:50 PM   Best Answer

I think the hero code needs 

 

Behavior = ProductionUpdate  ProductionUpdateModuleTag

  GiveNoExp = Yes

End 

 

Try changing the upgrade to Upgrade_IsengardHeavyArmor instead of Upgrade_TrueAlphaWarg

Then purchase the Heavy Arnor and see if you can now upgrade your Hero 



#5 OneV

OneV
  • Members
  • 53 posts

Posted 27 May 2020 - 10:22 PM

Thank you for the suggestions. I have tried using Upgrade_IsengardHeavyArmor instead and unfortunately it did not work either

Try changing the upgrade to Upgrade_IsengardHeavyArmor instead of Upgrade_TrueAlphaWarg

Then purchase the Heavy Arnor and see if you can now upgrade your Hero 

 

I also added this; it did not have any effect.

 

 

Behavior = ProductionUpdate  ProductionUpdateModuleTag

  GiveNoExp = Yes

End 

 


Edited by OneV, 28 May 2020 - 12:08 AM.


#6 OneV

OneV
  • Members
  • 53 posts

Posted 28 May 2020 - 01:37 AM

I think the hero code needs

Behavior = ProductionUpdate ProductionUpdateModuleTag
GiveNoExp = Yes
End

Try changing the upgrade to Upgrade_IsengardHeavyArmor instead of Upgrade_TrueAlphaWarg
Then purchase the Heavy Arnor and see if you can now upgrade your Hero

This helped me solve the issue. I added that piece of code and used the Upgrade_IsengardHeavyArmor template to create the new upgrade.
Now everything works properly: upgrade is available for purchase at level 5. After it is purchased, the model changes as well. Thank you very much!

Edited by OneV, 28 May 2020 - 04:21 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users