[en] - Modding Corner > Coding

Coding: add many heroes on a structure

(1/2) > >>

Mako:
Hi guys. I'm new on coding and i have some trouble on this thing. I wanna add at least 20 heroes on structure.

The structure is DwarvenFortressExpansion PadSideCommandSet (the expansion near the fortress where you build some stuff):


--- Code: ---CommandSet DwarvenFortressExpansionPadCornerCommandSet
   1  = Command_ConstructDwarvenCatapultExpansion
   2  = Command_ConstructDwarvenEreborTowerTowerExpansion
   3  = Command_ConstructDwarvenHallExpansion
   4  = Command_ConstructDwarvenWallHubExpansion
End

--- Ende Code ---

So i think i have to:


--- Code: --- CommandSet DwarvenFortressExpansionPadCornerCommandSet
    InitialVisible = 20
 
    1 = Command_GenericReviveSlot1
    2 = Command_GenericReviveSlot2
    ...
    20 = Command_GenericReviveSlot20
End
 

PlayerTemplate FactionDwarves
 
   BuildableHeroesMP = CreateAHero DwarvenCaptainofDale DwarvenGloin DwarvenGimli DwarvenDain RohanFrodo RohanEowyn RohanEomer GondorBoromir
   BuildableRingHeroesMP = ElvenGaladriel_RingHero
 
End

CommandButton Command_GenericReviveSlot1
Command = REVIVE
Options = HIDE_WHILE_DISABLED CANCELABLE ;Hides button while disabled.
TextLabel = CONTROLBAR:GenericReviveHero
;ButtonImage = ***Filled in automatically! No need to specify a button image.
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGenericReviveHero
InPalantir = No
Radial = Yes
End
 
CommandButton Command_GenericReviveSlot2
Command = REVIVE
Options = HIDE_WHILE_DISABLED CANCELABLE ;Hides button while disabled.
TextLabel = CONTROLBAR:GenericReviveHero
;ButtonImage = ***Filled in automatically! No need to specify a button image.
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGenericReviveHero
InPalantir = No
Radial = Yes
End

...

CommandButton Command_GenericReviveSlot13 ;and then i copied unitl 20th
Command = REVIVE
Options = HIDE_WHILE_DISABLED CANCELABLE ;Hides button while disabled.
TextLabel = CONTROLBAR:GenericReviveHero
;ButtonImage = ***Filled in automatically! No need to specify a button image.
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGenericReviveHero
InPalantir = No
Radial = Yes
End
 
CommandButton Command_RingHeroReviveSlot
Command = REVIVE
Options = HIDE_WHILE_DISABLED CANCELABLE NEED_UPGRADE ;Hides button while disabled.
NeededUpgrade = Upgrade_RingHero Upgrade_FortressRingHero
TextLabel = CONTROLBAR:GenericReviveHero
;ButtonImage = ***Filled in automatically! No need to specify a button image.
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGenericReviveHero
InPalantir = No
Radial = Yes
End
 
CommandButton Command_CreateAHeroReviveSlot
Command = REVIVE
Options = HIDE_WHILE_DISABLED CANCELABLE NEED_UPGRADE ;Hides button while disabled.
NeededUpgrade = Upgrade_AllowBuildCreateAHero
TextLabel = CONTROLBAR:GenericReviveHero
;ButtonImage = ***Filled in automatically! No need to specify a button image.
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGenericReviveHero
InPalantir = No
Radial = Yes
End

--- Ende Code ---
But it doens't work. So i tried a simply code to change only fortresspad as this to see how ini works


--- Code: ---CommandSet DwarvenFortressExpansionPadSideCommandSet
1  = Command_ConstructDwarvenWallHubExpansion
2 = Command_ConstructDwarvenWallHubExpansion
3  = Command_ConstructDwarvenWallHubExpansion
4  = Command_ConstructDwarvenWallHubExpansion
End
--- Ende Code ---

But when i start game Pad of Dwraf's fortress and single pad object still remain as this


--- Code: ---CommandSet DwarvenFortressExpansionPadSideCommandSet
1  = Command_ConstructDwarvenCatapultExpansion
2 = Command_ConstructDwarvenEreborTowerTowerExpansion
3  = Command_ConstructDwarvenHallExpansion
4  = Command_ConstructDwarvenWallHubExpansion
End
--- Ende Code ---

Any ideas?

Mako:
Sry i wrong main topic. i got de :)

Mako:
Now my work is going


