Zone Builder

[Reusable] Zone Builder v2.12

This thread contains content that may be reused, modified, or ported by anyone.

glaber

Emblem Radar Ready
Except that it's not aligning them properly at all as these results are showing (unspoiled as I don't think you looked)
srb20051_1.png
srb20054_1.png

Actualy I can't even tell what line they're trying to align with anymore.
 

MascaraSnake

Maybe out of retirement?
I did look. It's just that I was confused by your explanation, which made it sound like the problem is that it's trying to align them at all, not that it's doing it wrong. Anyway, in order to debug this, I need the map in question.
 
How do you rotate and resize the sector/line? (Line is because I 'grab' the lines of the sector rather going to Sector Mode and click on it.)
 
Last edited:

toaster

トースタちゃん
Kart Krew™️
Romio is incorrect. When you have stuff selected, press the E key on your keyboard - this is Edit mode. Drag on the handles to manipulate it by scale and rotation, or open the panel on the very right of the Zone Builder window and manipulate the numbers there for more precise scaling. Pressing the E key takes you out of this mode when you are done.
 

glaber

Emblem Radar Ready
I did look. It's just that I was confused by your explanation, which made it sound like the problem is that it's trying to align them at all, not that it's doing it wrong. Anyway, in order to debug this, I need the map in question.
The map in question is map B1 from SRB2 the Past. I'll Isolate the map for this.

EDIT
here's the map: https://www.dropbox.com/s/g1fsj4r4y0slcse/SC_GreenflowerTGFact2.wad?dl=0
I included the last good edit from the current version as map B2 and the version affected by Zone Builder as map B1
 
Last edited:
Romio is incorrect. When you have stuff selected, press the E key on your keyboard - this is Edit mode. Drag on the handles to manipulate it by scale and rotation, or open the panel on the very right of the Zone Builder window and manipulate the numbers there for more precise scaling. Pressing the E key takes you out of this mode when you are done.

Wow, i didn't realize that, it would be really useful in future .
 

StellarStardust

Smol neko that warms your heart~
For some reason, ZB sometimes makes things go in mid-air instead of touching the ground like they should when I want them to. Badniks, Decorations... you name it, it makes that float. I can't undo/redo or edit the height to fix it either.
 

MK.exe

The one and only!
Kart Krew™️
Contest Winner🏆
For some reason, ZB sometimes makes things go in mid-air instead of touching the ground like they should when I want them to. Badniks, Decorations... you name it, it makes that float. I can't undo/redo or edit the height to fix it either.

Have a look at there heights individually. Usually it will copy the same object you used previously.
 

MascaraSnake

Maybe out of retirement?
I promised a mapping tutorial for Zone Builder, and here it is! It's based on the old SRB2DB tutorial, but it also explains a few of ZB's more advanced features. It still needs more images (as always), but text-wise it's finished. For future releases, I plan to get the in-editor manual up to shape, so you can look up how specific features work without the Wiki.
 

MascaraSnake

Maybe out of retirement?
v2.3 has been released!

The main focus of this release is script support: You can now edit SOC and Lua scripts in the script editor. All script lumps in the currently opened file are automatically opened in the script editor, as well as the MAINCFG and OBJCTCFG lumps (even if they don't yet exist). You can't add new lumps to the file though, because this isn't a lump editor. :P

The other big new feature is that Zone Builder now automatically recognizes custom Things that are defined in the Lua and SOC scripts of the currently loaded files. These custom Things are added to the list of Things so you can easily place them in the editor. By default, custom Things will show the "unknown sprite" graphic, but you can specify a real sprite with a special comment in the script itself:

For SOC lumps, add "#$Sprite <name>" as a line anywhere in the object type definition, where <name> is the lump name of the sprite you want to be displayed. The sprite can be located in the IWAD or any of the currently loaded files. Likewise, add "$Name <name>" to supply your own name for the object. Otherwise, it will be listed under the internal MT_ name. Here's an example:

Code:
Object MT_EXAMPLE
#$Name Example object
#$Sprite CUSTA3A7
MapThingNum = 1234
SpawnState = S_PLAY_STND
SpawnHealth = 1
SeeState = S_PLAY_RUN1
SeeSound = sfx_None
ReactionTime = 0
AttackSound = sfx_thok
PainState = S_PLAY_PAIN
PainChance = MT_THOK
PainSound = sfx_None
MeleeState = S_NULL
MissileState = S_PLAY_ATK1
DeathState = S_PLAY_DIE
XDeathState = S_NULL
DeathSound = sfx_None
Speed = 1
Radius = 16*FRACUNIT
Height = 48*FRACUNIT
DispOffset = 0
Mass = 1000
Damage = MT_THOK
ActiveSound = sfx_None
Flags = MF_SOLID|MF_SHOOTABLE
RaiseState = MT_THOK

For Lua lumps it's pretty much the same, except the lines are "//$Sprite <name>" and "//$Name <name>". Here's an example:

Code:
mobjinfo[MT_EXAMPLE] = 
	//$Sprite CUSTA3A7
        //$Name Example object
        doomednum = 1234,
        spawnstate = S_PLAY_STND,
        spawnhealth = 1,
        seestate = S_PLAY_RUN1,
        seesound = sfx_None,
        reactiontime = 0,
        attacksound = sfx_thok,
        painstate = S_PLAY_PAIN,
        painchance = MT_THOK,
        painsound = sfx_None,
        meleestate = S_NULL,
        missilestate = S_PLAY_ATK1,
        deathstate = S_PLAY_DIE,
        xdeathstate = S_NULL,
        deathsound = sfx_None,
        speed = 1,
        radius = 16*FRACUNIT,
        height = 48*FRACUNIT,
        dispoffset = 0,
        mass = 1000,
        damage = MT_THOK,
        activesound = sfx_None,
        flags = MF_SOLID|MF_SHOOTABLE,
        raisestate = MT_THOK
}

