Commit Graph
1280 Commits
Author SHA1 Message Date
aurhat 6605a20e00 Add a wall clock with local time
It uses strftime formatting from "wallclockformat" alias.

DOCREF wallclockformat
2015-08-06 21:08:46 +02:00
aurhat b2845b7c15 Improve "clean" screenshot
The parameter of blankouthud is "frames", so for example 1000 will take
20 seconds at 50 fps or 1 second at 1000 fps.

DOCREF blankouthud
2015-08-01 22:17:40 +02:00
aurhat 47485bea24 Add rewind menu 2015-07-28 22:17:32 +02:00
aurhat 54c09b8c48 Remove/adjust gibnum in preset gfx settings 2015-07-15 21:58:36 +02:00
aurhat 5df5fec352 Reorder and cleanup gamma settings
Remark: "gamma" command changes gamma only temporary, to next map start.
2015-07-15 21:57:44 +02:00
aurhat 297b5c69f8 Improve audibility of sounds
It's solution for missing hit/shot/etc. sounds:
1. decrease priority of ambient sounds to low, in order to hear more
non-ambient sounds with priority greater than low;
2. increase amount of sound channels to hear more sounds. Newer sound
cards on PC should be able to use more channels than only 32;
3. improve preset sound settings.

Remark: after these changes for default value of mapsoundrefresh (10)
break in playing ambient sounds, caused by playing sounds with greater
priority, isn't practically audible. The break is audible for greater
value, for example for mapsoundrefresh=1000.
2015-07-15 21:56:15 +02:00
aurhat ea067d54cb Add radaricons font 2015-07-04 22:17:47 +02:00
aurhat 9c0f99f2a1 Cleanup
Remarks:
1. Changed order in keycmds lets to keep alphabetical order in saved.cfg .
2. Earlier long information in docs about arguments of command could be
invisible for low aspect ratio (example: "weapon" command), now it's fixed.
2015-07-04 11:30:58 +02:00
ac-stef 0ed05a2036 string fix 2015-06-23 23:06:20 +02:00
aurhat bfc273ee52 Select automatically menu item with chosen weapon 2015-06-13 23:40:05 +02:00
ac-stef 38c563dfd6 add command getvarrange
getvarrange <what> <varname>
  Gets range attribute <what> for builtin variable <varname>.

  what
    one of "min", "max" or "default"

  varname
    name of any builtin variable (integer or float)

DOCREF getvarrange
2015-06-13 22:16:52 +02:00
ac-stef fe6f9e92a7 tab and formfeed cleanup 2015-06-10 14:28:50 +02:00
ac-stef d249f00e88 clean up gibsgore and poniesmode 2015-06-10 14:28:50 +02:00
ac-stef 4ba5b0545c keep keybind aliases out of saved.cfg 2015-06-10 14:28:50 +02:00
ac-stef d99d456a36 allow dyngamma for all maps 2015-06-10 14:28:50 +02:00
ac-stef 0b940be8a0 remove gettext from cubescript 2015-06-10 14:28:50 +02:00
ac-stef 78115b90b4 remove gettext from menus
also clean up some color codes
2015-06-10 14:28:50 +02:00
ac-stef d3cdec0708 allow persistent menu selections
menuselectionpersistent
  Enables persistent selections for the currently displayed menu and also
  restores a previously saved selection. Probably most efficient inside
  "menuinit". The position is restored during execution of this command,
  so the menu entry has to already exist and the alias with the last
  position has to be read from saved.cfg. In autmatically created menus
  it may be necessary to execute the command with a short delay (see
  examples in this commit).

