Modding Union

[en] - Modding Corner => Coding => Thema gestartet von: Glorfindel23 am 11. Jan 2016, 20:21

Titel: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 11. Jan 2016, 20:21
Hello everyone! I hope this topic will help peaople who have some question about modding in Edain Mod. It's a topic created for the small questions which don't need a whole subject.

Here is my first question... Note that I'm totally beginer with coding (and english also ^^)

Where can find the ini of the edain mod 4.00 ? Because when I extract the "__edain_data.big" I get the Ini of the old version 3.8 (I need the ini for the modification of the map)
Titel: Re: Coding in Edain 4.00
Beitrag von: Ealendril der Dunkle am 11. Jan 2016, 22:41
Ehm....the __edain_data.big contains every single codefile of the version 4.0, not 3.8.1. So if you have 4.0 installed, you should get the codefiles concerning 4.0.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 12. Jan 2016, 00:03
my problem is ending, I had a bug with my finalbig...
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 17. Jan 2016, 11:17
Can you help me for the ini modification of my map, I would like add the Beregond Compagnie recruitable to the caserne of gondor but I do not know how to do. I tried to modify the "commandset.ini" but it does not work.
Help me please.

I don't understand why the file doesn't work
(My ini map)

Titel: Re: Coding in Edain 4.00
Beitrag von: Prinz von Dol Amroth am 17. Jan 2016, 12:15
Zitat
Object                 = Object GondorWächterderKompanieHorde

Zitat
Object GondorArcherRange
CommandSet = CommandSet GondorArcheryCommandSet_MinasTirith
CommandSet = CommandSet GondorArcheryCommandSetL evel2_MinasTirith
 CommandSet = CommandSet GondorArcheryCommandSetL evel3_MinasTirith


ReplaceModule ModueTag_ArcheryRangeLev el2CommandSet
    Behavior = CommandSetUpgrade ModueTag_ArcheryRangeLev el2CommandSet_42
        TriggeredBy           = Upgrade_GondorStructureL evel2
        ConflictsWith         = Upgrade_GondorStructureL evel3
        CommandSet            = GondorArcheryCommandSetL evel2_MinasTirith
    End   
End
ReplaceModule ModueTag_ArcheryRangeLev el3CommandSet
    Behavior = CommandSetUpgrade ModueTag_ArcheryRangeLev el3CommandSet_42
        TriggeredBy           = Upgrade_GondorStructureL evel3
        CommandSet            = GondorArcheryCommandSetL evel3_MinasTirith
    End   
End

End

Zitat
CommandSet GondorArcheryCommandSet_ MinasTirith
    InitialVisible = 6
    1 = Command_ConstructGondorA rcherHorde
    2 = Command_PurchaseTechnolo gyGondorFireArrows
    3 = Command_PurchaseUpgradeG ondorStructureLevel2
    4 = Command_BeregondKommanda ntWeißeKompanie
    6 = Command_Sell
End
CommandSet GondorArcheryCommandSetL evel2_MinasTirith
    InitialVisible = 6
    1 = Command_ConstructGondorA rcherHorde
    2 = Command_PurchaseTechnolo gyGondorFireArrows
    3 = Command_PurchaseUpgradeG ondorStructureLevel3
    4 = Command_BeregondKommanda ntWeißeKompanie
    6 = Command_Sell
End
CommandSet GondorArcheryCommandSetL evel3_MinasTirith
    InitialVisible = 6
    1 = Command_ConstructGondorA rcherHorde
    2 = Command_PurchaseTechnolo gyGondorFireArrows
    4 = Command_BeregondKommanda ntWeißeKompanie
    6 = Command_Sell
End
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 17. Jan 2016, 12:54
Thank you very much
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 18. Jan 2016, 19:05
Why The icon of the garde of the fontaine is pink ? (I have remplaced the original icon of the garde of the fontaine per the icon of the tower garde)

