Level Editor Issues

Anything to do with Drakan level editing and modifications, post it here! Also this is the place to tell us about your new levels and get player feedback.
UCyborg
Dragon
Posts: 433
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Level Editor Issues

Post by UCyborg »

Looks like we have different issues, because for me, viewing STOMP sequences always crash the editor itself, the 3D viewer remains and keeps playing it until the end.

Since I'm not really familiar with those tools, do you view those animations by opening Databases window, selecting Models tab and opening some model there? I can load Wartok Canyon level, open Databases window, select NPCs, find farmer under Models and am able to see all his animations. No crashing here.

PS: after I wrote this, I noticed that crashing while playing a STOMP sequence is not universal. Playing those in level Ruined Village always crash, while those in Wartok Canyons seem to work. Well, now it crashed few seconds after it stopped playing and i minimized its window...so much bugs. I think some of these issues are more due to sloppy coding rather than incompatibilities with Windows. That bug for example which I fixed in AiO Patch, where the game crashed if Arokh was frozen and even ice effect wasn't visible...how did they miss this?

But to be fair, the technology that powers Drakan was probably quite impressive for its time, some touch-ups would still be nice though. And who knows what we'd see if the source code was available. It really sucks when it comes to old games in general that you have to mess with compatibility fixes, emulators, some even build PCs out of old parts just to get some old game running, while with the source code, they could easily be fixed to run well and on variety of platforms.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

UCyborg
Dragon
Posts: 433
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Level Editor Issues

Post by UCyborg »

Some of the bugs were fixed with recent releases of AiO Patch, should be more stable now. I forgot about the fact that you said it worked fine some time ago. There is always this chance of some file being corrupt.

Generally, people don't provide enough information regarding these crashes, and some are very specific, eg. there's this model called slaveM, makes the editor crash when you open its properties window. There's been a lot of issues identified by myself in the game, nobody ever mentioned them here. So there's that, and having only disassembled code to work with doesn't help neither.

The issues I've talked about last time seem to be the thing of the past now though.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

User avatar
De Profundis
Dragon
Posts: 98
Joined: Sat Feb 09, 2002 12:40 am
Location: Canada
Contact:

Re: Level Editor Issues

Post by De Profundis »

Yea, the last time I opened the editor, the issues were more or less the same. One more recent one I noticed was a freezing issue with the 3D window when selecting the "X" icon to close it after moving the camera, but this doesn't occur if you close the window with the "escape" key instead. Obviously, there may be others that I haven't experienced due to simply not coming across them yet. STOMP sequences didn't crash so much as they just didn't play at all, but I also may not have the modified engine file and I don't have the most current AiO patch yet.

I'll get the most recent AiO patch as soon as I can. I just hooked up my PC again, but I'll be replacing the power supply and GPU soon, so I'm crossing fingers that new issues won't come up. I'll still be using Windows 7 for a while though. If anything happens afterward, I can report them here.
Strange things are afoot at the circle K.

UCyborg
Dragon
Posts: 433
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Level Editor Issues

Post by UCyborg »

De Profundis wrote:It just sucks because it takes so long to do, but it's not impossible. There are certain landscape items and buildings that you can only see parts of in 3D when they require multiple pieces to put together, so i have to find them in uther levels to set their positions relative to one another and group them before I can place them somewhere.
I think this is one of those things that should work properly now. There was this nasty bug in the code for communication between the editor and the 3D engine, where WIndows SendMessage API function was needlessly called recursively from both editor and 3D engine, eventually causing some messages to not make it through, resulting from missing objects in the 3D window at best and crashing at worst. Actually found this on Microsoft's support site, describing our exact issue among other things: https://support.microsoft.com/en-us/kb/2664641

The first time I looked into it, I only noticed that some messages don't make it, but not the fact that the code was structured in a way that resulted in recursive calls to said function, so I replaced it with the call to the more suitable SendNotifyMessage. This apparently worked fine on ancient WIndows 9x and it even still works fine on WINE, but when you take a closer look, you see that it was implemented really stupidly and using SendNotifyMessage instead of SendMessage is really the only sane choice.

I have identified this issue in two codepaths, one referring to models and the other to characters, I'm assuming models refer to things like houses, trees, tables, ... and characters refer to monsters, Arokh, Rynn, AI waypoints, ...

