The screen resolution menu now shows two batches of resolutions: first
those recommended by the graphics driver and then some more default
resolutions. Resolutions higher than the reported maximum are not listed.
setdesktopres was replaced by two variables reflecting the desktop
resolution (or zero, if not available): desktopw and desktoph
getdisplayresolutions returns a list of available screen resolutions
DOCREF getdisplayresolutions desktopw desktoph setdesktopres
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.
By adding a "requires"-attribute to the mapmodel config file, a mapmodel
can trigger the map editor to include another model and have it loaded
during map load. This can be used to create model modifications which
use ressources of another model. For example, a new model can provide a
different skin for an existing model - and that attribute will make sure,
that the required original model is also loaded.
This mechanism does not work, if the attribute is changed after the map
is finished, because the map editor has to copy the dependency into the
map config file. After adding the attribute, the map has to be written at
least once (the dependencies are checked during savemap).
The point of dependency-attributes is to make sure the custom original
model is also loaded from a package server. Mods of official models do not
need to use the attribute, because the official model does not need to be
downloaded. The attribute is necessary, if one model on akimbo depends on
another model on akimbo.
The mapmodels that are required by other models have an additional
parameter "1" added to their mapmodel command in the config file - which
will preload the model during map load, even if no entity actually uses it.
The additional parameter is handled automatically.
The new command updatemapmodeldependencies triggers the dependency check
manually - which will make required models appear in the model list. This
is done automatically during savemap.
Changed commands:
mapmodelslotusage
now returns a single space, if the model slot is not used by any
map entity, but is required by another model (with entities)
mapmodel
allows one more parameter - if "1", the model is preloaded, even if
no entities use it
mdlattribute requires <modelname>
if used, specifies that the current model depends on parts of another
custom model (which therefore also has to be downloaded)
can only be used once per model config
example:
mdlattribute requires makke/signs/exit
could be used in signs/loading-dock/md2.cfg to reuse
makke/signs/exit/tris.md2
DOCREF mdlattribute mapmodel mapmodelslotusage
Unless otherwise specified in a config file, every model (md2 or md3)
tries to load skin.jpg, skin.png, ../skin.jpg and ../skin.png (in that
order). This commit silences the errors if some of those attempts fail.
There is still an error message, if none of the four files can be found.
The commit also deletes five identical skin.jpg and places one in ../
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
The arch menu now allows
* editing all vertices instead of only half of them, for non-symmetrical
arches
* deleting saved custom arches
* using custom arches for other widths than what they were created for
* measuring an arch on a map and creating a prefab of it
Scripts:
av_measure
"echo (av_measure)" prints the list of vdelta values of a selected arch.
Only works as expected, if the selection is only 1 cube wide. To use the
measurements to create a width 8 arch, select 8x1 cubes under the arch
to copy and type "av 8 (av_measure)". Or use the menu.
av width-1 vdelta_list
One of the oldest scripts of the game (and because of that, the first
argument stayed "arch width minus one", for compatibility reasons).
Creates a prefab arch of the desired width. If the list has exactly
as many entries as required, all of them are used to create the prefab -
this is the way the script has always worked.
If there are too few or too many elements in the list, the script will
try to take half the required values from the list and mirror the other
half to create a symmetrical arch. This way, a list can be used for
slightly wider or narrower archs. Or use the menu.
The menu lists all prefab arches and allows to edit them with sliders.
Arches can be saved and restored.
"archvertex" now returns the old value of the vertex, and if the vertex
argument is omitted, doesn't change it.
enumalias prefix
Lists all persistent aliases that start with prefix. Returns a table
with two entries per alias: 1) full name and 2) name without prefix
DOCREF archvertex enumalias
The edit protocol now allows the following commands in multiplayer:
arch, slope, edittag, edittagclip, selectionrotate, selectionflip
also:
mapenlarge has been limited to size 10 in multiplayer
entitiy undelete in multiplayer has been fixed
SV_EDITS, SV_EDITD and SV_EDITE are to be cleaned up with a protocol bump
DOCREF arch slope edittag edittagclip selectionrotate selectionflip
undolevel <level>
Returns the number of undo steps that can be undone. If argument "level"
is given, as many steps are undone, until "level" steps remain.
Example, during editing:
echo (undolevel)
prints number of previous editing steps, for example "55"
... do some editing ...
undolevel 55
undoes all changes to restore the previous state (if that state
is still in memory... keep in mind, undo-space is limited, see
"undomegs" parameter)
Unless memory limits delete states, undolevel commands can be undone
with "redo".
DOCREF undolevel
The mapper has now the choice to disable several graphics features on
the client (for his map only, of course). The overrides are stored in
the map header.
mapoverride_nowaterreflect
If "1", water reflection is disabled. Useful, when odd water colours
are used to emulate other liquids that are not supposed to be that
reflective.
mapoverride_limitwaveheight
If "1", waveheight is capped at 0.1 max. Useful for small water
areas (like puddles), where higher waves would look weird.
mapoverride_nostencilshadows
If "1", stencil shadows are disabled. On clients, where stencil shadows
are otherwise enabled, blob shadows are used instead. If shadows are
disabled anyway, they stay disabled. Useful for dim maps, where hard
shadows make no sense.
The player is free to ignore any of those overrides:
ignoreoverride_nowaterreflect
If "1", mapoverride_nowaterreflect is ignored and regular client
settings are used.
ignoreoverride_limitwaveheight
If "1", mapoverride_limitwaveheight is ignored, and "waveheight" is
used unchanged.
ignoreoverride_nostencilshadows
If "1", mapoverride_nostencilshadows is ignored.
DOCREF mapoverride_nowaterreflect ignoreoverride_nowaterreflect
DOCREF mapoverride_limitwaveheight ignoreoverride_limitwaveheight
DOCREF mapoverride_nostencilshadows ignoreoverride_nostencilshadows
also: more stuff in the map settings menu
getmaptimestamp fmt
Returns the "last written" timestamp of the current map in the requested
format. If fmt starts with "U", the time is given as UTC, otherwise
as local time. If fmt is empty, or not given or just the "U", the format
defaults to "YYYYMMDD_hh.mm.ss". Use "%c" to get something nicer.
DOCREF getmaptimestamp
getwatercolour
Returns a string with the four components of the water colour, red,
green, blue and alpha.
Example: echo (getwatercolor) --> 20 25 20 178
setwatercolour what value
Allows setting the components of the water colour independently. "what"
is either a keyword "red|green|blue|alpha" or the index number 0..3 and
determines, which component is set to "value".
Example:
watercolour 0 0 0
sets all colour components to zero
setwatercolour red 200
sets the red component to 200
DOCREF getwatercolour setwatercolour
same as looplist, but it automatically counts the loops in "i", starting
with 0.
Example:
a = [u v w] ; b = [x y z]
looplisti $a m [echo $m (at $b $i) $i]
u x 0
v y 1
w z 2
DOCREF looplisti
...including the option to sort the most visible textures to the default
slots for special uses (wall, floor, ceiling).
Also: add the information about default texture slots to the menus. Some
mappers may not know, yet.
Also: add a "Pick texture name" option to the edit texture slot menu.
The command sorttextureslots now allows to manually sort the first few
slots by adding the slot number to move to the slots #1, #2, #3...
DOCREF sorttextureslots
The command textureslotusagelist now returns two values per slot: usage
and visibility. If given the argument "onlymostvisible", instead of the
regular list, a list of only the most used wall, floor, ceiling and upper
wall textures (alternating with the keywords) is returned.
Example:
echo (textureslotusagelist onlymostvisible)
--> wall 211 floor 45 ceiling 0 "upper wall" 79
DOCREF textureslotusagelist
When a script file is executed, any additional arguments are passed
as execarg1..execargX to the script. The number of arguments is in
execnumargs and if the script in the file sets the value of execresult,
the exec command returns that value.
Example:
If there is a file testscript.cfg with this content:
execresult = (* $execarg1 $execarg2)
then the command
echo (exec testscript.cfg 6 7)
will output "42".
DOCREF exec
* 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
Allows to reset notexture, to set a high-contrast color to find and
fix the areas and to set to a useful default texture.
As useful textures, in addition to rock.jpg and concrete.jpg, the menu
lists the default wall, floor and ceiling textures of the current map,
and also the last watched texture from the texture menu.
Also adds a few checks to detect unconverted map config files and misuse
of the new bright highlight textures.
replaced by makke/rock.jpg, which is the base for the "missing content"
texture - so, only the text is missing...
on outpost, notexture was reset (since there's no use for it on official
maps)
Collect warnings during load_world() and issue a warning at the end. Most,
but not all warnings already printed a message - which usually scrolls out
of the console quite fast.
The collected value is also given back by the loadmap command, which
allows batch editing scripts for maps stop at problematic maps.
Mapsound errors are not detected, if soundvol is zero. Missing textures are
not flagged, if notexture is set.
The error code is ored together from those elements:
0x0000001 entity attribute overflow
One or more map entities had attribute values, that are no longer
supported with map format 10. Rework manually.
0x0000010 map decoder error
Indicates a damaged map file.
0x0000100 world error -1
Map is completely solid. Very funny.
0x0000200 world error -2
Map border is not solid. Fix manually.
0x0001000 missing skymap texture files
0x0002000 missing world texture files (only if no notexture is set)
0x0004000 missing mapmodel files
0x0008000 missing mapsound files
0x0010000 bad mapsound command in map config
0x0020000 bad mapmodel command in map config
0x0040000 bad texture command in map config
0x0080000 bad loadnotexture command in map config
0x0100000 error during loading of mapmodels (see earlier console output)
0x1000000 out of range integer value in map config (for example, "fog 0")
0x2000000 out of range float value in map config
0x4000000 generic cubescript error in map config
The command loadmap is now also available for non-debug builds.
DOCREF loadmap
Mapmodel and -sound entities which refer to unassigned slots are now
listed in the "edit slots" menus. From there, the entities can be visited
and manually corrected or deleted.
The condition appeared on 32-bit g++ builds with -O3. Apparently, due to
optimisations, the player1 location vector was kept in FPU registers
during collision checks - and the written-to-memory float values gave
different results in the next round.
The fix forces a write to memory and a readback before the collision
checks. An alternative fix would be, to compile physics.cpp with the
switch -ffloat-store, but that would cause a bigger performance hit.
g++ 5.4 detects the static bools as "unused", which is true - but also
intentional.
Removing the "static" adds a lot of unused symbols to the global pool,
but it also prevents any compiler from detecting the "not used" status.