Sleeper Map Template

Telanir · 12841

Telanir

  • Community Guild
  • *****
    • Posts: 75
  • Sleeping
on: April 17, 2015, 04:26:23 am
The PAC maps have an amazing template post for developing maps of that gameplay style and I figure that you guys should have one as well for the Sleeper gamemode. Who knows? Someone might use it! : )

Maps created using the Sleeper template will be featured on the main post and authors given due credit. I am excited to see what you guys might come up with, generally it's a straightforward process having to do mostly with story editing and map development but I will also add instructions below for anyone to follow step-by-step.

Current Template Version: 1.1
  • Fixed bug where sometimes game would fail to finish and play victory.
  • Added splash text for Sleeper maps.
  • Added a terrain reference.
  • Made a few adjustments to Aether requirements.

Template Tutorial
This is a basic tutorial, if you follow the steps outlined here you will most assuredly get a Sleeper map with at least bare minimum requirements. For a more engaging map, you can follow the more advanced instructions in the rest of this topic post.
  • Import the map template. Find your creeperworld3 folder (most likely in your documents) and enter \creeperworld3\WorldEditor\ and create a folder. You can name this folder the name of your map. Place the save.cw3 file you can download from this topic into that folder.
  • Open Creeper World 3 and navigate to the Projects menu, open your new project!
  • Read the instructions on the map, they are at the top and explain what to do. Editor mode means that you pressed the Edit Map button and are in the Unit menu. Pause mode indicates you are not in the editing mode but the game is paused.
  • It is crucial that you never unpause the game, however if for some reason you need a certain script to initialize you should press 'N' to move to the next frame at the most.
  • You should now resize the map to your liking, pick a size you will probably stick with, although changing map sizes later is possible you may lose your units/work.
  • Shape the terrain in any way, Sleeper code is adaptable and can survive in a variety of landscapes, make sure that the terrain is challenging but not brutal, recall that the Sleeper unit can move across the void if necessary.
  • After the terrain is finished stick the Sleeper unit where you like and begin working on the opening dialogue.
  • Lastly, apply any finishing touches then hover the mouse above the map and read the text carefully, after you are done, finalize your map and release!

How to Design Your Map
Typical maps in Creeper World 3 involve a dynamic player that will move and advance on the Creeper that will recede as time goes by and be eventually nullified by the player, for the most part it is not responsive and is highly predictable. When you are working with the Sleeper template you have to remember that the Sleeper reacts and responds to threats imposed by the player and will play dirty or advance on strategic locations to gain an edge.

In these maps the main concern is not the emitters but is the Sleeper itself, it is essentially a CN vs CCN scenario where you fight an equivalent and challenging enemy. Therefore, when you are adding the Sleeping emitters they should be distanced from the player a fair bit and not numerous, they are a side-addition, the cherry on top.

You don't want to make the beginning ultra-challenging for the player. This is usually a bizarre scenario because the longer the player lives in a traditional CW3 map the easier it gets and typically map developers want to put players in a pinch at the beginning to get the adrenaline running. In this case, the player needs some space initially to develop their infrastructure, give them some energy deposits and some minerals, players absolutely need the beginning time to get stay alive. You must remember that the Sleeper also starts off at ground 0 but as time progresses begins building an increasingly concentrated amount of Creep units on map and becomes very dangerous very fast. If the player has yet to get their socks and t-shirt on with finally creating a wall of units substantial enough to repel emitters while the Sleeper has had a few minutes to build there is virtually no chance of victory and the game will become exponentially hard with Creep units advancing to take out the front lines of the player and wreak havoc.

Remember that having a Sleeper on a higher altitude creates a much greater difficulty because Pulse Cannon Creeps can shoot down and player Pulse Cannons can't shoot up, and vice-versa that it becomes easier if the player has a terrain advantage. Sometimes you may want to go for a valley type scenario where it would involve a sort of tug of war with the Sleeper, with both having a terrain advantage at their end of the map.

Now for an extremely important point, do not neglect the Sleeper when placing Ore deposits and Totems! The Sleeper, just like the player, requires Aether to upgrade and uses Ore deposits to create Ore mines that create substantial creeper and help keep the player at bay. These two factors can dramatically increase or decrease the difficulty of the level because Ore mines produce a lot of Creeper, and the more Totems the Sleeper has access to the faster it unlocks further Creep units.

I hope that with these tips you'll be able to create a great map, just make sure that it's not impossible and isn't a cakewalk, because both scenarios are frustrating and boring. : )