(http://img11.hostingpics.net/pics/421572game2016011818584759.png) (http://www.hostingpics.net/viewer.php?id=421572game2016011818584759.png)

My code :

Zitat
CommandButton Command_ConstructGondorW ächterBrunnenHorde
    Command             = UNIT_BUILD
    Object              = GondorWächterBrunnenHord e
    Options             = NEED_UPGRADE CANCELABLE
    NeededUpgrade       = Upgrade_StructureLevel2
    TextLabel           = CONTROLBAR:ConstructGondorWächterBr unnenHorde
    ButtonImage         = BGBarracks_TowerGuard
    ButtonBorderType    = BUILD
    DescriptLabel       = CONTROLBAR:ToolTipBuildGondorWächte rBrunnendHorde
    Radial              = Yes
    InPalantir          = Yes
    ShowProductionCount = Yes     
End

Object GondorBarracks
CommandSet = GondorBarracksCommandSet _MinasTirith

ReplaceModule ModueTag_BarracksLevel2C ommandSet
    Behavior = CommandSetUpgrade ModueTag_BarracksLevel2C ommandSet_42
        TriggeredBy           = Upgrade_GondorStructureL evel2
        ConflictsWith         = Upgrade_GondorStructureL evel3
        CommandSet            = GondorBarracksCommandSet Level2_MinasTirith
    End   
End
ReplaceModule ModueTag_BarracksLevel3C ommandSet
    Behavior = CommandSetUpgrade ModueTag_BarracksLevel3C ommandSet_42
        TriggeredBy           = Upgrade_GondorStructureL evel3
        CommandSet            = GondorBarracksCommandSet Level3_MinasTirith
    End   
End

End

CommandSet GondorBarracksCommandSet _MinasTirith
    InitialVisible = 8
      1    = Command_ConstructGondorF ighterHorde
      2    = Command_ConstructGondorS peerträgerHorde
      3    = Command_ConstructGondorT owerShieldGuardHordeEdai n
      4    = Command_ConstructGondorW ächterVesteHorde
      5    = Command_ConstructGondorB oromirGuardHorde
      6    = Command_ConstructGondorW ächterBrunnenHorde
      7    = Command_Sell
      8    = Command_PurchaseUpgradeG ondorStructureLevel2
     12    = Command_ConstructGondorF ighterHorde_Denethor
     13    = Command_ConstructGondorS peerträgerHorde_Denethor
     14    = Command_ConstructGondorT owerShieldGuardHorde_Den ethor
     15    = Command_ConstructGondorW ächterVesteHorde_Denetho r
End

CommandSet GondorBarracksCommandSet Level2_MinasTirith
    InitialVisible = 8
      1    = Command_ConstructGondorF ighterHorde
      2    = Command_ConstructGondorS peerträgerHorde
      3    = Command_ConstructGondorT owerShieldGuardHordeEdai n
      4    = Command_ConstructGondorW ächterVesteHorde
      5    = Command_ConstructGondorB oromirGuardHorde
      6    = Command_ConstructGondorW ächterBrunnenHorde
      7    = Command_Sell
      7    = Command_PurchaseUpgradeG ondorStructureLevel3
     12    = Command_ConstructGondorF ighterHorde_Denethor
     13    = Command_ConstructGondorS peerträgerHorde_Denethor
     14    = Command_ConstructGondorT owerShieldGuardHorde_Den ethor
     15    = Command_ConstructGondorW ächterVesteHorde_Denetho r
End

CommandSet GondorBarracksCommandSet Level3_MinasTirith
    InitialVisible = 8
      1    = Command_ConstructGondorF ighterHorde
      2    = Command_ConstructGondorS peerträgerHorde
      3    = Command_ConstructGondorT owerShieldGuardHordeEdai n
      4    = Command_ConstructGondorW ächterVesteHorde
      5    = Command_ConstructGondorB oromirGuardHorde
      6    = Command_ConstructGondorW ächterBrunnenHorde
      7    = Command_Sell
     12    = Command_ConstructGondorF ighterHorde_Denethor
     13    = Command_ConstructGondorS peerträgerHorde_Denethor
     14    = Command_ConstructGondorT owerShieldGuardHorde_Den ethor
     15    = Command_ConstructGondorW ächterVesteHorde_Denetho r
End
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 18. Jan 2016, 19:28
You can't replace ButtonImages. If there stands something different than the vanilla buttonimage-name, it will cause such problems.
The only possibility is to search for the original buttonimage and change the image itself in the codes.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 18. Jan 2016, 20:08
Thank you
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 30. Jan 2016, 17:41
Help me please I have a new problem :
I have however done the same than above I don't understand

My Map.ini :

Zitat
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

Object RohanKaserne
CommandSet = RohanKaserneCommandSet

ReplaceModule ModueTag_KaserneLevel2Co mmandSet
    Behavior = CommandSetUpgrade ModueTag_KaserneLevel2Co mmandSet_42
        TriggeredBy           = Upgrade_StructureLevel2
        ConflictsWith         = Upgrade_StructureLevel3
        CommandSet            = RohanKaserneCommandSetLe vel2_HelmsDeep
    End   
End
ReplaceModule ModueTag_KaserneLevel3Co mmandSet
    Behavior = CommandSetUpgrade ModueTag_KaserneLevel3Co mmandSet_42
        TriggeredBy           = Upgrade_StructureLevel3
        CommandSet            = GondorArcheryCommandSetL evel3_HelmsDeep
    End   
End

CommandSet RohanKaserneCommandSet_H elmsDeep
    InitialVisible = 6
    1 = Command_ConstructRohanHe rold
    2 = Command_ConstructRohanRo yalGuardInfantryHordeEdo ras
    3 = Command_ConstructIsenfur tWächterHorde
    4 = Command_ConstructIsenfur tReiterHorde
    5 = Command_ConstructIsenfur tSpeerträgerHorde
    6 = Command_Sell
End

CommandSet RohanKaserneCommandSetLe vel2_HelmsDeep
    InitialVisible = 6
    1 = Command_ConstructRohanHe rold
    2 = Command_ConstructRohanRo yalGuardInfantryHordeEdo ras
    3 = Command_ConstructIsenfur tWächterHorde
    4 = Command_ConstructIsenfur tReiterHorde
    5 = Command_ConstructIsenfur tSpeerträgerHorde
    6 = Command_Sell
End

CommandSet RohanKaserneCommandSetLe vel3_HelmsDeep
    InitialVisible = 6
    1 = Command_ConstructRohanHe rold
    2 = Command_ConstructRohanRo yalGuardInfantryHordeEdo ras
    3 = Command_ConstructIsenfur tWächterHorde
    4 = Command_ConstructIsenfur tReiterHorde
    5 = Command_ConstructIsenfur tSpeerträgerHorde
    6 = Command_Sell
End
Titel: Re: Coding in Edain 4.00
Beitrag 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.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 30. Jan 2016, 18:52
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.

I do not arrive, can you underline in red what doesn't work please ?
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 30. Jan 2016, 19:03
The problem is order/sequence of your commands.
For example you have:
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

But it should be:

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
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 30. Jan 2016, 19:28
Thank you but
The probleme is not the order/sequence because I did change and my problem I always here, look at this :

(http://zupimages.net/up/16/04/52df.png) (http://zupimages.net/viewer.php?id=16/04/52df.png)
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 30. Jan 2016, 21:21
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.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 31. Jan 2016, 00:57
My probleme is ending :

New code
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 1. Feb 2016, 20:29
The code is working for the kaserne but it doesn't working for the archery if someone have an idea of why say me please.
(The problem is than the archery rest with her standard setting)

Zitat
Object RohanArcherRangeMod
CommandSet = RohanArcherrageModComman dSet_HelmsDeep

ReplaceModule ModueTag_Level2CommandSe t
    Behavior = CommandSetUpgrade ModueTag_Level2CommandSe t_42
        TriggeredBy           = Upgrade_StructureLevel2
        ConflictsWith         = Upgrade_StructureLevel3
        CommandSet            = RohanArcherrageModComman dSetLevel2_HelmsDeep
    End   
End
ReplaceModule ModueTag_Level3CommandSe t
    Behavior = CommandSetUpgrade ModueTag_Level3CommandSe t_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

Probleme ending:

Zitat
Object RohanArcherRangeModPlayer
CommandSet = RohanArcherrageModComman dSet_HelmsDeep

ReplaceModule ModueTag_Level2CommandSe t
    Behavior = CommandSetUpgrade ModueTag_Level2CommandSe t_42
        TriggeredBy           = Upgrade_StructureLevel2
        ConflictsWith         = Upgrade_StructureLevel3
        CommandSet            = RohanArcherrageModComman dSetLevel2_HelmsDeep
    End   
End
ReplaceModule ModueTag_Level3CommandSe t
    Behavior = CommandSetUpgrade ModueTag_Level3CommandSe t_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
    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
    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
    6 = Command_Sell
End
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 6. Feb 2016, 15:57
Why the command button of the "Gardian of the white city" has not his picture and how make disappear the text of this command button ?

(http://zupimages.net/up/16/05/4v0m.bmp) (http://zupimages.net/viewer.php?id=16/05/4v0m.bmp)

My code :

I need help please
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 6. Feb 2016, 16:12
You can't change the imagebutton of a commandbutton. Always use the original one, every change to it will make it invisible.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 6. Feb 2016, 16:37
You can't change the imagebutton of a commandbutton. Always use the original one, every change to it will make it invisible.

I didn't change the imagebutton, look the original code :

(original code)
Zitat
CommandButton Command_ConstructGondorB oromirGuardHorde
    Command                  = UNIT_BUILD
    Object                   = GondorBoromirGuardHorde
    Options                  = NEED_UPGRADE CANCELABLE
    TextLabel                = CONTROLBAR:WächterderweißenStadt
    ButtonImage              = HSStadtwächter
    ButtonBorderType         = BUILD
    DescriptLabel            = CONTROLBAR:GondorBoromirGuardHordeR ecruit_Neu
    Radial                   = Yes
    InPalantir               = Yes
    ShowProductionCount      = Yes
    NeededUpgrade            = Upgrade_TestBuilding_2
End

(modified code)
Zitat
CommandButton Command_ConstructGondorB oromirGuardHorde_MT
    Command                  = UNIT_BUILD
    Object                   = GondorBoromirGuardHorde
    Options                  = NEED_UPGRADE CANCELABLE
    TextLabel                = CONTROLBAR:WächterderweißenStadt
    ButtonImage              = HSStadtwächter
    ButtonBorderType         = BUILD
    DescriptLabel            = CONTROLBAR:GondorBoromirGuardHordeR ecruit_Neu
    Radial                   = Yes
    InPalantir               = Yes
    ShowProductionCount      = Yes
End
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 6. Feb 2016, 16:40
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.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 8. Feb 2016, 12:32
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 :


Help me please
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 8. Feb 2016, 12:45
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).
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 8. Feb 2016, 21:56
Zitat
Thank you !  :)

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

the code :
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 8. Feb 2016, 22:15
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.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 8. Feb 2016, 23:20
Thank you I will see  ;)
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 9. Feb 2016, 19:04
How delete the limit of the recruitment to one unit without change the commandbutton ?
Titel: Re: Coding in Edain 4.00
Beitrag von: Melkor Bauglir am 9. Feb 2016, 19:30
Remove the entry "MaximumSimultaneousOfTyp e". (However, than this is a global change counting for all maps.)

Greetings
Melkor Bauglir
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 9. Feb 2016, 22:21
Thank you !
________________________ ________________________

Help me please
Why it doesn't work ?

Zitat
ChildObject RohanEomer_mod_Summoned RohanEomer_mod

RemoveModule ModuleTag_LifetimeUpdate
    Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
        MinLifetime      = ROHAN_ANTWORTET_LIFETIME ;180000
        MaxLifetime      = ROHAN_ANTWORTET_LIFETIME ;180000
        DeathType        = FADED
    End 
End
End
Titel: Re: Coding in Edain 4.00
Beitrag von: Prinz von Dol Amroth am 10. Feb 2016, 10:36
Because RemoveModule only needs one argument, so you only need:
RemoveModule ModuleTag_LifetimeUpdate .

For your next question, please try solving the problem yourself, before you ask someone. There are a lot of files and map.inis in the edain_data.big, which are examples for nearly every code/syntax.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 10. Feb 2016, 11:31
Because RemoveModule only needs one argument, so you only need:
RemoveModule ModuleTag_LifetimeUpdate .

For your next question, please try solving the problem yourself, before you ask someone. There are a lot of files and map.inis in the edain_data.big, which are examples for nearly every code/syntax.


I had already test to write juste :

Zitat
ChildObject RohanEomer_mod_Summoned RohanEomer_mod
RemoveModule ModuleTag_LifetimeUpdate
End
 End
 End

I have test again and it doesn't work
(http://zupimages.net/up/16/06/xgoa.png) (http://zupimages.net/viewer.php?id=16/06/xgoa.png)
Titel: Re: Coding in Edain 4.00
Beitrag von: Prinz von Dol Amroth am 10. Feb 2016, 12:00
This error is a little tricky. In map.ini you only write ChildObject to create a new Object. If you want to modify an existing ChildObject, you have to write "Object RohanEomer_mod_Summoned".
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 11. Feb 2016, 12:38
Ok thank you  :) !
________________________ ______________



