[en] - Modding Corner > Coding

Coding in Edain 4.00

<< < (5/23) > >>

Gnomi:
But that's a new commandbutton. ;)
It doesn't matter if this exists, but you have a commandbutton which has in the original game code another image (in this case: not existant image). Therefore it won't be shown.

Glorfindel23:
Thank you !  :)
________________________ ________________________

Why when I add a line "Command_FakeHeroReviveSl ot" for my new heroes, they are still moved of batiments ?
Exemple of problem -> Eomer is recruitable in the forteresse and Aragorn in the inn

(I've 8 heroes standard of the Gondor and I want add 5 heroes for the Rohan to the inn)

My ini.map :


--- Zitat ---PlayerTemplate FactionMen
    BuildableHeroesMP        = CreateAHero RohanPippin_mod GondorBeregond GondorBoromir_mod GondorAragornEntwicklung 1 GondorGandalf_mod GondorImrahil GondorFaramir_mod RohanEomer_mod RohanTheoden_mod RohanMerry_mod RohanGamling_mod_neu RohanEowyn_mod

Object Inn
CommandSet = CommandSetInnMenFaction_ MinasTirith

ReplaceModule ModuleTag_CommandSetMen
    Behavior = CommandSetUpgrade ModuleTag_CommandSetMen_ 42
        TriggeredBy    = Upgrade_MenFaction
        CommandSet    = CommandSetInnMenFaction_ MinasTirith
    End   
End

End

CommandSet CommandSetInnMenFaction_ MinasTirith
    InitialVisible = 3

   1   = Command_ConstructInnHero GoodGondor
   2   = Command_SelectUpgradesLe henFactionNew
   3   = Command_StartSelfRepair

        4   = Command_ConstructLehenDo lsoldatenHorde
        5   = Command_ConstructRingVal eSwordsmanHorde
        6   = Command_RadialBack
        7   = Command_ConstructPelegir SpearmenHorde
        8   = Command_ConstructMorthon dBowmenHorde
        9   = Command_ConstructGondorK nightsofDolHordeMod
        10   = Command_ConstructLehenLo ssarnachĂ„xteHorde
       

        11    = Command_FakeRingHeroRevi veSlot
        21   = Command_FakeHeroReviveSl ot9
        22   = Command_FakeHeroReviveSl ot10
        23   =  Command_FakeHeroReviveSl ot11
        24   =  Command_FakeHeroReviveSl ot12
        25   =  Command_FakeHeroReviveSl ot13
        31   = Command_RadialBack
End

--- Ende Zitat ---

Help me please

FG15:
You have to make sure that the (Fake)RingHeroReviveSlots are enough and in the correct order.
You have to start with the "Command_FakeRingHeroRevi veSlot" and "Command_FakeCreateAHeroR eviveSlot" if both the CaH and Ring Hero should not be recruitable in this building. Then you start with the regular heroes and add for every buildable hero a "Command_GenericReviveSlo t" (+ a number at the end) and for every not buildable hero a "Command_FakeHeroReviveSl ot" (+ a number at the end).

Glorfindel23:

--- Zitat ---Thank you !  :)
--- Ende Zitat ---

I want add a horse to Grimbold what this code does not function ?

the code :

--- Zitat ---
PlayerTemplate FactionRohan
    BuildableHeroesMP            = CreateAHero RohanMerry_mod RohanOldMan RohanGamling_mod_neu RohanEowyn_mod RohanHama RohanTheodred RohanEomer_mod RohanGrimbold
End

Object RohanGrimbold
CommandSet = RohanGrimboldCommandSet_ HelmsDeep
End

CommandSet RohanGrimboldCommandSet_ HelmsDeep
    1    = Command_ToggleStance
    2    = Command_SpecialAbilityGr imboldSturmangriff
    3    = Command_SpecialAbilityAt helasMod
    4    = Command_MountHorseEowynM od_MM
    5    = Command_SpecialAbilityLe adershipGrimbold
    12    = Command_CaptureBuilding
    13    = Command_AttackMove
    14    = Command_Stop
    16  = Command_SetStanceBattle
    17  = Command_SetStanceAggress ive
    18  = Command_SetStanceHoldGro und
End

Object RohanGrimbold

AddModule ModuleTag_HorseEnabler
    Behavior = UnpauseSpecialPowerUpgra de ModuleTag_HorseEnablerHD
        SpecialPowerTemplate = SpecialAbilityToggleMoun ted
        TriggeredBy = Upgrade_HeldenPferde
    End
End

AddModule ModuleTag_HorseToggleSta rter
    Behavior = SpecialPowerModule ModuleTag_HorseToggleSta rterHD
         SpecialPowerTemplate      = SpecialAbilityToggleMoun ted
         UpdateModuleStartsAttack  = Yes
         StartsPaused              = Yes
    End
End

AddModule oduleTag_HorseToggle
    Behavior = ToggleMountedSpecialAbil ityUpdate ModuleTag_HorseToggleHD
         SpecialPowerTemplate    = SpecialAbilityToggleMoun ted
         UnpackTime              = 2000
         PreparationTime         = 1 
         PersistentPrepTime      = 250
         PackTime                = 2000   
         OpacityTarget            = .3        ; How see-thru to be at peak of change
         AwardXPForTriggering    = 0
        CancelDisguiseWhenDismou nting = Yes   
    End
End

End

--- Ende Zitat ---

FG15:
The code only works if the hero has a mounted model defined. Because Grimbold uses two different objects as mounted and unmounted, it does not work in this way.

I would advise you to just look at other heroes who have a mount and try to understand how it works. (model, locomotor, Crushstyle, ...)

Honestly, I doubt that anyone can really help you with this, without doing all the work on his own.

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln