Disable stalkers while in cities? (Mod compatibility).

Post » Mon Apr 04, 2016 1:26 am

This is the basic script for an undead survival/horror type mod I am working on... Works nearly perfect, only problem is unlike Skyrim Oblivion doesn't seem to have a


GetLocationKeyWord condition, so I don't know how to make them stay out of cities.



What type of function can I add to disable these undead stalkers whenever the player is inside of a city?



Here is another script I tried... A GIGANTIC script, but supposedly scripts have a length limit and this one didn't work... (Because of being way too long for a script).




Spoiler
ScriptName AABAZombehStalkersScript


begin gamemode


Ref Self


if PlayerRef.GetEquipped Torch02 == 0 && (gamehour >= 19 || gamehour < 7) && Player.IsInInterior == 0 && Player.GetInCell Anvil == 0 && Player.GetInCell Bravil == 0 && Player.GetInCell Bruma == 0 && PIayer.GetInCell Cheydinhal == 0 && PIayer.GetInCell CheydinhalCastle && Player.GetInCell Chorrol == 0 && Player.GetInCell ChorrolCastle == 0 && Player.GetInCell CloudRulerTemple == 00 && Player.GetInCell Hackdirt == 00 && Player.GetInCell IC == 00 && Player.GetInCell ICArboretum && Player.GetInCell ICArcaneUniversity && Player.GetInCell ICArenaDuplicate000 && Player.GetInCell ICElvenGardens == 00 && Player.GetInCell ICImperialLegionHQ == 00 && Player.GetInCell ICMarket == -- && Player.GetInCell ICPalace == 00 && Player.GetInCell ICStable == 0 && Player.GetInCell ICTalosPlaza == 0 && Player.GetInCell ICTemple == 0 && Player.GetInCell ICTempleDistrict0 == 0 && Player.GetInCell ICWaterfront == 0 && Player.GetInCell ImperialDungeon == 0 && ImperialSewerSystemTG11 == 0 && Player.GetInCell Kvatch == 0 && Player.GetInCell KvatchChapel == 0 && Player.GetInCell Leyawiin == 0 && Player.GetInCell LeyawiinCastle == 0 && Player.GetInCell LeyawiinStable == 0 && Player.GetInCell MQ10BrumaOblivion == 0 && Player.GetInCell MQ13OblivionWorld == 0 && Player.GetInCell MQ14Oblivion && Player.GetInCell SEVitharn == 0 && Player.GetInCell SEVirtharnBailey == 0 && Player.GetInCell Skingrad == 0 && Player.GetInCell SkingradCastle == 0 && Player.GetInCell SkingradHouse && Player.GetInCell SkingradStable == 0 && Player.GetInCell TempleOfTheAncestorMoth == 0 && Player.GetInCell WeynonPriory == 0 && Player.GetInCell

enable

else

disable

endif


if getdead==0 && getdistance player > 16400 && PlayerRef.GetEquipped Torch02 == 0 && (gamehour >= 19 || gamehour < 7) && Player.IsInInterior == 0 && player.IsRidingHorse == 0

Self.moveto player

endif


if Player.IsInInterior == 1

Self.StopCombat

Endif



if getdead == 1 && getdistance player > 600 && player.IsInCombat == 0

resurrect 1


EndIf


end



Here is my current one that seems to work but...



begin gamemode

Ref Self

if PlayerRef.GetEquipped Torch02 == 0 && (gamehour >= 19 || gamehour < 7) && Player.IsInInterior == 0 && Player.GetInCell Wildernes== 1
enable
else
disable
endif

if getdead==0 && getdistance player > 16400 && PlayerRef.GetEquipped Torch02 == 0 && (gamehour >= 19 || gamehour < 7) && Player.IsInInterior == 0 && player.IsRidingHorse == 0
Self.moveto player
endif

if Player.IsInInterior == 1
Self.StopCombat
Endif


if getdead == 1 && getdistance player > 600 && player.IsInCombat == 0
resurrect 1

EndIf

But... I had to make a new custom dummy cell named Wildernes. Does that mean if someone elses mod uses a custom Wilderness cell named Wildernes to do similar functions with conditions that it will conflict with mine? I tried a very similar script with GetInWorldSpace == Tamriel 1, but it seemed buggy and didn't work at all. Is the best thing I can do in this case, mention there's a possibility my mod may conflict with any other mod that created a Wilderness dummy cell named Wildernes and leave it at that?



AFAIK according to all my testing I've been doing it SEEMS the ONLY way to make my zombie stalkers avoid the non-interior cells of major cities - which is pretty important for this mod. Is there anything I can do to give my Wilderness dummy cell a more unique ID to prevent potential conflicts, or will that inevitably wreck the dummy function? Any suggestions? Or am I worrying over nothing? (I tried making them unable to open doors in the past, but that just doesn't work because the teleport function is extremely important for this mod).

User avatar
Jerry Cox
 
Posts: 3409
Joined: Wed Oct 10, 2007 1:21 pm

Post » Sun Apr 03, 2016 11:56 pm

In Oblivion, you use http://cs.elderscrolls.com/index.php?title=GetInCell. Bethesda has created a dummy interior cell for all cities and they name all city spaces with the same prefix so this function works.


I wouldn't create a cell called "wilderness" because that could mess things up, as you said.
User avatar
Hope Greenhaw
 
Posts: 3368
Joined: Fri Aug 17, 2007 8:44 pm


Return to IV - Oblivion