Dark Brotherhood Attack and Guards

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
Post Reply
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Dark Brotherhood Attack and Guards

Post by Greendogo »

A couple of questions regarding the DB attacks I came across when my girlfriend reviewed OpenMW for me the other day:
1) Are Dark Brotherhood attacks technically supposed to happen every time you sleep after a new game or is it supposed to be random? So far she's gotten attacked (and killed) every single time she goes to sleep. I don't remember how it works in Vanilla but it seems even more aggressive than I remember it being (I remember it always being a little on the broken side since the devs assumed you'd kill the assassins off and be at a higher level when you started Tribunal).

2) Are guards supposed to attack Dark Brotherhood assassins (and first-striking NPCs in general)? She was running away from a Dark Brotherhood assassin she ran into outside of Seyda Neen and ran back to the town for protection from the guards only to have them stand there as she ran around them in circles with the assassin slashing at her until she was cut down. I don't remember how Vanilla works here either, but it was really a bummer.

3) Side note: It seems the following script for NPCs is pretty good, as the DB assassin followed her for a good ten minutes through the terrain and through many game exterior cells. However, I might note that the following behavior is a little unrealistic since you can get super far away from an enemy and they'll still follow you and keep you from sleeping for health.
Chris
Posts: 1625
Joined: 04 Sep 2011, 08:33

Re: Dark Brotherhood Attack and Guards

Post by Chris »

Greendogo wrote: 19 Nov 2017, 22:31 A couple of questions regarding the DB attacks I came across when my girlfriend reviewed OpenMW for me the other day:
1) Are Dark Brotherhood attacks technically supposed to happen every time you sleep after a new game or is it supposed to be random?
It's random. By the nature of randomness, it's possible to happen several times consecutively (IIRC, it rolls once every hour of sleep).
2) Are guards supposed to attack Dark Brotherhood assassins (and first-striking NPCs in general)?
Not usually. Morrowind had problems with guards not attacking aggressive NPCs because it lacked the ability to tell if NPCs were acting lawfully (this was added in Oblivion), so guards tend to only help against creature attacks.
nwah
Posts: 45
Joined: 21 Nov 2013, 07:40

Re: Dark Brotherhood Attack and Guards

Post by nwah »

I also notice much higher frequency of attacks with OpenMW, for what it's worth. I do think there's a bug here.
User avatar
Atahualpa
Posts: 1176
Joined: 09 Feb 2016, 20:03

Re: Dark Brotherhood Attack and Guards

Post by Atahualpa »

Chris wrote: 20 Nov 2017, 00:56
Greendogo wrote: 19 Nov 2017, 22:31 A couple of questions regarding the DB attacks I came across when my girlfriend reviewed OpenMW for me the other day:
1) Are Dark Brotherhood attacks technically supposed to happen every time you sleep after a new game or is it supposed to be random?
It's random. By the nature of randomness, it's possible to happen several times consecutively (IIRC, it rolls once every hour of sleep).
Looking at the script, it is, as usual, based on random dice rolls:

Code: Select all

Begin dbattackScript

float dbchance
short journalOnce
short attackOnce
short playerLevel
short attackmod
short othermod
short dbnumber
short temp
short sleepOnce

if ( GetJournalIndex TR_dbAttack >= 50 )
	return
endif

if ( player->GetLevel >= 30 )
	set playerLevel to 5
else
	if ( player->GetLevel >=20 )
		set playerLevel to 4
	else
		if ( player->GetLevel >= 10 )
			set playerLevel to 3
		else
			if ( player->GetLevel >=4 )
				set playerLevel to 2
			else
				set playerLevel to 1
			endif
		endif
	endif
endif

if ( GetPCCell "Seyda Neen, Census and Excise Office" == 1 )
	return
endif

if ( journalOnce == 1 )
	;Journal TR_DBAttack 10
	set journalOnce to -1
endif