The old patch made in 2006 to address 3D engine crash also wasn't implemented properly, causing memory leak basically every time you opened 3D view, so I took care of that too.
De Profundis wrote:Yea, the last time I opened the editor, the issues were more or less the same. One more recent one I noticed was a freezing issue with the 3D window when selecting the "X" icon to close it after moving the camera, but this doesn't occur if you close the window with the "escape" key instead. Obviously, there may be others that I haven't experienced due to simply not coming across them yet. STOMP sequences didn't crash so much as they just didn't play at all, but I also may not have the modified engine file and I don't have the most current AiO patch yet.
This is an interesting observation (freezing issue) to which I'm afraid I don't have precise answer to. Though I did notice a very similar problem which has to do with Desktop Window Manager. If the game is run in windowed mode and its window loses focus for more than 5 seconds, Windows considers it non-responsive. With the editor, on later Windows versions where desktop composition is always active, the same glitch shows as the quick sort-of flash of the 3D window. But Windows 7 disables composition when you start the editor, so this may not apply. I have a workaround implemented that disables window ghosting SetAppCompatData API function is detected in ddraw.dll, which is the case on Windows 7+.

Since recent patches, I can watch all STOMP sequences in retail levels for the first time without issues. Previously, you were lucky if you could just put the camera on the level to view it in 3D without crashing.
De Profundis wrote:I'll get the most recent AiO patch as soon as I can. I just hooked up my PC again, but I'll be replacing the power supply and GPU soon, so I'm crossing fingers that new issues won't come up. I'll still be using Windows 7 for a while though. If anything happens afterward, I can report them here.
The editor should now behave much more consistently across different Windows versions, excluding visual glitches on Windows 8+ due to Desktop Window Manager and editor's oldschool GUI rendering, so sticking to Windows 7 shouldn't be an issue. Well, TBH, I didn't notice anything else except bitmap scaling doesn't work properly. So eg. when you view textures in Databases window and the actual texture is bigger than its preview square, it won't display properly. And since the editor now accepts 512x512 and 1024x1024 textures, the only way to see them on these systems is to enlarge preview size in Texture View Options dialog.

PS: Get the AiO Patch from either Google Drive link or ModDB. These two are guaranteed to be always up to date. They've disabled public links for my Dropbox account due to excessive traffic, I guess the patch is too popular. And the file on Arokh's Lair download site is not always up-to date.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

UCyborg
Dragon
Posts: 433
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Level Editor Issues

Post by UCyborg »

Forgot to mention, 3D sound buffers must be enabled in Riot Engine options for the most sounds to work in STOMP sequences in 3D view. Then you'd also need Creative ALchemy to get EAX effects, if you're going to put them in the level to be able to test them.

ALchemy comes with Creative drivers if you have one of their sound cards or if you don't, there's this software solution called Creative Sound Blaster X-Fi MB 3, which bundles ALchemy. I use X-Fi MB3 to get richer sound through headphones in newer games that support surround sound output.

Though even if you have genuine version, you still have to rename Sens_oal.dll to ct_oal.dll, located in WIndows\SysWOW64 (also the one in System32, though not necessary for ALchemy, but for consistency) directory, because if you don't, ALchemy uses inferior implementation of 3D sound library, which doesn't work as well.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

User avatar
De Profundis
Dragon
Posts: 98
Joined: Sat Feb 09, 2002 12:40 am
Location: Canada
Contact:

Re: Level Editor Issues

Post by De Profundis »

That's pretty impressive. I have one more question: does the engine crash when selecting "test level" from the editor for you?
Strange things are afoot at the circle K.

UCyborg
Dragon
Posts: 433
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Level Editor Issues

Post by UCyborg »

Nope, works fine on my end. So launching it by going in the game and selecting it from the list when you click New Game works? Test Level option isn't anything special, it just starts the game .exe and tells it which level to load using a command-line parameter, assuming Game value in Editor Files and Paths dialog is set properly. Could you find the crash log in Event Viewer and post it here? The log should be under Custom Views->Administrative Events on the top or somewhere nearby. It tells where exactly it crashed, though it doesn't give much context, still better than nothing.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

Post Reply