I sought and I don't find how use the command "ReplaceModule" here :

Zitat
ReplaceModule ModuleTag_SummonRohanGon dor
    Behavior = OCLSpecialPower ModuleTag_SummonRohanGon dorMT
        SpecialPowerTemplate = SpellBookSummonRohanGond or
        OCL                  = OCL_SpawnRohanGondorEggM T
        TriggerFX             = FX_RohirimSummon
        CreateLocation       = CREATE_AT_LOCATION
        AvailableAtStart     = No
        RequirementsFilterMPSkir mish = SPELL_BOOK_REQUIREMENTS_ FILTER
        RequirementsFilterStrate gic = SPELL_BOOK_REQUIREMENTS_ FILTER_STRATEGIC
    End
End

I do not know what to write in the first line (I think I've forgotten a line at the top of the code).
Titel: Re: Coding in Edain 4.00
Beitrag von: CragLord am 16. Feb 2016, 13:51
One simple question, is data\ini\object file for Beorn in edain_data.big and what is full name of that .ini file?
Titel: Re: Coding in Edain 4.00
Beitrag von: Melkor Bauglir am 16. Feb 2016, 15:00
Do you mean the summoned Beorn of the Dwarves? The object's name should be "GasthausGrimbeorn_Summon ed" and his ini's name is "data\ini\object\goodfaction\units\dwarven\dwarvengrimbeorn.ini" (the recruitable Grimbeorn of Lothlorien is the first object, btw).
I'm not completely sure though because it seems that this object has no different name than the Lothlorien Grimbeorn. Not sure about that^^

Greetings
Melkor Bauglir
Titel: Re: Coding in Edain 4.00
Beitrag von: CragLord am 16. Feb 2016, 15:32
It is ChildObject in same ini, it is clear now, just I couldn't find it because I haven't read whole dwarvengrimbeorn.ini file. xD
Thanks Melkor.  :)

Regards,
CragLord
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 17. Feb 2016, 20:21
How to delete the transparency of the trees of the Lothlorien ? Help me please
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 17. Feb 2016, 20:58
The transparency is part of the draw behavior (usually the first module in an object).
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 20. Feb 2016, 19:54
The transparency is part of the draw behavior (usually the first module in an object).

Thank you very much !
________________________ ________________________ ___

I have tested some possibility but it doesn't work

My problem is ending if someone is interested my code is :

Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 21. Feb 2016, 14:27
Hello i have a problem with a code
this is the code:
Object BruchtalSchwertkämpferHo rde_Summoned
RemoveModule ModuleTag_LifetimeUpdate
End

However the unit still despawns even though there is no time remaining bar.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 21. Feb 2016, 17:06
Hello i have a problem with a code
this is the code:
Object BruchtalSchwertkämpferHo rde_Summoned
RemoveModule ModuleTag_LifetimeUpdate
End

However the unit still despawns even though there is no time remaining bar.

It doesn't work because you must put also the unit of base  ;)

The Code :
Zitat
Object BruchtalSchwertkämpferHo rde_Summoned
RemoveModule ModuleTag_LifetimeUpdate
End

Object BruchtalSchwertkämpfer_S ummoned
RemoveModule ModuleTag_LifetimeUpdate
End
____________________________________________________


Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 21. Feb 2016, 18:53
Hello i have a problem with a code
this is the code:
Object BruchtalSchwertkämpferHo rde_Summoned
RemoveModule ModuleTag_LifetimeUpdate
End

However the unit still despawns even though there is no time remaining bar.

It doesn't work because you must put also the unit of base  ;)

The Code :
Zitat
Object BruchtalSchwertkämpferHo rde_Summoned
RemoveModule ModuleTag_LifetimeUpdate
End

Object BruchtalSchwertkämpfer_S ummoned
RemoveModule ModuleTag_LifetimeUpdate
End
____________________________________________________



I need help !
Now I want add a transparency effect to the TreeShire01 but this doesn't work, the tree has not changement

(the lines who I've added are in green)
My code :

Thanks alot again :)
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 21. Feb 2016, 21:51
I need help !
Now I want add a transparency effect to the TreeShire01 but this doesn't work, the tree has not changement

(the lines who I've added are in green)
My code :

Zitat
Object TreeShire01

ReplaceModule ModuleTag_01
  Draw                  = W3DScriptedModelDraw ModuleTag_01CG
    DefaultModelConditionSta te
      Model             = SB_Tree01
    End

    ModelConditionState = PASSENGER CLUB
      Model = None
    End

    AnimationState = PASSENGER CLUB
      EnteringStateFX = FX_TreeBecomeClub
    End

    AnimationState = PASSENGER
      EnteringStateFX = FX_TreePickUp
    End
   
    ; These are the model conditions and animation states required for trees that can burn. 
    ModelConditionState = BURNED
      Model = PTreeHarad01 ; use default nondeath model in place of this.
    End

    AnimationState   = AFLAME ;Currently on fire
      ParticleSysBone     = None FireTreeSmall
      ParticleSysBone     = None TreeEmbers
    End

    AnimationState   = DYING BURNED ;Currently on fire
      ParticleSysBone     = None FireTreeSmall
      ParticleSysBone     = None TreeEmbers
    End
    ; End of stuff required for burn. 

        StaticSortLevelWhileFadi ng = 2
    AlphaCameraFadeOuterRadi us = 600
    AlphaCameraFadeInnerRadi us = 200
    AlphaCameraAtInnerRadius = 10%

  End
End

End
Titel: Re: Coding in Edain 4.00
Beitrag von: CragLord am 23. Feb 2016, 18:59
One question about data\lotr.str file in english.ini.
I tried to add some sentence to description's text of some CONTROLBAR, but no matter what I have changed, new change is never applied in game. Is there some special thing I should do? xD

I edited file with Notepad++ and saved change, and then used finalbig to put that new lotr.str into english_ini.big 

Regards,
CragLord
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 23. Feb 2016, 19:09
Is it possible to change the command points of a unit?
Titel: Re: Coding in Edain 4.00
Beitrag von: Prinz von Dol Amroth am 23. Feb 2016, 19:51
There are normally no special things to do for editing lotr.str.
Is the name of your lotr.str in your big "data\lotr.str"?

Yes it's possivle to change the commandpoints of a unit. Objects have the parameter CommandPoints.
Titel: Re: Coding in Edain 4.00
Beitrag von: CragLord am 24. Feb 2016, 13:41
No, its name is lotr.str, everything is fine now, made some trivial error while I was editing file... xD
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 25. Feb 2016, 02:15
How can I make upgrades available from different buildings?
For example, right now, the Isengard Banner Carrier and the Mordor Fire Arrows are available respectively inside the Isengard Armory and Sauron's Influence on Mordor's Arsenal. I've changed the Commandbutton of the upgrades and I've set that the required building for both is the Mordor Orc Tent. But, even if the upgrade is purchased and the building actually exists, the game still says the units can't receive that upgrade. (Sorry, I know this is an over-spammed question, but any combination I tried it didn't solve the problem).

This is the code:

And that code doesn't work until I build an armory. It just seems the game ignores this code
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 25. Feb 2016, 08:01
Is this for a map.ini or normal coding? Map.inis ignore all object definitions in filters, so you can only work with KindOfs. Therefore, you have to give the desired building an unique KindOf and use that.
Also, I'm not 100% sure if this entry is even changable in map.inis because I've never tried to change it myself. Then I would just change another button with the same image, which doesn't have the requirements.
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 25. Feb 2016, 13:58
It is for a map.ini, unfortunately. Btw, I solved with a nice trick suggested by Fredius: I placed an armory belonging to the Player outside the map, while the upgrade may be researched only in the Orc Pit  xD

Thank you nonetheless for your answer^^
Titel: Re: Coding in Edain 4.00
Beitrag von: Fredius am 25. Feb 2016, 23:38
I said that :D??

Anyway glad to see that this issue has been resolved. I did not know about this trick either to be honest :D!
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 26. Feb 2016, 03:25
Well, you actually suggested me to place a Citadel out-of-map to enable the start without a camp and the spellbook. So, since the game kept harassing me I needed the proper building to give units the upgrades, voilà xD
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 26. Feb 2016, 20:53
Hello I am having trouble with this code im sure its not right but im very new to this coding stuff so any help would be appreciated.

CommandSet ElvenBarracksCommandSet
InitialVisible = 7
 
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_RingMechanikLoth lorien     
    7      = Command_StartCitadelSelf Repair     

