
	Overview of R3D specific definitions for v220-33
	For more info see the relevant txt file in R3D_Docs

	NOTE: formatted for viewing with notepad

=========================================================================
	1)	script LUMP types
=========================================================================

	Standard types which are cut down versions compatible in the main
	with scripts produced for doom2 wads.

	a)	ANIMDEFS	Standard animdefs type
	b)	SNDINFO		See R3D_Ambients.txt
	c)	MAPINFO

	Risen3D specific (v2.1.00 and later)

	d)	SCP_DEFN	Amodel script
	e)	SCP_ZOFF	Used to set z offsets or link sounds
	f)	MUSINFO		Used for map music


	-------------------------------------------------------

	NOTE:	model replacement is disabled where any of the
		following sprites are custom pwad type;

	"BSKU", "RSKU", "YSKU", "BKEY",
	"RKEY", "YKEY", "AMMO", "SBOX",
	"CELL", "ROCK", "SHEL", "SBOX",
	"MEDI", "ARM1", "ARM2", "STIM".

	Note: later extended to all custom pwad sprites.
	      Using -amwds can force partial override.

	-------------------------------------------------------

=========================================================================
	2)	THINGs used as MAP TYPE IDENTIFIERS

		One instance of this type must be present in a map
		for their associated lines or things to be identified
		when the map is loaded.  If not present then their
		associated types will be treated as standard types.
=========================================================================

 15500 to 15550

	a) reserved for identifying map type
	b) only one should be placed in a map
	c) they are not spawned

	----------------------------------------------------
	IDENTIFIERS
	----------------------------------------------------

	15500	Force waterdynamics and opacity ON.
		Opacity set to 170.
	15501	As 15500 plus identify map as having 3D lines
		and slopes. Also enables jumping and sets jump
		power to 9.0.
	15503	Purely identifies map as having slopes.
	15504	Can be used in place of a 15500 and a 15501 Thing.
	15507	As 15504 plus forces falling and underwater
		damage ON.
	15508	In a scripted map Things with the mf_pickup flag
                and the deaf (ambush) flag set are treated as
                secret pickups (similar to sector special 9).
	15509	Allow the use of extended dynamic light types
		5500 to 5505.

	Note:	types 15500, 15504 and 15507 prevent menu changes
		for the values they set. Jump power can be changed
		by a scripted map from 9.0. Note that the usual
		default for jump power is 8.0 but is increased to
		9.0 with 3D line maps to allow the player to jump
		up and grab a ladder that can otherwise be walked
                under.

Redundant types removed v220-5

sky stretch is now automatically applied with 512w * 240h textures
** 15502 force sky height 240 support
** 15506 inhibit global command
** 15505 v220-19 version later than 20-Feb-2013

	-------------------------------------------------------

	15551	fake movefloor Thing

	See R3D_Docs\editing\R3D_FakeMoveFloors.txt


=========================================================================
	3)	LIGHT, AMBIENT and FAKETP THINGS
=========================================================================

 5000	Dynamic light source.
	If angle set to East then spawned on ceiling else spawned on floor.

        It is best to use just North or East as these will then remain
        unaffected if a 15509 marker Thing is added to the map for editing
        purposes at a later date.

	The difficulty settings now change the colour. This should be
        backward compatible as white = easy + medium + hard which is
        how they should already be set (as dynlights would have been
        needed whatever the game difficulty setting chosen).

