version 0.32 savegame problem with buggy mod

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

version 0.32 savegame problem with buggy mod

Post by asmo »

EDIT:
As the (altered) subject states the problem has to do with a bug in a script. Obviously that problem is handled differently in earlier versions because playing the game was possible.
As written in the replies it would be nice to have OpenMW tell the user that script XY is broken.

@mods: Feel free to change the subject to something better fitting.


When I start a game or leave to an external cell my char falls into water going down endlessly.
Opening a savegame with an exterior cell the game simply doesn't start, displaying the error message "Failed to load saved game: compile error".

The openmw-0.31 worked perfectly with the "Advanced Herbalism TR & BM.esp" - unfortunatelly version 0.32 does not.
I attached some hopefully useful CMDL output.

This happens when I try to load a savegame where the char is in an exterior cell (Seyda Neen):

Code: Select all

Loading config file: /home/xxx/.config/openmw/openmw.cfg... done.
Loading config file: /etc/openmw/openmw.cfg... done.
Using default (English) font encoding.
Data dir /home/share/gaming/openmw_new/Data_Files
Adding BSA archive /home/share/gaming/openmw_new/Data_Files/Morrowind.bsa
Adding BSA archive /home/share/gaming/openmw_new/Data_Files/Tribunal.bsa
Adding BSA archive /home/share/gaming/openmw_new/Data_Files/Bloodmoon.bsa
Sound output: OpenAL
Sound decoder: FFmpeg
Enumerated output devices:
  Built-in Audio Digital Stereo (IEC958)
  Cypress HDMI Audio [Radeon HD 5800 Series] Digital Stereo (HDMI)
Opened "Built-in Audio Digital Stereo (IEC958)"
Input #0, bink, from 'video\bethesda logo.bik':
  Duration: 00:00:16.00, start: 0.000000, bitrate: 2324 kb/s
    Stream #0:0[0x0]: Video: binkvideo (BIKi / 0x694B4942), yuv420p, 640x480, 30.06 fps, 30.06 tbr, 30.06 tbn, 30.06 tbc
    Stream #0:1[0x0]: Audio: binkaudio_rdft, 44100 Hz, stereo, flt
Loading content file Morrowind.esm
Loading content file Tribunal.esm
Loading content file Bloodmoon.esm
Loading content file Advanced Herbalism - TR & BM.esp
Playing music/explore/mx_explore_4.mp3
Playing Music/Special/morrowind title.mp3
loading cell -26, 20
loading cell -26, 23
loading cell -26, 26
loading cell -25, 19
loading cell -24, 26
loading cell -22, 21
loading cell -22, 23
loading cell -22, 25
loading cell -21, 23
loading cell -20, 19
loading cell -20, 24
loading cell -20, 25
loading cell -12, 11
loading cell -11, 9
loading cell -11, 15
loading cell -9, 2
loading cell -9, 4
loading cell -8, 2
loading cell -8, 3
loading cell -8, 16
loading cell -6, -5
loading cell -5, -10
loading cell -5, -9
loading cell -5, -8
loading cell -5, -7
loading cell -5, -5
loading cell -5, 9
loading cell -4, -10
loading cell -4, -9
loading cell -4, -8
loading cell -4, -7
loading cell -4, -6
loading cell -4, 12
loading cell -3, -11
loading cell -3, -10
loading cell -3, -9
loading cell -3, -8
warning line 60, column 13 (ishere)
    can't re-declare local variable (ignoring declaration)
error line 60, column 16 (to)
    Unexpected keyword
Failed to load saved game: compile error
When I use a savegame where the char is inside Arrille's Tradehouse (Seyda Neen) the same happens.

Code: Select all

loading cell -3, -11
loading cell -3, -10
loading cell -3, -9
loading cell -3, -8
warning line 60, column 13 (ishere)
    can't re-declare local variable (ignoring declaration)
error line 60, column 16 (to)
    Unexpected keyword
Failed to load saved game: compile error
In a new game the char "falls into water and sinking down ... down ..." when leaving the ship in the very beginning.
There is no error message, no error, game goes on but there is no action (e.g. swimming) possible...