Also i would like to make Glorfindel, Elrond, Arwen, Elladan and Elrohir recruitable from the same building, any help would be much appreciated. :)
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 26. Feb 2016, 21:02
Hello I am having trouble with this code im sure its not right but im very new to this coding stuff so any help would be appreciated.

CommandSet ElvenBarracksCommandSet
InitialVisible = 7
 
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_RingMechanikLoth lorien     
    7      = Command_StartCitadelSelf Repair     

Also i would like to make Glorfindel, Elrond, Arwen, Elladan and Elrohir recruitable from the same building, any help would be much appreciated. :)

Look this (I had the same problem before and this did help me) :
http://forum.modding-union.com/index.php/topic,32468.msg426627.html#msg426627
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 26. Feb 2016, 21:15
Hello I am having trouble with this code im sure its not right but im very new to this coding stuff so any help would be appreciated.

CommandSet ElvenBarracksCommandSet
InitialVisible = 7
 
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_RingMechanikLoth lorien     
    7      = Command_StartCitadelSelf Repair     

Also i would like to make Glorfindel, Elrond, Arwen, Elladan and Elrohir recruitable from the same building, any help would be much appreciated. :)

Look this (I had the same problem before and this did help me) :
http://forum.modding-union.com/index.php/topic,32468.msg426627.html#msg426627
Thanks glorfindel but im struggling to understand where the issue for me is this code is like another language for me :'D im trying to figure it out tho.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 26. Feb 2016, 21:38
Hello I am having trouble with this code im sure its not right but im very new to this coding stuff so any help would be appreciated.

CommandSet ElvenBarracksCommandSet
InitialVisible = 7
 
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_RingMechanikLoth lorien     
    7      = Command_StartCitadelSelf Repair     

Also i would like to make Glorfindel, Elrond, Arwen, Elladan and Elrohir recruitable from the same building, any help would be much appreciated. :)

Look this (I had the same problem before and this did help me) :
http://forum.modding-union.com/index.php/topic,32468.msg426627.html#msg426627
Thanks glorfindel but im struggling to understand where the issue for me is this code is like another language for me :'D


Ok, I explain to you ;)
You have forgotten the lines in red

New code :

Zitat
Object ElvenBarracks
 CommandSet = LothlorienBarracksComman dSetNewName
End

CommandSet LothlorienBarracksCommandSetNewName
InitialVisible = 7
 
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_RingMechanikLoth lorien     
    7      = Command_StartCitadelSelf Repair   
End   

________________________ _________________

I have a question, why the code in green is working and the same code in red reused for another unit is not working ?
(I want replace the texture of the MithlondSentryHeavyArmor per the texture of GaladhrimArmor)

My code :

Zitat
Object LothlorienGrenzwächter

AddModule ModuleTag_ArmorUpgrade
    Behavior = ArmorUpgrade ModuleTag_ArmorUpgrade
        TriggeredBy = Upgrade_BruchtalHeavyArm or
        ArmorSetFlag            = PLAYER_UPGRADE
    End
End
AddModule ModuleTag_Armor_Upgrade2
    Behavior = SubObjectsUpgrade ModuleTag_Armor_Upgrade2
        TriggeredBy        = Upgrade_BruchtalHeavyArm or
        UpgradeTexture    = RUElvnWorrior_L.tga  0 RUElvnWorrior.tga
        UpgradeTexture    = RUElvnWorrior_L.tga 0 RUElvnWorriorHA.tga
        RecolorHouse            = Yes
        ExcludeSubobjects       = Forged_Blade
    End
End

End

Object LothlorienGrenzwächterHo rde
CommandSet = LothlorienHighFighterCom mandSet
End

CommandSet LothlorienHighFighterCom mandSet
    InitialVisible = 18
    1    = Command_ToggleStance
    2    = Command_SpecialAbilityLe mbasbrotHealSpell
    3    = Command_Imladrisweisheit FormationReiter
    4     = Command_PurchaseUpgradeB ruchtalHeavyArmor
    5     = Command_PurchaseUpgradeL othlorienForgedBlades   
    12     = Command_CaptureBuilding   
    13    = Command_AttackMove
    14    = Command_Stop
    16      = Command_SetStanceBattle
    17      = Command_SetStanceAggress ive
    18      = Command_SetStanceHoldGro und
End


Object ElvenMithlondSentry

RemoveModule ArmorUpgradeModuleTag

AddModule ModuleTag_ArmorUpgrade
    Behavior = ArmorUpgrade ModuleTag_ArmorUpgrade
        TriggeredBy = Upgrade_BruchtalHeavyArm or
        ArmorSetFlag            = PLAYER_UPGRADE
    End
End

RemoveModule Armor_Upgrade

AddModule ModuleTag_Armor_Upgrade2
    Behavior = SubObjectsUpgrade ModuleTag_Armor_Upgrade2
        TriggeredBy        = Upgrade_BruchtalHeavyArm or
        UpgradeTexture    = RUElvnWorrior_L.tga  0 RUElvnWorrior.tga
        UpgradeTexture    = RUElvnWorrior_L.tga 0 RUElvnWorriorHA.tga
        RecolorHouse            = Yes
        ExcludeSubobjects       = Forged_Blade
    End
End

End

Object ElvenMithlondSentryHorde
CommandSet = LothlorienNewGuardComman dSet
End

CommandSet LothlorienNewGuardComman dSet
    InitialVisible = 18
    1    = Command_ToggleStance
    2    = Command_SpecialAbilityLe mbasbrotHealSpell
    3    = Command_Imladrisweisheit FormationReiter
    4     = Command_PurchaseUpgradeB ruchtalHeavyArmor
    5     = Command_PurchaseUpgradeL othlorienForgedBlades   
    12     = Command_CaptureBuilding   
    13    = Command_AttackMove
    14    = Command_Stop
    16      = Command_SetStanceBattle
    17      = Command_SetStanceAggress ive
    18      = Command_SetStanceHoldGro und