Ok now something is working...
But i can't recruit. I mean when i press on button it doens't do anything
 
My code:
 

--- Code: ---PlayerTemplate FactionWild
Side = Wild
PlayableSide = Yes
Evil = Yes
StartMoney = 0
MaxLevelMP = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_DEFAULT PLAYER_PURCHASE_POINTS_GRANTED )
MaxLevelSP = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_EVIL PLAYER_PURCHASE_POINTS_GRANTED )
PreferredColor = R:84 G:114 B:71
StartingBuilding = WildFortress
 
 
StartingUnit1  = NONE
StartingUnit0  = NONE
IntrinsicSciences = SCIENCE_EVIL
IntrinsicSciencesMP = SCIENCE_WILD
SpellBook = EvilSpellBook
SpellBookMp = WildSpellBook
PurchaseScienceCommandSet = EvilSpellStoreCommandSet
PurchaseScienceCommandSetMP = WildSpellStoreCommandSet
InitialUpgrades = Upgrade_WildFaction Upgrade_GoblinDualEconomyChoice Upgrade_EvilDualEconomyChoice //Any upgrades this player template is born with.
 
// NOTE: It is very important that the create-a-hero be the first buildable hero, to ensure that the create-a-hero and the ring hero are always
// attached to the first two buttons in the command set.
 
BuildableHeroesMP = WildGoblinKing WildAzog WildShelob Drogoth MordorGothmog MordorMouthOfSauron KhamulFellBeast MorgomirFellBeast MordorWitchKingOnFellBeast NeutralGollum EvilMenBlackRider EvilMenBlackRider Alatar Pallando
BuildableRingHeroesMP = NONE
End
 
CommandSet AllExpansionPadCommandSet
1 = Command_GenericReviveSlot1
2 = Command_GenericReviveSlot2
3 = Command_GenericReviveSlot3
4 = Command_GenericReviveSlot4
5 = Command_GenericReviveSlot5
6 = Command_GenericReviveSlot6
7 = Command_GenericReviveSlot7
8 = Command_GenericReviveSlot8
9 = Command_GenericReviveSlot9
10 = Command_GenericReviveSlot10
11 = Command_GenericReviveSlot11
12 = Command_GenericReviveSlot12
13 = Command_GenericReviveSlot13
End
 
CommandButton Command_GenericReviveSlot1
Command = REVIVE
Options = HIDE_WHILE_DISABLED CANCELABLE ;Hides button while disabled.
TextLabel = CONTROLBAR:GenericReviveHero
;ButtonImage = ***Filled in automatically! No need to specify a button image.
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipGenericReviveHero
InPalantir = No
Radial = Yes
End
 
 
Object MenArrowTowerExpansion
BuildCost = 1300
BuildTime = 1.0
End
 
Object DwarvenEreborTowerTowerExpansion
BuildCost = 1200
BuildTime = 1.0
End
 
Object IsengardFortressExpansionPadCorner
CommandSet = AllExpansionPadCommandSet
End
 
Object IsengardFortressExpansionPadSide
CommandSet = AllExpansionPadCommandSet
End
 
Object ElvenFortressExpansionPadCorner
CommandSet = AllExpansionPadCommandSet
End
 
Object ElvenortressExpansionPadSide
CommandSet = AllExpansionPadCommandSet
End
 
Object DwarvenFortressExpansionPadCorner
CommandSet = AllExpansionPadCommandSet
End
 
Object DwarvenFortressExpansionPadSide
CommandSet = AllExpansionPadCommandSet
End
 
Object MenFortressExpansionPadCorner
CommandSet = AllExpansionPadCommandSet
End
 
Object MenFortressExpansionPadSide
CommandSet = AllExpansionPadCommandSet
End
 
Object WildFortressExpansionPadCorner
CommandSet = AllExpansionPadCommandSet
End
 
Object WildFortressExpansionPadSide
CommandSet = AllExpansionPadCommandSet
End
 
Object MordorFortressExpansionPadCorner
CommandSet = AllExpansionPadCommandSet
End
 
Object MordorFortressExpansionPadSide
CommandSet = AllExpansionPadCommandSet
End
--- Ende Code ---

FG15:
I guess your object does not have a QueueProductionExitUpdat e or a ProductionUpdate.
Try adding those, such that the object can produce things.

Mako:
ooooo fine. An answer  :D

Tbh the problem isn't spawning but it doesn't start to recruit. Spawning maybe is later [uglybunti]
Do you know the timer when you purchase a unit/hero/upgrade?

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln