[Download] 1.2 Mapping Client
#1
What is this?

This is a modified Assault Cube executable with various new features and quality-of-life improvements that dramatically improve workflow with the in-game map editor. Since it uses your existing Assault Cube resources, it is a small download and doesn’t overwrite any files.

Editor Interface Improvements

Cube Grid

"Solid" cubes now have purple grid guides to differentiate them from non-solid cubes

The cube grid and selection edges now fade out when the mouse is idle for a few moments (moving the mouse will bring back the grid)

[Image: autohidegrid.gif]

Entities

Entities can now be selected and edited from any distance even if other entities are closer to the player.

Entity sparkles are now colorized according to the corresponding entity so identifying them from a distance is easier (arrows from playerstart entities also colorized)

The closest/selected entity now radiates smoke particles while retaining its sparkle color.

The entity information text that is visible on the bottom-left of the screen has been reformatted into three lines: the first shows the selection status of entities, the second is the standard entity info (entity name is now colorized to match the entity sparkle), and the third line displays the file name/location of the resource on disk for sounds and mapmodels.

[Image: sparkles.gif]

There is now a toggleable “clean edit” mode for the editor that hides entity particles and reduces the size of the entity information text (does not hide grid or selection edges as they fade out automatically when the mouse is idle)

[Image: cleaneditmode.gif]

Mapmodels

The rotation of mapmodels is now displayed in degrees and editing using “domodifier” (holding the [1] key and scrolling the mouse wheel) nows cycles through the 24 unique angles possible.

[Image: mapmodelselection.gif]

New Cubescript Commands

Documentation for all commands available later in this post (Must be manually installed for in-game reference/tab autocomplete to work)

Interface

/cleanedit - enables (1) or disables (0) clean edit mode.

/togglecleanedit - toggles clean edit mode (recommended bind)

/lockselent - locks (1) or unlocks (0) the entity selection to the nearest/selected entity. Selected entities may be edited from any distance even if other entities are closer to the player.

/togglelockselent - toggles entity selection lock (recommended bind)

Cube Selection

/savesel - stores selection info in memory

/reselect - restores selection(s) from memory

[Image: saveselreselect.gif]

/select_all - selects entire map (new maps must be saved/loaded for this command to work)

/undo_sel - removes the most recent selection(s) Useful when you make complex selections and accidentally make a stray selection of additional cubes

Cube Information

Commands that return a value can be passed to other cubescript commands, for example to the /echo command to print the value to the local player or the new selection filtering command /filter_sel

/texname - returns the filename of the most recently selected cube’s wall/floor/ceiling texture

/curheight - prints all height info of the most recently selected cube or a cube at a given location

/getcurheight - returns specific height info for a cube

/curtex - prints all texture slot information of the most recently selected cube or a cube at a given location

/getcurtex - returns specific texture info for a cube

[Image: curtex.png]

Miscellaneous

/equalize_sels - A variation of the existing /equalize command that levels the floor/ceiling of all selections, except this one levels all selections to the same height instead of each selection being calculated separately

/paste_half - pastes only floor cubes or only ceiling cubes from copied selection. The choice of floor or ceiling is derived from which the player is looking at

[Image: paste-half.gif]

/scalelight - A variation of the existing command /scalelights except this scales an individual light’s size and/or intensity

[Image: scalelight.gif]

/clearrecenttex - clears the history of recent textures used in the current map

/tex2front - brings textures from a selected cube to the front of the texture history list for immediate application

Selection Filtering

Possibly the most powerful new feature is the ability to process cube selections based on various parameters such as a cube’s texture choice or height, or combine/subtract overlapping selections.

[Image: filter-sel-demo.gif]

The command format is /filter_sel [T] [V] where T is the type of filter to apply and V is up to seven values based on the filter type used. Typing /filter_sel in the console (with the documentation installed) will show the type options which I will also list below:

Filter by Cube Texture

FLOOR_T, WALL_T, UPWALL_T, CEIL_T, where V is up to seven slot numbers to match

Filter by Cube Height

FLOOR_H, CEIL_H, where V is up to seven height values to match

Filter by Cube Type

SOLID, HEIGHTFIELD, CORNER, SPACE, where (V > 0) is matching the type, and (V <= 0) excluding the type. “SPACE” cubes are simply normal cubes not of the other types.

Miscellaneous

DISSOLVE, where V is the percent of cubes to randomly remove from the selection(s)

SUBTRACT, where the V most recent selection(s) are subtracted from the remaining selection(s)

MERGE, where V is unused and all selections are combined/condensed into non-overlapping selections

Installation

Client Download

Windows - 1.2MB

Extract to the same location as your existing Assault Cube installation. Run mapper.bat to launch.

Configuration

Optional, but I highly recommend binding the commands /togglecleanedit and /togglelockselent to improve editing efficiency. I use F3 and F4, respectively.

You can set these binds in game by typing the following:

/editbind F3 togglecleanedit

/editbind F4 togglelockselent

Documentation

For the in-game console’s TAB-autocomplete function to work with the new commands and the command reference to appear you will want to manually install this documentation.

Add the following code to your config/docs.cfg file somewhere (like the top)

docsection [New]

//----------------------------------------------------------------------------

docident [scalelight] [Scales nearest/selected light];

docargument [S] [Size change (percentage)] [] [0];

docargument [I] [Intensity change (percentage)] [] [0];

//----------------------------------------------------------------------------

docident [togglelockselent] [toggles isolated selection of an entity, where the entity is selected as the closest entity regardless of any closer entities.];

docremark [The desired entity must be the closest entity when making selection.];

//----------------------------------------------------------------------------

docident [filter_sel] [filters selections(s) to cubes matching at least one of the provided values];

docargument [T] [Type of filter applied to selection(s)] [] [0];

docargument [V] [Up to seven values to match, depending on the filter] [] [1];

docremark [The following filters are supported:];
docremark [];
docremark [Textures:]
docremark [FLOOR_T, WALL_T, UPWALL_T, CEIL_T, where V is the slot number];
docremark [];
docremark [Heights:]
docremark [FLOOR_H, CEIL_H, where V is the height];
docremark [];
docremark [Types:]
docremark [SOLID, HEIGHTFIELD, CORNER, SPACE, where (V > 0) is matching the type, and (V <= 0) excluding the type];
docremark [];
docremark [Functions:]
docremark [DISSOLVE, where V is the percent of cubes to randomly remove from the selection(s)];
docremark [SUBTRACT, where V is the number of selections to subtract from the selection(s)];
docremark [MERGE, where V is unused];
docremark [];

docexample [filter_sel CEIL_T 0] [selects only cubes in the current selection(s) with the skymap as the ceiling texture];
docexample [] [];
docexample [filter_sel DISSOLVE 80] [removes 80% of the selection(s) randomly];

//----------------------------------------------------------------------------

docident [filter_sel FLOOR_T] [filters selections(s) to cubes using one of the provided floor textures];

docargument [T] [Up to seven texture slots to match] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel WALL_T] [filters selections(s) to cubes using one of the provided wall textures];

docargument [T] [Up to seven texture slots to match] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel UPWALL_T] [filters selections(s) to cubes using one of the provided upper wall textures];

docargument [T] [Up to seven texture slots to match] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel CEIL_T] [filters selections(s) to cubes using one of the provided ceiling textures];

docargument [T] [Up to seven texture slots to match] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel FLOOR_H] [filters selections(s) to cubes with one of the provided floor heights];

docargument [H] [Up to seven heights to match] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel CEIL_H] [filters selections(s) to cubes with one of the provided ceiling heights];

