1541 Commits
Author SHA1 Message Date
aurhat 923feb249a Add detection and setting resolution as in desktop
Partially the code is ported from Sauerbraten.
Commit changes also menu items in Display resolutions menu.

DOCREF setdesktopres
2016-10-08 20:40:19 +02:00
aurhatandac-stef ab27d952d6 Adjust in-game menus
Introduced common parts of In-game and In-game admin menus, fixed showing
player skin in In-game admin menu (thx BrutalSystem).
2016-10-01 22:03:55 +02:00
ac-stef 5ba5d1b4b3 optionally show media origin in slot lists 2016-09-26 22:45:34 +02:00
ac-stef c66f846cf0 better selection handling for arch and slope placement
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
2016-09-18 17:13:24 +02:00
ac-stef a291b74504 take measurements to create arch prefabs from existing maps
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.
2016-09-18 00:22:27 +02:00
ac-stef 925645ecb3 new custom arch prefab editor
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
2016-09-17 01:01:40 +02:00
ac-stef dae7773d68 fix involuntary shooting when switching guns while throwing a nade
also: more aggressive middle mouse button
2016-09-16 21:08:48 +02:00
ac-stef fc3c77868f add hardcoded stairs command for coop
stairs xs ys

  Places stairs in all selections. xs and ys determine the step width
  in x- and y-direction.

DOCREF stairs
2016-09-16 14:06:27 +02:00
ac-stef 815f4aa764 add selectall command
selectall

  selects the whole map (minus the two cubes wide border)

DOCREF selectall
2016-09-16 14:06:26 +02:00
ac-stef c5904dc065 add stairs to edit menu 2016-09-16 14:06:26 +02:00
ac-stef 1b8eeac7ce font fixes 2016-09-14 20:35:13 +02:00
ac-stef a5470d5ea0 really clear all binds during "resetbinds"
including self-assigned ones

_resetallbinds

  Clears _all_ binds for all keys and all modes. Do not use the command
  manually.

DOCREF _resetallbinds
2016-09-06 18:43:37 +02:00
ac-stef cb630bde49 add per-map overrides to disable graphics features
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
2016-09-04 17:44:22 +02:00
ac-stef bc2a091f95 show map timestamp in map info menu
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
2016-09-04 15:00:00 +02:00
ac-stef 870900f92f new map settings menu
Containing all persistent per-map settings (stored in map config and
map header).

removed some random number nonsense
2016-09-03 22:48:49 +02:00
ac-stef a6bffc1858 new command looplisti
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
2016-09-02 21:58:39 +02:00
ac-stef c2ca8706c5 add most visible textures menu
...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
2016-09-01 22:59:08 +02:00
ac-stef 6cd5be6225 show how many uses of a texture slot are actually visible
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
2016-09-01 22:59:08 +02:00
ac-stef 4b2767a96d cleanup
* 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
2016-08-31 17:20:28 +02:00
ac-stef 300d702619 add menu to set notexture
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.
2016-08-30 22:57:03 +02:00
ac-stef f8188df428 add menu to list mapmodels with unconfigured custom textures 2016-08-30 21:04:41 +02:00
aurhat 9c964d95b4 Improve converting paths in pre v.1.2 map configs
The script converted paths only when "mapmodel" or "texture"
strings were at beginning of the lines, now that is changed,
in order to paths will be converted also in, for example,
commented out lines.
Also changed name of the script to more proper.
2016-08-29 23:21:43 +02:00
ac-stef 7cb9aa79c8 add access to entities with unassigned config slots to edit menus
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.
2016-08-29 15:47:46 +02:00
ac-stef 41fa9e1b34 add command for raw scripted editing
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
2016-08-27 21:58:02 +02:00
ac-stef fdb683e406 add command and keybind for tag clips
edittagclip type

  Sets tag clip type of all selected cubes.

  type can be numeric 0, 64 or 128 or keyword "none", "clip", or "plclip"

DOCREF edittagclip
2016-08-26 16:45:37 +02:00
ac-stef b7d797d73c new menu for edit mode key binds
Two new commands, menuitemeditkeyinput and menuitemspectkeyinput, both
work the same as menuitemkeyinput - only for edit and spect binds.
The new edit keys menu should also work fine as edit key help :)

menuitem[|edit|spect]keyinput text bindcmd

  Menuitem, that displays "text" and all keys, that bind "bindcmd" - in
  game-, edit- or spect mode.

DOCREF menuitemeditkeyinput menuitemspectkeyinput
2016-08-26 14:34:44 +02:00
ac-stef dbfdb5927b omit unchanged default binds from saved.cfg
omitunchangeddefaultbinds n

  0 print
  1 print, but commented out
  2 omit

The new var _defaultbinds is used to mark default binds in resetbinds.cfg.

DOCREF omitunchangeddefaultbinds
2016-08-26 14:31:33 +02:00
ac-stef daae49273d remove __fontsetting
instead, "curfont" returns name of current font

