Jump to content

[LE] Creating actual Werebear mod?


lycanthropus

Recommended Posts

So, whenever I see a "werebear mod", it always turns out to be a werewolf skin/model replacer or an alternate skin in the mcm menu. You simply get a creature that looks like a werebear, but with certain mods installed, may sound like a werewolf, and bears still attack you like always. Out of curiosity, I went snooping around in the creation kit, and found that the werebear beast form, and the effect that comes with it, is seperate from the werewolf's

 

Theoretically, would it be possible to create a disease that grants the vanilla werebear form and maybe an additional, customized "beast blood" effect that grants frost resistance? and if it is possible, how would I go about doing it and where would I start?

Link to comment
Share on other sites

Those mods do that because they wanted to take a shortcut. Nothing wrong with that - doing it the 'long' way involves more work.

 

It's possible 100%.

 

You can start with the PlayerWerewolfChange quest, well more importantely the script.

 

Basically studying the entire werewolf framework, and using it as the basis for creating your own werebear framework.

Link to comment
Share on other sites

Those mods do that because they wanted to take a shortcut. Nothing wrong with that - doing it the 'long' way involves more work.

 

It's possible 100%.

 

You can start with the PlayerWerewolfChange quest, well more importantely the script.

 

Basically studying the entire werewolf framework, and using it as the basis for creating your own werebear framework.

 

Thanks, I tried taking a look at that. I tried to duplicate it with less than stellar results. It seems, at least at first glance, that it's dependent on the companions quest-line. I'm still a bit new to "modding", in the sense that I've never modified scripts or complex things before, so any help is appreciated. All I've done so far is created a player werebear faction and edited the regular werebear faction a bit.

Link to comment
Share on other sites

First of all, the companions quest is not even needed. Beth did that as a wall of sorts to force people to start the quest, but you can just strip out the portion of that script or simply copy the script and make adjustments and it would not conflict with the vanilla quest at all, especially since the Werebear form was not intended to be used by the player.

 

As a starting point to get a grasp of the framework, start here:

 

The spell to transform NPCs is: DLC2WerebearChangeFX

The magic effect associated with that is: DLC2WerebearChangeFXEffect

The script attached is: WerewolfTransformVisual

 

It's simply the vanilla werewolf script, adjusted to transform the NPC into a werebear. I have rewritten it though to make it more fitting for werebear.

 

 

Scriptname WerebearTransformVisual extends ActiveMagicEffect

Armor property DLC2ArmorFXWearbearTransitionSkin auto
{ the skin the actor is going to "morph" into. }

Race property DLC2WerebearBeastRace auto

VisualEffect property BloodSprayWerewolfEatEffect auto
{ the blood splatter that occurs when you use feed. }

Idle property IdleWerewolfTransformation auto
{ There is no idle for werebears so beth stuck with the werewolf one. }

; No sounds made for werebear, so beth stuck with the werewolf ones.
Sound property NPCWerewolfTransformation auto
Sound Property NPCWerewolfTransformationB2D auto
Sound Property NPCWerewolfTransformationB3D auto

; reserve this spot for a werebear quest

Event OnEffectStart(Actor akTarget, Actor akCaster)
    if ((akTarget.GetBaseObject() as Actor).GetRace() != DLC2WerebearBeastRace)
        ; add the "morphing" skin
        akTarget.equipItem(DLC2ArmorFXWearbearTransitionSkin, false, true)
        RegisterForAnimationEvent(akTarget, "SetRace")
        ; tell the game to listen for a setrace event.
        akTarget.PlayIdle(IdleWerewolfTransformation)
        utility.wait(10.0)
        TransformIfNecessary(akTarget)
    endif
EndEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    if (asEventName == "SetRace")
        ; tell the game it's time to transform
        TransformIfNecessary(akSource as Actor)
    endif
EndEvent

Function TransformIfNecessary(Actor Target)
    if (Target == None)
