RezEditor Alpha Log

Will be done when it's done

Much later edit: this doesn't really get interesting for a few pages. I really shouldn't have release anything so soon, and I'm not very good at PR, but it did give me a good morale boost. The help I mention has some things in post 81, and others in post 86. The following is the original post:

You may have noticed a link in my sig.
Well, now I actually have something with which other people could be helpful.
By "alpha" I mean component testing.
I want to know if the basics, at least, work the same for other people. I know Macs have poor Java support, but I don't see anything that could go wrong.
I will release more Soon (when it's done or earlier).
You can download files here.
What you care about is the .jar file in the dist folder. (The source is included but still contains a lot of clutter)
If it works properly, it should open a boom GUI (with an invalid ID, I know) and a Critical Error which, when clicking OK, will terminate the VM.
That's all for now; I will get back to coding.

Edit: wait, I forgot that I set it up to require assertions. So run it from the command line with -ea.

This post has been edited by Nonconventionally Creative : 13 May 2010 - 03:40 AM

Won't run on OS X.

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass2(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:774)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

I wouldn't say java support on OS X is bad but it is a bit behind. We have java 1.5/5.0/whatever-you-want-to-call-it. Of course Mac support is hardly important for this.

This post has been edited by Guy : 22 June 2008 - 09:36 PM

@guy, on Jun 22 2008, 07:32 PM, said in RezEditor Alpha Log:

Won't run on OS X.

Yep... doesn't seem to run on Leopard. When it opens, it gives an error, and when I click "Ok", it closes.

This post has been edited by king_of_manticores : 22 June 2008 - 10:22 PM

I tried your editor. It wont even launch with errors that are supposed to happen (!) (!!) , I was a bit surprised to read that. Are programs ever supposed to have errors? Even in a early stage when the programmer expects errors? Anyways! Heres the errors I got when I tried to launch the program:

Doubleclick jar: Could not find main class. Program will now exit. Title: Java Virtual Machine.

Command line with the instructions in the readme. It sounds very Sun-like because its so hard to understand and comes with a lot of programming gibberish. But the rezeditor notice sounds like you, unless its auto-generated (To run the project from the command line, go to the dist folder and
type the following: java -jar "RezEditor.jar"...): Lots of errors. Even worse. I dont even know where to start.

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
umber in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Should I upgrade my Java? I have 1.5, and 1.6 has been released.

I would really like to try your app, but I wont work even to the degree you say! Sorry! A really sad thing, because I would really like something replace EVNEW (I wont even detail here how awful it is... that requires a separate post because its so horrible...). Well, maybe not so sad, because your editor wont do anything. But still. How does it look like? Pic? Apparently it does something , because it opens a boom GUI . I think you messed up and b0rked things up big time. I think you either messed up something with the main class, or my Java is old. I followed instuctions. Oh, and I saw your edit in my reply window or requiring ea, I put and it still gets the same error. It still messes up. Btw, why Java as language? Isnt C++ better? Thats what game creators endorse, at least. I hope it wont be slow, because Java has been infamous for performance problems. I love speed! I dont know how much it has bounds in reality (the slowness).

P.S. Why just boom as the first?

PS2. I will tell how much I like this idea and program later. And how much I really am annoyed at EVNEW, at its incapacity to do ANYTHING, even basic things, like selecting multiple resources at the same time, or ordering by name (the resources). ResEdit is capable of this, and it was never even meant for plugs; It was for Apple programmers (yes, Apple) in the mid- 90s to work with resources- that were somehow linked to coding in C!

Edit- I updated my Java, just for fun, because I couldnt waited to wait for hours for you to answer- the whole day for me, realistically. I updated my java- and now nothing happens. I dont even get errors. I never knew I actually liked errors. (Because I like errors more than nothing happening). I tried to run it from the command line per your instruction, that gives this confusing and terse error message:

C:\Documents and Settings\Tom\Työpöytä\rezeditor\dist>java -jar "RezEditor.jar"
-ea
Sorry, assertions are off
Turn on assertions, please.
Exception in thread "main" java.lang.IllegalMonitorStateException
at java.lang.Object.wait(Native Method)
at net.sourceforge.rezeditor.Main.main(Main.java:83)

Your main thing is again at fault- at line 83, it seems. Check line 83 to see what is bugged (I dont know if Enters count as lines, so youll have to figure the line for yourself). You have roaylly screwed up something, and badly it seems. Even if I know nothing about java, I know the main class is important...

Atleast this is improvement? Right? Right? 😛 :laugh: (Yes, if you didnt get it already, that was humor. I like to be funny. ) I dont get any errors anymore when I double-click on it! Huzza! Its not my to turn on assertions (whatever they may be), or even know how to turn them on, you'll have to do it. Package your app better next time kk?

This post has been edited by General Cade Smart : 23 June 2008 - 08:47 AM

OK, the old version of java was probably what caused the first problem.
The second problem is expected. You have to run:
java -ea -jar RezEditor.jar
The second alpha will pop up an friendly error message if assertions are off.
I have no idea why the wait function on line 83 threw that exception, but I've deleted that code.

The reason boom is the only one that pops up is because it's the only one I've written.

@guy, on Jun 22 2008, 07:32 PM, said in RezEditor Alpha Log:

Won't run on OS X.

I wouldn't say java support on OS X is bad but it is a bit behind. We have java 1.5/5.0/whatever-you-want-to-call-it. Of course Mac support is hardly important for this.

I don't know what's causing that problem

@king_of_manticores, on Jun 22 2008, 08:22 PM, said in RezEditor Alpha Log:

Yep... doesn't seem to run on Leopard. When it opens, it gives an error, and when I click "Ok", it closes.

It's supposed to pop up an error message that says "Have a nice day :)" or something similar.

Hopefully I'll upload the next one in a few days.

If it's any consolation, these are exactly the kinds of problems I have been hoping to get.

Edit: There are a few things I need from someone on the Mac side of things: Definitions for the DLOG and DITL resources (order and size of fields) and a sample of how Context/Restore do text files (also MC if it has this feature)

This post has been edited by Nonconventionally Creative : 23 June 2008 - 10:07 AM

@nonconventionally-creative, on Jun 23 2008, 11:02 AM, said in RezEditor Alpha Log:

OK, the old version of java was probably what caused the first problem.
The second problem is expected. You have to run:
java -ea -jar RezEditor.jar
The second alpha will pop up an friendly error message if assertions are off.
I have no idea why the wait function on line 83 threw that exception, but I've deleted that code.

The reason boom is the only one that pops up is because it's the only one I've written.
I don't know what's causing that problem
It's supposed to pop up an error message that says "Have a nice day :)" or something similar.
Hopefully I'll upload the next one in a few days.

If it's any consolation, these are exactly the kinds of problems I have been hoping to get.

:laugh: Why would you want any problems? :laugh:

@oryhara, on Jun 23 2008, 08:05 AM, said in RezEditor Alpha Log:

:laugh: Why would you want any problems? :laugh:

So I know that the problems occur equally across platforms.

alpha2 is up, including screenshots of what it should be with or without assertions.

@nonconventionally-creative, on Jun 23 2008, 11:41 AM, said in RezEditor Alpha Log:

So I know that the problems occur equally across platforms.

alpha2 is up, including screenshots of what it should be with or without assertions.

Never mind <_< . 😉

This post has been edited by oryhara : 23 June 2008 - 10:51 AM

Also, people: please check in your user dir (My Documents in Windows, please tell me where on Mac) for a file called "rezeditor.log" (and maybe rezeditor.prefs - I'm not sure if that one will initialize)

I dled the new alpha immediately and deleted the old one by trashing it for good measure. I found a much improved app. Now it would actually run- in the sense of actually let me do something! Hint: make the assertion error message even more userfriendly. Guarantee that everyone can run it by including detailed instructions. For example:

Windows: cmd <the commands> That is, insert cmd there, because thats what is the command prompt in XP and beyond. Then, include instructions on where to type all of this. Including cmd would sufficient for me., but really only helps advanced-ish users. So put this in: Press Start, then Run, type cmd and press OK or Enter. Or Start- Run- cmd if you think that was way too userfriendly (too lenghty and detailed, and doesnt assume any skills of understanding instead of having people understand what it says, think). So it would be: cmd java -jar -ea "Rezeditor.jar": For Macs, tell them to open the Terminal (no, I dont know how to open it. I've opened it before, but dont remember.) ,with all the steps to open it, even. Eventually, get rid of this "assertion" (whatever it is) thing requirement, so we dont have such a difficult way of opening it. Only the crudest of test apps require this (pre-alpha or actually worse, that is). I know of only 1 app in my PC history to require this...

I had fun typing random values in the fields- and a name. And pressing the buttons. I liked the screenshots especially. They are good enough to be called a feature. Sadly, I didnt get the beatiful title (bar) like in the screenshot. I find even the error message a improvement (and like it). At leat its a improvement on the cryptic message that asks users to do what ever power users cant.

I checked the file- and I had no idea it would dump files, I only checked my documents when you said. Funny that the simplest software should have undocumented features.

It was empty- does this file be supposed to have something useful? Also, I didnt get any prefs file. What would it contain? Would it be readable? Or readable, but so mega cryptic no mortal understands it?

My next post will tell you what I want from Alpha 3. Features, that is.

Heres to Alpha 3! I wonder how long it will take? Its almost night for me now. I hope I have a new version when I wake up. After all, version 2 come only in 15 hours after 1- when you had created this topic. It had come earlier than I expected- you said several days- and saved me from total boredom seeing only a screen wishing me a good day (Yes, I did get it to work after I added -ea to the beginning. Heh, is it funny that I buried this so deep in my post? That I got Alpha 1 to work?)

@general-cade-smart, on Jun 23 2008, 12:29 PM, said in RezEditor Alpha Log:

Hint: make the assertion error message even more userfriendly. Guarantee that everyone can run it by including detailed instructions.

I've thought about it. I'll probably just change it to a warning so that the use can continue anyway.

@general-cade-smart, on Jun 23 2008, 12:29 PM, said in RezEditor Alpha Log:

I had fun typing random values in the fields- and a name. And pressing the buttons. I liked the screenshots especially. They are good enough to be called a feature. Sadly, I didnt get the beatiful title (bar) like in the screenshot.

Beware, it does not check that you type a valid number in the number boxes. I might have a way to stop that, though (NtS: return early from closeGUI(boolean save) if save is true)
The title bar is just a Windows setting. Control panel->Display->Appearance->Advanced (You can't do very much using the Windows XP theme; set it to classic)

@general-cade-smart, on Jun 23 2008, 12:29 PM, said in RezEditor Alpha Log:

I checked the file- and I had no idea it would dump files, I only checked my documents when you said. Funny that the simplest software should have undocumented features.

It was empty- does this file be supposed to have something useful? Also, I didnt get any prefs file. What would it contain? Would it be readable? Or readable, but so mega cryptic no mortal understands it?

It was supposed to do that. In future, the log will actually log what the user does (and the log will be moved to the application directory). Alphas may or may not include the first line: "Beginning session at "+now(), where now() is the date/time like this: 2008/06/23 12:29:01.234
I looked over the code again and the preferences file was correct in not appearing - it requires an explicit call. It will be human readable, if I understand the documentation correctly, in the form: KEY = VALUE, with lines starting with #'s being commented lines.

@general-cade-smart, on Jun 23 2008, 12:29 PM, said in RezEditor Alpha Log:

My next post will tell you what I want from Alpha 3. Features, that is.

Heres to Alpha 3! I wonder how long it will take? Its almost night for me now. I hope I have a new version when I wake up. After all, version 2 come only in 15 hours after 1- when you had created this topic. It had come earlier than I expected- you said several days- and saved me from total boredom seeing only a screen wishing me a good day (Yes, I did get it to work after I added -ea to the beginning. Heh, is it funny that I buried this so deep in my post? That I got Alpha 1 to work?)

Alpha 3 will probably be longer - 2 was just a quick fix of 1. Of course, I never know ahead of time what I'm going to do since humans are nondeterministic - I wasn't really intending to release a 2 so soon.
As far as feature requests, they are welcome but will probably be ignored at this point.

Edit: I caught and squished the bug in the upcoming version that prevented the save/load functions from working. Now all I have to do is add that to the other 29 resources, and it will almost be usable.

This post has been edited by Nonconventionally Creative : 23 June 2008 - 11:49 PM

Well I got it open in Linux. 🙂

Running Ubuntu 8.04 64bit edition.

This post has been edited by Swithich : 23 June 2008 - 11:49 PM

@guest_swithich_-, on Jun 23 2008, 09:48 PM, said in RezEditor Alpha Log:

Well I got it open in Linux. 🙂

Running Ubuntu 8.04 64bit edition.

Thanks.

Anybody got it to run on a Mac?

I will repeat my request. Can someone please get the list of fields, with their sizes, for DLOG and DITL? (and anything else there might be) And, can someone show me a sample file created by Context? (and one created by MC if it uses a different text format)

@nonconventionally-creative, on Jun 24 2008, 08:50 AM, said in RezEditor Alpha Log:

Can someone please get the list of fields, with their sizes, for DLOG and DITL?

I'm afraid both of these are substantially more complicated than the game's own types; it took me ages to get them working properly in MissionComputer, and that was with ResEdit as a guide. Here's the specification for the DLOG resource:

Short top
Short left
Short bottom
Short right
Short ProcID
Bool Visible
Bool GoAway
Long RefCon
Short ItemsId
PString Title
Awrd Ignored
UShort AutoPosition

Note that ItemsID contains the ID of the associated DITL resource, though for clarity you should always give both resources the same ID.

DITL is more difficult, but I'll try to get it into a readable form for you.

I presume that Ushort mean unsigned short, but I have no idea what Pstring and Awrd are. Also, how are the Bools represented? The only one in Nova (CanAbort in mďsn) occupies a byte I think.
I've notice in the .rez file that the ID and Name are stored at the end of the file, away from the rest. I still have to figure out how the .rez format works, but that will be delayed until I write all the GUIs (I should have taken my own advice) and get text file support working.

@nonconventionally-creative, on Jun 24 2008, 05:50 PM, said in RezEditor Alpha Log:

I presume that Ushort mean unsigned short, but I have no idea what Pstring and Awrd are.

Hey Creative! Didnt you read the list carefully? The Awrd (whatever that is. Im not going to even to care to guess what it is, since not only it is awful and ununderstandable- maybe inscrutable would be better, and those words that tell how something cant be accessed or passed trough), is ignored, so you dont have to care. Got it? Ignored.

I thought I would pass on even this little help to you, because I understood this much from the list (even if I otherwise didnt). I want to do everything to help you in this awesomely interesting app- I have yet to tell how much I like this app, and how long I have waited for something to replace EVNEW (I havent told you how terrible EVNEW is either. To give you a picture of how interesting this is, I religiously read every reply by you in this topic, heck I read any reply at all in this topic. No matter how boring.

I think next time I will tell you how much I like this idea.

@nonconventionally-creative, on Jun 24 2008, 10:50 AM, said in RezEditor Alpha Log:

I have no idea what Pstring and Awrd are. Also, how are the Bools represented?

PString is a Pascal string: the string is preceded by one byte which tells you how long it is. Maximum length is therefore 255 characters.

Awrd is 'align word', a now-obsolete dodge which mattered back when the DLOG format was designed in 1984. I handle it as follows: if the cursor index is divisible by two, move ahead two bytes; otherwise, move ahead one byte. You may need to adjust this depending on whether your read cursor begins at zero or one.

Bool is essentially a Short, which is set to 256 for True, and 0 for False.

UShort is indeed an unsigned short.

@nonconventionally-creative, on Jun 24 2008, 10:50 AM, said in RezEditor Alpha Log:

I still have to figure out how the .rez format works...

This topic appears to have much of the information you're looking for.

@general-cade-smart, on Jun 24 2008, 12:15 PM, said in RezEditor Alpha Log:

Hey Creative! Didnt you read the list carefully? The Awrd ... is ignored, so you dont have to care. Got it? Ignored.

Even when a field is ignored, you still have to know how to read it properly, or you'll be loading the wrong values for the rest of the resource. I spent more time on working out the AWRD field than I did on anything else related to the DLOG resource.

(nevermind)

This post has been edited by Lindley : 24 June 2008 - 01:08 PM

OK, I got Boom working fully. I was haunted by some scary NullPointerExceptions - one of which originated from the fact that the "final" variables in the subclass were not initialized when the layout method was called from the constructor of the superclass. Ugh.
Now you can actually save when you click OK (although the absence of any way to open them again doesn't make this visible) and it will check for invalid input and not save anything until you fix it.

@david-arthur, on Jun 25 2008, 04:24 AM, said in RezEditor Alpha Log:

I spent more time on working out the AWRD field than I did on anything else related to the DLOG resource.

Why is that? It seems pretty straight-forward.

On a related note, should a Cnnn field end in a null byte? Since it's a fixed length there doesn't seem any reason to do so but just thought I'd check.

Log in to reply