DOCREF menuselectionpersistent
2015-06-10 14:22:11 +02:00
aurhat 0dc1340eef Add/change binds for demo mode and console 2015-06-07 13:57:14 +02:00
ac-stef 0f438a12f0 dynamic sound menus
no prelisten. sue me.
2015-06-05 16:00:03 +02:00
ac-stef 999a3929b6 dynamic texture menus 2015-06-05 16:00:02 +02:00
ac-stef c91bd91ba1 dynamic skymap menu
Lists all available skymaps. List is divided into skymaps provided by
the original install ("official") and custom skymaps located in the
profile directory.
2015-06-05 16:00:02 +02:00
ac-stef 6379e625be mapmodel menu fixes
Adds "distribution" info and editing of model scale.
2015-06-05 16:00:02 +02:00
ac-stef 1629e3bf54 fix editmeta2down initialisation 2015-06-05 16:00:02 +02:00
ac-stef 1b2e944754 add script commands to support texture and sound config menus
textureslotusagelist <what>
  Return a list of 256 numbers representing the number of uses for every
  texture slot. If <what> is "onlygeometry", uses as map model skin do
  not count. If <what> is "onlymodels", the uses in map geometry do not
  count.

gettextureorigin <path>
  Returns the location where the texture actually can be found. The
  possibilities are:
    "official": texture was found in the working directory, which
                indicates an official texture.
    "custom":   texture was found in the profile directory, which means,
                the texture is either manually installed or downloaded.
    "package dir #x": texture was found in a mod directory.
    "<file not found>": that.

textureslotbyname <texture path>
  Returns the list of numbers of all texture slots which use that texture
  file.

edittexturestack <floor|wall|ceiling> <texture slot number>
  Puts a texture slot in a "last used" list up front. The first
  parameter picks the list, the second parameter is the texture
  slot number to be used for the next edit

getautomapconfig
  Returns "1" if automapconfig is already enabled, "0" otherwise.

getmapsoundorigin <path>
  Returns the location where the map sound file actually can be found. The
  possibilities are:
    "official": the sound file was found in the working directory, which
                indicates an official mapsound.
    "custom":   the file was found in the profile directory, which means,
                the mapsound is either manually installed or downloaded.
    "package dir #x": mapsound was found in a mod directory.
    "<file not found>": that.

mapsoundslotbyname <mapsound path>
  Returns the list of numbers of all mapsound slots which use that texture
  file.

getmapsoundlist
  Returns a list of all *.wav and *.ogg files below packages/audio/ambient.

DOCREF textureslotusagelist gettextureorigin textureslotbyname
DOCREF edittexturestack getautomapconfig
DOCREF getmapsoundorigin mapsoundslotbyname getmapsoundlist
2015-06-05 16:00:02 +02:00
ac-stef 00fab48b94 change names of map model attribute commands
The command mapmodelattributes is now more appropriately named
"getmapmodelattributes", and the former "getmapmodelattributes" is now
named "listallmapmodelattributes".

DOCREF listallmapmodelattributes getmapmodelattributes
2015-06-05 16:00:02 +02:00
ac-stef 107a563e99 pin selection of closest entity in map editor
Pressing the middle mouse button toggles a pin on the "closest entity"
selector. The HUD will indicate the lock by showing "pinned" instead of
"closest" entity. All actions, that would otherwise affect the closest
entity, will affect the pinned entity instead. Deleting the locked entity
will unlock it.

toggleclosestentpin
  Toggles the pin on the "closest ent" selector. Bound to MOUSE3
  by default.

DOCREF togglelockclosestent
2015-06-05 16:00:01 +02:00
ac-stef 95680b699c add undelete for entities
BACKSPACE in combination with editmeta (LCTRL) now undeletes the last
deleted entity. BACKSPACE in combination with editmeta2 (LSHIFT) brings
up the menu "deleted entities".

The edit menu now has a submenu "deleted entities" which lists all
deleted entities and undeletes the selected one.

undelent [<index>]
  If no index is specified, the last deleted entity is restored. If an
  index is given, the specified entity from the list of deleted entities
  is restored.

getdeletedentities
  Returns a list of deleted entities. Each line contains the entity type,
  the position and all seven attributes.

unlistdeletedentity [<which>]
  If <which> is a number, the specified entry from the list of deleted
  entities gets removed. If <which> is "all", the whole list of deleted
  entities gets deleted. If <which> is "last" the last deleted entity is
  removed from the list of deleted entities.
  Returns the number of entities on the list of deleted entities (even if
  the parameter <which> was unknown or not specified).

DOCREF undelent getdeletedentities unlistdeletedentity
2015-05-27 15:47:05 +02:00
ac-stef ee18d192eb introduce second edit meta key (LSHIFT)
and use it to enable unscaled editing of entity attributes

(first editmeta key is still LCTRL - but it is already used during
editing entity attributes to provide 10x speed)
2015-05-27 15:47:05 +02:00
ac-stef 84871a13f1 option to show all playerstarts in edit mode
Set showplayerstarts to "1" to see a playermodel rendered at all
playerstart entities.

DOCREF showplayerstarts
2015-05-27 15:47:05 +02:00
ac-stef 47367c3e61 new command to list entities of a certain type
enumentities <entity type name>
  Returns a list of the numbers of all entities of that type. If no such
  entities exist or the entity type could not be recognised, the list is
  empty.

DOCREF enumentities
2015-05-18 14:59:41 +02:00
ac-stef ae82b6b22e add attr5..7, add mapmodel pitch and roll
Keys 5, 6 and 7 (in combination with the scrollwheel) can be used to alter
the new entity attributes.

Pressing editmeta (LCTRL by default) speeds up the scrolling.

(Parts of the roll code are borrowed from Alejandro V. Garcia's commit
"Model rotations, experimental" from January 2013)

Note: coop edit is now broken between "next" and older clients, but I
  don't want to bump the protocol just yet.
2015-05-18 14:59:41 +02:00
ac-stef ab10f6bcdb avoid some error messages when building mapmodel menus without edit mode
To fully build (and use) mapmodel menus, edit mode is required. This
change builds parts of the menus only in edit mode, to avoid errors.
When edit mode is entered, the menus are rebuilt fully.
2015-05-18 14:59:41 +02:00
ac-stef 1d06ed1b64 new "Map config operations" menu
Edit and delete mapmodel slots.
2015-05-18 14:59:41 +02:00
ac-stef 37f856983e adjust loadsky parameters
Also, apparently, default_map_settings.cfg had a few CRs too many.
2015-05-18 14:46:03 +02:00
ac-stef 4a5b5cded8 create mapmodel slots automatically from the edit menu
If a mapmodel is placed that does not have a slot assigned yet, it is
assigned one automatically.
2015-05-18 14:46:03 +02:00
ac-stef 3733b7e9ba script "mapmodelzoff" to allow negative z-offsets for mapmodels
A mapmodel entity is placed at a z-coordinate that is based on the floor
height of map geometry and a z-offset. The z-offset is a sum of the
entity attribute 3 and the third mapmodel slot parameter. The entity
z-offset can range from 0 to 255 while the mapmodel slot parameter can
be any integer including negative numbers. So, to place a mapmodel below
floor height, the mapmodel slot parameter has to be negative.

This script decreases the mapmodel slot parameter by one and increases
the z-offset of every mapmodel which uses that slot also by one. This
means, that all mapmodel are exact in the same place afterwards - but
the entity z-offset now has room to lower the mapmodel by one more cube.

The script requires one parameter: the mapmodel slot number.

If you need more z-offset available, run the script several times.

DOCREF mapmodelzoff
2015-05-18 14:46:03 +02:00
ac-stef fe478d13ca script to set up argument completion for loadsky
Generates a list of all available skymaps under packages/textures/skymaps
by checking for files with the ending "_ft.jpg".