docargument [H] [Up to seven heights to match] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel SOLID] [filters selections(s) to cubes that are/aren't solid];

docargument [V] [valid integer] [] [0];
docremark [V > 0 searches for solids, removing non-solids]
docremark [V <= 0 searches for non-solids, removing solids]

//----------------------------------------------------------------------------

docident [filter_sel HEIGHTFIELD] [filters selections(s) to cubes that are/aren't heightfields];

docargument [V] [valid integer] [] [0];
docremark [V > 0 searches for heightfields, removing non-heightfields]
docremark [V <= 0 searches for non-heightfields, removing heightfields]

//----------------------------------------------------------------------------

docident [filter_sel CORNER] [filters selections(s) to cubes that are/aren't corners];

docargument [V] [valid integer] [] [0];
docremark [V > 0 searches for corners, removing non-corners]
docremark [V <= 0 searches for non-corners, removing corners]

//----------------------------------------------------------------------------

docident [filter_sel SPACE] [filters selections(s) to cubes that are/aren't spaces];

docargument [V] [valid integer] [] [0];
docremark [V > 0 searches for spaces, removing non-spaces]
docremark [V <= 0 searches for non-spaces, removing spaces]
docremark []
docremark ["Space" cubes are cubes not matching any other unique type, e.g. heightfields]

//----------------------------------------------------------------------------

docident [filter_sel DISSOLVE] [Removes P percent of selection(s) randomly];

docargument [P] [percentage of cubes to remove from selections(s)] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel SUBTRACT] [Subtracts the last N selections from all other selections];

docargument [N] [Number of selections to subtract] [] [0];

//----------------------------------------------------------------------------

docident [filter_sel MERGE] [Combines and condenses overlapping selections];

//----------------------------------------------------------------------------

docident [curtex] [Prints texture slot information of the selected cube, or the cube at X / Y];
docargument [P] [Position of texture to check] [FLOOR, WALL, UPWALL, CEIL, ALL] [0];
docargument [X] [X coordinate of cube to check] [optional] [0];
docargument [Y] [Y coordinate of cube to check] [optional] [0];
docremark [If no coordinate arguments are provided, curtex will list textures(s) for the currently selected cube];
docremark [];
docremark [Note: Without x/y input, curtex works with the top-left cube of the most recent selection]
docexample [curtex WALL] [prints the texture slot used for the wall of the selected cube];

//--------------------------------------------

docident [texname] [returns the filename of the selected cube's texture at position P]
docargument [P] [Position of texture to return] [FLOOR, WALL, UPWALL, CEIL] [0];
docexample [echo (texname FLOOR)] [prints the filename of the selected cube's floor texture]

//--------------------------------------------

docident [getcurtex] [returns texture slot number of the selected cube, or the cube at X / Y];
docargument [P] [Position of texture to return] [FLOOR, WALL, UPWALL, CEIL, ALL] [0];
docargument [X] [X coordinate of cube to check] [optional] [0];
docargument [Y] [Y coordinate of cube to check] [optional] [0];
docremark [If no coordinate arguments are provided, getcurtex will list textures(s) for the currently selected cube];
docremark [];
docremark [Note: Without x/y input, getcurtex works with the top-left cube of the most recent selection]
docremark [];
docremark [Returns -1 on error];
docexample [getcurtex FLOOR 100 75] [returns the texture slot used for the floor at position 100/75];

//--------------------------------------------

docident [curheight] [Prints height information of the selected cube, or the cube at X / Y];
docargument [P] [Position of height to check] [FLOOR, CEIL, BOTH] [0];
docargument [X] [X coordinate of cube to check] [optional] [0];
docargument [Y] [Y coordinate of cube to check] [optional] [0];
docremark [If no coordinate arguments are provided, curheight will list height(s) for the currently selected cube];
docremark [];
docremark [Note: Without x/y input, curheight works with the top-left cube of the most recent selection]
docexample [curheight CEIL] [prints the ceiling height of the selected cube];

//--------------------------------------------

docident [getcurheight] [returns the height of the selected cube, or the cube at X / Y];
docargument [P] [Position of height to check] [FLOOR, CEIL] [0];
docargument [X] [X coordinate of cube to check] [optional] [0];
docargument [Y] [Y coordinate of cube to check] [optional] [0];
docremark [If no coordinate arguments are provided, getcurheight will return the height of the currently selected cube];
docremark [];
docremark [Note: Without x/y input, getcurheight works with the top-left cube of the most recent selection]
docremark [];
docremark [Returns -255 on error];
docexample [getcurheight FLOOR 100 75] [returns the floor height at position 100/75];

//----------------------------------------------------------------------------

docident [undo_sel] [removes last N selection(s) from the list of selections];
docargument [N] [Number of selections to remove] [If no argument provided, a value of 1 is used] [0];
docexample [undo_sel 2] [removes the last two selections made from the list of selections.];

//----------------------------------------------------------------------------

docident [select_all] [removes all current selections and selects entire map area, including bounding walls];

//----------------------------------------------------------------------------

docident [equalize_sels] [levels the floor/ceiling of all selections, with the min/max height gathered from all of them];

docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)] [0];

docremark [This differs from /equalize in that /equalize_sels levels all selections at once, rather than each selection having it's own min/max height]

//----------------------------------------------------------------------------

docident [clearrecenttex] [clears the history of recent textures used in the current map];

//-------------------------------------------------------------------

docident [cleanedit] [turns on/off clean edit mode];
docargument [V] [0(off)...1(on)] [] [0];
docremark [While editing in clean edit mode, objects/guides not normally visible remain unvisible]
docremark [i.e. The grid guidlines, selection borders, entity sparkles, clips, playerstart arrows, and closest entity information are hidden]

//-------------------------------------------------------------------

docident [togglecleanedit] [inverses the on/off state of cleanedit];

//-------------------------------------------------------------------

docident [savesel] [Stores the list of current selections to later be recalled by /reselect];

//-------------------------------------------------------------------

docident [reselect] [Removes all current selections and selects the list of cubes previously stored with /savesel];

//-------------------------------------------------------------------

docident [tex2front] [Brings the selected cube's texture slot used in position P to the front of its recent textures list];
docargument [P] [The position of the cube's texture to bring to front] [FLOOR, WALL, UPWALL, CEIL] [0];
docremark [tex2front works with the top-left cube of the most recent selection]

//-------------------------------------------------------------------

docident [paste_half] [Pastes the floor/ceiling of a previously copied selection, leaving the opposite half unmodified];
docremark [The choice of floor or ceiling is derived from which the player is looking at]

//-------------------------------------------------------------------

This also allows you to use the in game reference to access all these commands from a menu within AC (main menu -> help -> assaultcube reference -> new)

What I Would Like from You

Players / Mappers:

This is a product of many hours of programming, testing, and troubleshooting. I strongly encourage feedback, which helps me improve on this design. I would like to hear how this client improves your mapping and any features you would like to see in a future version.

Programmers / Advanced Users:

I would like to get Mac and Linux ports for this. It is based on the 1.2.0.2 source.

Diff: hosted on pastebin because of post character limit

Please contact me if you can port then I can add the port(s) to this post.
Thanks given by: zero , It's L'enmerdeur , Toriality


Messages In This Thread
[Download] 1.2 Mapping Client - by Felix-The-Ghost - 08 Jun 14, 06:42PM
RE: [Download] 1.2 Mapping Client - by PhaNtom - 08 Jun 14, 09:02PM
RE: [Download] 1.2 Mapping Client - by MCS - 09 Jun 14, 02:38AM
RE: [Download] 1.2 Mapping Client - by MPx - 10 Jun 14, 01:35AM
RE: [Download] 1.2 Mapping Client - by PhaNtom - 10 Jun 14, 02:22AM
RE: [Download] 1.2 Mapping Client - by RKTnoob - 10 Jun 14, 01:40PM
RE: [Download] 1.2 Mapping Client - by Alien - 11 Jun 14, 07:34PM
RE: [Download] 1.2 Mapping Client - by PhaNtom - 22 Aug 14, 01:39PM