[en] - Modding Corner > Coding

Coding in Edain 4.00

<< < (3/23) > >>

Gnomi:
The order is wrong. Always put the things you're linking to first.

So always put:

Commandbuttons
CommandSets
Objects

Otherwise the commandset will use the original commandbuttons, as they haven't been changed yet.

Glorfindel23:

--- Zitat von: Gnomi am 30. Jan 2016, 18:31 ---The order is wrong. Always put the things you're linking to first.

So always put:

Commandbuttons
CommandSets
Objects

Otherwise the commandset will use the original commandbuttons, as they haven't been changed yet.

--- Ende Zitat ---

I do not arrive, can you underline in red what doesn't work please ?

Gnomi:
The problem is order/sequence of your commands.
For example you have:

--- Code: ---Object RohanArcherRangeMod
CommandSet = RohanArcherrageModComman dSet

ReplaceModule ModueTag_ArcherRangeModL evel2CommandSet
    Behavior = CommandSetUpgrade ModueTag_ArcherRangeModL evel2CommandSet_42
        TriggeredBy           = Upgrade_StructureLevel2
        ConflictsWith         = Upgrade_StructureLevel3
        CommandSet            = RohanArcherrageModComman dSetLevel2_HelmsDeep
    End   
End
ReplaceModule ModueTag_ArcherRangeModL evel3CommandSet
    Behavior = CommandSetUpgrade ModueTag_ArcherRangeModL evel3CommandSet_42
        TriggeredBy           = Upgrade_StructureLevel3
        CommandSet            = RohanArcherrageModComman dSetLevel3_HelmsDeep
    End   
End

End

CommandSet RohanArcherrageModComman dSet_HelmsDeep
    InitialVisible = 8
    1 = Command_ConstructRohanAr cherHorde
    2 = Command_ConstructRohanSp eerwerferHorde
    3 = Command_PurchaseTechnolo gyRohanModFireArrows
    4 = Command_ConstructLothlor ienGaladhrimHorde
    5 = Command_ConstructRohanHe roldBow
    6 = Command_Sell   
    7 = Command_PurchaseUpgradeR ohanStructureLevel2
    8 = Command_PurchaseUpgradeR ohanStructureLevel3
End

CommandSet RohanArcherrageModComman dSetLevel2_HelmsDeep
    InitialVisible = 8
    1 = Command_ConstructRohanAr cherHorde
    2 = Command_ConstructRohanSp eerwerferHorde
    3 = Command_PurchaseTechnolo gyRohanModFireArrows
    4 = Command_ConstructLothlor ienGaladhrimHorde
    5 = Command_ConstructRohanHe roldBow
    6 = Command_Sell
    7 = Command_PurchaseUpgradeR ohanStructureLevel2
    8 = Command_PurchaseUpgradeR ohanStructureLevel3
End

CommandSet RohanArcherrageModComman dSetLevel3_HelmsDeep
    InitialVisible = 6
    1 = Command_ConstructRohanAr cherHorde
    2 = Command_ConstructRohanSp eerwerferHorde
    3 = Command_PurchaseTechnolo gyRohanModFireArrows
    4 = Command_ConstructLothlor ienGaladhrimHorde
    5 = Command_ConstructRohanHe roldBow
    6 = Command_Sell
End

--- Ende Code ---

But it should be:

--- Code: ---
CommandSet RohanArcherrageModComman dSet_HelmsDeep
    InitialVisible = 8
    1 = Command_ConstructRohanAr cherHorde
    2 = Command_ConstructRohanSp eerwerferHorde
    3 = Command_PurchaseTechnolo gyRohanModFireArrows
    4 = Command_ConstructLothlor ienGaladhrimHorde
    5 = Command_ConstructRohanHe roldBow
    6 = Command_Sell   
    7 = Command_PurchaseUpgradeR ohanStructureLevel2
    8 = Command_PurchaseUpgradeR ohanStructureLevel3
End

CommandSet RohanArcherrageModComman dSetLevel2_HelmsDeep
    InitialVisible = 8
    1 = Command_ConstructRohanAr cherHorde
    2 = Command_ConstructRohanSp eerwerferHorde
    3 = Command_PurchaseTechnolo gyRohanModFireArrows
    4 = Command_ConstructLothlor ienGaladhrimHorde
    5 = Command_ConstructRohanHe roldBow
    6 = Command_Sell
    7 = Command_PurchaseUpgradeR ohanStructureLevel2
    8 = Command_PurchaseUpgradeR ohanStructureLevel3
End

CommandSet RohanArcherrageModComman dSetLevel3_HelmsDeep
    InitialVisible = 6
    1 = Command_ConstructRohanAr cherHorde
    2 = Command_ConstructRohanSp eerwerferHorde
    3 = Command_PurchaseTechnolo gyRohanModFireArrows
    4 = Command_ConstructLothlor ienGaladhrimHorde
    5 = Command_ConstructRohanHe roldBow
    6 = Command_Sell
End

Object RohanArcherRangeMod
CommandSet = RohanArcherrageModComman dSet

ReplaceModule ModueTag_ArcherRangeModL evel2CommandSet
    Behavior = CommandSetUpgrade ModueTag_ArcherRangeModL evel2CommandSet_42
        TriggeredBy           = Upgrade_StructureLevel2
        ConflictsWith         = Upgrade_StructureLevel3
        CommandSet            = RohanArcherrageModComman dSetLevel2_HelmsDeep
    End   
End
ReplaceModule ModueTag_ArcherRangeModL evel3CommandSet
    Behavior = CommandSetUpgrade ModueTag_ArcherRangeModL evel3CommandSet_42
        TriggeredBy           = Upgrade_StructureLevel3
        CommandSet            = RohanArcherrageModComman dSetLevel3_HelmsDeep
    End   
End

End

--- Ende Code ---

Glorfindel23:
Thank you but
The probleme is not the order/sequence because I did change and my problem I always here, look at this :

Gnomi:
Yeah, I just see that there are some mistakes...
First you wrote
"ModueTag_ArcherRangeModL evel2CommandSet"
I think the module in the game isn't called "Modue", but "Module". Always copy the original code.
Additionally (if you have copied my parts) there are some spaces (which are there because of copying your parts - happens sometimes)

You can always find the mistake by reading the message. It says clearly on which line (line 4) the mistake is and what's the problem. (can't find that module)
Therefore you just have to follow the bug. Search for the correct name in the inis and put it there.

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln