Does dopey Necromancy work in OpenMW?

Post about your mods, learn about OpenMW mod compatibility, check for problematic mods, discuss issues, and give us feedback about your experience with modded OpenMW.
Post Reply
WhiteGuar
Posts: 18
Joined: 10 May 2017, 14:20

Does dopey Necromancy work in OpenMW?

Post by WhiteGuar »

https://www.nexusmods.com/morrowind/mods/43313
There is virtually no documentation regarding this mod and I am not really sure if it works or not in OpenMW.
So far I lean towards "no", but I guess asking for confirmation here doesn't hurt :D

The premise is simple: you read Arkay The Enemy from the inventory and then a Scribbled Note is added. However, in my case nothing happens.
This is the script that (should) start it all:

Code: Select all

Begin DN_BookArkay_s

Short OnPCEquip
Short PCSkipEquip
Short ReadBook
Short DoOnce

If ( ReadBook == 1 )
	If ( GetJournalIndex "DN_Necromancy" > 0 )
		If ( DN_ArkayRead > 0 )
			If ( DoOnce == 0 )
				Set DoOnce to 1
				If ( DN_NotesRead < 12 )
					MessageBox "You find a note tucked in the pages."
					StartScript "DN_Note_s"
				EndIf
			EndIf
		EndIf		
	EndIf
	If ( DN_Initiation != 1 ) ;inital reading
		Set DN_Initiation to 1
		MessageBox "A note falls out of the book as you open it."
		Player->AddItem "DN_Note00" 1
	Else
		If ( DN_ArkayRead != 1 ) ;initial study
			MessageBox "You study the text."
			If ( DN_BooksRead == 0 )
				StartScript "DN_PlayerCheck_s"
			EndIf
			Set DN_ArkayRead to 1
			Set DN_BooksRead to ( DN_BooksRead + 1 )
		EndIf
	EndIf
	Set ReadBook to 0
	Return
EndIf

If ( PCSkipEquip == 1 )
	Set PCSkipEquip to 0
	Set ReadBook to 1
	Return
EndIf

End DN_BookArkay_s
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Does dopey Necromancy work in OpenMW?

Post by Capostrophic »

This script will never work in 0.45.0, but it will work in 0.46.0 and should presently work in the nightly builds (didn't test).

OpenMW didn't replicate the vanilla PCSkipEquip/OnPCEquip behavior until recently.
WhiteGuar
Posts: 18
Joined: 10 May 2017, 14:20

Re: Does dopey Necromancy work in OpenMW?

Post by WhiteGuar »

Capostrophic wrote: 22 Mar 2020, 22:44 This script will never work in 0.45.0, but it will work in 0.46.0 and should presently work in the nightly builds (didn't test).

OpenMW didn't replicate the vanilla PCSkipEquip/OnPCEquip behavior until recently.
Ty for your reply. Where can I find a list of every implemented/removed/not-there-yet behavior?
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Does dopey Necromancy work in OpenMW?

Post by Capostrophic »

That should be the issue tracker (click Bugs in the header of the website).

There'll be a huge number of mod compatibility improvements in 0.46.
WhiteGuar
Posts: 18
Joined: 10 May 2017, 14:20

Re: Does dopey Necromancy work in OpenMW?

Post by WhiteGuar »

I've tried the latest nightly build and everything worked fine until the animation of the skeletal vessel. Basically, the newborn minion just stands still without doing anything nor it follows me and if I talk to it it says that it is awaiting my command, yet no options are displayed on the dialogue window.

Everything else works (getting the notes from the books, having a dream, getting the necromancy ritual spell, picking up corpses, being attacked by guards, arranging corpses, preparing the vessel and animating it by bloodletting).
Admittedly though I've never played this mod before so maybe I'm missing something...I'll read the in-game notes again

___
This is what happens
Image
Also the cursor disappears so I can only exit the dialogue mode by pressing ESC.
I THINK this is the script governing this part:

Code: Select all

Begin DN_MinionSkeleton1_s
;Attach to skeleton minion

Short Initialize
Short State
Short PCStrength
Short PCEndurance
Float PCHealth
Short AIState
Short PrepCheck
Short Menu
Short Button
Short Counter
Short Prepare
Short ConjureLevel
Short MysticLevel
Short PCConjuration
Short PCMysticism
Short Preparation
Short Fail
Float PosX
Float PosY
Float PosZ
Float Angle
Short Revived
Short Hostile
Float BloodOmen
Float HealthChange
Short MinionPower
Float MinionDifficulty
Short Check

If ( Initialize == 0 )
	Set MinionPower to 1
	Set MinionDifficulty to 0.8
	Set Initialize to -1
EndIf

If ( GetDisabled == 1 )
	Set Counter to ( Counter + 1 )
	If ( Counter >= 10 )
		SetDelete 1
	EndIf
	Return
EndIf

If ( MenuMode == 1 )
	If ( PrepCheck != 1 )
		Set PrepCheck to 1
	EndIf
EndIf

If ( Prepare == -1 ) ;Reset
	Set Prepare to 0
	Set PrepCheck to 1
	Return
EndIf

If ( Menu == 3 )
	Set Prepare to 1
	Set Menu to 0
Endif

If ( Menu == 2 )
	Activate
	Set Menu to 0
EndIf

If ( Menu == 1 )
	Set Button to GetButtonPressed
	If ( Button == 2 )
		Set Menu to 0
		Return
	EndIf
	If ( Button == 1 )
		Set Menu to 2
		Return
	EndIf
	If ( Button == 0 )
		Set Menu to 3
		Return
	EndIf
EndIf

If ( OnActivate == 1 )
	Set DN_DiseaseChance to 10
	StartScript "DN_Disease_s"
	If ( State == -1 )
		If ( Revived < 3 )
			If ( Preparation > 0 )
				MessageBox "What would you like to do with the skeleton minion's corpse?" "Perform Ritual" "Examine Corpse" "Nevermind"
				Set Menu to 1
				Return
			Else
				MessageBox "The skeleton minion is sturdy enough to reanimate."
			EndIf
		Else
			MessageBox "The skeleton minion is too damaged to reanimate."
		EndIf
	EndIf
	Set PCConjuration to ( Player->GetConjuration )
	Set PCConjuration to ( ( ( Player->GetIntelligence ) / 5 ) + PCConjuration )
	Set PCConjuration to ( ( ( Player->GetLuck ) / 10 ) + PCConjuration )
	Set ConjureLevel to Random, 100
	Set ConjureLevel to ( ConjureLevel * MinionDifficulty )
	If ( PCConjuration < ConjureLevel )
		Set Fail to Random, 100
		If ( Fail > 90 )
			MessageBox "You lost control of your skeleton minion!"
			Set Hostile to 1
			StartCombat "Player"
		Else
			MessageBox "You fail to command the skeleton minion."
		EndIf
		Return
	EndIf
	Activate
EndIf

If ( PrepCheck == 1 )
	set PrepCheck to 0
	Set Preparation to 0
	Set ConjureLevel to 0
	Set MysticLevel to 0

	;Reanimate
	If ( GetItemCount "ingred_bonemeal_01" >= 2 )
		If ( GetItemCount "ingred_gravedust_01" >= 1 )
			Set ConjureLevel to Random, 100
			Set ConjureLevel to ( ConjureLevel * MinionDifficulty )
			Set Preparation to 1
		EndIf
	EndIf

	;Sacrifice
	If ( HasSoulGem "DN_MinionSkeleton1" >= 1 )
		If ( GetItemCount "ingred_gravedust_01" >= 1 )
			Set MysticLevel to Random, 100
			Set MysticLevel to ( MysticLevel * MinionDifficulty )
			Set Preparation to 2
		EndIf
	EndIf

EndIf

If ( Prepare == 1 )
	Set PCHealth to ( Player->GetHealth )
	If ( PCHealth < 30 )
		MessageBox "You do not have enough lifeforce to perform a ritual."
		Set Prepare to -1
		Return
	EndIf
	If ( GetDistance "Player" > 192 )
		MessageBox "The ritual has no effect, you are not close enough."
		Set Prepare to -1
		Return
	EndIf
	Player->ModCurrentHealth -25
	Set PCConjuration to ( Player->GetConjuration )
	Set PCConjuration to ( ( ( Player->GetIntelligence ) / 5 ) + PCConjuration )
	Set PCConjuration to ( ( ( Player->GetLuck ) / 10 ) + PCConjuration )
	Set PCMysticism to ( Player->GetMysticism )
	Set PCMysticism to ( ( ( Player->GetIntelligence ) / 5 ) + PCMysticism )
	Set PCMysticism to ( ( ( Player->GetLuck ) / 10 ) + PCMysticism )
	If ( Preparation == 1 )
		RemoveItem "ingred_bonemeal_01" 2
		RemoveItem "ingred_gravedust_01" 1
		If ( PCConjuration > ConjureLevel )
			Set Prepare to 3
		Else
			Set Prepare to 2
		EndIf
	ElseIf ( Preparation == 2 )
		RemoveSoulGem "DN_MinionSkeleton1" 1
		RemoveItem "ingred_gravedust_01" 1
		If ( PCMysticism > MysticLevel )
			Set Prepare to 5
		Else
			Set Prepare to 4
		EndIf
	EndIf
EndIf

If ( Prepare == 2 ) ;Conjure Failure
	Set Prepare to -1
	Set Fail to Random, 100
	PlaySound "Spell Failure Conjuration"
	If ( Fail < 60 )
		If ( Fail < 30 )
			MessageBox "You reanimate the skeleton, but cannot sustain it!"
			Resurrect
			SetHealth 0
		Else
			MessageBox "You reanimate the skeleton, but cannot control it!"
			Set Hostile to 1
			Set State to 0
			Resurrect
			StartCombat "Player"
		EndIf
		Set Revived to ( Revived + 1 )
		Return
	EndIf	
	if ( Fail >= 60 )
		MessageBox "The reanimation failed."
		Return
	EndIf	
Endif

If ( Prepare == 3 ); Conjure Success
	Set Prepare to -1
	PlaySound "conjuration hit"
	MessageBox "You reanimate the skeleton minion."
	Resurrect
	Set State to 0
	Set Revived to ( Revived + 1 )
	Return
EndIf

If ( Prepare == 4 ); Mystic Fail
	Set Prepare to -1
	Set Fail to Random, 100
	PlaySound "Spell Failure Mysticism"
	If ( Fail < 20 )
		MessageBox "The sacrifice failed -- the skeleton minion is ruined."
		Set Revived to 99
		Return
	EndIf
	If ( Fail < 40 )
		MessageBox "The sacrifice failed -- ritual magic backfires on you!"
		PlaceAtMe "DN_RitualCurse_a" 1 0 0
		Return
	EndIf
	If ( Fail < 60 )
		MessageBox "The sacrifice failed -- your lifeforce is being syphoned into the void!"
		PlaceAtMe "DN_RitualDrain_a" 1 0 0
		Return
	EndIf
	If ( Fail >= 60 )
		MessageBox "The sacrifice failed."
		Return
	EndIf
EndIf

If ( Prepare == 5 ); Mystic Success
	Set Prepare to -1
	PlaceAtMe "sprigganup" 1 0 0
	PlaySound "mysticism hit"
	Disable
	MessageBox "You sacrifice the skeleton minion to the Soul Cairn."
	Set DN_MinionSacrifice to ( DN_MinionSacrifice + ( MinionPower * 2 ) )
	If ( DN_MinionSacrifice > 0 )
		If ( ScriptRunning "DN_MinionSacrifice_s" == 0 )
			StartScript "DN_MinionSacrifice_s"
		EndIf
	EndIf
	Return
EndIf

If ( GetHealth > 1 )
	If ( DN_Failed == 1 )
		Set DN_Failed to 0
		SetHealth 0
		Set State to -1
		Return
	EndIf
	If ( State == 2 )
		MessageBox "You don't have enough lifeforce to sustain a minion."
		SetHealth 0
		Set State to -1
		Return
	EndIf
	If ( State == 0 )
		Set Check to ( 5 * MinionPower )
		Set PCStrength to ( Player->GetStrength )
		If ( PCStrength < Check )
			Set State to 2
			Return
		EndIf
		Set PCEndurance to ( Player->GetEndurance )
		If ( PCEndurance < Check )
			Set State to 2
			Return
		EndIf
		Set PCHealth to ( Player->GetHealth )
		If ( PCHealth < 5 )
			Set State to 2
			Return
		EndIf
		If ( DN_MinionCount >= DN_MinionMax )
			Set State to 2
			Return
		EndIf
		Set State to 1
		Set BloodOmen to ( DN_BloodOmenDamage )
		Set DN_MinionCount to  ( DN_MinionCount + MinionPower )
		If ( DN_MinionCount > 0 )
			If ( ScriptRunning "DN_MinionDrain_s" == 0 )
				StartScript DN_MinionDrain_s"
			EndIf
		EndIf
		If ( DN_Hostile == 1 )
			Set DN_Hostile to 0
			Set Hostile to 1
			StartCombat "Player"
		EndIf
	EndIf
EndIf

If ( GetHealth <= 1 )
	If ( State == 1 )
		Set State to -1
		Set DN_MinionCount to  ( DN_MinionCount - MinionPower )
	EndIf
	If ( Hostile != 0 )
		Set Hostile to 0
	EndIf
EndIf

If ( Hostile == 0 )
	If ( GetTarget "Player" == 1 )
		StopCombat
	EndIf
EndIf

If ( GetCurrentAIPackage == 3 )
	If ( AIState != 1 )
		Set AIState to 1
		Set DN_MinionFollow to ( DN_MinionFollow + MinionPower )
	EndIf
	If ( Hostile == 0 )
		If ( BloodOmen != DN_BloodOmenDamage )
			Set HealthChange to ( BloodOmen - DN_BloodOmenDamage )
			Set HealthChange to ( ( HealthChange / DN_MinionFollow ) * MinionPower )
			ModCurrentHealth HealthChange
			Set BloodOmen to DN_BloodOmenDamage
		EndIf
	EndIf
Else
	If ( AIState != 0 )
		Set AIState to 0
		Set DN_MinionFollow to ( DN_MinionFollow - MinionPower )
	EndIf
	If ( BloodOmen != DN_BloodOmenDamage )
		Set BloodOmen to DN_BloodOmenDamage
	EndIf
EndIf

If ( GetWaterBreathing == 0 )
	SetWaterBreathing 1
EndIf

End DN_MinionSkeleton1_s
Oh, and I tried commanding it by spells but while the spell is active doors leading to other cells won't open no matter what. They will only open if Command Creature ends.
So it's definitely not compatible even with 0.46 rip
EvilEye
Posts: 33
Joined: 12 Feb 2014, 13:45
Gitlab profile: https://gitlab.com/Assumeru

Re: Does dopey Necromancy work in OpenMW?

Post by EvilEye »

That script is broken:
Error: dn_minionskeleton1_s[local variables] line 299, column 1 (): incomplete string or name
(You should have that line in your log)

The problem being the line above it that has a closing quote but no opening quote:
StartScript DN_MinionDrain_s"
WhiteGuar
Posts: 18
Joined: 10 May 2017, 14:20

Re: Does dopey Necromancy work in OpenMW?

Post by WhiteGuar »

EvilEye wrote: 25 Mar 2020, 17:59 That script is broken:
Error: dn_minionskeleton1_s[local variables] line 299, column 1 (): incomplete string or name
(You should have that line in your log)

The problem being the line above it that has a closing quote but no opening quote:
StartScript DN_MinionDrain_s"
Nice catch! Sorry I'm not very good at doing this kind of things. Apparently every single summon had the same problem, so I loaded up the costruction set and added the missing opening quotes to every single creature' script.
So far, everything works as intended. Thank you guys for the help :)
Post Reply