29. Mär 2024, 15:18 Hallo Gast.
Willkommen Gast. Bitte einloggen oder registrieren. Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge. Hierbei werden gemäß Datenschutzerklärung Benutzername und Passwort verschlüsselt für die gewählte Dauer in einem Cookie abgelegt.


Select Boards:
 
Language:
 


Autor Thema: Adding bubble shield to Saruman and glowing staff?  (Gelesen 1912 mal)

DropItLikeItsDogg

  • Bilbos Festgast
  • *
  • Beiträge: 19
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

  • Administrator
  • Ringträger
  • *****
  • Beiträge: 5.678
  • German, Motherfucker! Do you speak it?
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #1 am: 31. Aug 2022, 23:24 »
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

  • Bilbos Festgast
  • *
  • Beiträge: 19
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #2 am: 1. Sep 2022, 18:05 »
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

  • Administrator
  • Ringträger
  • *****
  • Beiträge: 5.678
  • German, Motherfucker! Do you speak it?
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #3 am: 2. Sep 2022, 10:45 »
Ok, so step by step. This is the code for the ability that you need to copy to Saruman's .ini:

;-----------------------------------------------------
; 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

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

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:     8    = Command_GandalfShieldBubbleEdainWith 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

  • Bilbos Festgast
  • *
  • Beiträge: 19
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #4 am: 3. Sep 2022, 14:38 »
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 ?

Elendils Cousin 3. Grades

  • Administrator
  • Ringträger
  • *****
  • Beiträge: 5.678
  • German, Motherfucker! Do you speak it?
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #5 am: 4. Sep 2022, 12:12 »
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 ?
Yes. The heroes you add in the playertemplate need their own GenericReviveSlot. Which slot they need depends on their spot on the list: If they are the third hero, they will use the third spot; if they are the fifth hero, they will use the fifth spot and so on. It will be easiest to add them at the end of the list and then add three more GenericReviveSlots to the end of the commandset of your fortress.

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?
It seems like it^^
The autoability is responsible for automatically triggering the bubble, this part here:
    Behavior = AutoAbilityBehavior ModuleTag_AutoAbilitySpecialPowerShieldBubble
        SpecialAbility               = SpecialPowerShieldBubbleEdain
        StartsActive                 = Yes
        MaxScanRange                 = 50
        Query                        = 1 ANY ENEMIES +MONSTER +HERO
    End
Make sure there is no other code interfering with it.

DropItLikeItsDogg

  • Bilbos Festgast
  • *
  • Beiträge: 19
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #6 am: 4. Sep 2022, 16:53 »
Here are the codes. I really can't see anything wrong, can you? The bubble only appears when I throw a fireball on top of the citadel, which is strange.  :D And it appears like 1-2 minutes then disappear until the next fireball.




Elendils Cousin 3. Grades

  • Administrator
  • Ringträger
  • *****
  • Beiträge: 5.678
  • German, Motherfucker! Do you speak it?
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #7 am: 5. Sep 2022, 17:47 »
Assuming you are modding Edain, you are editing the wrong commandset.

DropItLikeItsDogg

  • Bilbos Festgast
  • *
  • Beiträge: 19
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #8 am: 6. Sep 2022, 19:57 »
I also tried to edit commandset.inc but it always restarts when I open the game. How can I save the changes I've made? Sorry for too many questions, I searched but I couldn't.

Elendils Cousin 3. Grades

  • Administrator
  • Ringträger
  • *****
  • Beiträge: 5.678
  • German, Motherfucker! Do you speak it?
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #9 am: 6. Sep 2022, 23:19 »
What are you using to mod the game? You can use Notepad++ to edit .inc files.

1) Extract the .big file into a folder.
2) Change stuff.
3) Save them as a new .big file.
4) Replace the old .big with the new one.

DropItLikeItsDogg

  • Bilbos Festgast
  • *
  • Beiträge: 19
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #10 am: 7. Sep 2022, 12:05 »
Thanks! It worked. :)

Elendils Cousin 3. Grades

  • Administrator
  • Ringträger
  • *****
  • Beiträge: 5.678
  • German, Motherfucker! Do you speak it?
Re: Adding bubble shield to Saruman and glowing staff?
« Antwort #11 am: 7. Sep 2022, 15:20 »
Happy to help :)