// Added in v220-31

 For all types;

          Easy = RED, Medium = GREEN, Hard = BLUE

 --- WITH T15509 PRESENT ---

 If a (single) marker Thing 15509 is added to the map then the following
 settings apply.

 Note the change of behaviour over the default 5000 setting as these can
 now be set to display both floor and ceiling light which saves having to
 use two Things superimposed.

 For all types (including 5500 to 5505) difficulty settings set the colour;


 So for white   set to easy + medium + hard  (R + G + B)
        yellow  set to easy + medium         (R + G)
        magenta set to easy + hard           (R + B)
        cyan    set to medium + hard         (G + B)

 New things added in v31.

 Note: 35 tics = 1 second.

 Only types 5501 and 5502 can be synchronised

 For all other types it is only necessary to remember three angle
 settings which are;

    North - spawn floor
    East  - Spawn ceiling
    South - Spawn floor and ceiling (same as West)

 Settings for all types (5000 and 5500 to 5505)

	Spawn Angle	Floor	Ceiling
	-------------------------------
	North		Yes	No
	NorthEast	Yes	No
	East		No	Yes
	SouthEast	No	Yes
	South		Yes	Yes
	SouthWest	Yes	Yes
	West		Yes	Yes
	NorthWest	Yes	Yes


 5501	Dynamic strobe flash 5 tics on 15 tics off
 5502	Dynamic strobe flash 5 tics on 35 tics off 

	Spawn Angle	Floor	Ceiling	InSync
	-------------------------------------
	North		Yes	No	Yes
	NorthEast	Yes	No	No
	East		No	Yes	Yes
	SouthEast	No	Yes	No
	South		Yes	Yes	Yes
	SouthWest	Yes	Yes	No
	West		Yes	Yes	Yes
	NorthWest	Yes	Yes	No

 Note that types 5501 and 5502 can be synced with other 5501 or 5502
 types if the angle they are spawned at is N, S, E or w. Setting them
 to any of the other four available angles will desync them.


 5000	Standard type
 5500	Dynamic light flash 64 tics on 7 tics off
 5503	Dynamic light flicker 
 5504	Phased (always in sync - locked to global timer)
 5505	Fixed special type

	These types must be put in a sector with a special of 6, 8 or
        17.

        With 8 or 17 They will hijack the settings converting them to
        use dynlight only. The sector the Thing is in will have its
        floor light changed to the minimum floorlight surrounding.

        This allows for finer tuning of the way a dyn light flickers or
        is phased. A sector with 8 or 17 specials can be tested first
        before then adding a 5505 type to convert it to dynlight only.

        with 6, an otherwise unused Doom sector special, a trigger line
        type 81 can be used to turn them on. The period is set by the
        length of the trigger line. A line length of 70 (map units) will
        give an ON period of 1 second (35 tics). It will then remain off
        until retriggered. This allows for voodoo doll triggering in a
        scroll floor objects sector to give sequenced lighting effects,
        for example, which can be tuned by changing the scroll speed and
        trigger line lengths used.

        Note that the number of 5505 types that can be put in any one
        sector is limited to 16. Wrongly assigning this type will cause
        an explanatory error to help with map development.

 Light effects in general:

   5500 to 5504 are intended to be used in sectors where no special is set.

        5500 is similar to sector special 1
        5501 is similar to sector special 3 or sector special 12 if sync'ed
        5502 is similar to sector special 2 or sector special 13 if sync'ed
        5503 is similar to sector special 17
        5504 is similar to sector special 21 except that the bright sector is
             not needed. This is always set at the dark sector's light level
             at spawn time + 16.
             The dark sector is that which the 5504 Thing is in.

	5505 inherits the behaviour of sector types 8 or 17 and converts them
	     to dyn light only. The actual sector's light will be changed and
             remain fixed at the value of the minimum light level surrounding.
             It can also be triggered if sector special 6 is used.

 The Things sprite is not drawn.


