Duke4.net Forums: M32 enhancement scripts - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

M32 enhancement scripts  "Various scripts to aid and speed up mapping"

User is offline   oasiz 

  • Dr. Effector

#1

I think it's about time I start a thread on this stuff. :) Goal is to add any helper scripts and whatnot as I progress and have time to share.
I've dabbled with these quite actively since 2016 when Hendricks did an initial "copy slope" script for Fury use.. From that I kind of learned the basics and then just realised how much the editor can be extended from stuff like missing hotkeys to all sorts of automation and previews. To me editing nowdays with scripts has allowed me to go far beyond what I'd normally do.

For to those new to m32 scripts, they are basically CON syntax text files that allow extension of the m32 editor to do things from automation to in-editor preview visuals and whatnot.
A good script is something you don't even notice is there and simply offers things like documentation and additional functionality that simply augments existing tools.
This means that no technical or programming knowledge beyond loading a script is really required from user's side and the rest.
A simple example could be something like you'd never even think about, such as setting tags for multiple sprites if you have more than one selected with the exact same stock dialogues and all.
There are a lot of already existing editor extensions that Allen added to Duke3D's build through "astub.c", which is responsible for things like the spinning nuke at the start, skill previews, lighting preview, etc..
Naturally this has been extended over the years in code by various authors, including TX and Helix, etc..
m32 merely moves the extension possibilities to work outside of source code changing and recompilations... Kind of like the whole ethos of eduke32 in the first place.


NOTE:
I'll try to keep this nice and clean, don't expect these scripts to cooperate extremely well together and these are not really enterprise-grade quality but they are generally adapted from stuff I've either tested on Fury or such.
My end goal is to create a scriptset similar to Fury but instead for Duke3D and other games.. When I have time :)


Sector 3D selection
Followed with some tips on how to work differently with ROR / TROR to the point where I no longer even bother separating SOS layers.


To load a script, place the file to d3d dir and run `include sectsel` inside console.
After that use SHIFT + SPACE for 3D selection.
QUOTE + X (lighting preview) is required to see selected sectors in 3D mode, albeit has some clash with SE lights that may have some better methods in the future but not accessible at the moment.

For workflow, I recommend watching the video.

Attached File(s)


11

User is offline   quakis 

#2

Since it's relevant I'll throw this tidbit here since it may also not be common knowledge.
If certain scripts are too useful on a day-to-day basis and they're compatible with each other, instead of typing in the console to include them every time you launch Mapster, try the following instead:

  • Create a new text file in the same folder as Mapster32
  • Call it m32_autoexec.cfg (make sure it's not saved as a .txt file)
  • Open the .cfg in a text editor such as Notepad or Notepad++.
  • Write in the console commands you would usually input on startup, for this example:
  • include sectsel
  • The script should now be included every time Mapster is launched.

You can add or remove from this at any time and is useful for other commands like forcing expertmode on launch, etc. Be careful about overdoing it though. I try to keep my autoexec minimal and only have this script included because I pretty much use it all the time. Just be aware of potential conflicts between scripts since you may need to exclude one script to make proper use of another.

View Postoasiz, on 08 July 2023 - 04:53 AM, said:

Sector 3D selection

I've said it once and I'll say it again, thank you for this script, it has been a day and night difference in my workflow in Mapster. Not only does it make complex TROR easier to manage without hoping that 2D mode behaves (even while using the CTRL + R method), but it also simply functions as a major quality of life improvement for selecting sectors full stop while in 3D mode. Less hassle, more getting things done. I've been so used to a similar feature using the variant Doombuilder editors over the years so to finally have it as a function while Duke mapping has been an absolute blessing. Sometimes the simplest things go a long way.
6

User is offline   Forge 

  • Speaker of the Outhouse

#3

View Postoasiz, on 08 July 2023 - 04:53 AM, said:

I think it's about time I start a thread on this stuff. :)

nice.
now i'm going to complain that i wished you'd dropped this about 6 months ago.

also: pin this thread

This post has been edited by Forge: 08 July 2023 - 08:08 AM

0

User is offline   oasiz 

  • Dr. Effector

#4

Thanks :)
While I added sector selection late 2022, the CTRL ALT R greyout removal is a new addition from a few weeks ago (I requested this to test how it'd look like and it worked out really well!)

I plan on having more scripts later on but I think it's going to rely a lot on users to combine them together.
IIRC appendevent is missing on m32 but I might be wrong.
0

User is offline   oasiz 

  • Dr. Effector

#5

Might be worth linking this too, tutorial I did about a year ago on m32 scripting basics to those who want to experiment:

3

User is offline   brullov 

  • Senior Artist at TGK

#6

Some features I'd like to request:

- Ability to hide/unhide all sprites in 3D mode;
- Give lotag/hitag to the group of selected sprites, sectors, or walls;
- Ability to enter the exact angle rotation when rotating sectors/sprites.
0

User is offline   Aleks 

#7

View Postbrullov, on 10 July 2023 - 02:33 AM, said:

- Ability to enter the exact angle rotation when rotating sectors/sprites.

For single sprites, you can input the exact rotation in F8 menu and for selected sectors, Alt+< allows you to input the value. Unless you only mean rotating with LShift+RMB, then yeah would be useful :P
0

#8

View Postbrullov, on 10 July 2023 - 02:33 AM, said:

- Give lotag/hitag to the group of selected sprites, sectors, or walls;


This is a single command:

do for i selsprites { set sprite[i].lotag 0 }

Replace 0 with whatever lotag you want. Replace lotag with whatever member of their struct you want to change, could be hitag, ang, extra, whatever. I used this most heavily on sectnum to affect when sprites would draw. It should be easy to apply this command to walls and sectors instead, as they're basically the same and you just replace 'sprite' with wall.

It would have been nice to bind it to a key and request an input, but after you've used it once already, you can recall it DOSKey style in the console anyway (press up) and it's about as fast.
0

User is offline   oasiz 

  • Dr. Effector

#9

Also there is copypaste to console now, making your life a lot easier with a collection of scripts, such as above!

FYI, I've been abusing statnum a lot with offsets lately, I'm not sure how to expose offsets easily on script side but with this you can layer say.. 5 sprites at the exact same x/y/z and have it always draw in correct order.
If you combine this with offsets then you can create rudimentary signs with smallfont text and it will just never glitch in classic/polymost.
Such a tutorial will be better fit on a separate thread I guess.. I still end up using console as F8'ing stuff without instant visual feedback is hell.
0

User is offline   brullov 

  • Senior Artist at TGK

#10

I'm mostly fine using scripts and commands, but it's a big hell no for newcomers. It looks like a hard thing to do, so why not bind a key to this action? The same goes with copy/pasting slopes. I would also create a template for effects like door or train delay effects.

This post has been edited by brullov: 11 July 2023 - 02:46 AM

0

User is offline   oasiz 

  • Dr. Effector

#11

When I have time...

Meanwhile all I have is this unfinished "megascript"

Attached File(s)

  • Attached File  d3d.zip (19.99K)
    Number of downloads: 111

1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options