Note: argument completion does not work properly for arguments with spaces.
2015-05-18 14:46:03 +02:00
ac-stef e318ecd68e integrated automatic embedded map config files
This patch enables an option to keep the map config embedded in the map
file - with autogenerated content. Any changes to map config data will be
written with the map. This includes data by loadnotexture, loadsky,
mapmodel, texture, fog, fogcolour, mapsound and shadowyaw. Once enabled,
all changes with those commands become persistent to the map.

New variables:

mapsoundchanged
  Set to "1" with every command that changes mapsound slots. Should be
  used to trigger a rebuild of mapsound menus.

New/changed commands:

mapsound
  Now returns the number of the created slot.

mapmodel
  Now returns the number of the created slot.

texture
  Now returns the number of the created slot.

loadsky
  Is now a builtin string variable (instead of a command), which means,
  that the current value can easily be retrieved or edited.
  The skymap name in the argument is now required to start with
  "textures/skymaps/" - but that part of the path can be omitted.
  examples:
    loadsky steini/steini2 (loads textures/skymaps/steini/steini2_*)
    loadsky textures/skymaps/steini/steini2 (same)
    loadsky ../foo/bar (loads textures/foo/bar_*)
    echo $loadsky

getnotexture
  Returns the current "notexture" path. (Set by loadnotexture)

dumpmapconfig (available for debug binaries only)
  Writes the current automatically generated map config to
  dumpmapconfig.txt.

DOCREF mapsoundchanged mapsound mapmodel texture loadsky getnotexture
2015-05-18 14:46:03 +02:00
ac-stef 04e3d946bc updated automatic mapmodel menus 2015-05-17 00:24:39 +02:00
ac-stef 03f974b2bc additional text attributes for mapmodels
This adds a means to store additional attributes for mapmodels, including
a caching mechanism, so the mapmodels don't have to be loaded to access
the information. The goal is, to provide fully automatic mapmodel menus
for map editing who also add information about downloaded mapmodels.

Model attributes are extracted everytime, when a model is loaded. At game
end, all available data is written to config/mapmodelattributes.cfg and
restored at next startup. On release, a file with all (but only) official
models should be included. Since autodownloaded models are usually "loaded"
after download, those are automatically added to the database. If someone
adds models manually to the directories (media pack, w/e), the command
"loadallmapmodels" can be used to try to find all available models. The
only way to delete something from the database, is to delete the file
config/mapmodelattributes.cfg when the game is closed.

The current list of attributes is:

keywords
  List of one or more menu topics to list the model under. Check
  config/menus_edit.cfg for available keywords. Unknown keywords will
  be listed separately.

desc
  Short name or description of the model. Will be used as menu entry.

usage
  Important information for how to use that specific model.

author
  Who created the mapmodel. If it's a derivative of another model, state
  the author of the mod (refer to the original author under "license", if
  you like). Always use the exact same spelling for the same author, to
  allow menus to automatically group models by author.

license
  Free-text attribute for license info or info about additional
  contributors (or original authors for derivated works).

distribution
  One of "official", "autodownload" or "manual". Other values default to
  "manual". This is used to determine, if a map contains only original
  media or media that can be download automatically.

version
  Single numerical value to separate older from newer versions. Defaults
  to zero. Higher numbers mean "newer". Maybe someone manages to implement
  a versioning system for custom media in the future...

New commands:

mdlattribute <attr> <value>
  To be used in model config files. Adds a value for a specified
  attribute to the model.

mapmodelregister <modelpath> <attr1> <attr2> ...
  Adds values for all attributes to a specific mapmodel. This is used to
  restore the cached values from config/mapmodelattributes.cfg during
  game start. Does not actually verify of load the model.

mapmodelattributes <modelpath> <attr>
  Returns the value of a specific attribute of a mapmodel. If modelpath
  is a number, it is interpreted as index for the list of models in the
  current map config. If no attribute name is specified, all attributes
  are printed to the console instead.