A few words of warning about this feature: The parsers I wrote for this are very rudimentary. I can't guarantee that they will accept every valid script and reject every invalid script. If you do unorthodox stuff in your object definitions, Zone Builder may fail to read them. If you have errors in parts of the scripts that aren't read by the parsers, Zone Builder will recognize them as valid even though SRB2 won't. I consider these parsers a luxury feature and I don't intend to support all the intricacies of these scripting languages, especially Lua. Feel free to report issues to me, but please be aware that I might not be able to fix all of them.

Here are a few known limitations of the custom Thing parsers:
  • Only long-form object definitions like the example above are recognized in Lua scripts. Short-form definitions where the parameter names are omitted aren't recognized.
  • The editor won't recognize statements that modify only a single entry of an already existing object type entry, e.g. "mobjinfo[MT_EXAMPLE].doomednum = -1".
  • Arithmetic operations aren't supported, except for multiplications with FRACUNIT in the Radius and Height fields.
  • The parsers don't check if you defined freeslots for your custom objects, so if your objects show up in Zone Builder but not in SRB2, that might be a reason.
 
Last edited:

MK.exe

The one and only!
Kart Krew™️
Contest Winner🏆
Oh boy. Another update that surpasses the current version of the main game. Time for me to learn lua scripting! I been meaning to get to it now that ZB 2.3 has a lua scripter
 
I been meaning to get to it now that ZB 2.3 has a lua scripter
While I haven't tried Zone Builder version 2.3 (nor even 2.2) yet, I'll be very surprised if it can handle editing Lua scripts in any other way than just as a simple text editor. You're likely much better off using Slade3 or something (although it's nice if you want to just tweak a line or two of Lua), especially considering "You can't add new lumps to the file though, because this isn't a lump editor".

Edit: ...Oh. Oops. Apparently, according to the change-log in the opening post, there IS syntax highlighting. (I didn't know, as comment #133 didn't mention it, I didn't try it, and I forgot to read the change-log in the opening post.) My bad.
 
Last edited:

MK.exe

The one and only!
Kart Krew™️
Contest Winner🏆
You're likely much better off using Slade3 or something (although it's nice if you want to just tweak a line or two of Lua), especially considering "You can't add new lumps to the file though, because this isn't a lump editor".

I have Slade3 but i didn't know it could be used for making Lua scripts. On the plus side, if anything occurs i can just report it here so it can get fixed
 

glaber

Emblem Radar Ready
is there any documentation on how to use the different slope types?
I've figured out one type, but I can't figure out the vertex type.
 

glaber

Emblem Radar Ready
I didn't even know the page existed. when ever I looked before in the last few months, I got a page for an exe mod's slopes
 

Ritz

Subhedgehog
Sonic Team Junior
Bug report: ZB disallows negative numbers for tags, which matters since a tag of -1 supposedly applies an effect to the entire map.

EDIT: Tagging it as 65535 has the same effect, though. Of course it does
 
Last edited:

MascaraSnake

Maybe out of retirement?
Zone Builder v2.4 is out! Only very little has changed, but I wanted to update a few minor things for 2.1.15, so there you are. As usual, see the first post for a changelog.
 
Alright. We got $Sprite and $Name for custom Things. Though... Can we expect $Extra, $Flip, $Special, $Ambush, and/or $Angle in the future? (Those are very much completely optional, and one can most likely remember what those things will do for various custom objects one may use, especially if one makes the custom object oneself.) Regardless of whether we get those or not, the custom Thing support is still god-like, with sprites and also names now. Nice work. Very nice work.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top