I wrote some code the other day that I think would allow for the change in belly size with multiple pray. However I have no creation kit knowledge whatsoever and no idea how devourment handles the shrinking belly stuff. So if anyone more in the know on these things wants a go, hears my code.
- Code: Select all
ScriptName BellySizeChange extends DevourmentEventHandler
Event OnInit()
Manager.RegisterEventHandler(self)
EndEvent
int NumberOfPray = 0
Function OnSwallow(Actor pred, Actor prey, int flags)
NumberOfPray = NumberOfPray + 1
ApplyBelly()
EndFunction
Function OnPreyDeath(Actor pred, Actor prey, int flags)
NumberOfPray = NumberOfPray - 1
ApplyBelly()
EndFunction
Function OnEscape(Actor pred, Actor prey, int flags, bool oral)
NumberOfPray = NumberOfPray - 1
ApplyBelly()
EndFunction
Function ApplyBelly()
if(NumberOfPray == 1)
RemoveOtherBelly()
EndIf
if(NumberOfPray == 2)
RemoveOtherBelly()
Game.GetPlayer().EquipItem(BellyTwoPray, true, True)
EndIf
if(NumberOfPray == 3)
RemoveOtherBelly()
Game.GetPlayer().EquipItem(BellyThreePray, true, true)
EndIf
if(NumberOfPray == 4)
RemoveOtherBelly()
Game.GetPlayer().EquipItem(BellyFourPray, true, true)
EndIf
EndFunction
Function RemoveOtherBelly()
if (Game.GetPlayer().IsEquipped(BellyTwoPray))
Game.GetPlayer().UnequipItem(BellyTwoPray)
endIf
if (Game.GetPlayer().IsEquipped(BellyThreePray))
Game.GetPlayer().UnequipItem(BellyThreePray)
endIf
if (Game.GetPlayer().IsEquipped(BellyFourPray))
Game.GetPlayer().UnequipItem(BellyFourPray)
endIf
EndFunction
Its essentially a home made switch statement that keeps track of how many victims you currently hold and updates the mesh accordingly where BellyThreePray, BellyFourPray, ect are the different size meshes. It doesn't alter any of the original devourment code so the normal gats belly will run until more than one pray is swallowed and this code kicks in placing bigger meshes over the top and removing smaller ones (except the original which is just placed over).
Hopefully this helps someone create dynamic belly sizes, i'd have a go myself but my time is taken up by work and how devourment handles belly meshes is beyond me. Hell this code probably doesn't work, i wrote it in notpad++ the other night and haven't compiled it but if someone wants to tweak it and create something id love to see it
Cheers