DERELICT

Derelicts can be viewed as special containers that can hold some form of loot. They cannot attack or defend themselves, have no shields etc. Derelicts can be destroyed or salvaged (special equipment) to gain loot contained within.

Let's use one of the derelicts as an example, Spg2\Models\Derelicts\Bishop\wreck.der. Derelict files (*.der) can be edited with the Notepad++.

DERELICT FILE [*.der]

	ModelName:	Spg2\Models\Derelicts\Bishop\derelict.asb
	Name:	Derelict
	CargoValue:	1000
	LootDrop:	0
	Enable:	1
	Events:
	{
		...
	}
	
ModelName Path to object assembly file (*.asb)
Name Default name set by the Game/World editor when derelict is created
CargoValue Default CargoValue set by the Game/World editor when derelict is created
LootDrop Default LootDrop ([=>Base\LootDrop.wdt]) set by the Game/World editor when derelict is created
Enable Default Enable flag value set by the Game/World editor when derelict is created
Events { } Set of default event scripts set by the World Editor when object is placed

SCRIPT EVENTS

OnDestroy Triggered when derelict explodes ( derelict GetParent SetEnabled 0 ; )
OnEnter Triggered when player enters a game-created 300 unit sized radius around the derelict
OnExit Triggered when player exits a game-created 300 unit sized radius around the derelict
OnScan Triggered when player scans the derelict

MAP FILE PARAMETERS

	Derelict:	
	{	
		ModelId:	3
		Position:	44627.52	-601.00	-2127.06
		Rotation:	0.00	0.00	0.00
		KeyName:	DER_7_0
		Name:	Derelict
		CargoValue:	1000
		LootDrop:	5
		Enable:	0
		Events:
		{
			OnDestroy:	Spg2\Scripts\DerelictOnDestroy.sal
			OnEnter:	Spg2\Scripts\DerelictOnEnter.sal
			OnExit:	Spg2\Scripts\DerelictOnExit.sal
			OnScan:	Spg2\Scripts\DerelictOnScan.sal
		}
	}
	
ModelId Specific object model ([ Base\EditorDerelicts.wdt ]) used by this object type instance
Position Object global position
Rotation Object rotation
KeyName Object keyname used for accessing via scripts
Name Specific name of this object instance
CargoValue DEPRECATED
LootDrop ID of the loot drop script [Base\LootDrop.wdt]
Enable Initial object state when created in-game (1=ON | 0=OFF)
Events {} Set of events with linked scripts