Transcendence engine's filter criteria
Posted: Sat Feb 25, 2023 11:03 pm
This post covers the base criteria filters in the engine, based on the actual source code on github. Some details might be a bit hazy since things aren't super clear in all cases, and not everything has a nice comment explaining it all.
This is used for space object search criteria, such as with sysFindObject
these can be used for finding criteria but also objects, there seems to be some overlap in functionality with space object criteria, I guess because its used in other parts of the code. Normally you would be using the space object criteria though
These criteria can be used for items:
This is used for space object search criteria, such as with sysFindObject
Code: Select all
#this is yoinked directly from george's comments in the code. For some reason the others dont have this?
// Parse
//
// Parses the given criteria string and initializes our member variables. We
// assume that we are initialized.
//
// Parses a string and returns criteria structure
//
// b Include beams
// k Include markers
// m Include missiles
// s Include ships
// t Include stations (including planets)
// v Include intangible objects
// x Include missiles where targetable='true'
// z Include the player
//
// A Active objects only (i.e., objects that can attack)
// B:xyz; Only objects with attribute 'xyz'
// C (unused)
// D:xyz; Only objects with data 'xyz'
// E Enemy objects only
// F Friendly objects only
// G Stargates only
// G:xyz; Stargate with ID 'xyz'
// H Only objects whose base = source
// I:angle Only objects that intersect line from source
// J Same sovereign as source
// J:unid; Sovereign unid = unid
// K Killed objects only (i.e., objects that cannot attack)
// L:x-y; Objects of level x to y.
// M Manufactured objects only (i.e., no planets or asteroids)
// N Return only the nearest object to the source
// N:nn; Return only objects within nn light-seconds
// O:docked; Ships that are currently docked at source
// O:escort; Ships ordered to escort source
// O:guard; Ships ordered to guard source
// P Only objects that can be detected (perceived) by source
// Q Can perceive source only
// R Return only the farthest object to the source
// R:nn; Return only objects greater than nn light-seconds away
// S:sort Sort order ('d' = distance ascending; 'D' = distance descending
// T Include structure-scale stations
// T:xyz; Include stations with attribute 'xyz'
// U (unused)
// V Include virtual objects
// W (unused)
// X Only objects whose target is the source
// Y Enemy/angry objects only
// Z Exclude the player
//
// +xyz; Include objects with the given attribute
// -xyz; Exclude objects with the given attribute
//
// =n Level comparisons
Code: Select all
*: everything
A: active
K: killed
P: known
Q: in player's squadron
U: unknown
V: virtual
L: level
designtypes
T: stations which are structures (see 't' for the station type on its own)
charEconomyType = '$',
charAdventureDesc = 'a',
charItemTable = 'b',
charEffectType = 'c',
charDockScreen = 'd',
charSpaceEnvironmentType = 'e',
charOverlayType = 'f',
charGlobals = 'g',
charShipTable = 'h',
charItemType = 'i',
charSound = 'j',
// k
// l
charImage = 'm',
charMissionType = 'n',
charImageComposite = 'o',
charPower = 'p',
charSystemTable = 'q',
// r
charShipClass = 's',
charStationType = 't',
charMusic = 'u',
charSovereign = 'v',
// w
charGenericType = 'x',
charSystemType = 'y',
charSystemMap = 'z',
charTemplateType = '_',
+: requires a particular attribute tag (ex, +commonwealth)
-: cannot have a particular attribute tag (ex, -notForSale)
Theres also =/</> which are used contextually for integer comparisons of things like price or range
$: price range
L: level range
For example: <=$1500 means "less than or equal to 1500 credits"
|: logical "or" operation between two expression blocks
Code: Select all
~: anything that isnt the following filters
^: anything that is all of the following filters
*: everything
#lowercase
a: armor
b: misc devices
c: cargo holds
d: devices (misc devices, weapon, launcher, reactor, shields, cargohold, drive) #anything that takes up a deviceslot (or would take up a deviceslot unless overridden w/ slots=0 or external=true)
f: fuel
l: launcher
m: missile
p: weapon
r: reactor
s: shields
t: misc items (as opposed to misc devices, which are installable)
u: useful items (as in, items you can use in the "use" menu)
v: drive
w: weapon
#uppercase (does not support ~/^)
I: installed
D: damaged
F: frequency parameter
L: level range (or repair level range, if the context is that of repair levels)
M: missiles that satisfy "m_bLauncherMissileOnly"
N: not damaged
S: only useful items
U: not installed
V: include virtual items
+: requires a particular attribute tag (ex, +commonwealth)
-: cannot have a particular attribute tag (ex, -notForSale)
#used with =/</>
$: price range
#: mass range
R: repairlevel range
(when used alone) level range if in a non-repairlevel range context
For example: <=$1500 means "less than or equal to 1500 credits"
|: logical "or" operation between two expression blocks