User:VanishedOne

From The DarkMod Wiki
Jump to navigationJump to search

VanishedOne's notes and queries.

Stim/Response

Type Comment in tdm_stim_response.script My notes
STIM_FROB Frobbed The Response to apply STIM_FROB won't work everywhere the dedicated frob Response will (only the latter collects loot).
STIM_FIRE Fire
STIM_WATER Water
STIM_DAMAGE damages target AI and the player have a STIM_DAMAGE Response to make this the case. It's not a response to ordinary damage (though a script object could listen for SIG_DAMAGE).
STIM_SHIELD protects against arrows or physical blows Used? Usable?
STIM_HEALING heals target The player has a Response to this; AI, by default, don't.
STIM_HOLY holy is applied Undead use a special script to get the damage def. from the source (usually a holy water arrow result); without one, there's no effect.
STIM_MAGIC Magic is being used Used anywhere? What's the purpose of this one? (From Thief's MagicZapStim?)
STIM_TOUCH triggered if touched Couldn't get a Response to fire on ordinary collisions, or on entering brush triggers. Maybe it's meant to be used as a collision stim.
STIM_KNOCKOUT target is knocked out AI/heads (including the player head) inherit a Response to this as standard to enable it to knock AI out, but the blackjack presumably uses a non-S/R mechanism for hit-cone-dependent knockouts.
STIM_KILL target is killed AI don't have a Response to this as standard. No luck activating Responses through death by normal means.
STIM_RESTORE target is restored What does this mean, if not the same as STIM_HEALING?
STIM_LIGHT triggered by light [1] Testing revealed no special handling (and 'use bounds' doesn't work with light volumes; presumably if a light has a model it'll use that).
STIM_SOUND triggered by sound Testing with a speaker revealed no special handling. (What about AI-audible soundprop?)
STIM_VISUAL visual contact Handled in code
STIM_INVITE can be used to trigger special behaviour (like a stool can invite an AI to sit down) Probably related to this idea from 2005: [2]
STIM_READ Can be read Used?
STIM_RANDOM Random response is selected (does this make sense?) Whether it was meant to fire any of the entity's Responses by random selection, or one of its Responses to this stim, I'm not sure this works (but the latter case can be taken care of by enabling 'Random Effects' on any Response).
STIM_TIMER Timer has been triggered. Used?
STIM_COMMUNICATION Communication vocalization Handled in code
STIM_GAS Gas arrows / mines
STIM_TRIGGER Entity "activation" stim
STIM_TARGET_REACHED Can be emitted if the endposition (e.g. by using an effect_moveToPosition) is reached Emitted to what?
STIM_PLAYER The "player" stim Radial stim on the player
STIM_FLASH The flashbomb stim
STIM_BLIND A "blind" stim that blinds the actor (this is stronger than a FLASH stim, no visibility is needed)
STIM_MOSS stim from moss arrows (e.g., for dampening window shattering) func_fractures come with a Response that calls breakable_glass::on_moss_stim (in tdm_breakable_glass.script)




Is the magnitude of collision stims affected by velocity/force of collision, as reportedly in the Dark Engine?

Are these (in Response.h) used?

* How much damage must be applied for this response?
*/
float				m_MinDamage;
/**
* No more than this.
*/
float				m_MaxDamage;

Textures

'D3's folder depth limitation for DDS files. You cannot have DDS files more than 5 folders deep... - D3 just doesn't want that, only the id people know why this unfortunate limit is there in the first place.' [3] (Does this limit remain?)

Material shaders

