Essentials Series/Duplicatotron Tutorial: Difference between revisions

no edit summary
(Created page with "{{EssentialsSeriesBox}} This page is part of the Essential Series modding tutorials. It will cover how to use Industrial Park to place a D...")
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 3:
 
== Setting up the Duplicatotron ==
First of all, you must [[../Tikis and Enemies/#Importing HIPs|import the HIP file]] of the Duplicatotron to your stage's HOP. This is only needed if the stage didn't previously have a Duplicatotron. You also have to import the HIPs of all enemies you want to appear in the level.
 
After that, place a Duplicatotron [[../Asset Templates/|template]] in the HIP's Default layer. The template will place a Duplicatotron [[VIL]], which is the machine itself that you can move and rotate, a Group ([[GRUP]]) which will be our robots/move points group, and a [[game_objectDYNA/game object:NPCSettings|NPCSettings DYNANPCSettingsObject]] for the Duplicatotron.
 
Now, you should place the enemies which you want to spawn from the duplicatotron. Each enemy you place can only have one instance of itself active. For example, if you place one Fodder and one Ham-mer, no more than one Fodder and one Ham-mer will be spawned from the Duplicatotron at a time, it will only create another Fodder when the first one is killed, for example (it is technically the same Fodder that was killed).
 
When placing the enemy templates, the first thing you should todo is '''delete all the move points''' ([[MVPT]]) that were placed along with the enemies. This is because those MVPTsmove points do not work with Duplicatotrons. If you placed a template that includes a trigger, delete the trigger as well.
 
After the enemies were placed, you must use the '''Point_MVPT templateMovePoint''' template (not the area one) to place new move points. These will be the points in which the enemies will be spawned at. You do not need to place as many MVPTsmove points as there are enemies, there can be more or less.
 
If you want a specific enemy VIL to always spawn at the same MVPTpoint, you can set the MovePoint_AssetIDMovePoint of that VIL to the move point you want it to spawn at. Otherwise, leave that field blank and the Duplicatotron will spawn the enemy at a random move pointone.
 
With all VILs and new MVPTsmove points placed, open the Asset Data Editor for the GRUPgroup that was placed in the template along with the Duplicatotron. Add all the asset IDs of the '''enemies and move points to the group'''. You can do this by selecting all of them and clicking on "add all selected to group" in the Asset Data Editor. The order which the enemies and move points are in the group asset IDitems list does not matter.
 
There is one more thing you need to do: add one (or more) '''Area_MVPTMovePoint (Area)''' templates. This is because Point_MVPTspoint move points do not allow enemies to move around and detect the player. You can use only one for the whole group of enemies, or one for each Point_MVPTpoint you placed before, or one for a setsubset of Point_MVPTsthe points, it doesn't really matter, as long as you '''add the Areaarea MVPTmove point to the NextMVPTsNextMovePoints of each Point MVPTpoint'''. Each point will use the Areaarea you specify in their Next list. You don't need to add the Areaarea MVPTsmove points to the Duplicatotron's Groupgroup.
 
If you test ingame now, the Duplicatotron should work correctly and immediately. If you don't want the Duplicatotron to be active immediately as the level starts, add the [[../Links/|link]] ScenePrepare => Duplotron_Pause to the Duplicatotron's VIL, with the target asset as itself. When you want it active (when entering a [[../Triggers/|trigger]] for example, use the Duplotron_Resume event with the VIL as the target.
 
Note: you cannot use the same enemy in a Duplicatotron and outside of it. You also cannot have the same enemy in two or more different Duplicatotron groups.
 
=== Settings ===
The Duplicatotron Settings is a NPCSettings [[DYNA/game object:NPCSettings|NPCSettingsObject]] asset that is placed along with the Duplicatotron. You can set which NPCSettings your Duplicatotron is using in the VIL asset editor, and if you have multiple Duplicatotrons in a level, it's okay if they share the same NPCSettingssettings object (you can delete unused ones). These are some of the fields you can set in the NPCSettingsit:
 
*'''DuploWaveMode''': if set to Continuous, the Duplicatotron will continuously respawn the enemies as you destroy them. If set to Discreet, it will only start respawing the enemies after all of them were destroyed.
Line 34:
* '''Duplotron_Resume''': send this to a Duplicatotron to resume it.
* '''Duplotron_WaveBegin''': the Duplicatotron VIL receives this event when it starts spawning a new wave of enemies.
* '''Duplotron_WaveComplete''': fired when all enemies in a Duplicatotron's wave are destroyed (when WaveMode is Discreet), or all enemies + Duplicatotron are destroyed otherwise
* '''Duplotron_NPCBorn''': fired when one of the enemies is created.
* '''Duplotron_NPCKilled''': fired when one of the enemies is killed.
Line 41:
* '''Duplotron_DuperIsDoner''': fired when all enemies specified in a Duplicatotron's events are killed.
* '''Duplotron_KillKids''': send this to the Duplicatotron to kill all enemies it has spawned.
* '''Connect_IOwnYou''': the Duplicatotron should send this to a [[GRUP]] containing MVPTsmove points and VILs to connect to them. This is set automatically when placing the Duplicatotron template in Industrial Park.
* '''SetUpdateDistance''': much like [[../Platforms/#SetUpdateDistance|platforms]], Duplicatotrons stop working when you are at a distance from them. This can be unwanted if the move point where an enemy should spawn is very far away from the Duplicatotron itself (they can work from any distance). Send the SetUpdateDistance event to the Duplicatotron (this is usually done on ScenePrepare => SetUpdateDistance in the Duplicatotron's own links) to set a new update distance, which should be in the first argument. This is commonly left as 0, which will make the update distance infinite.
 
Aside from those, you can also use some of the [[../Tikis and Enemies/#Events|events used in normal enemies]]: Kill, NPCSetActiveOn, NPCSetActiveOff.
 
[[Category:Modding]] [[Category:Tutorials]]