Difference between revisions of "Spawner Documentation"
(→Introduction) |
(→Scripting Reference) |
||
Line 9: | Line 9: | ||
== Scripting Reference == | == Scripting Reference == | ||
+ | Why is there a scripting reference section and what does that mean? Well the spawner system allows you to use special @Commands:Arg <value1,value2,value3> type of setup to help you modify in game objects quick and efficiently. Sometimes you want to create simple quick content for your players, but it is such a hassle to go in and modify said template. I mean who wants to open up a text editor these days for silly things like this. What I did was designed a system that not only allows you to spawn a goblin,chest,effect,sound or other stuff into your world. Through the spawning system and its special in game commands you can apply to objects. You can come up with amazing content quickly. I have the section broken up into various sections for ease to remember. It is important to remember that you should at least glance at each section to understand its core concept, and how to apply it. Once you learn these simple sections and how they an work for you and your ideas. You won't regret the read I promise. | ||
=== Object Targeting Commands === | === Object Targeting Commands === | ||
{| class="wikitable" | {| class="wikitable" |
Revision as of 21:58, 17 June 2018
back to Project Phoenix#Spawners
Contents
Introduction
A Spawner is a object you can place in your world in which will spawn given objects at a rate of your choosing. Simply it puts things in the world for you like monsters or harvest item, even a sword or some lemongrass. It does what it states.. it simply spawns stuff. There is another side to the Gizmos Simple Spawner system though.
Advanced Spawning is something of its own kinda beast. Not only can you spawn objects, but you can also modify those objects in many ways, such as its scale, or hue.. you can even use advanced things such as setting an object variable on the object. You can communicate with objects outside the spawner by using keywords and a simple scripting language that runs behind the scenes. You can force spawners to wait on other objects to get a varible or reach a certain sequence. Want to run a simple old school champion spawn from the days of old? You can do that too. But thats is not all.
The spawners have the ability to code there own templates based on the data you enter. So once you set up a spawner with data, or lots of data you want to reuse for other spawners. It is simple just create your spawner, edit the data and click a button and the template is created...
Scripting Reference
Why is there a scripting reference section and what does that mean? Well the spawner system allows you to use special @Commands:Arg <value1,value2,value3> type of setup to help you modify in game objects quick and efficiently. Sometimes you want to create simple quick content for your players, but it is such a hassle to go in and modify said template. I mean who wants to open up a text editor these days for silly things like this. What I did was designed a system that not only allows you to spawn a goblin,chest,effect,sound or other stuff into your world. Through the spawning system and its special in game commands you can apply to objects. You can come up with amazing content quickly. I have the section broken up into various sections for ease to remember. It is important to remember that you should at least glance at each section to understand its core concept, and how to apply it. Once you learn these simple sections and how they an work for you and your ideas. You won't regret the read I promise.
Object Targeting Commands
Commands | Argument | Description |
---|---|---|
The following commands can be found in spawner.lua file. You can find them in the CheckingCommands(data) function | ||
SendMessage() | <Message> | This sends a message to the OBJECT you wish to send a message too. |
SetHue() | <hue> | This will apply the OBJECT:SetHue(<hue>) function to the OBJECT |
SetColor() | <color> | This will apply the OBJECT:SetColor(<color>) function to the OBJECT |
Talk() | <Message> | Gives the NPC a overhead message |
SetAmount() | <amount> | Sets the amount or quantity of an object |
SetScale() | <int> | This sets the targets scale.x,scale.y,scale.z to <int> |
SetAmount() | <amount> | this sets the count_max on the a spawner object |
SetDelay() | <min>,<max> | this sets the min and max spawn delay on the a spawner object |
SetRange() | <min>,<max> | this sets the min and max spawn range on the a spawner object |
SetObjVar() | <objvar>:<value> | this will set the <objvar> of the target to <value> |
DelObjVar() | <objvar> | this deletes an <objvar> from the target.+ |
RotateBy() | <x,y,z> | rotates the x,y,z by the values in degrees. |
SetLocation() | <x,y,z> | moves the target to the x,y,z values for the location. |
PlayEffect() | <effectname>,<durationinseconds> | plays the <effectname> on the target |
StopEffect() | <effectname> | stops the <effectname> on the target |
PlaySound() | <soundname> | plays the <soundname> at the targets location |
Spawned Object Commands
Commands | Syntax | Description |
---|---|---|
The following commands can be found in spawner.lua file. You can find them in the HandleChanges(mob,spawn_template) function | ||
SetHue | @SetHue:<value> | this will set the hue of the spawned object. |
SetColor | @SetColor:<value> | this will set the color of the spawned object. |
SetScale | @SetScale:<value> | this will set the scale of the spawned object. |
SetStr | @SetStr:<value> | this will set the Str of the spawned object. |
SetAgi | @SetAgi:<value> | this will set the Agi of the spawned object. |
SetInt | @SetInt:<value> | this will set the Int of the spawned object. |
SetCon | @SetCon:<value> | this will set the Con of the spawned object. |
SetWis | @SetWis:<value> | this will set the Wis of the spawned object. |
SetWill | @SetWill:<value> | this will set the Will of the spawned object. |
SetName | @SetName:<value> | this will set the Name of the spawned object. |
SetTitle | @SetTitle:<value> | this will set the Title of the spawned object. |
SetTeam | @SetTeam:<value> | this will set the TeamType of the spawned object.. |
SetLocation | @SetLocation:<x>,<y>,<z> | this will spawn the object at x,y,z location. |
SetRotation | @SetRotation:<x>,<y>,<z> | this will rotate some objects by x,y,z rotation. |
SetObjVar | @SetObjVar:<objvarname>,<objvarvalue> | this will add an objvar to the spawning object |
SetSkill | @SetSkill:<skillname>,<value> | this will set the skillname to n value |
PlaySimpleEffect | @PlaySimpleffect:<value>,<durationinseconds> | this will play any simple effect on the object when it apperas. |
PlaySound | @PlaySound:<value> | this will play a sound on the object when it appears. |
SetAppearanceFromTemplate | @SetAppearanceFromTemplate:<value> | this will set the appearnce of the object.. |
SetInvulnerability | @SetInvulnerability:<true>/<false> | this will the object to invulnerable. |
SetFacing | @SetFacing:<value> | this will set the facing of the object. |
SetHealth | @SetHealth:<value> | this will set the health of the spawned object.. |
SetStamina | @SetStamina:<value> | this will set the stamina of the spawned object. |
SetMana | @SetMana:<value> | this will set the mana of the spawned object. |
AddModule | @AddModule:<value> | this will add a module to the object when it spawns. |
RemoveModule | @RemoveModule:<value> | this will remove a module from an object when its spawned. |
SetSharedObjectProperty | @SetSharedObjectProperty:<property>,<value> | this will set a shared object property to n value. |
SetObjectTag | @SetObjectTag:<value> | this will set the tag on a object spawned. |
OBJECTLIST Commands
OBJECTLIST gives you the ability to make a list of objects. Then with the RANDOM,ALL you will be able to send a message to a RANDOM object on the list, or ALL of the objects on the list.
Example Syntax | What it means |
---|---|
The following commands can be found in gizmos_simple_spawner.lua file. You can find them in the HandleChanges(mob,spawn_template) function | |
OBJECTLIST@RANDOM@objectid1,objectid2,objectid3@SendMessage()@<message> | this will randomly pick from objectid1,objectid2,objectid3 and will send the message <message> to the randomly picked object |
OBJECTLIST@ALL@objectid1,objectid2,objectid3@SendMessage()@<message> | this will send all of objectid1,objectid2,objectid3 the message <message> |
FUNCTIONS
Function Name | Syntax | Description |
---|---|---|
The following commands can be found in gizmos_simple_spawner.lua file. You can find them in the HandleChanges(mob,spawn_template) function | ||
SendMessage() | @SendMessage()@<message> | this will send the <message> to the object |
SetHue | @SetHue()@<value> | this will set the objects hue to <value> |
WAITFOR Commands
Commands | Syntax | Description |
---|---|---|
The following commands can be found in gizmos_simple_spawner.lua file. You can find them in the HandleChanges(mob,spawn_template) function | ||
GetObjVar() | WAITFOR@OBJECT@<objectid>@GetObjVar()@<objvarname>@<condition>@<value> | the spawner will wait at this sequence, until an objvar meets a condition. |
HasObjVar() | WAITFOR@OBJECT@<objectid>@HasObjVar()@<objvarname> | the spawner will wait at this sequence, until the object has the objvar. |
HasModule() | WAITFOR@OBJECT@<objectid>@HasModule()@<modulename> | the spawner will wait at this sequence, until the object has the module <modulename>. |
MISC Commands
Commands | Syntax | Description |
---|---|---|
The following commands can be found in gizmos_simple_spawner.lua file. You can find them in the HandleChanges(mob,spawn_template) function | ||
GOTO | GOTO@<sequence> | this will start the sequence off at the sequence provided by <sequence> |