mapartist print|set|get|clear
print: prints the map artist player ID
set: sets the map artist player ID to the currently logged in player
get: returns the current map artist player ID
clear: erases an existing map artist record in the current map
modeinfo list|get|clear|<modelist> <modeflags>
list: lists current modeinfo entries
get: returns list of current modeinfo entries
clear: erases current list of modeinfo entries
<modelist> <modeflags>: specifies flags for a list of modes
DOCREF modeinfo mapartist
- copyent and pasteent now also work with the menu list of copied ents
- pressing editmeta while using pasteent opens the menu
- new switch command (not unlike the old one)
- make expandselection and shrinkselection work with multiple selections
DOCREF switch copyent pasteent
newent7 type attr1 attr2 attr3 attr4 attr5 attr6 attr7
Works like newent, but can set all seven attributes directly.
Does not automatically put the camera yaw angle into mapmodel and flag
entities.
fixed selectionwalk so that the first parameter can be ""
DOCREF newent7
changed commands:
strstr haystack needle
now returns position of needle in haystack (counting from 1)
or zero, if not found
substr string start len
now counts negative length from total length
"substr text 1 -2" now returns the text without first and last char
strreplace text search replace
no longer restricted to 260 char stringlengths
removed commands:
swapelements, strpos (can be scripted, if required)
DOCREF strstr substr
DOCREF swapelements strpos
* fix some memory leaks
* rename stuff
* fix crash
Removed commands and variables:
chmenumdl (replaced by menumdl)
scorefont (replaced by "menufont score mono")
menuitemvar (better handled with fully dynamic menus)
Changed commands:
menufont menu font
Sets the font for a specific menu. If menu is "", the currently
initialised menu is used. Example: menufont score mono
menumdl menu mdl anim rotspeed scale
Assumes the function of the previous chmenumdl. If menu is "", the
currently initialised menu is used. Specifies, which model to render
and how. If only menu is specified, no model is rendered.
DOCREF chmenumdl scorefont menufont menumdl menuitemvar
updateeditinfopanel is a cubescript hook to provide additional information
about the current edit situation, like, for example, the closest entity.
The returned text is rendered on the right side of the screen.
Default for updateeditinfopanel is explainclosestentity which provides
detailed info about the closest entity.
editinfopanelmillis <n>
update the edit info panel every n milliseconds
hideeditinfopanel 0|1
render (0) or hide (1) the edit info panel
DOCREF updateeditinfopanel editinfopanelmillis hideeditinfopanel
- cleanup scoreboard menu code
- clientlog info messages for debug binaries only
- have debug binaries check for easy docs errors
- docinvalid now also checks for broken references
- collect most sound infos in one table and use it to generate the menus
- no more sound category checks with ranges
- now only PAINx and FOOTSTEP* sounds use hardcoded index numbers
enumsounds <list of categories>
Lists sound index numbers and short descriptions for all sounds of one
or more categories. The argument should contain one or more of PAIN,
OWNPAIN, WEAPON, PICKUP, MOVEMENT, BULLET, OTHER, VOICECOM, TEAM,
PUBLIC, FFA, FLAGONLY. All sounds with at least one of the flags will
be listed. Flag names prefixed with "!" will exclude all matching
sound from the list.
Example: /echo (enumsounds "VOICECOM !PUBLIC") will list all voicecom
sounds that are for teams only.
DOCREF enumsounds
- add new hook "autoexec", executed right after autoexec.cfg
- properly report errors during hook execution
- new script to edit the contents of an alias in the console
DOCREF autoexec
Restore the old persistidents system from AC 1.0, since it's working as
intended - if used properly.
As a reminder:
* aliases created by "const" and "tempalias" are never persistent
* aliases created or altered by "alias" or "=" become persistent, if
the persistidents flag is set during that operation
* persistidents if false during the execution of almost all config files
during game start - those files can create aliases with default values
which will not be persistent (until changed later while the flag is
set)
* before saved.cfg is executed, the flag is set and stays set all
throughout the game - which means, that all changes (from menus, for
example) will change the altered alias to "persistent"
* exceptions for map or model config files are unnecessary, since those
run restricted and can't create aliases anyway
* exceptions are necessary for "late run" config files like those in
config/opt/
The new command "persistidents" may be used to manually set or clear the
flag. It also returns the current state of the flag. If used in a config
file, the flag is restored to its original value when the file ends
execution.
In short: only late-run config files (meaning: run after saved.cfg was
restored) may need to manually set/reset the flag. Use const and tempalias
where appropriate and clear persistidents before creating an alias with a
not-to-save default value that may be changed and made persistent later.
DOCREF persistidents
convmap is a toolset to convert hundreds of maps mostly automatically
to map format 10. Old media paths from akimbo and from before AC 1.2 are
automatically converted to AC 1.2 and akimbo2 paths.
The additional editing scripts mostly help with further optimisation of
existing maps (mainly to reduce the number of clipped entities).
If convmap is loaded after mapeditscripts, one additional conversion
stage is unlocked.
Add some commands to support an entity TODO list. Entity errors during
map load are automatically added to the list. The list is saved and
restored with xmaps. A keybind (no default key assigned) to scroll
through TODO entities was added.
The list is indented as a means for automated map check scripts to
return a list of entities to fix.
cleartodoentities [index]
Clear list of TODO entities. The list is also deleted, when a new map
is loaded.
If an entity number is given as an argument, only entries for this
entity are cleared.
addtodoentity index comment
Add the entity #index to the TODO list. Add optional comment.
enumtodoentities
Returns a list of TODO entities. Returns entity index number and comment
for every entry.
DOCREF enumtodoentities addtodoentity cleartodoentities
If the assigned key is pressed, the mousewheel can be used to cycle
through player spawn points, sorted by groups CLA, RVSF and FFA.
No default key is assigned.
gotonextplayerstart can be used, to manually jump to the next spawn.
enlargearchslopeselections
If the variable is set to 1, after placing an arch or a slope, the
selection is enlarged, so that the arch or slope can be changed by
vdelta increments (for example, to raise an arch in 1/4 cube increments).
This is also the classic behaviour.
If the variable is set to 0 (which is now default), the selection remains
unchanged. This way, for example, the arch can be raised or lowered by
regular cube increments.
The arch menu allows changing the setting and also contains a script to
enlarge the selections once.
pushselections
New script to store the positions of all current selections. Can be used
repeatedly. To restore the selections, type "popselections".
enlargevdeltaselections
Enlarges all selections by one cube in x- and y- direction, to change a
selection from the "cube area" to the "vdelta area".
If an argument is given, it is used as increment value, so, for example
"enlargevdeltaselections -1" undoes a previous enlargement.
DOCREF enlargearchslopeselections pushselections enlargevdeltaselections
* removed convertcase
use toupper (concat A B C D ....) instead
* moved several COMMAND macros to their function bodies
* cleaned up screenshot extension handling
* prefix screenshot argument with "screenshot/" and add correct extension
selectionwalk action beginsel endsel
The command iterates over all cubes in all selections and executes
"action" for each cube. The cubes of every selection are framed by
executions of "beginsel" and "endsel". The action script is allowed
to make changes to cube attributes, and if it does, an undo point is
automatically added. "beginsel" and "endsel" are optional.
While the scripts are executed, several aliases provide further info:
sw_cursel
Position and size of the current selection. Valid in all three
scripts. Holds four integer values for x, y, xs, ys. See command
"selection" for details.
(all following aliases are only valid during the execution of the action
script and provide the attributes of one cube of the map)
sw_abs_x
sw_abs_y
sw_rel_x
sw_rel_y
Absolute and relative (within the current selection) coordinates of
the current cube. Read-only values.
sw_type
Type of the current cube. Can be 0..4 for SOLID, CORNER, FHF, CHF and
SPACE. May be changed to other numerical value or keyword.
sw_floor
sw_ceil
Floor and ceiling heights of the current cube. Range -128..127
sw_wtex
sw_ftex
sw_ctex
sw_utex
Texture slot indices for wall, floor, ceiling and upper wall of the
current cube.
sw_vdelta
sw_tag
Vdelta and tag values of current cube.
sw_r
sw_g
sw_b
Current light values of current cube. Can be edited, but only with
temporary effect. Will be reset with the next light recalc.
The command is mostly useful for statistics scripts (like counting cubes
with certain attributes), but is can also be used for scripted editing,
as the following (useless) example shows:
selectionwalk [ += sw_floor (rnd 2) ]
Further changes:
The command listoptions now also can return the names of cube types:
echo (listoptions cubetypes)
The command countwalls is now implemented as a script instead of a
builtin command. The script works better, because it doesn't create
unnecessary undo points.
DOCREF selectionwalk listoptions countwalls
Calculate some key values to determine map geometry viability.
mapareacheck <what>
Returns different sets of statistics, depending on the keyword "what":
vdelta
Returns table of numbers of cubes within a certain range of vdelta
differences (steepness)". First entry is "0..2 cubes steep", next is
"2..4" and so on.
steepest
Returns the coordinates of the steepest heightfield cube.
total
Returns the number of non-solid cubes on the map.
pprest
Returns the number of cubes _not_ visible from one of the probe
positions.
pp (default)
Returns a table of all (currently 64) probe points of the map. Each
probe point is listed with:
- x-coordinate
- y-coordinate
- floor height
- area visible
- volume of visible area
- average height in visible area
DOCREF mapareacheck
(for now) by default bound to the '#'-key (and backslash)
Press and hold the '#'-key and scroll the wheel to scroll console.
Just pressing and releasing '#' resets the console position.
Without the console open, releasing '#' always resets the console position.