UDMF maps don't work with mod

Sat Jul 31, 2021 2:28 pm

A mod I'm working on doesn't work with UDMF maps -- some maps cause the game to crash, others render mod-specific controls useless.

It could potentially be an ACS or ZScript issue, but it seemed to start happening when I added ZScript.

Re: UDMF maps don't work with mod

Sat Jul 31, 2021 2:32 pm

Unfortunately, we can't help with this little amount of information. Do you have a runnable example of your mod that causes a crash/problem, and information on which exact maps it's happening with?

Re: UDMF maps don't work with mod

Sat Jul 31, 2021 3:23 pm

I received a message from a tester saying the following:
I know you're busy right now, but I figured I'd post here about something I found with SL&L. Apparently (potentially, not a 100% sure about this) it really doesn't like UDMF maps. That's what I've been using for the ToaCW music pack, and there are two big things: 1) taunts don't work at all. 2) the off-hand attack only works sometimes, and generally acts like it has a really long cool down. Not sure what exactly is going, could be UDMF being weird, could be SL&L, could be some config going on with me. I dunno. Just figured I'd let ya know

When playing Kinsie's test map (which no longer crashes for whatever reason) I receive a message in the console saying
Code:
Music "ShotgunGuy" was not found
on level start and local ACS functions don't work at all.

Re: UDMF maps don't work with mod

Sat Jul 31, 2021 4:04 pm

That looks like an issue with your ACS script not having a defined library.
For gameplay mods you want to include the #library keyword at the top of your script file, like so:
Code:
#library "modname"
#include "zcommon.acs"  

Re: UDMF maps don't work with mod

Sat Jul 31, 2021 4:09 pm

Oh, I didn't even know that was a thing. Thanks!

Re: UDMF maps don't work with mod

Sun Aug 01, 2021 5:53 am

What it didn't like was actually the presence of other scripts. Then they get confused about which variable belong to which script, and that's precisely why you have to declare your script as a library script so as not to interfere with map scripts.