if ( GetPCSleep == 1 )
	if ( sleepOnce == 1 )
		return
	endif
	set sleepOnce to 1
	set dbchance to Random 100
	set attackmod to ( attackonce * 10 )
	if ( playerlevel == 5 )
		set othermod to ( 90- attackmod )
		if ( dbchance <= othermod )
			WakeUpPC
			MessageBox "You are awakened by a loud noise."
			set dbnumber to ( dbnumber + 1 )
			if ( dbnumber > 2 )
				set dbnumber to 2
			endif
			set temp to dbnumber
			while ( temp != 0 )
				PlaceAtPC "db_assassin4" 1 128 1
				set temp to ( temp - 1 )
			endwhile
			set attackonce to ( attackonce + 1 )
				if ( journalOnce == -1 )
					return
				endif
				set journalOnce to 1
				set DBAttack to 1
		endif
	else
		if ( playerLevel == 4 )
			set othermod to ( 70 - attackmod )
			if ( dbchance <= othermod )
				WakeUpPC
				MessageBox "You are awakened by a loud noise."
				set dbnumber to ( dbnumber + 1 )
				if ( dbnumber > 2 )
					set dbnumber to 2
				endif
				set temp to dbnumber
				while ( temp != 0 )
					PlaceAtPC "db_assassin3" 1 128 1
					set temp to ( temp - 1 )
				endwhile
				set attackonce to ( attackonce + 1 )
					if ( journalOnce == -1 )
						return
					endif
					set journalOnce to 1
					set DBAttack to 1
			endif
		else
			if ( playerLevel == 3 )
				set othermod to ( 50 - attackmod )
				if ( dbchance <= othermod )
					WakeUpPC
					MessageBox "You are awakened by a loud noise."
					PlaceAtPC "db_assassin2" 1 128 1
					set attackonce to ( attackonce + 1 )
						if ( journalOnce == -1 )
							return
						endif
						set journalOnce to 1
						set DBAttack to 1
				endif
			else
				if ( playerLevel == 2 )
					set othermod to ( 40 - attackmod )
					if ( dbchance <= othermod )
						WakeUpPC
						MessageBox "You are awakened by a loud noise."
						PlaceAtPC "db_assassin1" 1 128 1
						set attackonce to ( attackonce + 1 )
							if ( journalOnce == -1 )
								return
							endif
							set journalOnce to 1
							set DBAttack to 1
					endif
				else
					if ( playerLevel == 1 )
						set othermod to ( 20 - attackmod )
						if ( dbchance <= othermod )
							WakeUpPC
							MessageBox "You are awakened by a loud noise."
							PlaceAtPC "db_assassin1b" 1 128 1
							set attackonce to ( attackonce + 1 )
								if ( journalOnce == -1 )
									return
								endif
								set journalOnce to 1
								set DBAttack to 1
						endif
					endif
				endif	
			endif
		endif
	endif
else
	set sleepOnce to 0
endif



End
@Greendogo: Since your girlfriend's character must have been at level 1, the game checks random(100) <= random(20) for the first encounter, random(100) <= random(10) for the second one, and random(100) <= random(0) from then on. Getting attacked every time seems a bit strange. I've just tested it with a lvl-1 character and everything looks fine.
LoneWolf
Posts: 138
Joined: 26 Sep 2017, 19:13

Re: Dark Brotherhood Attack and Guards

Post by LoneWolf »

Greendogo wrote:So far she's gotten attacked (and killed) every single time she goes to sleep.
The only safe place is the bed roll in the cellar of the census office (the building where you can loot some stuff on character generation)
Have a weapon readied when going to sleep, that saves some time when you do get attacked
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Dark Brotherhood Attack and Guards

Post by Greendogo »

LoneWolf wrote: 21 Nov 2017, 01:03Have a weapon readied when going to sleep, that saves some time when you do get attacked
This is just all-around good life advice.
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Dark Brotherhood Attack and Guards

Post by wareya »

Yeah, the attack frequency is a problem with the vanilla game for sure.

viewtopic.php?f=39&t=4252

Install this and they'll be delayed until you can probably kill them, but not so delayed as to
Spoiler: Show
like the normal DB attack delay mod does. (That spoiler is so incredibly minor I considered not spoilering it.) Once you kill them go report the attacks and they'll stop happening. Just reporting them doesn't start the Tribunal quest line, just stops the attacks.
Post Reply