End

Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 26. Feb 2016, 21:53
Well i tried the code you said and i got this error :/
(http://imgur.com/WhZiKfZ.jpg)

This is the whole of my Ini file im probably getting on your nerves buy now with my idiocy XD but i really appreciate the help.

Zitat
PlayerTemplate FactionElves
    Side                      = Elves
    PlayableSide              = Yes       ; Please note: the presence of "SIDE:Elves" in the string file is what makes this appear in MP as a playable side.  And the skirmish scripts are what actually make it function.
    Evil                      = No
    StartMoney                = 0
    MaxLevelMP                = #DIVIDE( PLAYER_MAX_PURCHASE_POIN TS_DEFAULT PLAYER_PURCHASE_POINTS_G RANTED )
    MaxLevelSP                = #DIVIDE( PLAYER_MAX_PURCHASE_POIN TS_GOOD PLAYER_PURCHASE_POINTS_G RANTED )
    PreferredColor            = R:43 G:150 B:179
    ;StartingBuilding          = LothlorienFortress
   
    ;------------- NO STARTING UNITS FOR YOU -------
 ;   StartingUnit0               = ElvenLorienWarriorHorde ;_StartUnit
  ;  StartingUnitOffset0         = X:-70 Y:220 Z:0
   ; StartingUnit1               = ElvenLorienWarriorHorde ;_StartUnit
    ;StartingUnitOffset1         = X:60 Y:270 Z:0 ;250

    StartingUnitTacticalWOTR    = ElvenLorienWarriorHorde
    StartingUnitTacticalWOTR    = ElvenLorienWarriorHorde
    StartingUnitTacticalWOTR    = ObjectRingkriegStartScri pt

    IntrinsicSciences           = SCIENCE_GOOD
    IntrinsicSciencesMP         = SCIENCE_IMLADRIS ;SCIENCE_ELVES
    SpellBook            = GoodSpellBook
    SpellBookMp            = ImladrisSpellBook ;ElvesSpellBook ;LothlorienSpellBook
    PurchaseScienceCommandSe t    = GoodSpellStoreCommandSet
    PurchaseScienceCommandSe tMP    = ImladrisSpellStoreComman dSet ;ElvesSpellStoreCommandSe t ;LothlorienSpellStoreComm andSet
    DisplayName            = INI:FactionElves
    DefaultPlayerAIType        = ElvesSkirmishAI        ; Needs to exist before I can change it.
    BeaconName            = MultiplayerBeacon
    LightPointsUpSound        = GondorLightPointsUp
    ObjectiveAddedSound        = Gui_MissionObjectiveNew
    ObjectiveCompletedSound        = Gui_MissionObjectiveComp leted
    InitialUpgrades            = Upgrade_ElfFaction    Upgrade_AllFactionUpgrad e  Upgrade_ImladrisFaction  Upgrade_LothlorienFactio n ;Any upgrades this player template is born with.

End

Object BruchtalSchwertkämpferHo rde_Summoned
RemoveModule ModuleTag_LifetimeUpdate
End

Object BruchtalSchwertkämpfer_S ummoned
RemoveModule ModuleTag_LifetimeUpdate
End

Object LothlorienRadagast
RemoveModule ModuleTag_LifetimeUpdate
End

Object BruchtalSchwertkämpferHo rde_Summoned
CommandPoints = 1
End

Object BruchtalSchwertkämpfer_S ummoned
CommandPoints = 1
End

Object BruchtalSchwertkämpferHo rde_Summoned
BuildCost = 60
End

Object BruchtalSchwertkämpfer_S ummoned
BuildCost = 60
End

Object ElvenBarracks
 CommandSet = LothlorienBarracksComman dSetNewName
End

CommandSet LothlorienBarracksComman dSetNewName
InitialVisible = 8
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_StartCitadelSelf Repair     
    7      = Command_ConstructLindonW arriorHorde
    8      = Command_ConstructHeavenW arriorHorde
End     
   
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 26. Feb 2016, 21:56
The button doesn't exist. That's exactly what the error says:
You're referring to a button which hasn't been defined and therefore the game crashes.
Also, if you're defining new buttons they are always black, so they don't have an image, no matter what you do.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 26. Feb 2016, 22:11
The button doesn't exist. That's exactly what the error says:
You're referring to a button which hasn't been defined and therefore the game crashes.
Also, if you're defining new buttons they are always black, so they don't have an image, no matter what you do.

No the boutton is working, the problem is the texture
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 26. Feb 2016, 22:14
Did I ever write that the button wouldn't work? ;)
I wrote that it is black (or invisible), so I wrote exactly what you wrote: The texture doesn't work.

Believe me: I've done enough map.ini coding to know what I'm talking about. :P ( 6 years ago I did my first big map.ini :P (40.000+ lines))
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 26. Feb 2016, 22:28
Did I ever write that the button wouldn't work? ;)
I wrote that it is black (or invisible), so I wrote exactly what you wrote: The texture doesn't work.

Believe me: I've done enough map.ini coding to know what I'm talking about. :P ( 6 years ago I did my first big map.ini :P (40.000+ lines))
Jesus 40k lines XD
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 26. Feb 2016, 22:31
Did I ever write that the button wouldn't work? ;)
I wrote that it is black (or invisible), so I wrote exactly what you wrote: The texture doesn't work.

Believe me: I've done enough map.ini coding to know what I'm talking about. :P ( 6 years ago I did my first big map.ini :P (40.000+ lines))

The button is working perfectly ann his texture also look :
The probleme is not this

(http://zupimages.net/up/16/08/nuct.bmp) (http://zupimages.net/viewer.php?id=16/08/nuct.bmp)
(http://zupimages.net/up/16/08/whuq.bmp) (http://zupimages.net/viewer.php?id=16/08/whuq.bmp)
(http://zupimages.net/up/16/08/yhye.bmp) (http://zupimages.net/viewer.php?id=16/08/yhye.bmp)
(http://zupimages.net/up/16/08/m8do.bmp) (http://zupimages.net/viewer.php?id=16/08/m8do.bmp)
(http://zupimages.net/up/16/08/ir8g.bmp) (http://zupimages.net/viewer.php?id=16/08/ir8g.bmp)

(My problem is not the button, I want change the texture of the armor of the unit in the game  :) )
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 26. Feb 2016, 22:37
Therefore you have to change the whole skin. Via map.ini you can just use another skin, so you can only swap one skin with another, not change a skintake only parts of a skin. on 3rdage is a good tutorial for that.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 26. Feb 2016, 23:08
Therefore you have to change the whole skin. Via map.ini you can just use another skin, so you can only swap one skin with another, not change a skintake only parts of a skin. on 3rdage is a good tutorial for that.

Thank you for your answers fast ! I go to see :)

________________________ ________________________ __

If someone is interested, I've resolved my problem "how to add the transparancy for one tree :

my code :

Zitat
Object TreeShire01

RemoveModule ModuleTag_Opt_01
  ; *** ART Parameters ***
  ;------ This was done because we needed to add fade effect to tree.
;  Draw                  = W3DTreeDraw ModuleTag_Opt_01
;    ModelName = SB_Tree01
;    TextureName = SB_Trees.tga
;
;    DoTopple         = Yes
;    ToppleFX         = FX_ToppleTree
;    BounceFX         = FX_TreeBounce
;    KillWhenFinishedToppling = No
;    SinkDistance     = 9;
;    SinkTime         = DEFAULT_TREE_SINK_TIME
;  End

ReplaceModule ModuleTag_01
  Draw                  = W3DScriptedModelDraw ModuleTag_01New 

  StaticModelLODMode = yes

 
    DefaultModelConditionSta te
      Model             = SB_Tree01
    End

    ModelConditionState = PASSENGER CLUB
      Model = None
    End

    AnimationState = PASSENGER CLUB
      EnteringStateFX = FX_TreeBecomeClub
    End

    AnimationState = PASSENGER
      EnteringStateFX = FX_TreePickUp
    End
   
    ; These are the model conditions and animation states required for trees that can burn. 
    ModelConditionState = BURNED
      Model = SB_Tree01 ; use default nondeath model in place of this.
    End

    AnimationState   = AFLAME ;Currently on fire
      ParticleSysBone     = None FireTreeSmall
      ParticleSysBone     = None TreeEmbers
    End

    AnimationState   = DYING BURNED ;Currently on fire
      ParticleSysBone     = None FireTreeSmall
      ParticleSysBone     = None TreeEmbers
    End
    ; End of stuff required for burn. 

        StaticSortLevelWhileFadi ng = 2
    AlphaCameraFadeOuterRadi us = 600
    AlphaCameraFadeInnerRadi us = 200
    AlphaCameraAtInnerRadius = 10%
  End
End
 
  ;Behavior = FireWeaponCollide ModuleTag_03
  ;  CollideWeapon  = TreeFireDealDamageWeapon
  ;  RequiredStatus = AFLAME       ; I can only fire if I am on fire
  ;End
 
  ; *** DESIGN parameters ***
  DisplayName      = OBJECT:Prop
  EditorSorting    = SHRUBBERY
  CrushableLevel   = 1 ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles

; SupplyOverride = 10 ; This overrides the value in gamedata.ini
   
  ArmorSet
    Conditions      = None
    Armor           = NoArmor
  End

  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)

  ; *** ENGINEERING parameters ***
; KindOf           = SHRUBBERY IMMOBILE CLUB TREE SELECTABLE;
  KindOf           = SHRUBBERY IMMOBILE CLUB SELECTABLE;

  ; Note no SwayBehavior, as this is handled in the W3DTreeBuffer.
AddModule ModuleTag_SEE
    Behavior = SlowDeathBehavior ModuleTag_SEE
        DeathTypes = ALL
        SinkDelay = 1000
        SinkRate = 8     ; in Dist/Sec
        DestructionDelay = 4000
    End
End

AddModule ModuleTag_CMB
    Behavior = CastleMemberBehavior ModuleTag_CMB
    End
End


;  Shadow              = SHADOW_DECAL
  InstanceScaleFuzziness = 0.1
 
End
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 26. Feb 2016, 23:22
Im still having no luck with the command set :/

Object ElvenBarracks
 CommandSet = LothlorienBarracksComman dSetNewName
End

CommandSet LothlorienBarracksComman dSetNewName
InitialVisible = 8
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_StartCitadelSelf Repair     
    7      = Command_ConstructLindonW arriorHorde
    8      = Command_ConstructHeavenW arriorHorde
End     
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 27. Feb 2016, 00:11
Edited
I had not seen the first time but all your code is false I've make a correction

Im still having no luck with the command set :/

Object ElvenBarracks
 CommandSet = LothlorienBarracksComman dSetNewName
End

CommandSet LothlorienBarracksComman dSetNewName
InitialVisible = 8
    1      = Command_ConstructBruchta lSchwertkämpferHorde_Sum moned
    2      = Command_ConstructLothlor ienBerserkerHorde
    3      = Command_ConstructElvenKn ightHorde
    4      = Command_ConstructDorwini onNaturmagier
    5      = Command_ConstructDorwini onWinzer
    6      = Command_StartCitadelSelf Repair     
    7      = Command_ConstructLindonW arriorHorde
    8      = Command_ConstructHeavenW arriorHorde
End   

You must delete the "Summoned" because it doesn't exist in the ini file

New code :

Or if you want continue with the "summoned" you must create his button like it doesn't exist :

New code :


Important : your major problem is the command you must open the "commandbutton.inc" and in this you must search the command than you want use
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 27. Feb 2016, 00:35
Working now so thank you for enduring with me Glorfindel. There is however 1 flaw which is that no upgrades for the unit can be purchased where as they can be if the unit is on the map.

Also one more thing im not sure if this is coding or not but how would i make it so that when you capture a flag a timer will start and after that timer some units will appear?
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 27. Feb 2016, 09:48
This is scriting. Therefore give the flag a name and set a waypoint (this is where the units start) and open the scripting menu in the worldbuilder.
Script 1:

Script conditions:
If Unit 'Flagname' belongs to player 'Playername'
then
Actions if TRUE:
start timer 'Troupsarrive' with 'XXX' seconds

Script 2:
If Timer Troupsarrive is finished
then
spawn units


Spawn units can be different things:
Either you just spawn the units (spawn unit xyz at waypoint 'spawnname').
Or you spawn a whole team. Therefore you go to the team-editor first, go to the player which should get the units and add a new team. Then you can give this team units, f.e. min 1, max 1 Mordorfighterhorde.
Afterwards you say in the script:
Spawn an instance of team 'teamname'.

If you want the units to move in the map you have to additionally set a waypointpath (klick on the spawnpoint with the waypopinttool, hold it and pull the mouse somewhere else. A second waypoint will appear and a red arrow.)
Now you have to name the waypointpath and add as a second action:
Have team/unit follow waypointpath.

or you just add another waypoint and say: move team/unit to waypoint)


They can't get upgrades, because it isn't defined in the inis.^^ You have to add the upgrades to the unit with the inis. I personally would say: Try it yourself, you learn most by doing it yourself^^)
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 27. Feb 2016, 09:59
This is scriting. Therefore give the flag a name and set a waypoint (this is where the units start) and open the scripting menu in the worldbuilder.
Script 1:

Script conditions:
If Unit 'Flagname' belongs to player 'Playername'
then
Actions if TRUE:
start timer 'Troupsarrive' with 'XXX' seconds

Script 2:
If Timer Troupsarrive is finished
then
spawn units


Spawn units can be different things:
Either you just spawn the units (spawn unit xyz at waypoint 'spawnname').
Or you spawn a whole team. Therefore you go to the team-editor first, go to the player which should get the units and add a new team. Then you can give this team units, f.e. min 1, max 1 Mordorfighterhorde.
Afterwards you say in the script:
Spawn an instance of team 'teamname'.

If you want the units to move in the map you have to additionally set a waypointpath (klick on the spawnpoint with the waypopinttool, hold it and pull the mouse somewhere else. A second waypoint will appear and a red arrow.)
Now you have to name the waypointpath and add as a second action:
Have team/unit follow waypointpath.

or you just add another waypoint and say: move team/unit to waypoint)


