Modding Union

[en] - Modding Corner => Coding => Thema gestartet von: jiraiyathegallent am 8. Nov 2015, 12:45

Titel: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 12:45
Please someone help I'm a beginner and I want to add command_specialAbilityEr innerungenTelperion to gandalfs commandset I've given him a new command set which shows in game but when I click it nothing happens. It doesn't even use the ability if someone could tell me the ini file I need or if someone can give me the code to add it to someone I'd MAJORLY appreciate it
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:02
It's only for a map I'm not quite sure what to do there
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 14:06
so you just want to have the commandset for the gandalf in a specific map?
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:08
Yeah  :)
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 14:13
if i'm not mistaken the spell is from galadriel? so you have to put the code for it into the gandalf.ini and did you create a new gandalf or just a new commandset for him?
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:17
It is indeed from galadrial and no I just made a new command set
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 14:22
you always need the code in the hero.ini otherwise you can't activate them that's what i experienced.

and for the commandset, go into the map.ini of the map and put this code inside

For example :

Object GondorGandalf
    CommandSet = GondorGandalfCommandset_ YourMap
END

and it should work
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:33
Where would I find the hero.ini ? Also is this what I write for the command set ?
Object GondorGandalf
    CommandSet = GondorGandalfCommandset_ BOTFA Dol Guldur Misson
END
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 14:39
which gandalf did you take? i mean what's the name of the object you used? GondorGandalf_mod?
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:40
Yeah I just accidentally didnt add the _mod to the reply
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 14:42
y then this one should work :D

about the hero.ini = gandalf.ini there you have to add the  code for the galadriel  spell
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:45
Thank you for your time. so do I just copy all of the gandalf.ini in to the map.ini?
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 14:48
no dude,

you have to copy the code wich is in the galadriel.ini


    Behavior = UnpauseSpecialPowerUpgra de ModuleTag_ErinnerungEnab ler
        SpecialPowerTemplate       = SpecialAbilityErinnerung anTelperion
        TriggeredBy                = Upgrade_Level_5
        ObeyRechageOnTrigger       = Yes
    End

    Behavior = SpecialPowerModule ModuleTag_ErinnerungStar ter       
        SpecialPowerTemplate       = SpecialAbilityErinnerung anTelperion
        UpdateModuleStartsAttack   = Yes
        StartsPaused               = Yes
        ;InitiateSound              = GandalfWordofPowerVoice
    End

    Behavior = WeaponFireSpecialAbility Update ModuleTag_ErinnerungWeap onFireUpdate   
        SpecialPowerTemplate       = SpecialAbilityErinnerung anTelperion
        WhichSpecialWeapon         = 1
        SkipContinue               = Yes
        UnpackTime                 = 1700
        PackTime                   = 1   
        FreezeAfterTriggerDurati on = 2500 ; Hold AI for this long after we fire.       
        AwardXPForTriggering       = 0       
        StartAbilityRange          = 80.0       
        SpecialWeapon              = ErinnerunganTelperionWea pon
    End

    Behavior = AutoAbilityBehavior ModuleTag_ErinnerungAuto Ability
        SpecialAbility             = SpecialAbilityErinnerung anTelperion
        MaxScanRange               = 80
        Query                      = 3 ANY +HORDE +MACHINE ENEMIES
        Query                      = 1 ANY +HERO +MONSTER NOT_FLYING_UNITS
    End

into the gandalf.ini then you should be able to use the spell with gandalf :D
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:53
How do I add that to the gandalf ini?
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 14:55
Do I make a separate ini in the maps folder so it would be gandalf.ini and map.ini?
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 14:56
the gandalf ini is in data/ini/object/goodfactions/units
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: Prinz von Dol Amroth am 8. Nov 2015, 14:58
If you only want your changes for one map, than you have to work with map.ini and not with gandalf's ini.
Object GondorGandalf_mod
AddModule
    Behavior = UnpauseSpecialPowerUpgra de ModuleTag_ErinnerungEnab ler
        SpecialPowerTemplate       = SpecialAbilityErinnerung anTelperion
        TriggeredBy                = Upgrade_Level_5
        ObeyRechageOnTrigger       = Yes
    End

    Behavior = SpecialPowerModule ModuleTag_ErinnerungStar ter       
        SpecialPowerTemplate       = SpecialAbilityErinnerung anTelperion
        UpdateModuleStartsAttack   = Yes
        StartsPaused               = Yes
        ;InitiateSound              = GandalfWordofPowerVoice
    End

    Behavior = WeaponFireSpecialAbility Update ModuleTag_ErinnerungWeap onFireUpdate   
        SpecialPowerTemplate       = SpecialAbilityErinnerung anTelperion
        WhichSpecialWeapon         = 1
        SkipContinue               = Yes
        UnpackTime                 = 1700
        PackTime                   = 1   
        FreezeAfterTriggerDurati on = 2500 ; Hold AI for this long after we fire.       
        AwardXPForTriggering       = 0       
        StartAbilityRange          = 80.0       
        SpecialWeapon              = ErinnerunganTelperionWea pon
    End

    Behavior = AutoAbilityBehavior ModuleTag_ErinnerungAuto Ability
        SpecialAbility             = SpecialAbilityErinnerung anTelperion
        MaxScanRange               = 80
        Query                      = 3 ANY +HORDE +MACHINE ENEMIES
        Query                      = 1 ANY +HERO +MONSTER NOT_FLYING_UNITS
    End
End
End
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: noTenshiNei am 8. Nov 2015, 15:01
oh yes that's right sorry that was my mistake
Titel: Re: PLEASE SOMEONE HELP
Beitrag von: jiraiyathegallent am 8. Nov 2015, 15:08
THANK YOU BOTH SO MUCH. I had been stumped for ages finally my map is complete  xD and now I know what to do for adding abilities to heroes I can't thank u guys enough  :D :D