[en] - Modding Corner > Coding

Coding in Edain 4.00

<< < (12/23) > >>

Glorfindel23:

--- Zitat von: calsash am 26. Feb 2016, 21:15 ---
--- Zitat von: Glorfindel23 am 26. Feb 2016, 21:02 ---
--- Zitat 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. :)

--- Ende Zitat ---

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

--- Ende Zitat ---
Thanks glorfindel but im struggling to understand where the issue for me is this code is like another language for me :'D

--- Ende Zitat ---


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   
--- Ende Zitat ---

________________________ _________________

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


--- Ende Zitat ---

calsash:
Well i tried the code you said and i got this error :/


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     
   
--- Ende Zitat ---

Gnomi:
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.

Glorfindel23:

--- Zitat 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.

--- Ende Zitat ---

No the boutton is working, the problem is the texture

Gnomi:
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))

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln