Difference between revisions of "NDDynamicSpawners"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
Line 1: Line 1:
 
<p style="width:60%;margin: 0 auto">[[NewDawnHome|[Main]]] [[NDServerIndexTemplateMain|[Templates]]]</p>
 
<p style="width:60%;margin: 0 auto">[[NewDawnHome|[Main]]] [[NDServerIndexTemplateMain|[Templates]]]</p>
<p style="color: #DDDD88;font-size: 22px;width:60%;margin: 0 auto">Example Dynamic Spawner Template</p>
+
<p style="color: #DDDD88;font-size: 22px;width:60%;margin: 0 auto">Example Dynamic Spawner Universal Template</p>
  
 
<p style="color: #DDDD88;font-size: 16px;width:60%;margin: 0 auto">Object Variables</p>
 
<p style="color: #DDDD88;font-size: 16px;width:60%;margin: 0 auto">Object Variables</p>
Line 15: Line 15:
 
* TriggerSpawnTeamType  
 
* TriggerSpawnTeamType  
 
* TriggerDeathRadius  
 
* TriggerDeathRadius  
* TriggerChance  
+
* TriggerChance
 +
* SpawnKey
 +
* HUDVars
 
* SpawnObjVars  
 
* SpawnObjVars  
 
</div>
 
</div>

Revision as of 16:48, 7 December 2019

[Main] [Templates]

Example Dynamic Spawner Universal Template

Object Variables

  • spawnRadius
  • SpawnRateIncrease
  • spawnEffect
  • spawnMode
  • lootMode
  • progressModifier

Initializer Variables

  • TriggerSpawnTeamType
  • TriggerDeathRadius
  • TriggerChance
  • SpawnKey
  • HUDVars
  • SpawnObjVars

Below is an example of a typical Dynamic Spawner template file for Rebels.

<ObjectTemplate>
	<ClientId>2</ClientId>
	<Name>Dynamic Rebel Spawner</Name>
	<ObjectVariableComponent>	
	<DoubleVariable Name="spawnRadius">20</DoubleVariable>
	<DoubleVariable Name="SpawnRateIncrease">1.03</DoubleVariable>
        <StringVariable Name="spawnEffect">none</StringVariable>
        <StringVariable Name="spawnMode">Progressive</StringVariable>
	<StringVariable Name="lootMode">Weighted</StringVariable>
        <DoubleVariable Name="progressModifier">2.5</DoubleVariable>
	</ObjectVariableComponent>
	<ScriptEngineComponent>
		<LuaModule Name="dynamic_spawn_controller_rebels">
			<Initializer>
				{
					TriggerSpawnTeamType = "Rebel",
                                        TriggerDeathRadius = 30,
                                        TriggerChance = 0.1,
                                        TeamType = "Rebel",
					SpawnObjVars = {
						["AI-StationedLeash"] = false,
						["AI-LeashDistance"] = 20,
						["AI-CanWander"] = true,
					}
				}
			</Initializer>
		</LuaModule>
	</ScriptEngineComponent>
</ObjectTemplate>