They can't get upgrades, because it isn't defined in the inis.^^ You have to add the upgrades to the unit with the inis. I personally would say: Try it yourself, you learn most by doing it yourself^^)
Thank you Gnomi 1 more question should the flag be neutral? because for some reason i cant actually capture the flag.
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 27. Feb 2016, 14:08
To capture a flag, there need to be a building right beside it which can be captured. If there is no capturable building the flag can't be captured. (either you make a building capturable or you just place an inn, scale it to 0.01 and z=-1 (or something else so you don't see it) and make it not selectable.
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 28. Feb 2016, 13:04
To capture a flag, there need to be a building right beside it which can be captured. If there is no capturable building the flag can't be captured. (either you make a building capturable or you just place an inn, scale it to 0.01 and z=-1 (or something else so you don't see it) and make it not selectable.
Are these scripts correct
SCRIPT 1
IF
Unit 'White Council' (name of flag) is owned by player_1 *AND* true.
THEN
Null operation(does nothing)
Set timer 'Troupsarrive' to expire in 100 frames.

SCRIPT 2
IF
Timer 'Troupsarrive' has expired.
*AND* True.
THEN
Null operation(does nothing)
Spawn an instance of Team 'Player0001/teamplayer0001' at waypoint 'Council spawn'

Those are what i have and it didnt seem to work when I capped the flag, sorry for all this bother.
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 28. Feb 2016, 13:21
What exactly doesn't work?
Do troups arrive at the wrong time or not at all? Best thing is to upload the map, then I can look at it directly.

Also I wouldn't use the frame timer, but the second timer (a second has about 5 frames).




I think this could be the problem:
Have you used "Add skirmish players"?
If no, then delete your players and DO IT.
"player_1" is probably not the real Player_1 which starts at start point 1. Additionally Player0001 is also not the Player_1.
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 28. Feb 2016, 13:30
Just remove the TRUE and NULL OPERATION commands. They're not required to make the script working.

But, as Gnomi said, you must add the correct Skirmish Players. Furthermore, the reinforcement army should belong to Player_1, but also to a different team (to add it, just click on the button with three guys on the top right corner of the Worldbuilder, select Player_1, and then Add new team. Then, in the bottom part of the window, you can select all the units you want to make them spawn with the team (just ignore the Max tab, because the game will consider just the Min one))

If you have any difficulties I can post a screen of it :)
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 28. Feb 2016, 13:32
Ah thank you and yeah i did add skirmish players i just got confused about whether the reinforcements had to be  a different team or not.
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 28. Feb 2016, 13:34
If I'm not mistaking, "teamPlayer1" should be Player_1's starting units/buildings, so that's why you should make the reinforcements belong to another team :)
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 28. Feb 2016, 13:37
Gnomi i have PM'd you the map because this is confusing me, but one more thing and then all the coding and scripting should be done how would i add Elrond, Arwen, Glorfindel , Elladan and Elrohir to the main keep as recruitable heroes?
And i have been getting a weird effect from the water falls and would it be possible to remove it? here is a link to a video of whats going on: https://drive.google.com/file/d/0By36Hi0bmHWeRWRBQWxxY0E1Vnc/view?usp=sharing
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 1. Mär 2016, 19:58
I tried what you had suggested house and it still isn't working :/ would you like me to send it to you?
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 2. Mär 2016, 00:56
Sure, send it to me. I'll give it a look :)
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 2. Mär 2016, 08:58
Sorry I haven't answered you. I have a lot to do and completely forgot it. :P If DrHouse has more time, then just sent it to him.^^
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 2. Mär 2016, 09:17
Sorry I haven't answered you. I have a lot to do and completely forgot it. :P If DrHouse has more time, then just sent it to him.^^
no problem Gnomi :) but I was wondering how would I make heroes recruitsble from the Elvenbarracks?
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 2. Mär 2016, 10:23
Which heroes you want to make recruitable from the Elven Barracks?
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 2. Mär 2016, 16:24
Which heroes you want to make recruitable from the Elven Barracks?
elrond, glorfindel,arwen and elronds sons. Also did you get my link to the map?
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 2. Mär 2016, 17:34
I got it. I'll give it a look after^^
Titel: Re: Coding in Edain 4.00
Beitrag von: Thorin King under the Mountain am 3. Mär 2016, 01:36
I did the same thing for a dwarvenbuilding today and it worked perfectly. Im not sure if it might help u for elvenbuildings but i could give u a short instruction how i did it. First u need to go to data/ini... then u search "playertemplate" open the first document. Then u look for the faction u want to add the heroes so lets say elves, press Ctrl + F to search for "PlayerTemplate FactionElves" there u ll find this:
PlayerTemplate FactionElves
    Side                      = Elves
    PlayableSide              = Yes       ; Please note: the presence of "SIDE:Elves" in the string file is what makes this appear in MP as a playable side.  And the skirmish scripts are what actually make it function.
    Evil                      = No
    StartMoney                = 0
    MaxLevelMP                = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_DEFAULT PLAYER_PURCHASE_POINTS_GRANTED )
    MaxLevelSP                = #DIVIDE( PLAYER_MAX_PURCHASE_POINTS_GOOD PLAYER_PURCHASE_POINTS_GRANTED )
    PreferredColor            = R:43 G:150 B:179
    ;StartingBuilding          = LothlorienFortress
   
    ;------------- NO STARTING UNITS FOR YOU -------
    StartingUnit0               = ElvenLorienWarriorHorde ;_StartUnit
    StartingUnitOffset0         = X:-70 Y:220 Z:0
    StartingUnit1               = ElvenLorienWarriorHorde ;_StartUnit
    StartingUnitOffset1         = X:60 Y:270 Z:0 ;250

    StartingUnitTacticalWOTR    = ElvenLorienWarriorHorde
    StartingUnitTacticalWOTR    = ElvenLorienWarriorHorde
    StartingUnitTacticalWOTR    = ObjectRingkriegStartScript

    IntrinsicSciences           = SCIENCE_GOOD
    IntrinsicSciencesMP         = SCIENCE_ELVES
    SpellBook                   = GoodSpellBook
    SpellBookMp                 = ElvesSpellBook_MapMirkwood
    PurchaseScienceCommandSet   = GoodSpellStoreCommandSet
    PurchaseScienceCommandSetMP = ElvesSpellStoreCommandSet_MapMirkwood
    DisplayName                 = INI:FactionElves
    DefaultPlayerAIType         = ElvesSkirmishAI        ; Needs to exist before I can change it.
    BeaconName                  = MultiplayerBeacon
    LightPointsUpSound          = GondorLightPointsUp
    ObjectiveAddedSound         = Gui_MissionObjectiveNew
    ObjectiveCompletedSound     = Gui_MissionObjectiveCompleted
    InitialUpgrades             = Upgrade_ElfFaction  Upgrade_LothlorienFaction  Upgrade_AllFactionUpgrade        ; 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        = CreateAHero RohanFrodo_mod RohanSam_mod LothlorienRumil LothlorienHaldir LothlorienCeleborn LothlorienGaladriel LothlorienTauriel LothlorienLegolas GasthausGrimbeorn ElvenThranduil_mod
    BuildableRingHeroesMP        = RingHeroDummy
    SpellStoreCurrentPowerLabel     = APT:SpellStoreCurrentEvenstarPower
    SpellStoreMaximumPowerLabel     = APT:SpellStoreMaximumEvenstarPower
    ResourceModifierObjectFilter     = RESOURCE_MODIFIER_OBJECT_FILTER
    ResourceModifierValues        = 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100
    MultiSelectionPortrait        = UPElvenArmy
    LoadScreenMusic            = Shell2MusicForLoadScreenLothlorien ;Shell2MusicForLoadScreen
