scriptcontext and isolatecontext now allow plain text mnemonics for
context level arguments (one of CORE, CFG, PROMPT, MAPCFG, MDLCFG)
also:
- cleanup (some dead code and dead prototypes removed)
- some stuff renamed
- script errors now show context levels
- conc is no longer thread-safe (but slightly faster)
DOCREF scriptcontext isolatecontext
- 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
break up shiftgametime() time jumps into 5-second jumps and five 1-second
jumps for the last five seconds
rename respawnoffset to lastdeath (because that's what it is)
rename clientside nextmillis to skipmillis (because that's what it does)
While the mapmodel registry works fully automatically for all auto-
downloaded models, it does not check for manual changes to the filesystem.
To clear models from the list that have been deleted from the profile
directory and to add models that have been downloaded outside the game,
this new menu entry can be used.
mapmodelregistryclear deletes all loaded mapmodel attributes
loadallmapmodels checks the filesystem for mapmodels and loads them
(all trees below packages/models/mapmodels, in home, zips, mods, install)
Both together rebuild the whole mapmodel database.
DOCREF mapmodelregistryclear
In old versions of AC it was necessary to trick with heightfields to raise
a pickup entity. However, for quite some time now, pickups can be raised
by attribute.
This additional stage for convmap finds pickup entities where the
heightfield is most probably unnecessary. Fixing is manual work, though.
Updated those pickups on 16 maps.
Also fixed a playerstart on desert3
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
- remove sensitivity training (should be rewritten in cubescript, if
actually required)
- more documentation on mouse sensitivity parameters
- some renaming
DOCREF findsens
- split into strafe roll (maxroll) and damage roll (maxrolleffect)
- locally recompute remote players roll (can be removed from pos pkt)
- fix maxrollremote
DOCREF maxroll maxrolleffect maxrollremote
* fixes bug with text input fields with less than 15 chars allowed
* recalculates slider width for resolution and font changes (on menu open)
* new tab-like function for '\n' in menuitems: sync with slider width
(see example in menus_edit.cfg in this commit)
DOCREF menuitem
menusynctabstops 0|1
if enabled(1), tab positions in a menu are synchronised
default is off(0)
affects menu title, header and items but not footer or descriptions
DOCREF menusynctabstops
changed command:
docfind <pattern> <silent>
Searches for pattern in all reference entries. If <silent> is zero or
omitted, all found references are listed.
A table of all found entries is returned as result. For each entry,
the index of the doc entry string that contains the pattern is listed.
new command:
getdoc <ref> <idx>
Returns a string of the doc entry specified by <ref>. String index
numbers match with the result of docfind.
0 name
1 description
2- remarks
DOCREF docfind getdoc
* now restricted to command references
* some parameter checks added
docref <reference command>
adds a reference to another command to the current commands
description
docrefvisible 0|1
if set to 0, docrefs are not rendered (default 1)
DOCREF docref docrefvisible
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