Jump to content


Photo

Upgrade doesn't work

upgrade doesnt work; upgrade;

  • Please log in to reply
5 replies to this topic

#1 Symonius

Symonius
  • Members
  • 51 posts
  • Location:The ancient shield
  • Projects:TROW Mod
  •  Just a winged modder

Posted 02 June 2015 - 12:30 AM

Hi people!
I need some help for making an upgrade to my dwarven golems.
 
I want to make 3 different upgrade, so i created 3 command button plus the button for the technology:
 
;-----------------------------------------------------------------------------------------------------------------------------------------
CommandButton Command_PurchaseTechnologyDwarvenRune
    Command                = PLAYER_UPGRADE
    Options                = CANCELABLE ;NEED_UPGRADE
    Upgrade                = Upgrade_TechnologyDwarvenRune
    ;NeededUpgrade            = Upgrade_DwarvenForgeWorksLevel2
    TextLabel            = CONTROLBAR:PurchaseTechnologyDwarvenRune
    ButtonImage            = BDForgeWorks_ForgedBlades
    ButtonBorderType        = UPGRADE
    DescriptLabel            = CONTROLBAR:ToolTipPurchaseTechnologyDwarvenRune
    Radial                = Yes
    InPalantir            = Yes
    LacksPrerequisiteLabel        = TOOLTIP:LackLevel2ForgeWorks
End

CommandButton Command_PurchaseUpgradeFireRune    
    Command                = OBJECT_UPGRADE
    Options                = NEED_UPGRADE CANCELABLE ;OK_FOR_MULTI_SELECT
    ;Object                = DwarvenGolem
    Upgrade                = Upgrade_FireRune
    NeededUpgrade            = Upgrade_TechnologyDwarvenRune ;Upgrade_ObjectLevel1
    TextLabel            = CONTROLBAR:PurchaseUpgradeFireRune
    ButtonImage            = BDForgeWorks_ForgedBlades
    ButtonBorderType        = UPGRADE
    DescriptLabel            = CONTROLBAR:ToolTipPurchaseUpgradeFireRune
    InPalantir            = Yes
    LacksPrerequisiteLabel        = TOOLTIP:LackDwarvenRune
End

CommandButton Command_PurchaseUpgradeEarthRune    
    Command                = OBJECT_UPGRADE
    Options                =  OK_FOR_MULTI_SELECT CANCELABLE ;NEED_UPGRADE
    Upgrade                = Upgrade_EarthRune ;Upgrade_DwarvenForgedBlades ;
    ;NeededUpgrade            = Upgrade_TechnologyDwarvenRune ;Upgrade_ObjectLevel1
    TextLabel            = CONTROLBAR:PurchaseUpgradeEarthRune
    ButtonImage            = BDForgeWorks_ForgedBlades
    ButtonBorderType        = UPGRADE
    DescriptLabel            = CONTROLBAR:ToolTipPurchaseUpgradeEarthRune
    InPalantir            = Yes
    LacksPrerequisiteLabel        = TOOLTIP:LackDwarvenRune
End

CommandButton Command_PurchaseUpgradeWindRune    
    Command                = OBJECT_UPGRADE
    Options                = NEED_UPGRADE OK_FOR_MULTI_SELECT CANCELABLE
    Upgrade                = Upgrade_WindRune
    NeededUpgrade            = Upgrade_TechnologyDwarvenRune ;Upgrade_ObjectLevel1
    TextLabel            = CONTROLBAR:PurchaseUpgradeWindRune
    ButtonImage            = BDForgeWorks_ForgedBlades
    ButtonBorderType        = UPGRADE
    DescriptLabel            = CONTROLBAR:ToolTipPurchaseUpgradeWindRune
    InPalantir            = Yes
    LacksPrerequisiteLabel        = TOOLTIP:LackDwarvenRune
End
;----------------------------------------------------------------------------------------------------------------------------------------
Then i added these lines to the Golem object :
;----------------------------------------------------------------------------------------------------------------------------------------
    ;--Weapon--
    Behavior = WeaponSetUpgrade WeaponSetUpgradeModuleTagGolemFire
        TriggeredBy = Upgrade_FireRune
    End
    Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality1
        TriggeredBy = Upgrade_FireRune
    End

    ;--Armor--
    Behavior = ArmorUpgrade ArmorUpgradeModuleTagGolemEarth
        TriggeredBy = Upgrade_EarthRune
        ArmorSetFlag            = PLAYER_UPGRADE
    End
    Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality2
        TriggeredBy = Upgrade_EarthRune
    End

    ;--Locomotor--
    Behavior = LocomotorSetUpgrade LocomotorUpgradeModuleTagGolemWind
        TriggeredBy = Upgrade_WindRune
    End
    Behavior = StatusBitsUpgrade ModuleTag_ProductionLegality3
        TriggeredBy = Upgrade_WindRune
    End

    Behavior = SubObjectsUpgrade Armor_UpgradeGolemWindTxt
        TriggeredBy        = Upgrade_ObjectLevel1
        HideSubObjects    = hammer1 Forged_Blade
    End

    Behavior = CommandButtonHuntUpdate ModuleTag_CommandButtonHuntUpdate
    End
 
    WorldMapArmoryUpgradesAllowed = Upgrade_FireRune Upgrade_EarthRune Upgrade_WindRune