End

The BuildableHeroesMP Define which heroes u can build at all in the whole game i think. That means You have to add a commandset of ~"RevivableRinghero" CaHReviveSlot "FakeheroReviveslot" and  "GenericReviveSlot". Generic with a numer means u can see the buildable hero, fakeHeroRS means u cannot see it but exists i think. So u just Check in BuildableHeroesMP which hero u want to build and give them their correspondent number but u dont count the Create A Hero and ringhero ( not sure about this), so u just start with the real hero in this case it should be LothlorienHaldir with number 1

CommandSet LothlorienCastleBaseKeepCommandSet_MapMirkwood2
    InitialVisible = 11

    1      = Command_ConstructElvenLorienWarriorHorde
    2      = Command_ConstructElvenLorienArcherHorde
    3      = Command_ConstructElvenLorienPikemanHorde
    4      = Command_ConstructLothlorienSängerinnen
    5      = Command_ConstructLothlorienGaladhrimHorde
    6      = Command_ConstructLothlorienCarasGuardHorde
    7      = Command_ConstructMirkwoodWächterPfadeHorde
    8      = Command_ConstructDwarvenKhazadVeteranenHorde
    9      = Command_RingMechanikLothlorien
    10     = Command_SelectRevivablesLothlorienCastleKeepHeroes_MapMirkwood
    11     = Command_StartCitadelSelfRepair

    12     = Command_FakeRingHeroReviveSlot
    13     = Command_CreateAHeroReviveSlot
    14     = Command_FrodoRingHeroReviveSlot
    15     = Command_SamRingHeroReviveSlot
    16     = Command_HaldirsBrüderGenericReviveSlot
    17     = Command_GenericReviveSlot1
    18     = Command_GenericReviveSlot2
    19     = Command_GenericReviveSlot3
    20     = Command_FakeHeroReviveSlot5
    22     = Command_FakeHeroReviveSlot6
    23     = Command_FakeHeroReviveSlot7
    24     = Command_FakeHeroReviveSlot8
    25     = Command_RadialBack
End

So that means if u want him in the building write GenericReviveSlot, if not u just write FakeHeroReviveSlot like in the codeexample.

I hope it wasnt too confusing because i just got one map. ini on this pc (I think it was your map.ini from Woodlandrealm)
P.S ignore the KhazadVeteranen, i changed it for a custom map

Regards :)
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 3. Mär 2016, 14:58


Why my map.ini is not working ? (I want change the texture of the object ")

Zitat
Object BlueMtnMountainLarge

ReplaceModule  ModuleTag_01
    Draw = W3DScriptedModelDraw ModuleTag_01HA
RandomTexture = tstone_edain3.tga
      DefaultModelConditionSta te
        Model = BB_mountainl
      End
   
    AlphaCameraFadeOuterRadi us = 500
    AlphaCameraFadeInnerRadi us = 250
    AlphaCameraAtInnerRadius = 0%
    End
End

    KindOf                = IMMOBILE UNATTACKABLE INERT IGNORED_IN_GUI BASE_FOUNDATION HIDE_IF_FOGGED  ; note: INERT is important otherwise things will collide...
  End
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 3. Mär 2016, 15:13
You need to write two things there:
The old texture which is replaced and the new texture. You've only written one thing.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 3. Mär 2016, 16:22
Thank you !  ;)
Where can I find the texture name of the "Object BlueMtnMountainLarge" ?
Titel: Re: Coding in Edain 4.00
Beitrag von: Gnomi am 3. Mär 2016, 18:26
Open the object with something like the 23d viewer and then look for the used skins.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 13. Mär 2016, 15:45
Thank you !  ;)
________________________ _________

I have a very little question, help me please :
How can I change the name of a units with the map.ini ?
Titel: Re: Coding in Edain 4.00
Beitrag von: Prinz von Dol Amroth am 13. Mär 2016, 18:08
If you want to change its description, you have to create a new String in your map.str and override the references of the strings in your Object with the name of your new String (DisplayName = OBJECT:NewName ,...).
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 28. Mär 2016, 19:14
How do i make it so that all player start with 99 power points?
Titel: Re: Coding in Edain 4.00
Beitrag von: Prinz von Dol Amroth am 28. Mär 2016, 20:33
data\ini\rank.ini
Rank 1
[...]
SciencePurchasePointsGra nted =
End
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 29. Mär 2016, 15:06
data\ini\rank.ini
Rank 1
[...]
SciencePurchasePointsGra nted =
End
It crashes my game when I put that line into the map.ini
Titel: Re: Coding in Edain 4.00
Beitrag von: Prinz von Dol Amroth am 29. Mär 2016, 16:09
What is your code you have add to your map.ini?

This works definitly :
Rank 1
    SkillPointsNeededDefault        = 0
    SkillPointsNeededCampaign       = 0
    SciencePurchasePointsGranted    = 99
End
Titel: Re: Coding in Edain 4.00
Beitrag von: calsash am 29. Mär 2016, 16:53
What is your code you have add to your map.ini?

This works definitly :
Rank 1
    SkillPointsNeededDefault        = 0
    SkillPointsNeededCampaign       = 0
    SciencePurchasePointsGranted    = 99
End
That code worked, thanks  :)
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 29. Apr 2016, 02:16
I'm trying to give to Mordor Archers their fire arrows, but granted by another upgrade (in this case, IsengardFireArrows, since the Mordor one doesn't work on the mission map I'm working on even if I put an Arsenal with the Influence of Sauron out-of-map). This is the code I'm using, which grants to Mordor Archers the visual effect only, but not the actual upgrade:

What am I getting wrong?
(Also, I've being already capable of giving them the Isengard banner, rather than the Mordor one, so I really don't understand why it's not working for Fire arrows)
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 29. Apr 2016, 08:53
The problem is that the WeaponSetUpgrade  is just a fake one, which has no effect. The actual effect of the fire arrow upgrade is defined in the weapon itself, which can't be changed.

My suggestion would be to just grant the unit the normal upgrade when it gets your upgrade.
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 29. Apr 2016, 11:20
Damn, I hate these stupid engine limitations >_>
Btw, I tried also in a different way. I used a code on the map like this:

* IF *
Player_1 has purchased the upgrade Upgrade_TechnologyMordorFireArrows
* THEN *
Give unit "Arsenal" (An actual Arsenal of Mordor placed out-of-map) this upgrade "Upgrade_PlantShield" (which should be the upgrade granted to it by the Influence of Sauron, thus unlocking Fire arrows for Orc Archers)

However, that doesn't work, as well. The faction set to be used is Isengard, maybe that is the reason?
Titel: Re: Coding in Edain 4.00
Beitrag von: DrHouse93 am 11. Mai 2016, 14:30
How can I make a building's rubble to stay on the battlefield when they're supposed to vanish? (so the player can click on it and rebuild the building)

EXAMPLE:

I've managed to use the Gondor Border Stronghold as a citadel for a map I'm working on. However, once destroyed, you can't rebuild it. How can I make its rubble stay on the battlefield (like for Helm's Deep's Arcade, or Minas Tirith's Citadel), rather than disappearing? (so the player can click on it and rebuild the fortress)

