Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Kaiser

Doom Builder 2: Compiling Hexen ACS Script Issues

Recommended Posts

So I am trying to compile a simple ACS script for Hexen (using Chocolate Doom branch) and the game crashes (no I_Error message or anything) whenever the script is executed.

My script is something like this:

#include "common.acs"

script 1 (void)
{
    print(s: "testing");
} 
I use the script editor in Doom Builder 2 to edit my script. After that I make sure the script type is set to HEXEN ACS and I compile that script before saving my map.

Something that I am missing here?

Share this post


Link to post

It sounds like it's not compiling using the hexen bytecode, which is odd, because the hexen format should automatically be using it. Are you sure you have selected to correct game/map configuration?

Failing that, you could cheat and add '-h' to the parameters in /Scripting/Zdoom_ACS.cfg.

Share this post


Link to post

Doesn't seem to fix it. Also this is for vanilla Hexen, I doubt I would want to use a version of ACC that was modified to work for Zdoom.

Share this post


Link to post

Well, your script looks nothing like vanilla Hexen ACS. I can see at least two Zdoom features in just that short snippet.

Share this post


Link to post

To be fair I've noticed that vanilla hexen doesn't support low-case strings so that's one thing I've caught. But everything else should work on Hexen.

Hexen supports both print and printbold routines.

Share this post


Link to post

Can you post the whole of the problem script? Its hard to say what the issue might be without it.

Share this post


Link to post

That is the whole script. Though I am starting to think it's Doom Builder that's not saving the compiled script properly.

Share this post


Link to post

Actually I had to download the original ACC executable from idgames and then manually saved the *.O file as the behavior lump and that seems to work.

Also just realized that there's several duplicated SCRIPTS lumps inserted in my test wad. I can assume that's a bug...

Share this post


Link to post

Something I've noticed about Doom Builder is that it tends to append two null bytes to script lumps. E.g., I'd create a brand new UDMF map without any sort of scripting, and it'd give me 2-byte DIALOGUE and SCRIPTS lumps that only contain 00 00. If it does the same thing to the BEHAVIOR lump, it might explain the problem?

Kaiser said:

Doesn't seem to fix it. Also this is for vanilla Hexen, I doubt I would want to use a version of ACC that was modified to work for Zdoom.

The latest version of Randy's ACC (here) aborts with an error message when you use the -h switch and the script contains instructions that cannot be used in vanilla Hexen. (Previous versions silently escalated to ZDoom bytecode; that behavior is now assigned to the -hh switch.)

Share this post


Link to post

Not for behavior lump, but the SCRIPTS lump has the 00 00 appended to it. It just never bothers to update the behavior lump when I compile the script in the editor.

Share this post


Link to post

I did that too, still nothing. I guess I can live with using SlumpED for exporting the updated behavior lump for now. Though it's a huge hassle that I have to close the editor first and then relaunch it after I am done.

Share this post


Link to post
CodeImp said:

I have tried making a vanilla Hexen map and it seems to work.

See http://youtu.be/sS4g_Powors

Other than using "print" (which I doubt is the problem) what else are you doing differently?


Ah okay I see what's going on. I completely misunderstood what that SCRIPTS tab was used for, I thought it was something not related to Hexen so I clicked on 'New' and another tab was created. Then I saw that it let me specify a script type so I chose Hexen Format and then tried compiling.

Personally that script interface seems somewhat vague. It should probably be updated to be more 'user-error' proof so morons like me won't make mistakes like that again :P

Then yet maybe I could take a stab at it since I have access to the SVN...

Share this post


Link to post

What do you have in mind?

I made the SCRIPTS tab like this on purpose, because that is the lump in the map that you are editing. The script editor can also be used to edit any other script files (because you may want to use include statements) and this way it clearly has tabs for the map that you are editing (and you can't close these tabs, because the map is open and they belong with the map).

Share this post


Link to post

As far as I can recall, Hexen doesn't support SCRIPTS lumps so wouldn't it make sense to rename the tab to BEHAVIOR for Hexen-specific levels? Or instead, label the tab as 'Level Script' so at least the description seems more direct.

Though I am curious to see if anyone else has better ideas... assuming I am not the only one who feels somewhat convoluted.

Share this post


Link to post
Kaiser said:

As far as I can recall, Hexen doesn't support SCRIPTS lumps so wouldn't it make sense to rename the tab to BEHAVIOR for Hexen-specific levels?

You don't edit the raw BEHAVIOR lump, though...

Hexen just happily ignores script sources as long as they are after the BEHAVIOR lump, since it just turns them into some lump that is never referenced.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×