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

SLADE - now with scripting

Recommended Posts

A third beta version of SLADE 3.1.2 is now available on its website or on GitHub. The major new feature introduced is that SLADE can now run Lua scripts. This means that you can now write instructions to get SLADE to automatically perform certain actions, such creating a new archive, copying maps to that new archive, and then changing these maps to modify various elements. But there are plenty of other nice new things, too, especially if you had missed the previous beta. Have fun!

Share this post


Link to post

Wow, a dream I had for long, was honestly that of writing Lua/Python/whatever plugins for GtkRadiant (Quake 3 maps) or even UnrealEd 2. I think now that I can modify SLADE (which includes not only maps! :D) the possibilities have open afar. Many thanks!

Share this post


Link to post

Sounds really cool, but when I try to open Tools->Script Manager, SLADE immediately crashes:

VUTuk6H.png

:/

Share this post


Link to post

Same here.

 

Not only that, but saving an altered script still does not work properly.

After changing something, for example a script, and then click on Entry:Save

and then go on to save the map, this comes up

 

hSAfWfQ.png

 

After I click on Yes  the same window pops up, over and over,

until I click on No and b2 or b3 closes.

 

At least 3.1.1.5 works flawlessly.

 

Edited by Kappes Buur

Share this post


Link to post
On 8/1/2017 at 2:59 AM, Gutawer said:

Sounds really cool, but when I try to open Tools->Script Manager, SLADE immediately crashes:

(image)

:/

Hmm not sure what's going on there, i get it too running the release but not my dev build, might be something wrong with slade.pk3.

 

Edit: Ok it looks like it's a bug, guess beta 4 will be soon :P For now you can try creating an empty file called "scriptmanager.layout" in "%APPDATA%\SLADE3"

 

On 8/1/2017 at 3:39 AM, Kappes Buur said:

Same here.

 

Not only that, but saving an altered script still does not work properly.

After changing something, for example a script, and then click on Entry:Save

and then go on to save the map, this comes up

 

(image)

 

After I click on Yes  the same window pops up, over and over,

until I click on No and b2 or b3 closes.

 

At least 3.1.1.5 works flawlessly.

 

Problem with this one is that I can't reproduce it at all in windows. I got it to happen in linux and fixed it there, guess that doesn't also apply to windows.

Edited by sirjuddington

Share this post


Link to post

Just had a play around with this (made a quick convenience script which fills in a pk3 with a ZScript & MapInfo lump, since I always end up doing that manually), very cool stuff! Just curious though, what am I supposed to do if I want to save a script permanently? I don't see an option in the script manager to do this.

Share this post


Link to post

The scripting is cool. What's the situation about creating and deleting map geometry and things with it? Admittedly I don't know Lua, but the "No Constructors" note in the documentation and no mention of built-in functions that could create them made me think it's impossible. If that's so, is it going to become possible later?

Share this post


Link to post
2 hours ago, Gutawer said:

Just had a play around with this (made a quick convenience script which fills in a pk3 with a ZScript & MapInfo lump, since I always end up doing that manually), very cool stuff! Just curious though, what am I supposed to do if I want to save a script permanently? I don't see an option in the script manager to do this.

At the moment there isn't a way to do this, closest you can do is create an archive script file and put it in the %APPDATA%\SLADE3\scripts\archive folder. The lua file will need an execute function that takes an archive (see the 'archive info' script for an example). The next beta will have more options for writing/saving custom scripts.

 

1 hour ago, scifista42 said:

The scripting is cool. What's the situation about creating and deleting map geometry and things with it? Admittedly I don't know Lua, but the "No Constructors" note in the documentation and no mention of built-in functions that could create them made me think it's impossible. If that's so, is it going to become possible later?

It'll be possible eventually yeah, I'm just starting with the more simple/safe stuff first. Creating/modifying map geometry in scripts will need to be handled carefully to avoid making it too easy to break a map.

Share this post


Link to post

Is there any way to create an undo point from scripts (for map editing)? Couldn't find anything about it in the docs, and it seems like a pretty cruical feature.

Share this post


Link to post

While SLADE doesn't support map scripting, the alternatives are WadC and node-wad; I don't recommend the latter as it is experimental, manual JavaScript code, and at the moment MapEdit doesn't even work...

Share this post


Link to post

I found a bug.

13:01:40: Error: Directory 'C:\Users\gusta_000.ACER\AppData\Roaming\SLADE3\scripts/archive' couldn't be created (error 3: o sistema n_o pode encontrar o caminho especificado.)

Translation (by hand):

13:01:40: Error: Directory 'C:\Users\gusta_000.ACER\AppData\Roaming\SLADE3\scripts/archive' couldn't be created (error 3: the system could not find the specified path)

 

Apparently it does not ensure that the parent folders are already created. I know because I have already suffered that before.

 

BTW you should add to the next beta a check to make sure it won't report previous versions as updates.

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
×