;         Debug.Trace("WEREWOLF: Trying to transform something that's not an actor; bailing out.", 2)
        return
    endif

    UnRegisterForAnimationEvent(Target, "SetRace")

    Race currRace = Target.GetRace()
    if (currRace != DLC2WerebearBeastRace)
        if (Target != Game.GetPlayer())
             Target.SetRace(DLC2WerebearBeastRace) ; WHEN BEARS ATTACK
            ; Remove the transformation effect armor if he/she has it on.
            if (Target.GetItemCount(DLC2ArmorFXWearbearTransitionSkin) > 0)
                (Target.Removeitem(DLC2ArmorFXWearbearTransitionSkin, 1, True, none))
            endif
        else
        ;    CompanionsHousekeepingScript chs = (PlayerWerewolfQuest as PlayerWerewolfChangeScript).CompanionsTrackingQuest as CompanionsHousekeepingScript
        ;    if (chs.PlayerOriginalRace == None)
        ;        chs.PlayerOriginalRace = currRace
        ;    endif
        ;    PlayerWerewolfQuest.SetStage(1)
        endif
        
    endif
EndFunction

 

 

 

The function "TransformIfNecessary()" checks if the target is not the player, and then transform the actor. This is mainly used for NPCs, like Sinding, etc. If the target IS the player, it checks for what race the player is at the time the joined the companions, and if it's none, it will set it the current race of the target(which will be the player's race). Then it starts the prepping the player for the transformation from Stage 1 of the playerwerewolfquest.

 

Now when this spell is cast on someone, or the player, they are gonna transform after all the visuals are done.

 

The next step is the PlayerWerewolfQuest.

 

This is 'connected' to the companions starting quest C00, and C03Ramage, which is the quest where you first become a werewolf and tearing s*** up in Whiterun.

 

I've not been able to track which quest starts the PlayerWerewolfQuest, but Stage 0 sets up all the restrictions, and tranformation capabilities. That function is "PrepShift()".

 

Stage 1 of the PlayerWerewolf Quest will call a function from the PlayerWerewolfChange script called "InitialShift()" - I have placed the functions in bold for you to check out.

 

InitialShift will warn you of the impending transformation, and check if you're dead, and if you are, well game over and nothing happens. Otherwise you undergo the race change. Stage 1 is called by the DLC2WerebearChangeFXEffect.

 

The script on the player's alias will call 2 functions depending on how things went. If the player is a werewolf, it'll call "StartTracking()". This function unequips all your stuff, puts on the werewolf costume( :tongue:) adds your spells, add you factions, etc. It's all there. Now if you're not a werewolf, it'll call "Shutdown()". It attempts to make you invincible during the transform back, but we all know you can actually be killed during transformation, and I think it's because there needs to be a delay after SetInvulnerable. Anyway, the quest is stopped. Waiting for the player to use the Beast Form power again, start the whole sequence over.

 

Stage 10 is called from StartTracking() - nothing happens in this stage. I think it's just acts as a delay.

Stage 11 is not used. At some point during development, Beth decided it was easier to add a perk for feeding on game start(you can't use it unless you're a werewolf).

Stage 20 is called from OnUpdate. When your time as a werewolf is almost over, it'll switch to this stage, and "WarnPlayer()" is then called.

Stage 100 is called from OnUpdate when time is up. "ShiftBack()" is called from OnUpdate. "ShiftBack" sets a variable to tell the function "ActuallyShiftBackIfNecessary()" to proceed with turning the player back to his old self. At the end of that function, it'll call "Shutdown()".

 

Hopefully I explained this well enough.

 

edit: the rewritten script was done so that I can explain it better while reading it. Beth reuses property names even though the value of that property might be different.

Edited by Rasikko
Link to comment
Share on other sites

I basically just remade the werewolf quest from the ground up, tweaked it appropriately, and added it to the werebear transformation effect. all that I need to get out of the way now is attaching it to a disease and then allow npc werebears to spread that disease. I figured maybe add the vampire quest script and modify it.

 

edit: I was able to create the disease, and attach it to the werebear attacks, but I cannot get it to transform the player

Edited by lycanthropus
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...