DOCREF __fontsetting curfont
2016-08-26 14:30:29 +02:00
ac-stef f730106c56 remove go_to
gotoposition does the same and more

DOCREF go_to
2016-08-26 14:30:02 +02:00
ac-stef 573e520ca0 argument completion for authsetup and authkey 2016-08-26 14:29:25 +02:00
ac-stef c4b570e8fd new menus for account management
During startup, it is checked, if the game account needs to be unlocked
by password. If so, the password is asked and applied.

If no game account exists yet, the creation of a new account is offered.

new command "mypubkey": returns public key of game account, or empty
  string, if no account exists or it is unusable (due to missing password,
  for example)

DOCREF mypubkey
2016-08-26 14:28:54 +02:00
ac-stef 6454a645ae new map checks and statistics menu
Visualise the results of "mapareacheck".
2016-08-26 14:08:56 +02:00
ac-stef 084be76825 new command mapareacheck
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
2016-08-26 14:08:56 +02:00
ac-stef 48e2ce3863 new command sortmapsoundslots
...and some options for sortmapmodelslots and sorttextureslots

All three commands now accept three modifier keywords as arguments:
  nosort     do not sort the list alphabetically
  nomerge    do not merge any slots
  mergeused  merge used and unused (identical) slots freely
By default, the list is sorted and only unused identical slots are merged.
The keywords can be combined in any order. "nomerge" takes priority over
"mergeused".

Examples:

  sortmapmodelslots
    Sort the mapmodel slot list alphabetically and merge unused identical
    slots. Merging an unused slot is pretty much the same as deleting it,
    so this command sorts the list and removes unneeded double entries.

  sortmapmodelslots nosort
    Merges (deletes) unused double entries in the mapmodel slot list.

  sorttextureslots nosort mergeused
    Merges double entries in the texture slot list. If two identical
    entries are used in the map, all uses are mapped to the new combined
    slot. This leaves no visual changes on the map. Should be avoided, if
    texture slots have been renamed manually - and the the renaming isn't
    finished yet.

  sortmapsoundslots mergeused
    Sorts the mapsound slot list and merges all double entries.

DOCREF sortmapmodelslots sorttextureslots sortmapsoundslots
2016-08-25 11:48:45 +02:00
ac-stef af1144b45d optionally show ladder entities in edit mode
If enabled, render ladder entities as blue wireframes.


DOCREF showladderentities
2016-08-23 00:42:00 +02:00
ac-stef 612a6291f1 new command sortmapmodelslots
* sorts all mapmodel slots alphabetically
* combines (merges) slots with the same model and parameters

DOCREF sortmapmodelslots
2016-08-22 15:08:20 +02:00
ac-stef 6c5bf68921 show model preview in "Edit mapmodel slots" menu 2016-08-22 15:08:20 +02:00
ac-stef 97c21ea044 new keybind to scroll the console by mousewheel
(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.
2016-08-22 15:08:20 +02:00
ac-stefandaurhat 158a33caed cleanup config files
* moved compatibility.cfg and autosave.cfg to config/opt/
* firstrun.cfg merged into defaults.cfg

DOCREF compatibilitymode alive currole curmode getclientmode curteam
DOCREF findpn pstat_score orderscorecolumns
2016-08-15 11:52:49 +02:00
ac-stef c96a983b65 fix edit selection height while grid is disabled
also: hide cleanshot helper scripts

DOCREF disablehud enablehud
2016-08-07 22:49:08 +02:00
ac-stef 639067a003 add new ktf flag direction indicator
enabled by default, disable with "hidektfindicator 1"

DOCREF hidektfindicator
2016-08-05 16:26:24 +02:00
ac-stef 192a918844 add settings menu for crosshair effects 2016-08-05 13:33:28 +02:00
ac-stef f36c1661d8 less ugly screenshot type slider code
also: persistent
2016-08-05 01:42:02 +02:00
ac-stef 0083c51b3b add menus to assign licenses to maps 2016-07-28 00:35:43 +02:00
ac-stef 3c2cac6121 simplify curmap command
no argument: just return the filename

DOCREF curmap
2016-07-27 12:23:56 +02:00
aurhat c1e9daee1e Cleanup 2016-07-17 13:27:10 +02:00
aurhat df0b0bbdfe Update docs.cfg
Compatible with tree in assaultcube.github.io for #4209cfe commit.
2016-06-19 13:03:28 +02:00
aurhat 1829ebff17 Improve settings for crosshairs
Also change resetmenu to resetcurmenu and some cleanups.
2016-05-22 23:06:24 +02:00
aurhat 3b0813412b Show on serverbrowser number of all players on the servers 2016-05-21 11:42:35 +02:00
ac-stef d107aa3cd6 added mapmodel menus sorted by author and distribution
all generated automatically from mapmodel attributes

also:
* fixed typo in model config
* concatuniq now works fine with spaces
2016-02-13 18:52:18 +01:00