EDIT: I tried with:
Zitat
ReplaceModule ModuleTag_08
    Behavior                  = StructureCollapseUpdate ModuleTag_08NEW
        MinCollapseDelay        = 000
        MaxCollapseDelay        = 000
        CollapseDamping         = .5
        MaxShudder              = 0.6
        MinBurstDelay           = 250
        MaxBurstDelay           = 800
        BigBurstFrequency       = 4
        FXList                  = INITIAL   FX_FortressCollapse
        ;FXList                  = ALMOST_FINAL  FX_FortressCollapse
        DestroyObjectWhenDone    = No  #It was 'Yes' originally
        CollapseHeight            = 155
    End
  End

  AddModule
    Behavior = KeepObjectDie ModuleTag_IWantRubble
      DeathTypes = ALL
    End
  End

but it didn't work
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 3. Jul 2016, 08:54
Edited*

Hi, I've a problem with the fire arrow upgrade :
When I make the fire arrow of a faction granted by the upgrade fire arrow of another faction the damage upgrade and the fire on the arrow working but not the annimation, the units continue to shoot normal arrow.
(I've seen the post above but this is not the same problem)

Can you help me please, this is my code :



And also, how can I delete the banner carrier of a unit ?
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 3. Jul 2016, 09:20
That isn't the animation, but the weapon. There the actual damage and the used projectile are defined.

If you want to delete the Banner Carrier of a horde you have change the behaviour of the horde, where the contained units are defined.
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 7. Jul 2016, 15:45
Thank you !  :)



Hi ! I want use the texture "chra_du_02" but the housecolor is enabled for this texture.
Can you say me how to delete the housecolor for her ?
I've find this code but I don't know how it work.

Zitat
HouseColor
    BaseTexture     = CHRA_DU_02.tga
    HouseTexture = HC_CHRA_DU_02.tga
End

(This is for a map.ini)



Problem ending ! it was enough to replace the texture 2 by the original like that:
Zitat
HouseColor
BaseTexture = CHRA_DU_02.tga
HouseTexture = CHRA_DU_02.tga
End
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 24. Okt 2016, 23:39
Hi I've a problem:
I want that this unit start with his sword and not his bow, I've this code how can I proceed please?

Zitat
    WeaponSet
        Conditions = None
        Weapon = PRIMARY    FaramirBow
        AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    End
    WeaponSet
        Conditions = WEAPONSET_TOGGLE_1        ;CLOSE_RANGE CONTESTING_BUILDING
        Weapon = PRIMARY    FaramirSword
        AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
    End
Titel: Re: Coding in Edain 4.00
Beitrag von: Fredius am 25. Okt 2016, 00:04
Perhaps switching places of FaramirBow and FaramirSword?
Titel: Re: Coding in Edain 4.00
Beitrag von: Glorfindel23 am 25. Okt 2016, 00:24
I've try but this does not change the animations :/
Titel: Re: Coding in Edain 4.00
Beitrag von: lord_ellessar am 17. Nov 2016, 09:42
I have made new texture for the dwarven buildings and I would like to make that when you select a faction, every buildings of the faction take this skin, problem, when I make the code for the object it doesn't work

(I made it for a submod and the files look like they can't find the texture, it's not pink but it does nothing, I have putted it with the upgrade Langbarte buuuut well, can someone help me please ^^ )
Titel: Re: Coding in Edain 4.00
Beitrag von: Tukolp am 13. Mär 2017, 02:23
Hello

Could you help me with my commandset ?
I want to add one or two additional commands, but I can't place them without replacing my original ones, I tried many numbers but something is awlays missing.
I want to a command to construck a builder and another for "delete building" to  the castlekeep.


My second question is about the system in Edain now castles, camps, settlements.
I want to restore the startingbuilding system. Can you explain how should I do that ? and how to connect a new fortress made by me to the game ?
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 21. Mär 2017, 11:30
Just adding the buttons at positions 5 and 6 should work without problems, because they are unoccupied and in the InitialVisible range. Else I don't see much room, because 32 is the maximal possible number of buttons.
I would make the buttons in an increasing order. For sets without InitialVisible the buttons are communtative, but it might be not the case for sets with InitialVisible.

To remove the capturable objects, you have to edit the maps, or just use original maps from the base game, where there aren't the new capturable objects. To get your fortress as a starting building, you have to reference it in the playertemplate "StartingBuilding = ". This object should be one that unpacks a base in a similar way that castles are unpacked.
Titel: Re: Coding in Edain 4.00
Beitrag von: Tukolp am 21. Mär 2017, 12:01
Thanks for your answer, I will try it out.

I have another fast question.
I placed farm templtes on a map, and added the ai porter the MordorSlaughterHouse_Ext ern object, but it's not building it. The builder is okay with all of the structures in the base, But I can't make the AI build farms, on farm templates with builders.
I placed farmteplate in neutralstructures. But something is still missing.

If someone knows it, Please help,
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 21. Mär 2017, 12:48
I don't know if that helps, but maybe it has to be defined in this list in the playertemplate.ini:
#define RESOURCE_MODIFIER_OBJECT_FILTER
Titel: Re: Coding in Edain 4.00
Beitrag von: Tukolp am 22. Mär 2017, 09:46
Thanks for the help, but it not solwed my problem.

I instered objects to my #define RESOURCE_MODIFIER_OBJECT _FILTER in playertemplate.
+MordorSlaughterHouse_Extern  and +MordorSlaughterHouse and the AIbuilder has these two also.

I also inserted this to skirmishaidata.ini :

   EconomyBuilderMinFarmsOw ned = 4
   EconomyBuilderMinMoney = 400 ;300
   EconomyBuilderPerFarmVal ue = 70
   EconomyBuilderPerSecPrio rityIncreaseBase = 30.0
   EconomyBuilderMinTimeBet weenFarms_Rush = 15.0f;   

and this

AIEconomyAssigment  MordorSlaughterHouse ;FarmTemplate MordorSlaughterHouse_Ext ern MordorLager
TemplateName =  MordorSlaughterHouse ;MordorSlaughterHouse_Ext ern FarmTemplate
End   

But still no luck, the porters are building the base, but not a single farm.

If anyone knows how to solve this, how to allow the builder to build edain 4.4.1's slaughterhouses on FarmTemplates from maps please help me. This is the last thing I need to make them work.
Titel: Re: Coding in Edain 4.00
Beitrag von: FG15 am 22. Mär 2017, 10:09
Zitat
AIEconomyAssigment  MordorSlaughterHouse ;FarmTemplate MordorSlaughterHouse_Ext ern MordorLager
TemplateName =  MordorSlaughterHouse ;MordorSlaughterHouse_Ext ern FarmTemplate
End   

Guess that is the code which is due for the farms.
But you added the normal SlaughterHouse, but not the Extern one.
Titel: Re: Coding in Edain 4.00
Beitrag von: Tukolp am 22. Mär 2017, 13:07
I modifed them to this :

AIEconomyAssigment MordorSlaughterHouse_Ext ern
   TemplateName = MordorSlaughterHouse_Ext ern
End   

and my playertemplate :
#define RESOURCE_MODIFIER_OBJECT _FILTER ANY +MordorSlaughterHouse_Extern

Also the builder has the  _extren one

Still no farms :'(
Titel: Re: Coding in Edain 4.00
Beitrag von: Tukolp am 27. Mär 2017, 10:01
Changing this command solved my problem:
    DisableBaseBuilding        = No
    DisableEconomyBuilding    = No ;Yes <------
    DisableUnitBuilding        = No
    DisableScienceUpgrading = No
    DisableUnitUpgrading    = No
    DisableTacticalAI        = No
    DisableTeamBuilding        = No
    DisableWallBuilding        = Yes

One problem solven, and another came :D

Now the AI builds the slaughterhouses, but sometimes duplicates them, near each other. Why ?