14001 to 14064

	a) ambient sound (for use with script stored to SNDINFO lump)
	b) identifier MT_SOUNDSOURCE
	c) more than one type with the same number can exist

	See R3D_Docs\editing\R3D_Ambients.txt


 14101 to 14164

	a) mus change THING (for use with script stored to MUSINFO lump)
	b) identifier MT_SOUNDSOURCE

	See R3D_Docs\editing\R3D_MusInfo.txt


	------------- PAIRED FAKETELEPORT TYPEs ------------------

	Paired things used to link between faked sectors.

	MT_TPUNDERFAKE links to MT_TPOVERFAKE when the player's head goes below
	a fake ceiling. When this occurs the player will be silently teleported
	to the sector with MT_TPOVERFAKE.

	MT_TPOVERFAKE links to MT_TPUNDERFAKE when the player's head goes above
	a fake ceiling. When this occurs the player will be silently teleported
	to the sector with MT_TPUNDERFAKE.

 14200 to 14299

	a) Fake teleport THING (first of pair)
	b) Identifier MT_TPUNDERFAKE
	c) There must only be one with a specific number in a map (thus 100 allowed)
	d) Its pair (see 14300 to 14399) must exist e.g. 14206 will link with 14306 

 14300 to 14399

	a) Fake teleport THING (second of pair)
	b) Identifier MT_TPOVERFAKE
	c) There must only be one with a specific number in a map (thus 100 allowed)
	d) Its pair (see 14200 to 14299) must exist e.g. 14306 will link with 14206 

	See R3D_Docs\editing\R3D_FakeTeleport.txt

 18000 to 18006

 Note:	1800x types are only recognised if a Thing type 15501, 15503 or 15504 is in
	the map of the map has an SCP_DEFN lump.

	None will have any effect unless precisely positioned on a line with a valid
	walkover or use teleport trigger type set. In addition if a W1 or S1 trigger
        the change can only be made once.

	In addition no check is made as to whether the line is monster triggered
	or monster and player triggered. The lighting change can only be triggered
	by the player and this will still be the case even if it is a monster only
	trigger line.

 18000 to 18005 are used to set lighting. The settings correspond to the three light
	settings in Control Panel-Lighting. Note; torch on and vtx on is proscribed.

	Torch on	Vtx on		Non-Linear

 18000      0              0              0
 18001      0              0              1
 18002      0              1              0
 18003      0              1              1
 18004      1              0              0
 18005      1              0              1
 
 
 18006  Make trigger line player only triggered. Should the trigger type be a
        monster only type then nothing will happen - so be warned as R3D makes
        no check on this.


=========================================================================
	4)	SCRIPTED THINGS
=========================================================================

	-------------------------------------------------------------
	Types specifically identified if a map has an SCP_ZOFF entry;
	-------------------------------------------------------------

 16000 - 16999

	16000 to 16899	z-off identifiers - also used with an SCP_DEFN script
	16900 to 16999	Used in conjunction with an SCP_ZOFF SETLINESOUND,
                        SETLINESOUNDBV, SETLINETRIGGERSOUND or SETLINESOUNDOFF
                        definition.

 17000 - 17099 Used in conjunction with an SCP_ZOFF SETELEVSPEED, SETELEVSPEEDHEIGHT,
               or SETPSEUDOFAKE definition.

	See R3D_Docs\editing\SCP_ZOFF_header.txt

	-------------------------------------------------------------
	Types specifically identified if a map has an SCP_DEFN entry;
	-------------------------------------------------------------

 6000 to 6099
	Identifies a THING that can drop any item
	v220-13
	6070 to 6079 types are dealt with differently if the player is dead and they are not.
	They are suspended in their current state. If they have no gravity then their frame is
	also suspended. Any infighting is also stopped.
	These types can also be made more aggressive.

	See R3D_Docs\editing\R3D_ModelScript.txt and SCP_DEFN_Header.txt

 7000 to 7699

	a) reserved for architectural models
	b) no special editor action required
	c) using R3D these types do not revert to a sprite at a preset
	   distance, do not fade and are not affected by corpse time.
	d) identifier and characteristics set with a ded definition file
	e) Up to 200 can be accessed by any one map

	Note: Architectural models can be set without a script but
	      a thing 15501, 15503 or 15504 must be in the map

 6700 to 6799 and 7700 to 7799

	a)	SCP linedef spots
	b)	not spawned

 6800 to 6899 and 7800 to 7899

	a)	SCP action spots
	b)	not spawned

 6900 to 6999 and 7900 to 7999

	a)	SCP script spots
	b)	not spawned

	See R3D_Docs\editing\R3D_ModelScript.txt and SCP_DEFN_Header.txt


 13901 to 13964

	a) used to link to an ambient sound THING for dynamic triggering
	b) identifier MT_TRIGAMBIENT
	c) more than one type with the same number can exist
	d) it must be placed exactly on a line.
	e) the last two digits are used to link it to a THING 14001 to 14064
	   e.g. 13921 will reference 14021

	Note: Triggered ambients can be set without a script but
	      a thing 15501, 15503 or 15504 must be in the map

 15600	Used to group sectors for reverb.  See SCP_DEFN_Header.txt

 20000 to 20127 REVERB

	See R3D_Docs\editing\SCP_DEFN_Header.txt


=========================================================================
	5)	3D LINE DEFINITIONS