Advanced Dialogue - Cinematic.crpl
If you hovered your mouse over the Runner Icon in the template you would notice it tells you to see Cinematic.crpl. This file allows you to edit further dialogue that is responsive to Sleeper actions such as the pre-landing, initial landing, first power surge, and victory dialogue, all optional.
Here is a quick tutorial on how to get to the file, you will have to do a bit of fiddling with the CRPL code however a tutorial is included IN the file.
  • Click on the Edit Map button to enter map-editing mode.
  • On the bottom left, select the Units button.
  • Click on the blue Scripts button and you should see a window pop-up with a bunch of confusing names.
  • Locate the one near the top, it should be named Cinematic.crpl and click on edit.
  • This should open the file, you will be able to see the code. Scroll down, you should be able to see a few amusing sample messages.
  • These messages will not play unless you put TRUE to the left of the ->PLAY_THIS text, if you do not want a conversation to display, write FALSE.
  • Messages are presented in order from top down.
  • Follow this format to add messages: [NUMBER] "My text" AddConversationMessage
  • e.g. 0 "I'm a sample chat Abraxis!" AddConversationMessage
Possible Numbers
Replace the [NUMBER] with any of these values.
0 is Abraxis
1 is Lia
5 is Military Director
6 is Settlement Director
7 is Sleeper (transmitting or being decoded)

:FirstChat
This occurs just before the Sleeper is about to land, you can use this to brief the player on any special strategy for this map.

:SecondChat
This occurs directly after the Sleeper has landed.

:TurboChat
This occurs the first time that the Sleeper uses a power surge to repel a significant number of the players units.

:DestructionChat
This is the victory chat that occurs right before the Sleeper plays the detonation sequence and destruction animation.

What is the cinematic hqx and hqy?
When you are in the editor, you can select the Cinematic.crpl and set the (X, Y) coordinates of any unit on the map, the player will lose control of that unit (if they have any) and when the Sleeper lands it will be destroyed. This is used in Era of the Sleeper.

Sleeper Customization
The Sleeper has a massive array of customizable variables that you can get to by double-clicking the Sleeper node while in unit editing mode, here I will detail every single one of them and explain what you can do with them.
  • waitTime: Measured in 30 ticks/sec where a value of 30 is one-second and 300 is ten seconds, the Sleeper will wait this exact time before descending onto its specified location. The player cannot build or nullify a Sleeper that has not yet landed.
  • dontFlyTimeSeconds: Measured in seconds, it begins counting down after the Sleeper has landed. For this amount of time the Sleeper will remain stuck in its position.
  • emit: How much creeper is produced per interval passed at the location of the Sleeper node.
  • interval: How often the Sleeper node will emit Creeper.
  • turboModeMultiplier: How much is emit multiplied by when the Sleeper node is in a power surge?
  • turboTime: Measured in 30 ticks/sec where a value of 30 would be one second, this variable determines how long a power surge will last.
  • moveSpeed: How fast does the Sleeper move while flying in pixels per tick (per 1/30th of a second)?
  • dangerRadius: How close does a player have to put a unit (measured in cells) for the Sleeper to enter a defensive state? (builds more often and will sometimes attempt fleeing)
  • buildRadius: How far away from the center of the Sleeper can it build? (measured in cells where 8 cells is the width/length of the Sleeper node)
  • distToPlayer: What is the minimum required distance (measured in cells) for the destination to be away from any player unit when the Sleeper decides to liftoff and relocate?
  • maxTravelRadius: How far (measured in cells) can the Sleeper travel in one flight?
Density algorithm is what determines how many Creeps can be built by the Sleeper in one area within a specific radius. The DENSITY_RADIUS affects how far from any selected point to check, and UNITS_PER_RADIUS is the maximum amount of Creeps allowed in that radius.
  • DENSITY_RADIUS: How far does the density algorithm check for Creeps when checking for overbuilding?
  • UNITS_PER_RADIUS What is the maximum number of units that can be contained within the radius used to check for overbuilding?
Aether collection and upgrades determine the pacing of the map and how difficult the Sleeper gets increasingly with time. Starting with an initial 0 Aether the Sleeper will construct Totem Siphons to extract more.
Sleeper Requirements:
Ore Mine: 0
Totem Siphon: 0
Collector: 0
Cannon: 0
Mortar: 0
Beam: 0
Terp: 35
Spore Tower: 80
Shield: 125
Strafers: 250
  • AETHER: What is the starting amount of Aether that the Sleeper has access to at the beginning?
  • USE_AETHER: This value can be either 0 for NO or 1 for YES. If this is FALSE the Sleeper will ignore Aether requirements and be able to build all units from the get-go.
  • SET_SNIPER_LIMIT: If the player can access too many snipers the Sleeper becomes a bit of a joke as they will all just pin it down and overpower it until its demise. Therefore you can set a limit to how many of these the player can produce. Note: the player can still use anti-creeper and traditional pulse cannons to take it down.
  • health: The amount of health the Sleeper starts off with. For reference, one sniper shot is 20 hp.
