Jump to content
Sign in to follow this  
A-Mod

KW Modding - Help needed with Upgrades and Structures

Recommended Posts

Hi to all I am new on this forum and do not know much English(I from Russia). I am a bad coder,but i like Kane's Wrath edition so that I trying to make a mod for this game. And after reading guide in "SDK topic" I use Wrathed and this programm work really good. I have some question about "Upgrades Template". I like in strategies if we can Upgrade some structures like Tech building and have much good stuffs. This make Defence really interesting. So that i trying add Upgrade to building like in "Power Plant". But after adding button image and ability upgrade this button don't active it's grey. Maybe somebody can help with this and say what I do wrong. Please help.

 

01a.png

 

 

And after constuct tiberium bulding it's not available

[Yeup russian language on the screens]

 

 

02a.png

 

This is Behaviors from gameobject "NODTiberiumSilo"

    <Behaviors>
<PowerUpgrade
id="ModuleTag_NODSiloShaft"
RequiresAllTriggers="False"
RequiresAllConflictingTriggers="False"
Permanent="False"
WaypointMode="False"
WaypointModeTerminal="True">
<TriggeredBy>Upgrade_NODTiberiumSiloShaft</TriggeredBy>
</PowerUpgrade>
<SubObjectsUpgrade
id="ModuleTag_ShowTurbines">
<CustomAnimAndDuration
AnimState="USER_1"></CustomAnimAndDuration>
<TriggeredBy>Upgrade_NODTiberiumSiloShaft</TriggeredBy>
</SubObjectsUpgrade>
<StatusBitsUpgrade
id="ModuleTag_NODSiloShaft2"
RequiresAllTriggers="False"
RequiresAllConflictingTriggers="False"
Permanent="False"
WaypointMode="False"
WaypointModeTerminal="True"
StatusToClear=""
ApplyToContained="False"
StatusToSet="HAS_TIBERIUM_UPGRADE">
<AutoDepositUpdate
InitialCaptureBonus="500"
DepositInterval="3s"
DepositAmount="5"
GiveNoXP="true"
Flags="ACTIVE_WHEN_REPAIRING"/>
<TriggeredBy>Upgrade_NODTiberiumSiloShaft</TriggeredBy>
</StatusBitsUpgrade>
 

 

This is "NewUpgrade.xml" code I use all this from this file.

<UpgradeTemplate
id="Upgrade_NODTiberiumSiloShaft"
DisplayName="UPGRADE:NODTiberiumSiloShaft"
AcquireHint="UpgradePrereq:NODTiberiumSiloShaft"
TypeDescription="UpgradeType:NODTiberiumSiloShaft"
Description="UpgradeDesc:NODTiberiumSiloShaft"
Type="OBJECT"
BuildTime="15s"
BuildCost="3500"
ResearchSound="AudioEvent:NOD_PowerPlantUpgradeMS"
ResearchCompleteEvaEvent="UpgradeComplete"
UnitSpecificSound="AudioEvent:NOD_TiberiumSiloSelect"
UpgradeFX="FX_NOD_CatalystMissile_TiberiumExplosion"
LocalPlayerProductionStartedEvaEvent="BuildingConstructionStarted"
LocalPlayerBuildOnHoldEvaEvent="BuildOnHold"
LocalPlayerBuildCancelledEvaEvent="BuildCancelled"
GroupOrder="0"
SkirmishAIHeuristic="INVALID"
Options="DO_NOT_TRANSFER"
WaypointQueueable="True"
IconImage="ButtonStateUpgradeNODTiberiumSiloShaft">
<GameDependency>
<RequiredObject>NODTiberiumLiquidationFacility</RequiredObject>
</GameDependency>
</UpgradeTemplate>
 
<ButtonSingleStateData
id="ButtonStateUpgradeNODTiberiumSiloShaft">
<State
Image="Button_TDSilo"
Title="UPGRADE:NODTiberiumSiloShaft"
Description="UpgradeDesc:NODTiberiumSiloShaft" />
</ButtonSingleStateData>
 
<UnitAbilityButtonTemplate
id="ButtonUpgradeNODTiberiumSiloShaft"
LogicCommand="Command_UpgradeNODTiberiumSiloShaft">
<Data>
<ObjectUpgrade
StateData="ButtonStateUpgradeNODTiberiumSiloShaft" />
</Data>
</UnitAbilityButtonTemplate>

This is "logic command"

 
<LogicCommand
id="Command_BUILDNODTiberiumSiloTIBHUB"
Type="CONSTRUCTION_YARD_CONSTRUCT"
Options="">
<Object>NODTiberiumSiloTIB</Object>
</LogicCommand>
 
<LogicCommand
id="Command_BUILDNODTiberiumSiloTIB"
Type="DOZER_CONSTRUCT"
Options="OPTION_ONE">
<Object>NODTiberiumSiloTIB</Object>
</LogicCommand>
 
<LogicCommand
id="Command_UpgradeNODTiberiumSiloShaft"
Type="OBJECT_UPGRADE"
Options="">
<UpgradeTemplate>Upgrade_NODTiberiumSiloShaft</UpgradeTemplate>
</LogicCommand>
 

and "logic command set"

 
<LogicCommandSet
id="NODTiberiumSiloTIBCommandSet">
<Cmd>Command_BUILDNODTiberiumSiloTIB</Cmd>
<Cmd>Command_UpgradeNODTiberiumSiloShaft</Cmd>
</LogicCommandSet> 
 
Edited by A-Mod

Share this post


Link to post

Are you using WrathEd or just the C&C3 Mod SDK? If it's the C&C3 Mod SDK, that ButtonSingleStateData and PowerUpgrade defines are not compatible, except KW's WrathEd and RA3 Mod SDK.

Edited by zocom7

Share this post


Link to post

Are you using WrathEd or just the C&C3 Mod SDK?

I use Wrathed

Share this post


Link to post

Zocom7 thanks for answer, I use WrathEd. I look to other scripts and code and don't know why this button don't working. In fact i find Buildings upgrade only in Power Plants. Other buildings have some abilities for units or some special powers.

Share this post


Link to post

Maybe you could add the code in Behaviors like this

 

<ProductionUpdate
id="ModuleTag_ProductionUpdate"
Type="UPGRADE"
GiveNoXP="true" />

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×