Gez Posted July 31, 2017 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! 12 Share this post Link to post
wallabra Posted July 31, 2017 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! 1 Share this post Link to post
Gutawer Posted July 31, 2017 (edited) Sounds really cool, but when I try to open Tools->Script Manager, SLADE immediately crashes: :/ 0 Share this post Link to post
Kappes Buur Posted July 31, 2017 (edited) 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 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 July 31, 2017 by Kappes Buur 0 Share this post Link to post
sirjuddington Posted August 2, 2017 (edited) 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 August 2, 2017 by sirjuddington 0 Share this post Link to post
Tango Posted August 2, 2017 This sounds awesome. Props to everyone involved :D 0 Share this post Link to post
sirjuddington Posted August 2, 2017 (edited) Beta 4 is up now which should fix the script manager crash. Also, the scripting documentation can be found here for anyone interested: http://slade.mancubus.net/docs/scripting/ 0 Share this post Link to post
Gutawer Posted August 2, 2017 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. 0 Share this post Link to post
scifista42 Posted August 2, 2017 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? 0 Share this post Link to post
sirjuddington Posted August 2, 2017 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. 0 Share this post Link to post
boris Posted September 5, 2017 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. 0 Share this post Link to post
Memfis Posted September 5, 2017 Sounds intriguing. Are there any example scripts that show what you can achieve with them? 0 Share this post Link to post
scifista42 Posted September 5, 2017 Yes, the script manager window lets you access a folder of example scripts. 0 Share this post Link to post
cybermind Posted September 5, 2017 Could it replace WadC when it comes to map generation from script? 0 Share this post Link to post
scifista42 Posted September 5, 2017 I guess it's not impossible, then again it can't create any map geometry yet. 0 Share this post Link to post
wallabra Posted September 5, 2017 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... 0 Share this post Link to post
Kappes Buur Posted September 5, 2017 A marriage of Slade3 and Oblige? :) 0 Share this post Link to post
wallabra Posted September 9, 2017 (edited) 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. 0 Share this post Link to post