Lichcraft2 Crown of Souls Scripting Error

Post » Fri Jan 21, 2011 12:44 pm

I don't have either of those mods.
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Fri Jan 21, 2011 3:47 pm

I don't have either of those mods.

Try commenting out the sections I noted then.

When hunger equals 0, state is set to 1 which should then prompt you to confirm feeding a soul. Looking at the logic flow in the state 1 block looks like a loop can occur if you don't have any of the souls the script is testing for since state is reset to 0 if no souls are found, returning flow back to the block you noted.

I'd make sure you have a required soul in your inventory when testing.
User avatar
Rinceoir
 
Posts: 3407
Joined: Thu Jun 29, 2006 1:54 am

Post » Fri Jan 21, 2011 5:16 pm

Well, the part of the script that lets you feed souls to the crown had parts like this:

if ( player -> hassoulgem, "ancestor_ghost" )

This is was true for all lines that had a soulgem reference.

I changed them to read:

if ( player -> hassoulgem, "ancestor_ghost" >= 1 )

The expression error is still there but now instead of a right eval error I got a left eval error. You guys said a right eval had to do with an undeclared variable yes? Wtf is a left eval?
User avatar
glot
 
Posts: 3297
Joined: Mon Jul 17, 2006 1:41 pm

Post » Fri Jan 21, 2011 4:38 pm

Try commenting out the sections I noted then.

When hunger equals 0, state is set to 1 which should then prompt you to confirm feeding a soul. Looking at the logic flow in the state 1 block looks like a loop can occur if you don't have any of the souls the script is testing for since state is reset to 0 if no souls are found, returning flow back to the block you noted.

I'd make sure you have a required soul in your inventory when testing.


I already removed the parts with the alternate leveling systems. Now it just reads:

if ( power >= 350 )	Messagebox "The Crown of Souls rewards you. Your Intelligence, luck, and willpower increase."		player -> modintelligence, 1		player -> modwillpower, 1		player -> modluck, 1	endif	set temp to ( power - 500 )	set power to tempendif


I'll change the "set state to 0" part to "return". Also, I am carrying around a grand soulgem with an storm atronach soul in it.
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Post » Fri Jan 21, 2011 9:41 pm

I have no idea why but now power is starting to decrease by several thousands. I'll undo what I did with the hassoulgem lines.

Edit:

When I cut out the mlRunOnce and Gals_Natural_Intelligence part of the script it caused power to decrease but several thousands for some reason.
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm

Post » Fri Jan 21, 2011 3:13 pm

Nobody has posted in this thread for several days. Am I to assume you've all given up? I don't mind I suppose. It is an annoying problem that doesn't seem to want to go away. If anyone comes along and reads this post know that I'm still trying to figure out how to make this script work and any help would be very much appreciated.
User avatar
Kelly Osbourne Kelly
 
Posts: 3426
Joined: Sun Nov 05, 2006 6:56 pm

Post » Fri Jan 21, 2011 9:47 pm

A premise. This http://abot.silgrad.com/tmp/ab01vn_lichcraft2.03patch.zip was the result of an old "clean the mod scripts so to be MWEdit strict syntax checking compliant" procedure before adding a mod to my game, but I never played/tested it, so it is just a syntax cleaning, and I could have just screwed things more, but maybe you could find something of use inside.
User avatar
Claire Lynham
 
Posts: 3432
Joined: Mon Feb 12, 2007 9:42 am

Post » Fri Jan 21, 2011 7:27 am

After some extensive testing I think I figured out the problem :)

If you comment out these to sections of code the script will run as intended.

elseif ( player -> hassoulgem, "Hunger" )	Messagebox "Allow the crown to feed on the soul of the Hunger?" "Yes" "No"	set soultype to 8	set state to 2


elseif ( soultype == 8 )	Messagebox, "The crown consumes the soul of the Hunger"		player -> removesoulgem, "hunger", 1		set hunger to ( hunger + 145 )		set power to ( power + 250 )


The problem seems to be the use of hunger as a variable and the creature ID hunger, the morrowind scripting engine doesn't like that very much.
It is probably better if you change the hunger variable to somthing else like Crownhunger.

Hope that helps.

Sy :obliviongate:
User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Fri Jan 21, 2011 1:26 pm

Ah! Genius! Have you tried changing the name of the variable?
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Fri Jan 21, 2011 10:30 pm

Ah! Genius! Have you tried changing the name of the variable?

Yes, I changed the variable to Chunger and to make sure I added a Soulgem with a Hunger soul in and tested, it worked as intended, all the apropriate message boxes came up. :)

Sy :obliviongate:
User avatar
Emma Pennington
 
Posts: 3346
Joined: Tue Oct 17, 2006 8:41 am

Post » Fri Jan 21, 2011 9:07 am

Yes, I changed the variable to Chunger and to make sure I added a Soulgem with a Hunger soul in and tested, it worked as intended, all the apropriate message boxes came up. :)

:twirl:
Then you've just solved an age old problem! Thank goodness that's solved.
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Fri Jan 21, 2011 10:47 pm

The problem seems to be the use of hunger as a variable and the creature ID hunger, the morrowind scripting engine doesn't like that very much.
It is probably better if you change the hunger variable to somthing else like Crownhunger.

Hope that helps.


Hunger to CrownHunger!? I see your point. I'm going to test it now. Whether or not it works I thank you in advance for offering your help.
User avatar
Marine Arrègle
 
Posts: 3423
Joined: Sat Mar 24, 2007 5:19 am

Post » Fri Jan 21, 2011 9:22 pm

The error involving hunger has gone away. For now it looks like the script isn't going to crash but I'm still having trouble getting it to work just right. What I mean is that I waiting for over 7 days with a soulgem containing an ancestral ghost and I was not able to feed the crown any souls. I think it might be because it was a summoned ghost. I'm going to soul trap a spawned creature and see what happens. In the mean time if you ( Psymoniser) could tell me how you got the crown to eat a soul then please let me know.
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm

Post » Fri Jan 21, 2011 8:57 pm

Okay, so it turns out that you have to feed it a soul that you didn't get via a summoning spell. It looks like this issue has been resolved. I have one final question:

I've tested the mod(attribute) function since the crown of souls script uses this function to reward the player. I have learned that if an attribute is equal to or greater than 100, even if it is at or above 100 because of fortification spells, then he mod(attribute) function will not actually raise the attribute. I assume this is to prevent the function from being used to get the players attributes to ridiculously high levels. I could just as well use to console to manually increase my players intelligence/willpower above 100 every time I get "power" >= 350 but that would be very tedious. I want this script to increase attributes above 100. Since mod(attribute) will not do this I wanted to know if there was a way to make it increase attributes above 100.

I was thinking something like this:


short newintelshort newwillif ( player->GetIntelligence >= 100 )	set newintel to ( player->GetIntelligence + 1 )	player->setintelligence to newintelendifif ( player->GetWillpower >= 100 )	set newwill to ( player->GetWillpower + 1 )	player->setwillpower to newwillendif

User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm

Post » Fri Jan 21, 2011 12:43 pm

Ignore my previous post. I tested it and it worked fine.

Thank you for all your help guys/gals. I've been trying to figure this out forever. A special thank you to Psymoniser for evidencing observational skills superior to our own.

This issue has been resolved. Will a moderator/admin please lock this thread.
User avatar
Sun of Sammy
 
Posts: 3442
Joined: Mon Oct 22, 2007 3:38 pm

Post » Fri Jan 21, 2011 12:48 pm

Ignore my previous post. I tested it and it worked fine.

Thank you for all your help guys/gals. I've been trying to figure this out forever. A special thank you to Psymoniser for evidencing observational skills superior to our own.

This issue has been resolved. Will a moderator/admin please lock this thread.

do you not want to release the fix as a patch :hehe: would be mighty decent if you did... :spotted owl:
User avatar
Manuela Ribeiro Pereira
 
Posts: 3423
Joined: Fri Nov 17, 2006 10:24 pm

Post » Fri Jan 21, 2011 12:18 pm

do you not want to release the fix as a patch :hehe: would be mighty decent if you did... :spotted owl:


Well if Fiddlesticks doesn't want to, I will release a patch for it when I get a chance. Will add some support for Azuras Star as well.

Sy :obliviongate:
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Post » Fri Jan 21, 2011 10:43 am

One other change seems to be required:

For each line with
player -> removesoulgem, "lich", 1
change it to
player -> removesoulgem, "lich"


It was only after that that I could get it to compile in MWEdit, and it all worked fine after that (including the add/remove of the Crown of Souls gift at the top of the script).
User avatar
Alba Casas
 
Posts: 3478
Joined: Tue Dec 12, 2006 2:31 pm

Previous

Return to III - Morrowind