getmapmodelattributes <list of attribute names>
  Returns a table of all known mapmodels. Each model is listed with the
  modelpath and the values for the requested attributes. To be used
  instead of a fixed table in menu_edit.cfg. In addition to attribute
  names, the function also allows the keywords "explodekeywords" and
  "sortby:" as arguments. If "explodekeywords" is given, all mapmodels
  with more than one keyword are listed multiple times, once for each
  keyword. If an attribute name is preceeded by "sortby:" the list will
  be sorted by this table column. If "sortby:" is used several times,
  this first sort will have highest priority. The list is always sorted
  by path by default.

  example:
    getmapmodelattributes sortby: author sortby: desc explodekeywords

loadallmapmodels
  Tries to load mapmodels from /all/ paths below packages/models/mapmodels.
  Will throw a lot of error messages, because not all directories contain
  models to load. This command can be used to build or rebuild the
  complete list of all available mapmodels. It is only necessary, if models
  are added manually to the directories, since every mapmodel gets added
  to the list when it is loaded - which takes care of all automatically
  downloaded models.

DOCREF mdlattribute mapmodelregister mapmodelattributes
DOCREF getmapmodelattributes loadallmapmodels
2015-05-17 00:24:38 +02:00
aurhat 1d497ac4d8 Add dedicated crosshair in edit mode
DOCREF loadcrosshair
2015-04-28 20:47:54 +02:00
Cmdr-Thrawnandaurhat 7e0b2be051 Changes to sound muting menus
* Fixed completely broken hitsound mute toggle
* Moved bullet sound toggles into appropriate menu
* Changed heartbeat toggle to use muteitem (for consistency)
* Fixed footsteps toggle (Previous behavior was to turn off all
footstep sounds, a toggle already existing elsewhere, rather
than muting the specific sound as it's intended to)
* Sorted sound menu (At grenadier's request)
2015-04-25 13:58:44 +02:00
cmdr_thrawnandaurhat 7fd5d19941 Update Game Mode Descriptions
* Added descriptions for modes 20 and 21
* Altered punctuation / whitespace for consistency
* Fixed grammar (you -> your)
2015-04-18 00:43:12 +02:00
Pascal de Bruijnandaurhat 76ec19b746 settings: allow edittoggle to be reconfigured
"editbind E edittoggle" is needed for such cases, when edittoggle will be
bounded to key, for which editbind exists. Then that will allow to
exit from edit mode still with use a key.
2015-04-15 20:36:01 +02:00
ac-stef 57a0d286c1 automatic mapmodel menus
auto-generate mapmodel menus depending on the actually available models
in the current map config.

Also fixes memory leak in "newmenu".

DOCREF mapmodelname mapmodelbyname mapmodelchanged
2015-04-12 18:09:36 +02:00
ac-stef f511889731 customisable sort order for file lists in menus 2015-04-12 18:09:36 +02:00
RandumKiwiandac-stef 5e8c64d8b7 Bind Q to change to previously selected weapon.
This will mirror the default bind in other FPS games and therefore
make AC easier to understand for unarmeds.
2015-04-12 18:06:09 +02:00
aurhat 1d1c9e6f96 Improve key binds
Changes:
1. added single aliases bounded to the keys, in order to maintain easier
the binds;
2. cleaned up binds;
3. updated Keyboard menu and fixed searching binds.
Remark: aliases bounded to the keys shouldn't have leading and trailing
white spaces, if they are present in Keyboard menu, otherwise they won't
be found. So construction like, for example: bind SLASH [ key_commandline ]
is inadmissible.
4. Alternate edit binds (default disabled) moved to
config/opt/alternateeditbinds.cfg and removed old_editbinds variable.

DOCREF old_editbinds
2015-04-03 23:44:22 +02:00
aurhat 5de86f9838 Cleanup
Fixed nested list in Cubescript, fixed conopen (now read-only), removed changeteam(),
fixed name of shortcuts for team survivor modes (so it fixes
https://github.com/assaultcube/AC/issues/73 ).

DOCREF ts tsurv btsurv
2015-03-29 14:57:29 +02:00