;----------------------------------------------------------------------------------------------------------------------------------------
And i obviously added the used upgrades:
;----------------------------------------------------------------------------------------------------------------------------------------
Upgrade Upgrade_TechnologyDwarvenRune
    DisplayName     = UPGRADE:DwarvenRune
    Type            = PLAYER
    BuildCost        = 0 ;Dwarven_PERSONAL_FORGED_BLADES_BUILDCOST
    BuildTime        = 0 ;Dwarven_PERSONAL_FORGED_BLADES_BUILDTIME
    ;ResearchCompleteEvaEvent    = UpgradeForgedBladesReady-Dwarf
End

Upgrade Upgrade_FireRune
    DisplayName     = UPGRADE:FireRune
    Type            = OBJECT
    Tooltip            = TOOLTIP:FireRune
    BuildCost        = 1 ;DWARVEN_TECH_FORGED_BLADES_BUILDCOST    
    BuildTime        = 1 ;DWARVEN_TECH_FORGED_BLADES_BUILDTIME    
    ;ResearchSound    = UpgradeForgedBlades
    UpgradeFX        = FX_PorterDeliverForgedBlades
    ButtonImage        = BuildingNoArt
    Cursor            = WeaponUpgrade
    RequiredObjectFilter = NONE +DwarvenGolem;+DwarvenSiegeWorks ;NONE +DwarvenGolem
    StrategicIcon    = AptStrategicUnitUpgradeBlade
End

Upgrade Upgrade_EarthRune
    DisplayName     = UPGRADE:EarthRune
    Type            = OBJECT
    Tooltip            = TOOLTIP:DwarvenForgedBlades
    BuildCost        = 1 ;Dwarven_PERSONAL_FORGED_BLADES_BUILDCOST
    BuildTime        = 0 ;Dwarven_PERSONAL_FORGED_BLADES_BUILDTIME
    UpgradeFX        = FX_PorterDeliverForgedBlades
    ButtonImage        = BuildingNoArt
    Cursor            = ArmorUpgrade
    RequiredObjectFilter = NONE +DwarvenGolem;+DwarvenSiegeWorks ;NONE +DwarvenGolem
    ;ResearchCompleteEvaEvent    = UpgradeForgedBladesReady-Dwarf
    StrategicIcon    = AptStrategicUnitUpgradeBlade
End

Upgrade Upgrade_WindRune
    DisplayName     = UPGRADE:WindRune
    Type            = OBJECT
    Tooltip            = TOOLTIP:DwarvenForgedBlades
    BuildCost        = 1 ;Dwarven_PERSONAL_FORGED_BLADES_BUILDCOST
    BuildTime        = 0 ;Dwarven_PERSONAL_FORGED_BLADES_BUILDTIME
    UpgradeFX        = FX_PorterDeliverForgedBlades
    ButtonImage        = BuildingNoArt
    Cursor            = LocomotorUpgrade
    RequiredObjectFilter = NONE +DwarvenGolem;+DwarvenSiegeWorks ;NONE +DwarvenGolem
    ;ResearchCompleteEvaEvent    = UpgradeForgedBladesReady-Dwarf
    StrategicIcon    = AptStrategicUnitUpgradeBlade
End
;----------------------------------------------------------------------------------------------------------------------------------------
 
 
Now, the problem is that the button of the upgrade remains grey, it happen if i comment the "needed upgrade" lines or not, and if i purchase the needed upgrades the "lack" information disappears and the tooltip appears, so i think that the technology upgrade works...
What can i have done wrong?
Thank for your help, i really appreciate your work of helping noob modder like me.

Edited by Symonius, 02 June 2015 - 12:50 AM.

"All we have to decide is what to mod with the time that is given us"


#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 04 June 2015 - 07:33 AM

Which upgrade does not work?

And try changing the research time to 1 instead of 0 on that player one :p

Also do you have the required object filter object alive?


Edited by Ridder Geel, 04 June 2015 - 07:33 AM.

Ridder Geel

#3 Symonius

Symonius
  • Members
  • 51 posts
  • Location:The ancient shield
  • Projects:TROW Mod
  •  Just a winged modder

Posted 05 June 2015 - 08:47 PM

None of the three upgrades you see on the code work, i tried with many different options but nothing.
For the object alive, yes, because i tried with no object needed or setting the needed object as the object that i want to upgrade...
any other suggestion? :(

"All we have to decide is what to mod with the time that is given us"


#4 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 07 June 2015 - 10:19 PM

Oh yes where are the upgrades done?

If i remember correctly....

    Behavior = ProductionUpdate ModuleTag_AllowUpgrades
        ; nothing, but is required if we have any Object-level Upgrades!
    End

 

Your object might need that in order to do the researches, not entirely sure though :p


Ridder Geel

#5 Symonius

Symonius
  • Members
  • 51 posts
  • Location:The ancient shield
  • Projects:TROW Mod
  •  Just a winged modder

Posted 09 June 2015 - 01:49 PM

I have never seen that code-line, i try this on the golem's object.
Thank, I'll reply if it work or not.

"All we have to decide is what to mod with the time that is given us"


#6 Symonius

Symonius
  • Members
  • 51 posts
  • Location:The ancient shield
  • Projects:TROW Mod
  •  Just a winged modder

Posted 09 June 2015 - 02:01 PM

Thanks very much, it seems to work greatly.
I love you ridder(metaphorically) ;)

"All we have to decide is what to mod with the time that is given us"





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users