Values unmentioned should not be touched, they are modified while the code is running by the Sleeper itself and are only visible so that other scripts can take advantage of them.

Creating Creeps
For those of you who are feeling adventurous or who would like to dabble in some coding I would like to direct you to the following important posts for guidance:
  • CRPL Reference - A list of all possible functions and applications of CRPL.
  • EasyCRPL - A collection of useful functions that simplify movement, rotation, beams, distance checks, forcefields and more.
  • CRPL Basic Tutorial - A simple tutorial for getting started with the absolute basics, if you are not familiar with CRPL at all you should look here.
Without further adieu, I will explain how you can create a new Creep that the Sleeper can build.
  • Download the _CTemplate.crpl from this topic.
  • Go into the Scripts menu and type in the name of your Creep, beginning with a capital 'C' e.g. CCollector
  • Click on Edit.
  • Open _CTemplate.crpl and copy then paste the contents into your new Creep unit.
  • Read comments in code carefully to know how the Creep functions, it is important to note that unless you have had some time with CRPL it is okay not to understand most of it, just follow along and open a few existing Creep units such as the CCollector.crpl and see how they work! They all use the template.
  • Rename the string CREEP_TYPE to your units name in all-caps, this value is important so remember it.
  • Change the string DEFAULT_IMAGE to the image you want your unit to have when made. This uses the list of Custom Images you can import from the map editor.
  • Change the value for CREEPER_FOR_BUILD to a number you deem sufficient to construct a single unit of your Creep.
  • Change the health to an appropriate value. 1.0 is the health of a Collector Creep and is destroyed by Bertha shots.
  • Sleep Mode is an optimization technique that allows Creeps that are far away from player units to disable most of their script and run without affecting performance too much. This allows for greater amounts of Creeps on map at any time.
  • FLIGHT_HEALTH_MODIFIER accounts for a problem with Beams. Beams deal a small amount of damage and all Spores have 1 health by default, by setting a flying modifier to health Beams can artificially deal more damage to your Creep and look like they are taking down a lot of health. A value of 1.0 means your object will be super OP when flying, use values like 0.15-0.35 so that it is not too hard nor too easy.
  • If sleeping doesn't really apply to your unit (it is like a collector and always runs the same way) then you can set SUPPORTS_HARDSLEEP to 0 and the :SleepAI function will never run.
  • If your unit is special and can function normally even while flying you can disable flight by setting IGNORES_FLIGHT to 1.
Most of your AI will be written in the :AI block, occasionally in the :SleepAI block, and rarely in :FlightAI. If you have some code that should always run no matter what if the Creep is built you use ConsistentAI and that will run regardless of sleeping or flight.



I appreciate all feedback and suggestions and will make them as soon as possible, this topic post will always contain the latest Sleeper Template. If you have any issues please report them to me, I have worked to make sure that it is a seamless process but we all know developers make mistakes. :)

If there's something you guys want added to Cinematic.crpl or extra functionality or customizability for the Sleeper let me know what you'd like to see below this post.
« Last Edit: April 18, 2015, 01:25:22 am by Telanir »

Want to make genius CRPL? The new top map? You can start here!

Find out more about Creeper World 3 on the wiki!

CW3, The Sleeper Menace!

Own an iOS device? Check out my game Blobivers


Telanir

  • Community Guild
  • *****
    • Posts: 75
  • Sleeping
Reply #1 on: April 18, 2015, 02:30:20 am
Sleeper Template has been updated to v1.1.

Changelog:
  • Fixed bug where sometimes game would fail to finish and play victory.
  • Added splash text for Sleeper maps.
  • Added a terrain reference.
  • Made a few adjustments to Aether requirements.

Want to make genius CRPL? The new top map? You can start here!

Find out more about Creeper World 3 on the wiki!

CW3, The Sleeper Menace!

Own an iOS device? Check out my game Blobivers


Telanir

  • Community Guild
  • *****
    • Posts: 75
  • Sleeping
Reply #2 on: April 19, 2015, 03:34:32 am
I've been working on the Sleeper Template, here's a sneak peek at version 1.2. :)
Hope you guys like what you see, I'm starting to go for a more generalized map Template.

Want to make genius CRPL? The new top map? You can start here!

Find out more about Creeper World 3 on the wiki!

CW3, The Sleeper Menace!

Own an iOS device? Check out my game Blobivers


thenoobish12341234

  • Newbie
  • *
    • Posts: 2
Reply #3 on: May 13, 2015, 08:42:54 pm
I'm not seeing any difference between (making a map, but not unpausing during build;) and (deleting the sleeper, letting the game run, and replacing it.) Whats the difference?

I even delete the sleeper mid game, create a new one through edit mode and continue playing, and the AI works fine.

Why can't we unpause the game, it is annoying me.



Telanir

  • Community Guild
  • *****
    • Posts: 75
  • Sleeping
Reply #4 on: May 13, 2015, 10:04:36 pm
I'm not seeing any difference between (making a map, but not unpausing during build;) and (deleting the sleeper, letting the game run, and replacing it.) Whats the difference?

I even delete the sleeper mid game, create a new one through edit mode and continue playing, and the AI works fine.

Why can't we unpause the game, it is annoying me.

Unpausing is not recommended for map makers who don't want to meddle with CRPLCore's or are unfamiliar with coding or scripts. Seeing as you most clearly are familiar with it it's not prohibited. :)

It is only a recommendation or a guideline that you don't have to follow. Sleepers are fairly flexible and the code will certainly run just fine even if you unpause to do some things and replace it later.


I suggest you also read my response on this page if you haven't already.

Want to make genius CRPL? The new top map? You can start here!

Find out more about Creeper World 3 on the wiki!

CW3, The Sleeper Menace!

Own an iOS device? Check out my game Blobivers


Nicant

  • Community Guild
  • *****
    • Posts: 433
  • Personal Text
Reply #5 on: August 15, 2015, 06:25:13 pm
Been a while... Anything new since the last update?

CW4 hype!!


Miksu

  • Jr. Member
  • **
    • Posts: 31
Reply #6 on: August 20, 2015, 03:19:30 am
Been wondering the same. I just recorded Telanir's maps to my channel and damn, this is pretty damn cool. I want more. :D


Nicant

  • Community Guild
  • *****
    • Posts: 433
  • Personal Text
Reply #7 on: October 28, 2015, 06:47:07 pm
Will there ever be anymore units?

CW4 hype!!


mike1011031

  • Jr. Member
  • **
    • Posts: 23
Reply #8 on: November 23, 2015, 09:24:43 pm
What happens if we put 2 or more sleepers in the map?
i feel like a fairly epic map could be made with multiple sleepers

Is this Loss?


Nicant

  • Community Guild
  • *****
    • Posts: 433
  • Personal Text
Reply #9 on: November 24, 2015, 03:51:06 pm
What happens if we put 2 or more sleepers in the map?
i feel like a fairly epic map could be made with multiple sleepers
There can be multiple sleepers in a map! (My map has 2 sleepers in it https://knucklecracker.com/forums/index.php?topic=19598.msg137361#msg137361)

CW4 hype!!


rer24

  • Jr. Member
  • **
    • Posts: 46
Reply #10 on: December 12, 2015, 07:30:08 pm
Anyone know how or where to get the custom images?

We shall end the infinite cycle of madness!


pablo2007

  • Jr. Member
  • **
    • Posts: 51
  • I am the kraken! Fear me!
Reply #11 on: December 14, 2015, 12:20:33 pm
I'm not seeing any difference between (making a map, but not unpausing during build;) and (deleting the sleeper, letting the game run, and replacing it.) Whats the difference?

I even delete the sleeper mid game, create a new one through edit mode and continue playing, and the AI works fine.

Why can't we unpause the game, it is annoying me.

Unpausing is not recommended for map makers who don't want to meddle with CRPLCore's or are unfamiliar with coding or scripts. Seeing as you most clearly are familiar with it it's not prohibited. :)

It is only a recommendation or a guideline that you don't have to follow. Sleepers are fairly flexible and the code will certainly run just fine even if you unpause to do some things and replace it later.


I suggest you also read my response on this page if you haven't already.
no sleeper units screen! please help

Kraken everywhere!


Builder17

  • Community Guild
  • *****
    • Posts: 1188
  • My account picture is from Nitrome Mutiny.
Reply #12 on: January 24, 2016, 04:04:35 pm
I created Sleeper base what doesn't end game when one goes down. Can somebody check it works?
« Last Edit: January 29, 2016, 02:26:21 pm by Builder17 »



TheLongFellowPLAYER

  • Community Guild
  • *****
    • Posts: 275
  • TLFP, don't mind me.
Reply #13 on: January 24, 2016, 04:29:29 pm
I created Sleeper base what doesn't end game when one goes down. Can somebody check it works?
It works! The only problem with it is it doesn't end the game if all of them go down.

Currently ghosting, don't mind me.
Christian, retired from youtube indefinitely.


Builder17

  • Community Guild
  • *****
    • Posts: 1188
  • My account picture is from Nitrome Mutiny.
Reply #14 on: January 25, 2016, 02:37:48 am
Did you changed Sleeper node amount from variables to amount of these?

Maybe making it check how many sleeper nodes there is when finalizing map with Template helper.Crpl ?

Edit:Above added changed Template Helper . crpl . Try it , if you want.
« Last Edit: February 02, 2016, 02:00:10 pm by Builder17 »