Code: Select all

loading cell Bthuand
loading cell Imperial Prison Ship
Changing to interior
cellName: Imperial Prison Ship
Playing music/explore/mx_explore_7.mp3

AiTravel: 90, -90, -88
AiEscort: 195, 100, 170, 12
Unloading cell
loading cell -3, -10
loading cell -3, -9
loading cell -2, -10
loading cell -2, -9
loading cell -1, -10
loading cell -1, -9
loading cell -1, -8
warning line 60, column 13 (ishere)
    can't re-declare local variable (ignoring declaration)
error line 60, column 16 (to)
    Unexpected keyword
Error in framelistener: compile error
warning line 45, column 5 (endif)
    endif without matching if/elseif
---------------------------

The mentioned lines in the esp file contain:
45 jjsAlmanac == 33^@^PI^@There are many questions which fools can ask that wise men cannot answer.^@^@ ^A^F^A^A^S G
60 jjsAlmanac == 46^@^PB^@A man who fears suffering is already suffering from what he fears.^@^@ ^A^F^A^A^S G
So I can not say what file the error message refers to...

I guess that something changed when switching between cells.
Can somebody reproduce this?

// maybe helpful
* dependency graph for games-engines/openmw-0.32.0

Code: Select all

 `--  games-engines/openmw-0.32.0  ~amd64 
   `--  dev-games/mygui-3.2.1  (dev-games/mygui) ~amd64 
   `--  dev-libs/tinyxml-2.6.2-r2  (dev-libs/tinyxml) amd64 
   `--  media-libs/openal-1.15.1-r2  (media-libs/openal) amd64 
   `--  virtual/ffmpeg-9-r1  (virtual/ffmpeg) ~amd64 
   `--  sci-physics/bullet-2.82  (sci-physics/bullet) ~amd64 
   `--  app-arch/unshield-0.6_p20120308  (app-arch/unshield) amd64 
   `--  dev-qt/qtcore-4.8.5-r2  (dev-qt/qtcore) amd64 
   `--  dev-qt/qtgui-4.8.5-r3  (dev-qt/qtgui) amd64 
   `--  dev-qt/qtxmlpatterns-4.8.5  (dev-qt/qtxmlpatterns) amd64 
   `--  dev-games/ogre-1.8.1  (dev-games/ogre) amd64  [boost freeimage opengl threads zip]
   `--  dev-libs/boost-1.55.0-r2  (dev-libs/boost) ~amd64  [threads]
   `--  media-libs/libsdl2-2.0.3-r200  (media-libs/libsdl2) ~amd64  [-directfb(-)]
   `--  dev-cpp/gmock-1.6.0  (dev-cpp/gmock) M[package.mask]  [tr1=]
   `--  dev-cpp/gtest-1.6.0-r2  (dev-cpp/gtest) M[package.mask]  [tr1=]
   `--  sys-devel/make-4.0-r1  (sys-devel/make) ~amd64 
   `--  dev-util/cmake-3.0.2  (>=dev-util/cmake-2.8.12) ~amd64 
   `--  sys-apps/findutils-4.5.14-r1  (>=sys-apps/findutils-4.4.0) ~amd64 
   `--  games-misc/games-envd-0  (games-misc/games-envd) amd64 
Last edited by asmo on 24 Sep 2014, 18:08, edited 4 times in total.
lef42
Posts: 33
Joined: 27 Jul 2014, 16:33

Re: version 0.32 not working with "adv. herbalism" mod

Post by lef42 »

I just tried the mod and loaded into a game fine. Using the newest build not 32 though
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: version 0.32 not working with "adv. herbalism" mod

Post by asmo »

I just installed the dev-version 144f6ca79a. The problem persists. :(
Any idea what might be wrong here?
lef42
Posts: 33
Joined: 27 Jul 2014, 16:33

Re: version 0.32 not working with "adv. herbalism" mod

Post by lef42 »

What i did is just copy the esp and stuff into data folder and checked in openmw launcher with them at the end of load order and it worked for me. Maybe try removing all of openmw including configs and reinstalling?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: version 0.32 not working with "adv. herbalism" mod

Post by Zini »

The failed to load saved game file error shouldn't happen. That is clearly a bug. However this esp seems pretty broken too. Could you please post the script in question so we can have a look at it?
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: version 0.32 not working with "adv. herbalism" mod

Post by asmo »

I removed the config folder (~/.config/openmw), set up a new Data_Files folder and executed omwlauncher, the script - and no other - is listed right after the games esm files (MW,TR,BM). It did not solve the problem.

As requested, I added the script - which worked perfectly in version 0.31. ;)
Attachments
advanced_herbalism_-_TR_and_BM.7z
script - advancd herbalism mod
(33.99 KiB) Downloaded 187 times
lef42
Posts: 33
Joined: 27 Jul 2014, 16:33

Re: version 0.32 not working with "adv. herbalism" mod

Post by lef42 »

It seems after playing with the mod active more i experience your problems if i load from ./openmw and not from the launcher.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: version 0.32 not working with "adv. herbalism" mod

Post by Zini »

@asmo Can you please post the script that is causing the problem? Not a binary dump of the whole plugin.
User avatar
asmo
Posts: 229
Joined: 18 Sep 2014, 21:20

Re: version 0.32 not working with "adv. herbalism" mod

Post by asmo »

I opened the esm with the OMW content editor. On load I got these error messages:

Code: Select all

Unsupported recoord type: MGEF
...
Unsupported recoord type: LTEX
...
Unsupported recoord type: LAND
...
Unsupported recoord type: PGRD
...
Unsupported recoord type: SNDG
...
Unsupported recoord type: SSCR
...
It looks like there is no single script (see screenshot). There seem to be specific scripts attached to each plant.

The content editor reports an error in the jjs_herb_coda1script - have a look at the attached screenshot too. After fixing it loading games works, the sinking problem is solved by this too.

BTW:
Is there a way to make the output - when omwlauncher is started on the commandline - display not only the error/warning itself but the according script name as well?

Here's the original version of the script

Code: Select all

Begin jjs_herb_coda1

short pickday
short quantity
short Schance
short Dchance
short Tchance
short pickchance
short getseed
short goodpick
short success
short endme
short addherb
short skillcheck
short ishere

float increase

If (MenuMode==1)
	return
endif

if ( getdisabled == 1 )
	if ( pickday < dayspassed )
		enable
	else
	return
	endif
endif

if ( OnActivate == 1 )
	set ishere to 2
	else
	return
endif

if ( ishere == 2 )
	set Schance to ( Herbalism * 2 )
	set Dchance to ( ( Herbalism - 38 ) * 3 / 4 )
	set Tchance to ( ( Herbalism - 60 ) * 6 / 10 )
	set pickchance to ( Random, 101 )	
	set getseed to ( Herbalism * 4 / 10 )
	if ( Schance > pickchance )
		set goodpick to 1
		set success to 1
	endif
	if ( success == 1 )
		if ( Dchance > pickchance )
			set success to 2 
		endif
	endif
	if ( success == 2 )
		if ( Tchance > pickchance )
			set success to 3 
		endif
	endif
	if ( success == 0 )
		MessageBox "You damage the plant and find nothing useful."
		set endme to 1
	endif
	short ishere to 1
endif

if ( goodpick == 1 )
	if ( Herbalism < 100 )
		set increase to ( ( 50 / Herbalism ) / 100 )
		set Herbalism to ( Herbalism + increase )
		set skillcheck to HerbalismStored + 1 
		if ( skillcheck <= Herbalism )
			set HerbalismStored to Herbalism
			PlaySound, "skillraise"
			Messagebox "You have gained new understanding and now have an Herbalism skill of %.0f!", Herbalism
		endif
	endif
	if ( pickchance > 25 )
		set quantity to 1
	endif
	set quantity to ( quantity * success )
	if ( quantity == 0 )
		Messagebox "This plant offers no usable herbs."
		set endme to 1
	endif
	if ( quantity > 0 )
		set addherb to 1
	endif
	set goodpick to 0
endif

if ( addherb == 1 )
	if ( GetSecundaPhase == 4 )
		if ( getseed > pickchance )
			player->additem, "shan_seed_coda_flower", 1
			Messagebox "You collect a coda seed from this plant!"
			set quantity to quantity - 2
			set getseed to -10
		endif
	endif
	if ( quantity > 1 )
		Messagebox "You collect %.0f coda flowers." quantity
	endif
	if ( quantity == 1 )
		Messagebox "You collect one coda flower."
	endif
	while ( quantity > 0 )
		player->additem, "ingred_bc_coda_flower", 1
		set quantity to quantity - 1
	endwhile
	playsound "item misc up"
	set endme to 1
	set addherb to 0
endif

if ( endme == 1 )
	set success to 0
	set pickday to dayspassed
	set pickday to ( pickday + 29 )
	disable
	set endme to 0
endif

end
The error seemed to be
short ishere to 1
which should be
set ishere to 1

What persists (although just as warning) is

Code: Select all

loading cell Vivec, Telvanni Enchanter
warning line 45, column 5 (endif)
    endif without matching if/elseif
Execution of script fallingScript failed:
unknown ID: agronian guy
Unloading cell
Unloading cell
Unloading cell
warning line 11, column 16 (to)
    unknown variable (ignoring set instruction)
warning line 16, column 5 (endif)
    endif without matching if/elseif
warning line 11, column 16 (to)
    unknown variable (ignoring set instruction)
warning line 16, column 5 (endif)
    endif without matching if/elseif
warning line 11, column 16 (to)
    unknown variable (ignoring set instruction)
warning line 16, column 5 (endif)
    endif without matching if/elseif
warning line 11, column 16 (to)
    unknown variable (ignoring set instruction)
warning line 16, column 5 (endif)
    endif without matching if/elseif
Unloading cell
IMHO the following scripts serve a general purpose. But that's maybe not rekevant anymore?!

Code: Select all

Begin jjs_herb_ampoule1

short quantity
short Schance
short Dchance
short Tchance
short pickchance
short getseed
short goodpick
short success
short endme
short addherb
short skillcheck
short ishere
short pickday
short fati
short endu

float increase

If (MenuMode==1)
	return
endif

if ( getdisabled == 1 )
	if ( pickday < dayspassed )
		if ( GetSecundaPhase == 0 )
			enable
		elseif ( GetSecundaPhase == 4 )
			enable
		endif
	endif
endif

if ( OnActivate == 1 )
	set ishere to 2
	else
	return
endif

if ( ishere == 2 )
	set Schance to ( Herbalism * 2 )
	set Dchance to ( ( Herbalism - 38 ) * 3 / 4 )
	set Tchance to ( ( Herbalism - 60 ) * 6 / 10 )
	set pickchance to ( Random, 101 )	
	set getseed to ( Herbalism * 4 / 10 )
	if ( Schance > pickchance )
		set goodpick to 1
		set success to 1
	endif
	if ( success == 1 )
		if ( Dchance > pickchance )
			set success to 2 
		endif
	endif
	if ( success == 2 )
		if ( Tchance > pickchance )
			set success to 3 
		endif
	endif
	if ( success == 0 )
		MessageBox "You damage the plant and find nothing useful."
		set endme to 1
	endif
	set ishere to 1
endif

if ( goodpick == 1 )
	if ( Herbalism < 100 )
		set increase to ( ( 50 / Herbalism ) / 100 )
		set Herbalism to ( Herbalism + increase )
		set skillcheck to HerbalismStored + 1 
		if ( skillcheck <= Herbalism )
			set HerbalismStored to Herbalism
			PlaySound, "skillraise"
			Messagebox "You have gained new understanding and now have an Herbalism skill of %.0f!", Herbalism
		endif
	endif
	if ( pickchance > 20 )
		set quantity to 1
	endif
	set quantity to ( quantity * success )
	if ( quantity == 0 )
		Messagebox "This plant offers no usable herbs."
		set endme to 1
	endif
	if ( quantity > 0 )
		set addherb to 1
	endif
	set goodpick to 0
endif

if ( addherb == 1 )
	if ( getseed > pickchance )
		if ( GetSecundaPhase == 3 )
			player->additem, "shan_seed_ampoule_pod", 2
			MessageBox, "You collect 2 ampoule seeds from this plant!"
		endif
		if ( GetSecundaPhase == 2 )
			player->additem, "shan_seed_ampoule_pod", 1
			Messagebox "You collect an ampoule seed from this plant!"
		endif
		set quantity to quantity - 1
		set getseed to -10
	endif
	if ( quantity > 1 )
		Messagebox "You collect %.0f ampoule pods." quantity
	endif
	if ( quantity == 1 )
		Messagebox "You collect one ampoule pod."
	endif
	while ( quantity > 0 )
		player->additem, "ingred_bc_ampoule_pod", 1
		set quantity to quantity - 1
	endwhile
	playsound "item misc up"
	set endme to 1
	set addherb to 0
endif

if ( endme == 1 )
	set success to 0
	set pickday to dayspassed
	set pickday to ( pickday + 10 )
	disable
	set endme to 0
endif

end

Code: Select all

begin jjs_pickscript

short check
short OnPCEquip
setscale, .5

if ( OnPCEquip == 1 )
	if ( check == 0 )
		set jjsHerbHoe to 1
		set check to 1
	endif
endif

if ( check == 1 )
	if ( OnPCEquip == 0 )
		set jjsHerbHoe to 0
		set check to 0
	endif
endif

end
There is more like: jjs_herb_chart, jjs_herb_choke...
Attachments
screenshot
screenshot
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: version 0.32 not working with "adv. herbalism" mod

Post by scrawl »

@Zini: looks like script compiler exceptions thrown by RefData::setLocals are not being caught. I'm not sure where the best place to catch the exception would be. Here's the stack trace I got:

Code: Select all

0	__cxa_throw	/usr/lib/x86_64-linux-gnu/libstdc++.so.6		0x7f3a10d34a30	
1	Compiler::Parser::reportSeriousError	parser.cpp	21	0x11d48f4	
2	Compiler::Parser::parseKeyword	parser.cpp	129	0x11d4dac	
3	Compiler::DeclarationParser::parseKeyword	declarationparser.cpp	69	0x11e6f23	
4	Compiler::Scanner::scanName	scanner.cpp	293	0x11d5e29	
5	Compiler::Scanner::scanToken	scanner.cpp	137	0x11d5578	
6	Compiler::Scanner::scan	scanner.cpp	525	0x11d67bf	
7	Compiler::QuickFileParser::parseKeyword	quickfileparser.cpp	29	0x11e7110	
8	Compiler::Scanner::scanName	scanner.cpp	293	0x11d5e29	
9	Compiler::Scanner::scanToken	scanner.cpp	137	0x11d5578	
10	Compiler::Scanner::scan	scanner.cpp	525	0x11d67bf	
11	MWScript::ScriptManager::getLocals	scriptmanagerimp.cpp	184	0xe3a0be	
12	MWScript::Locals::configure	locals.cpp	18	0xe35b29	
13	MWWorld::RefData::setLocals	refdata.cpp	153	0xea45b8	
14	MWWorld::LocalScripts::add	localscripts.cpp	96	0xf8a62e	
15	(anonymous namespace)::listCellScripts<ESM::Container>	localscripts.cpp	22	0xf8b2bb	
16	MWWorld::LocalScripts::addCell	localscripts.cpp	110	0xf8a7ce	
17	MWWorld::Scene::loadCell	scene.cpp	213	0xf5dce3	
18	MWWorld::Scene::changeCell	scene.cpp	333	0xf5e5be	
19	MWWorld::Scene::changeToExteriorCell	scene.cpp	461	0xf5ef6a	
20	MWWorld::World::changeToExteriorCell	worldimp.cpp	909	0xeab8bf	
Post Reply