=========================================================================

 NOTE:	the following, apart from 260, only applies if a
        THING type 15501 is present in the map.

	i)	special tags. Rotation support for 3D lines using tags -1
                              and -2 was removed in v220-13 in favour of
                              using model rotation.

	ii)	line specials
		
		a)	260 - translucent midtex (same as MBF)
			277 - translucent bottom tex
			278 - translucent mid and bottom tex.

			Where tag is 0 just the line with the special is
			affected else all lines with the same tag are
			affected.

                b)      270 - link to sector having 3D floor flats.
                              See R3D_structures.txt
			Sector tags != 0 must be used

	iii)	linedef textures

		In general;
		3D linedefs must be two sided.
		The upper texture on side 1 and side 2 must be a 3D special type.
		The texture name is used as the definition.

		a)	hi-tex side 1 takes the form $Nxxxxx where N is a letter in
			the range A to F used to identify the definition type and
			xxxxx is a decimal number.
			The definition must comprise of exactly 7 characters
			e.g. $A00000

		b)	hi-tex side 2 takes the form $xxxNyyy where N is the letter
			A, B, C, D, or E and xxx is a decimal number and yyy is a
			decimal number.
			The definition must comprise of exactly 8 characters
			e.g. $000A000

		c)	lines with 3D hitex defs but no other textures are used for
			invisible blocking or THING height setting purposes.
			
	See R3D_Docs\editing\R3D_Structures.txt for further information


=========================================================================
	6)	AMBIENT TRIGGER LINE SPECIAL DEFINITIONS
=========================================================================

	8090	R3D ambient trigger - push
	8091	R3D ambient trigger - gun
	8092	R3D ambient trigger - walkover

	Used in conjunction with an SCP_DEFN script
	Where used will require a SNDINFO script


=========================================================================
	7)	SCRIPTED LINE SPECIAL DEFINITIONS
=========================================================================

	Used in conjunction with an SCP_DEFN script

	7000 to 7699	has the local flag even if unset in its def.
			health is set to 1 if defined as 0.
	8112	Block friends
	8113	Release hold state walkover
	8114	Release hold state gun

	Ignored unless an SCP_DEFN script is present and has
	a MAP identifier for the map using the special.

	See under heading "LINEDEF TRIGGERING" in:
		R3D_Docs\editing\R3D_ModelScript.txt
	for further linedef types.

=========================================================================
	8)	3D SLOPE DEFINITIONS
=========================================================================

 NOTE:	the following only applies if a THING type 15503 is present in the map

	The values are entered by using the tex definitions on the line side
	for the	sector to be sloped.

	a) $Axxxxxx where xxxxxx is a decimal number - single vertex
								height change
	b) $Bxxxxxx where xxxxxx is a decimal number - opposing two vertices
								height change

	These definitions must always be eight characters in length.
	Leading zeros should be used to make up the length.
	E.g. to lift a single vertex by 1 then $A000001 would be used.

	Values should be positive, negative numbers are treated as 0.

	A value of 0 is used to automatically change z values depending
	on the adjoining sector height.

	See R3D_Slopes.txt for further information

=========================================================================
	9)	COD DEFINITIONS
=========================================================================

	The following player only triggered specials are now supported:

	Line 274 = WALK,            Light_RaiseByValue(tag, 15)
	Line 275 = WALK,            Light_LowerByValue(tag, 15)

	sector 18 = Damage_InstantDeath;
	sector 19 = Sector_Heal;

=========================================================================
	10)	R3D SECTOR SPECIAL 20
=========================================================================

	If a lit object's sector special is set to 20 then any
	surrounding subsectors will only be lit by it if there
	is a direct line of sight between the lit object's
	centre of luminance to the x,y point on a subsector's
	floor. This is therefore dependent upon careful map
	design. In the SlopesTest.wad that can be found in R3DTEST
	then the closed pipe near the start has torches but their
	light does not spill out to the outside of the pipe. On
	hitting the switch the pipe will split where the torches
	can then be seen. On doing so a switch behind is exposed
	which when activated will raise the torches. Their light
	can now see the subsectors outside of the pipe so they
	will now be lit. It is not necessarily an acceptable
	result showing the limitations of using this method.



gmj - February 2018



	

	



