Archetypes

From RoboBlitz Editor Wiki

Archetypes are a useful tool when placing many similiar objects in the game world. Whenever you need to setup a class or collection of classes and you want to save those settings across maps or in various places in the same map, and you want to be able to change the settings for all instances of that game piece at the same time, then Archetypes are for you.

Contents

Basics

Whenever you place an archetype in the editor, you're actually placing a reference to that archetype. When the map is loaded it copies the archetype and places it in the map (applying any changes you made to that specific instance of the archetype in the map).

You can force archetypes to use a simple form of inheritance by settings an archetype's archetype to another object in the generic browser. However, this feature is still a little buggy and can cause undesired changes in your archetypes. If you decide to use it, save often, keep backups, and check to make sure your archetypes haven't changed unusually. Hopefully this will be fixed in a future patch.

Copying Some Archetypes

Now that you know the basics of of archetypes, lets create one. It would be pretty amusing to see a RoboNOED with little tiny drone arms dangling at it's side, so lets do that.

Start with an empty map (it might help to have a Basic Map setup).

Since we're making a new type of RoboNOED we can just make a copy of the existing RoboNOED body and use that to build our Tiny Armed NOED. Right click on MISC_PostDefaultLoad and click on FullyLoad to make sure all the resorces in the MISC_PostDefaultLoad package are loaded. Make sure MISC_PostDefaultLoad is still selected and enter "NOED" into the filter box. Find NoedBodyArch, right click it and say Duplicate. You should choose a different package to save your duplicate in, so you don't accidentally break MISC_PostDefaultLoad and your RoboBlitz installation along with it. I'll save mine in a package called TutorialPackage with the name SmallArmsNoedBodyArch.

Double-Click your new SmallArmsNoedBodyArch to edit it's properties. You might want to Play Around With The NOED Archetype a bit before we continue. When you're done with that scroll down to the RPart section of the Properties Window Notice the array of ConnectorSockets. Each one of these will accept an RPart which will be attached to the NOED body. For now, don't make any changes here.

Now we need to get a copy of some NOED arms. Do the same procedure with NoedGunArch in MISC_PostDefaultLoad. Now TutorialPackage should contain a copy of the NOED arms. I named mine: SmallArmsNoedGunArch

You can place these Archetypes in the map, but they'll just bounce around on the ground? How do you put them together into a NOED?

Making a Factory

All the Robots in RoboBlitz use a Factory to connect their parts and give them a Controller (If you don't know what a Controller is, just think of it as a "computer brain" for the robot). We should make a copy of the RoboNoedFactoryArch in MISC_PostDefaultLoad.

First lets grab a reference to the arm Archetype. Right click on it and select "Copy Reference". Think of a reference as a URL to the resource. Now double click the new RoboNOED factory to adjust it's properties. Scroll down to the "Factory" section and paste the reference into the RoboNOEDGunArch field. The reference should look something like this: RoboNoedGun'TutorialPackage.SmallArmsNoedGunArch'. The editor automatically casts the SmallArmsNoedGunArch into a RoboNoedGun, which the factory requires.

Do the same with the Body archetype. Leave the default booster reference for now.

BaddieSpawnPad

Lets test out our new copy of the RoboNOED Factory. Get a reference to the factory.

Now we're going to make a BaddieSpawnPad to hold the factory and controll the spawning of the NOED. Go to the Actor Classes Browser tab and expand RDestructible and RBaddieSpawnPorter and then select RBArenaBaddieSpawnPad. Then right click in one of the viewports of your map and click on Add RBArenaBaddieSpawnPad Here. Right click on the new RBArenaBaddieSpawnPad and go to properties. Open the BaddieSpawn section and click on the BaddieSpawnRecords array, click on the green Plus symbol to add a new SpawnRecord. Click the triangle to open the Record and copy and paste your Factory reference into the BFArchetype field. Set the MaxBaddieCount to 1 to make sure there is only one baddie around at a time. Close the properties window and save the game. Try the map in PIE.

Aaah! Lookout! A NOED!

Lets give him small arms now. Exit the game and open the properties for SmallArmsNoedGunArch in TutorialPackage. Go to the Collision section and expand the Collision Component. Scroll down to static mesh component. We need to change the Static mesh to make his arms look smaller. Find a reference to the drone arms static mesh. (It should be "MISC_PostDefaultLoad.Drone_Larm", but the right arm should work fine too) Paste the reference in the static mesh field.

The drone arms are a little TOO small, so change the drawscale or 3 or 4.

Save your map and try it out in PIE again.

They look kinda like earings... I think they're upside down. You can play around with the collision components rotation and translation to adjust where they're placed. (You might explore the NOED's connector settings too).

Making a New Archtype

But now lets make a totally new archetype from a class, instead of copying them. Go to the Actor Classes Browser and open RDestructible->RPart->RPartAimable->RPartFirable and select RocketLauncher. Right click in the map and Add RocketLauncher Here just like you added the BaddieSpawnPorter. Change the settings of the RocketLauncher (it needs a static mesh at the very least). Right click it and select "Create Archetype". When you're done naming it check to make sure it's in the package you selected and then delete the instance you placed in the world. You've now created a perfectly new archetype!

You can also type: edit Archetype create class=ClassName in the command box in the lower left hand corner.

Views