Stuff not in [4] (including TDM's additions):

xrayRenderMap -- some code support from RoE may be missing (cf. Entity.cpp, BrittleFracture.cpp...). Perhaps TDM was built on /neo/game instead of /neo/d3xp. What's left can create a subview that skips some surfaces, e.g. there's an AI it can make bald, but the rules are unclear (some bodies just turn invisible, some don't) and I think "skin_xray" and "skin_head_xray" spawnargs may be broken. (Also D3BFG has a base/_common/generated/images/textures/sfx/xrayblend#__0200.bimage for which there's no apparent equivalent.)

portalRenderMap -- unknown.

suppressInSubview -- global; appears occasionally in D3/RoE materials. Probably does what it says and hides surfaces in remote/mirror views, but I haven't tested.

screen -- stage keyword; appears in D3/RoE's textures/smf/window_scratch, and in TDM's portal_sky. Projects to screen instead of surface co-ordinates?

screen2 -- same as screen? Code comment: 'duzenko: treated by renderer same as TG_SCREEN, simplified'

name -- stage keyword. Code comment: 'BSM Nerve: Added for stage naming in the material editor'

portalSky -- as distinct from sort portalSky.

'New _currentDepth global image accessible by any shader. Unlike _currentRender, using this keyword in a material file does not delay the shader being drawn. New ignoreDepth material file keyword. Prevents the shader being clipped by solid geometry.' -- [5]

islightgemsurf [6]

withAudio -- parameter added to videoMap [7] [8]

cubicLight, ambientCubicLight -- [9] lightFalloffCubeMap, makeIrradiance() -- [10]


Do we have `sort underwater`? Seen here but not in idDevNet docs. (Maybe a mix-up with Quake 3 or ET:QW?)


noFog does nothing except during dmap with lightCarve -- [11]


Is this how the hardwood surface type differs from regular wood? -- No: [12][13]


'rgb parameters work on cubemap stages ONLY when there are no diffuse/bumpmap/specular map blending stages set on the material' [14]

Under these conditions, vertexColor has an effect but inverseVertexColor seems to have the exact same effect.


ignoreAlphaTest appears not to work on light-reactive stages.


In my experience the following can't be used with light interactions:

  • Surfaces altered by deforms. (All non-particle deforms? Does TDM even use 'deform eyeball'?) But turbulent is at least partly compatible with light-interactive bump/specular. Others...?
  • Particles spawned from surfaces (except that the simple ambient can add colour to them).

clamp keyword: if materials look fine in DR but warped or invisible in TDM (e.g. for hinge decals), move the control points in the Texture Tool so the top-left is at 0,0.


'The "add" image program only works with uncompressed textures.' [15] I think this may be true of other image program functions too.


It seems "soundmap" gives bars for any string token except "wavelength". "soundmap" alone is an error.


What's the nodrop surface parameter for (in textures/common/nodrop)? Same as [16]?


Do blood decals still use this hack? [17]


TDM macros: [18]

PARTICLE_MACRO:

 noselfShadow
 noShadows
 translucent
 discrete
 nonsolid
 noimpact

GLASS_MACRO:

 noselfShadow
 noShadows
 translucent
 twosided

TWOSIDED_DECAL_MACRO:

 discrete
 nonsolid
 noimpact
 polygonOffset 1
 noShadows
 sort decal
 noselfShadow
 noShadows
 translucent
 twosided

(Why translucent?)

ShaderParms

Number Alias (RenderWorld.h) Alias in tdm_defs.script My notes
0 SHADERPARM_RED
1 SHADERPARM_GREEN
2 SHADERPARM_BLUE
3 SHADERPARM_ALPHA

SHADERPARM_TIMESCALE

Contra List_of_shaderParm_variables, may be set > 1 by LOD fading.

Read by lights on spawn.

4 SHADERPARM_TIMEOFFSET Set on func_static activation [19]. Lights set this to -MS2SEC(gameLocal.time) on turning on, when they break, and on spawn if shaderParm4 isn't set in spawnargs.
5 SHADERPARM_DIVERSITY Programmer comment: 'random between 0.0 and 1.0 for some effects (muzzle flashes, etc)'

Toggled on func_static activation [20].

6
7 SHADERPARM_MODE

SHADERPARM_TIME_OF_DEATH

Programmer comment: 'for selecting which shader passes to enable'

Programmer comment: 'for the monster skin-burn-away effect enable and time offset'
Toggled on func_static activation [21]. Set to 1 when a light breaks.

8 SHADERPARM_MD5_SKINSCALE

SHADERPARM_MD3_FRAME SHADERPARM_BEAM_END_X SHADERPARM_SPRITE_WIDTH SHADERPARM_PARTICLE_STOPTIME





Programmer comment: 'for scaling vertex offsets on md5 models (jack skellington effect)'

[22]
Programmer comment: 'for _beam models'
No effect on deform sprite patch; maybe its model isn't _SPRITE?
Programmer comment: 'don't spawn any more particles after this time'
AI script event shrivel(time): 'Modifies shaderparm 8 from 1.0 to 0.5 over time (will return after multiple frames). Not used in Doom 3.' [23] Is this what SHADERPARM_MD5_SKINSCALE is about? Setting parm8 to nonzero on an AI caused wild glitching in the vertex positions when I tried to look at it: is this just broken or do the materials need something special? See [24], [25].

9 SHADERPARM_MD3_LASTFRAME

SHADERPARM_BEAM_END_Y SHADERPARM_SPRITE_HEIGHT

[26]
10 SHADERPARM_MD3_BACKLERP

SHADERPARM_BEAM_END_Z

[27]
11 SHADERPARM_BEAM_WIDTH Luckily it's unlikely someone would want a frobable func_beam


_SPRITE should behave like deform sprite according to code comments ('A simple sprite model that always faces the view axis.' -- Model_sprite.cpp), but in my tests, on an idStaticEntity it faced the reverse of the entity's direction, even with no "angle" spawnarg. (Whereas _BEAM worked as expected.) Using a deform sprite material (setting materials via a wildcard skin) overrides this but stops the aspect ratio changing: you can use the parms for scaling but the sprite can't change shape any more.

Particles

 const ParticleParmDesc ParticleCustomDesc[] = {
 	{ "standard", 0, "Standard" },
 	{ "helix", 5, "sizeX Y Z radialSpeed axialSpeed" },
 	{ "flies", 3, "radialSpeed axialSpeed size" },
 	{ "orbit", 2, "radius speed"},
 	{ "drip", 2, "something something" }
 };

(from framework/DeclParticle.cpp)

orbit presumably should correspond to Spherical in editParticles, but that's broken; type "orbit" in manually instead. drip does work in the editParticles menu. Neither is available for selection in DR, and it can't read them.

 if ( !token.Icmp( "customPath" ) ) {
 			src.ReadToken( &token );
 			if ( !token.Icmp( "standard" ) ) {
 				stage->customPathType = PPATH_STANDARD;
 			} else if ( !token.Icmp( "helix" ) ) {
 				stage->customPathType = PPATH_HELIX;
 			} else if ( !token.Icmp( "flies" ) ) {
 				stage->customPathType = PPATH_FLIES;
 			} else if ( !token.Icmp( "spherical" ) ) {
 				stage->customPathType = PPATH_ORBIT;
 			} else {
 				src.Error( "bad path type: %s\n", token.c_str() );
 			}

This, however, checks for a "spherical" (not "orbit") keyword, but has no "drip". PPATH_DRIP is defined in the header file and tested elsewhere, though.

GLprogs

Frob highlight: 'The frob.vfp program is not active. This has been part of Rebb's frobhighlighting improvement project, but in the end we ran into an issue with TGA files (they ended up with a heavy green tint in-game, which (we think) is due to some sort of limitation in the closed source parts - can't remember exactly).' [28] See [29]

FX

'In the vanilla code "trackorigin" will not work unless "fadeIn" or "fadeOut" is set too.' [30] Bug remains in TDM: [31]

Decal splatting has a short vertical range. For FX called in frame commands, use bindto "origin". For func_fx, its origin should be < 8 units above the ground.

Does ignoreMaster work in singleplayer? (The fall of my AI test partner's ragdoll from the sky suggests not.)

 idEntity *ignore_ent = NULL;
 if ( gameLocal.isMultiplayer ) {
 	ignore_ent = this;
 	if ( fxaction.shakeIgnoreMaster ) {
 		ignore_ent = GetBindMaster();
 	}
 }

GUIs

Focus doesn't work in TDM: [32]

Sound

Stuff not in [33] (including TDM additions; passing over reverb, ordered, plain and onDemand, all marked no longer supported):

antiPrivate -- opposite of private, presumably

playonce

fromVideo -- [34] [35]

Triggers

Patches can be used for triggers and 'there could be separate triggers to be walked into depending on which direction you are walking'. [36]

Targets

target_setinfluence removed? (Maybe considered redundant with S/R or too D3/'demonic'-specific? Comparing [37] to the TDM entity list suggests a purge of even some quite generic entities may have occurred.) idTarget_SetInfluence still exists so it can be recreated, but may be bugged in TDM [38]. Can crash TDM on map load if e.g. targetted by worldspawn. D3 usage: [39]; D3 def here: [40]

PortalSky

Game_local.h --

 enum {
 	PORTALSKY_STANDARD = 0,			// classic portalsky
 	PORTALSKY_GLOBAL = 1,			// always following portal sky
 	PORTALSKY_LOCAL = 2,			// following portal sky from a spot

Misc.cpp --

 if ( spawnArgs.GetInt( "type" ) == PORTALSKY_GLOBAL )
 gameLocal.portalSkyScale = spawnArgs.GetInt( "scale", "16" );	

[41], [42]

Security camera

idSecurityCamera::Pain() refers to an "fx_damage" spawnarg not documented in the entityDef. Similarly, idSecurityCamera::Killed() refers to an "fx_destroyed" spawnarg.

idSecurityCamera::SetAlertMode() looks to have code to update SHADERPARM_MODE (parm7), where

 enum { SCANNING, LOSINGINTEREST, ALERT, ACTIVATED }

suggesting it's possible to have something like the T2 Watchers' colour-changing lights.

Misc.

What is/was trigger_air? (textures/common/trigair) There's no such entity def., even among the commented-out ones in triggers.def. Maybe related to the commented-out info_vacuum in d3_junk.def?

`knockout` spawnarg on atdm:weapon_base ('If set to true, a hit with that weapon knocks the AI out') -- working/used? The blackjack instead uses a `knockout` spawnarg in its melee def. (melee_blackjack_ovr): compare atdm:damage_moveable, which also has a `knockout_power` spawnarg.

`inv_item_count` defined on atdm:playertool: used for anything? (Compare `inv_count`.)

Does clipmodel_contents still exist/work? -- Yes, as in atdm:blood_marker

$player1.replaceInvItem($some_inv_item, $null_entity) -- if $some_inv_item was simply placed in the world, the inventory icon will disappear if it was on the screen; if it entered the inventory via the shop, the icon will remain until cycled away from.

func_splat -- undocumented in the entityDef, "splatAngle" spawnarg can specify rotation. (Only splats $world, sadly, and I'm not sure the fade respects decalInfo.)

Weather

 "classname" "func_static"
 "sr_class_1" "S"
 "sr_radius_1" "0"
 "sr_state_1" "1"
 "sr_time_interval_1" "200"
 "sr_type_1" "2"
 "sr_use_bounds_1" "1"
 "solid" "0"

Texture brushes of this entity with textures/common/collision and put them under your rain/snow patches so you can no longer carry a lit candle through a downpour.