[en] - Modding Corner > General Modding Questions

Adding bubble shield to Saruman and glowing staff?

(1/3) > >>

DropItLikeItsDogg:
Greetings, I'm not into modding things, and also I play the game singleplayer, so can someone explain me how can I add Gandalf's bubble shield to Saruman? I want it to be active automatically like Gandalf's, not a button. And how can I make Saruman's staff glow after a strike? I tried some but I couldn't manage. Thanks already for your help.

Elendils Cousin 3. Grades:
What did you try so far? It would be very helpful to know how experienced you are to be able to give you some pointers.

DropItLikeItsDogg:
Like I said I'm not experienced in those things. I tried gandalf.ini bubble shield code copy
to saruman.ini, but it didn't work. I searched commandset, and special powers etc. but I couldn't manage. As for the glowing staff, I didn't do anything, I just wanted to know is it possible or not and how. Also can you help me adding a hero to another faction if it is possible?  :)

Elendils Cousin 3. Grades:
Ok, so step by step. This is the code for the ability that you need to copy to Saruman's .ini:


--- Code: ---;-----------------------------------------------------
; Automatische Lichtsphere (Ohne Ring) aus Sum1
;-----------------------------------------------------

    Behavior = SpecialPowerModule ModuleTag_ShieldBubbleStarter
        SpecialPowerTemplate         = SpecialPowerShieldBubbleEdain ;aus Sum1
        UpdateModuleStartsAttack     = No
        AttributeModifier            = GandalfShieldBubbleBonusEdain ;aus Sum1
        AttributeModifierRange       = 1
        AttributeModifierAffectsSelf = Yes
        AttributeModifierAffects     = ANY +CAVALRY +INFANTRY
        SetModelCondition            = ModelConditionState:USER_3
        SetModelConditionTime        = 2.5
    End
   
    Behavior = SpecialAbilityUpdate ModuleTag_ShieldBubbleUpdate             
        SpecialPowerTemplate         = SpecialPowerShieldBubbleEdain
        UnpackTime                   = 0
        PreparationTime              = 0.1
        PackTime                     = 0.15
        AwardXPForTriggering         = 0
    End

    Behavior = AutoAbilityBehavior ModuleTag_AutoAbilitySpecialPowerShieldBubble
        SpecialAbility               = SpecialPowerShieldBubbleEdain
        StartsActive                 = Yes
        MaxScanRange                 = 50
        Query                        = 1 ANY ENEMIES +MONSTER +HERO
    End

    Behavior = SpecialPowerModule ModuleTag_Leadership
        SpecialPowerTemplate         = SpecialAbilityFakeLeadership
        UpdateModuleStartsAttack     = No
        StartsPaused                 = No
    End
--- Ende Code ---

If you want Saruman to also get the visual indicator (the white bubble around him), you need to also copy the W3DScriptedModelDraw module. You can see in the code above that the ability uses the ModelCondition USER_3, so we look for that in Gandalf's ini and find this:

--- Code: ---    Draw = W3DScriptedModelDraw ModuleTag_ShieldBubble
        DefaultModelConditionState
            Model = None
        End
        ModelConditionState = USER_3
            Model = GUGANDALFCRSTL
            ParticleSysBone     = ROOTTRANSFORM GandalfCrystalSphere FollowBone:Yes
            ParticleSysBone     = ROOTTRANSFORM GandalfBeamGlow2 FollowBone:Yes
        End
    End
--- Ende Code ---

Copy this as well. The ParticleSysBone you see at the bottom are the FX.
In the last step, add a commandbutton to Saruman's commandset - you can once again simply copy one from Gandalf's commandset:
--- Code: ---    8    = Command_GandalfShieldBubbleEdain
--- Ende Code ---
With that, Saruman should be good to go.


If you want to add a hero to another faction, simply add him to the list BuildableHeroesMP of the new faction in the playertemplate.ini. You might have to add GenericReviveSlots to the commandset of the fortress in order to recruit the hero. As long as you don't exceed the limit (our dwarves in Edain are at the limit, for example), this is relatively simple.

Good luck!

DropItLikeItsDogg:
I added those to Saruman.ini but the bubble only activates when I throw a fireball on top of the citadel to enemy. I want it to be activated automatically like Gandalf's. Am I doing something wrong? And, I added 3 heroes to Imladris, but they disappear and come back time to time in the buildings. Heroes replaces heroes in buildings and change again. Is that about GenericReviveSlots ?

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln