Difference between revisions of "Spawner Documentation"
(→OBJECTLIST Commands) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 145: | Line 145: | ||
FUNCTIONS | FUNCTIONS | ||
+ | This list of functions will grow as they are similar to object code just need to get around to it (future update) | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 153: | Line 154: | ||
| SendMessage()||@SendMessage()@<message>||this will send the <message> to the object | | SendMessage()||@SendMessage()@<message>||this will send the <message> to the object | ||
|- | |- | ||
− | | SetHue||@SetHue()@<value>||this will set the objects hue to <value> | + | | SetHue()||@SetHue()@<value>||this will set the objects hue to <value> |
+ | |- | ||
+ | | SetColor()||@SetColor()@<value>||this will set the objects color to <value> | ||
|- | |- | ||
|} | |} | ||
Line 183: | Line 186: | ||
| GOTO|| GOTO@<sequence>|| this will start the sequence off at the sequence provided by <sequence> | | GOTO|| GOTO@<sequence>|| this will start the sequence off at the sequence provided by <sequence> | ||
|} | |} | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 03:04, 2 July 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
Object targeting commands are effects and or actions that you can apply to external objects in your game world. If you are wanting to manipulate an object or the spawner. You would use the following commands to modify that object with the spawner. But what does it mean to modify an object and why is it important? If you look at the Talk() Command as an example. I could put in my spawner entry table the following command for it to execute.
OBJECT@53724@Talk()@Hey your spawner made me say this, but its the 1st entry
OBJECT@53724@Talk()@Hey your spawner made me say this, but its the 2nd entry
So with these 2 spawner entries, lets see what happens when a spawner is turned on. All spawners start off in normal mode, or random spawning. What this means if you have more then 1 entry in the spawner list, it will randomly select one of them and execute it. The other option is to set the spawner to sequential mode and it will execute each spawner entry one after the other. In this case, it will use the first talk command, then waits for your designated spawner frequency. Then it will do the second talk entry. After this, the timer goes off again, then goes back to one, so it goest 1,2,1,2,1,2 over and over again until shut off or another spawner sends a message to it to deactivate.
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
Spawned object commands are like the previous commands listed above, except these are special commands you can apply to spawned objects that come from the spawner. Sometimes you want to change a monster file to make it harder or easier. Problem is, here we go again. Open a xml file, add or remove modules, change values. Click save. Reload templates. I mean its kinda tedious. With my system you can do things like this.
giant@SetHue:42@SetColor:FFFF00
giant@SetHue:42@SetColor:00FF00
giant@SetHue:42@SetColor:FF0000
giant@SetHue:42@SetColor:0000FF
lets go over this functionality shall we? So with your spawner in its normal mode, which is random spawning. When you turn the spawner on with these 4 entries you will have the spawner randomly pick a giant, and it will be the color Yellow, Green, Red or Blue. when you kill the giant, it will again pick 1 of the 4 random entries. If we are running in sequential mode, then it will spawn each giant in order based on its entry position. Again it will spawn a yellow one, wait for you to kill it, then spawn the green one, wait for you to kill it, then spawn the red one, then you kill that and it then spawns the blue one. What happens next? After you kill the the blue one, it will then spawn the yellow one and repeat the process over and over continuously. Below is a list of other attributes and functions you can apply to a object when its spawned.
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 This list of functions will grow as they are similar to object code just need to get around to it (future update)
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> |
SetColor() | @SetColor()@<value> | this will set the objects color to <value> |
WAITFOR Commands
ONLY WORKS FOR SEQUENTIAL SPAWNING
Commands | Syntax | Description |
---|---|---|
The following commands can be found in 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 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> |