Commit Graph
258 Commits
Author SHA1 Message Date
flowtron 2c95c105e2 pasting *all* attributes is now possible 2021-08-27 11:44:27 +02:00
flowtron 75fe433613 retire newent7 2021-08-18 17:08:50 +02:00
flowtron d98889c525 copyent: fix typo 2021-08-18 14:56:46 +02:00
flowtron e7016f4f83 defaultmaps now maps_all 2021-08-16 09:44:10 +02:00
flowtron 83bf139cc0 curated cubescript compatibility 2021-08-04 10:33:53 +02:00
flowtron 4687f00e47 editent: always all 7 attributes 2021-07-13 17:55:47 +02:00
flowtron 95ce3a34c1 fixing more typos (blush) 2021-07-12 10:48:29 +02:00
flowtron aad462636e seteditshow back & improved from opt/compatibility.cfg 2021-07-12 10:32:14 +02:00
flowtron f84001ffa6 copyent only if entity targeted 2021-07-11 17:47:55 +02:00
flowtron b13fcaf3e3 merge grenadier/aurhat commits curated by BrutalSystem (issue #375) 2021-06-25 09:32:35 +02:00
flowtron 65f4f2c6d0 ent seven : heaven (issue #372) 2021-06-21 09:35:26 +02:00
drian 4fd14cf6c2 #108 not only validate the PAUSE vote clientside but also server-side to reduce abuse 2021-04-14 09:47:48 +02:00
drian b615fe449e Merge remote-tracking branch 'remotes/origin/next' into release_v1.3 2021-02-10 21:00:09 +01:00
aurhat c9d9b752a1 Update scripts for preparing Windows installer
Also cleanup
2017-11-25 03:06:06 +01:00
aurhat 1d7dd9df84 Cleanup 2017-10-15 12:14:20 +02:00
ac-stef 3a320de948 cleanup cpistol 2017-06-27 15:15:25 +02:00
ac-stef 49232e05e0 new commands to add modeinfo and artist info to maps
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
2017-06-27 15:15:23 +02:00
ac-stef 8235300d77 merge old and new entity copy/paste
- 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
2017-06-15 14:00:54 +02:00
ac-stef 0b2079660a fix clip entity menu and add entity copy/paste menu
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
2017-06-15 01:12:33 +02:00
ac-stef e1572dcdee move ++, --, ++f and --f to compatibility.cfg
useless, because of the "failing silently" behaviour

DOCREF ++ -- ++f --f
2017-06-14 19:01:15 +02:00
ac-stef 83d0199867 command cleanup
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
2017-06-07 23:20:00 +02:00
ac-stef 4d684cfc8e improve alias lookups
now i = 3; echo $(concatword arg $i) works like echo $arg3 :)
2017-06-06 21:41:25 +02:00
ac-stef dbcb040eeb menu code cleanup
* 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
2017-06-06 13:17:20 +02:00
ac-stef 72e5b08463 add edit info panel
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
2017-05-30 10:43:55 +02:00
ac-stef c02c1277ec cleanup
declare "?" and "switch" deprecated: should not be used or documented

DOCREF ? switch
2017-05-29 15:47:12 +02:00
ac-stef 753474c401 menu updates
- separate settings menus for console and scoreboard
- some sorting
- "return" command removed

DOCREF return
2017-05-29 00:00:26 +02:00
ac-stef c97461a0f5 docs fixes and cleanup
- 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
2017-05-24 20:11:11 +02:00
ac-stef dd82065177 fix killmessage menu
and add frag/gibmessage weapon name completion
2017-05-22 22:50:51 +02:00
ac-stef d0b309320b really cleanup sound
- 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
2017-05-22 17:30:51 +02:00
ac-stef 6f03d1819b add menu for cubescript hooks
- 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
2017-05-16 13:11:32 +02:00
ac-stef b33ad603d4 cleanup
c removed

DOCREF c
2017-05-12 01:33:55 +02:00
ac-stef b650fca2ca persistidents cleanup
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
2017-05-05 15:50:59 +02:00
aurhat 4d2d326136 Cleanup 2017-02-18 22:40:07 +01:00
ac-stef c5065cddaa add batch map conversion tools and more editing scripts
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.
2016-11-07 16:57:18 +01:00
ac-stef e12d25dc95 add todo list for entities
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
2016-11-05 17:42:30 +01:00
ac-stef 88320bd095 add script and keybind to cycle through spawn points in edit mode
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.
2016-11-03 18:02:45 +01: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 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 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 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 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 573e520ca0 argument completion for authsetup and authkey 2016-08-26 14:29:25 +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 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 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 1829ebff17 Improve settings for crosshairs
Also change resetmenu to resetcurmenu and some cleanups.
2016-05-22 23:06:24 +02:00