Knuckle Cracker

Creeper World 3 => Custom Map Discussion => Topic started by: Grabz on March 24, 2018, 08:06:40 AM

Title: [CW3] GSM / CW2.5 Series Mapping Template
Post by: Grabz on March 24, 2018, 08:06:40 AM
This template is no longer supported. Stay tuned for CW2.25 currently in the works, that is going to address many problems that occured with this template.

Hello!

This post will be automatically edited with updates.

I'm very open to feedback and suggestions. If you have any ideas, or you need help with the template, write a new comment in this thread, or write to me on Discord if you require more immediate help. (Grabz#4707, either DM or let me know on the KC discord)

Instructions:
Spoiler

CW2.5 is a series I started for fun, and it ended up working really well, so I kept going, and now it's CW2 in CW3! :)

To get started, download the save from the attachment and edit it in your own project. You should see this map:
(https://imgur.com/IskFoUW.png)

I've placed some tiles in top left, as well as units, which you can clone all over the map to your heart's content.

The tiles from left to right are: Tile, Strong Tile (takes longer to remove by player), Decayable Very Slow, Decayable Slow, Decayable Medium (decays in contact with creeper), Ore (place siphon to get ore), Technytes (excavate in-game to uncover 50 Aether), Various Gems (excavate in-game to uncover Energy), Strong Tile versions of the previous tiles. You can also take any of the tiles and mess with their variables to create even more combinations, but be careful as Ore Tiles will spawn Ore Resource Packs under themselves on the next frame, so if you let the game run, you shouldn't change that tile's type unless you also remove the Resource Pack or it will be hidden.

Make sure to always clone tiles. Don't move them around, unless there are no Walls under them yet. If you progress a frame with the Step during Pause key, tiles will spawn Walls under themselves and change terrain to Void. Moving tiles will not revert this, but deleting them will. You might need to save/load to see some changes happen, though.

Do not use more than one CN, unless you do not use Gateways. Currently, Drones pathing will produce unexpected behaviour with multiple CN's on the map.

In the top left corner of the map, there's two hidden out-of-bounds CRPL cores, like so:
(https://imgur.com/0jAfD1S.png)

Don't move/delete the one on the left, touching the map's corner. It's required for the map to function properly, and it needs to stay on these coordinates as well.

The core in the middle is inactive, and it's a tool for you to use - if you drag it inside the map's bounds and progress one frame with the Step during Pause key, it will fill the whole map with basic tiles - if you'd prefer the map be filled, and carve out empty areas instead. Just move it out of bounds or delete it entirely afterwards if you no longer need it.

Personally I've been using this AutoHotkey script to carve areas faster: https://pastebin.com/En8X1Cuz (Hit the ` key to press X repeatedly, deleting units. Hit it again to suspend.)

The top-left core has some properties you can change
(https://imgur.com/DunKGdq.png)

  • windRL - Left/right gravity strength. 100000 is 1G
  • windUD - Top/bottom gravity strength. 100000 is 1G
  • isTerrainDigThrough - If 0, terrain will use the new system where you can only dig a terrain block if its surrounded by at least one empty block. If 1, you can dig any terrain in range of the network.
  • _FLAG_MAP - don't touch this variable!
[close]

Cleanup Instructions while Mapping:
Spoiler

Tiles:
When you finish cloning tiles, you have to progress two frames with the Step during Pause key for all the tiles to properly update themselves and be ready for finalizing. Reset time and recompile scripts afterwards.

Units:
(https://imgur.com/9AB64Ig.png)
Here are the enemies you can use.

You can clone these. If you progress frames they will start working. You can erase their actions by doing the following steps:

  • Manually delete any spawned Drones from the Gateways. Just move them manually to an empty area (if needed) and hit X on them
  • Scripts -> Compile all scripts
  • Terrain -> Delete Creeper, Delete AC, Reset Time
  • Save in editor, then Load in editor
[close]

Unit Properties:
Spoiler

Emitter:
Spoiler

(https://imgur.com/GyFTLxg.png)
The Emitter uses EmitterAddCreeper.crpl, which has the following input variables:

  • power - The emitter's power. Negative values will turn the emitter into an AC emitter, with different texture, automatically.
  • emitInterval - The emit interval, in frames.
  • startDelay - The starting delay of the emitter.
  • flip - Whether this emitter is a flip emitter. Flip emitters will convert power from positive to negative and from negative to positive when nullified. This means they can't be removed from the map - you have to convert all flip emitters to AC to win.
[close]

Gateway:
Spoiler

(https://imgur.com/sm1TjH1.png)
The Gateway uses Gateway.crpl, which has the following input variables:

  • droneType

    • BASIC - Standard drone.
    • STRONG - Strong version of the standard drone.a
    • CREEPER - This drone will emit creeper under itself, like an emitter. Set its power to negative to spawn an anticreeper drone instead.
    • CREEPER_ALT - Same as CREEPER, but the Gateway will send both a creeper drone and an anticreeper drone, alternating between the two
    • CONVERSION - This drone, when destroyed, will spawn a Conversion Bomb, which will briefly pull nearby creeper to itself, then flip it.
  • droneSpeed - The drone speed. 1.0 by default, can be set to any floating point value.
  • droneInterval - How frequently will the Gateway spawn new drones, in frames.
  • dronesMax - Max number of drones that can be spawned by this Gateway at once. Killed drones made by this Gateway spawn more drones. Can be 0 if you want no drones.
  • dronePayloadOnDeath - If this is 0, drones will destroy some AC around themselves when destroyed. If this is not 0, drones will not do that, but they will instead deposit the set amount of anticreeper or creeper when destroyed.
  • creeperDroneAmt - If the drone type is CREEPER, this determines the amount of creeper spawned by the drone. Drones spawn Creeper with addcreeper.
  • creeperDroneInterval - If the drone type is CREEPER, this determines the interval in frames between creeper spawns.
  • _FLAG_GATEWAY - Don't touch this variable!

Drones spawned by the Gateway are shielded, meaning Snipers will not fire at them, until there is a path from the Gateway to the Command Node, in which case the drones will be vulnerable to Sniper fire.
[close]
[close]

Creeper Flow/Gravity:
Spoiler

Creeper Flow Rate is set to 0.6 in Map.crpl (default is 0.2), meaning it's tripled. I found this to work best.

By default, I use 100000 downwards wind, which simulates 1G of gravity from CW2.

If you wish to change Wind, do not use SetWind in the script. Instead, click on the core in top left, click on Map.crpl and change the windRL windUD variables.
(https://imgur.com/rE1lOmW)

There is a special display in the UI showing Gravity, which is basically Wind in CW3. It will be automatically updated with the values you set to the variables above. There is no need to mess with it - just enjoy its existence :)
(https://imgur.com/bqdVw4S)
[close]

Resizing the map:
Spoiler

Due to an engine limitation (or a problem I don't know how to fix), UI elements will get destroyed when resizing the map clips them.

But fear not! There is a workaround...

First, make the game window really small, like this sort of small:
(https://imgur.com/cqjf09o.png)
Zoom in to the maximum and make sure your camera is moved top left, to the very edge.

Now, do your resize, and the UI elements should stay after it!

Warning: Make sure your resize doesn't clip an emitter. There's another CW3 bug that on my template causes the editor to crash if an emitter is destroyed by a resize. If you hit Resize Map, and nothing happens i.e. the map isn't reloaded, your save is now corrupted - hit Load to revert it and get rid of the emitter first...
[close]

Do all this before finalizing! Map Finalize Checklist:
Spoiler

Here's all the steps you should take before finalizing the map. You have to do this every time you clone a new tile, to make sure ammo bars don't appear under tiles on frame 1 on the finalized map.

  • Progress 2 frames with the Step during Pause key
  • Press Scripts->Compile All
  • Terrain -> Delete Creeper, Delete AC, Delete Digitalis, Reset Time
  • If any exist, manually remove all spawned Drones (created by Gateways over time)
  • Save in editor, then load in editor
  • Finalize. Confirm in the finalized map that advancing 1-2 frames with the Step during Pause key doesn't cause any visually jarring behavior
[close]
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on March 25, 2018, 05:30:35 PM
Version history:

V8 - 2018-04-29
* Added a new "dronePayloadOnDeath" variable to Gateways that lets you specify the payload of creeper to drop when the drones are destroyed. Drones which have a payload of non zero don't explode AC around themselves on death.

V7 - 2018-04-27
* Drones no longer explode when colliding with units that are building.

V6 - 2018-04-27
* Drones pathing has been slightly reworked to fix lag when moving the CN. Now drones don't repath each time the CN moves, but will reach the previous position of the CN and move to the next one. This means they will be slightly dumber, but with fast enough speeds the CN still won't be able to outrun them. Also Gateways now path to CN every second when moving, which should improve massive lag when it's moving over terrain and the pathfinder has to go through the whole map to try and find a path.
* Attempted to fix the bug with drones moving through terrain blocks sometimes.
* Gateways should now find pre-placed CN's.
* Added a version indicator to bottom left of the screen.

V5 - 2018-04-26
* Drones now lose their shield if the Gateway is destroyed.
* Shielded drones no longer get damaged when colliding with player units. Shielded drones are now effectively impervious to anything.

V4 - 2018-04-25
* Added missing sound when flipping an emitter.
* Emitters with delay will now lose the timer display when the delay runs out.

V3 - 2018-04-25
* Fixed drones not moving (V2 bug)
* Fixed CN not available from start (V2 bug)
* Added new type of decayable terrain (very slow)
* Drones now use a floating point value for speed rather than SLOW/FAST
* Emitters can now be given a start delay and they can also now be made flip emitters.
* Added new drone type CREEPER_ALT where the Gateway will alternate between spawning C and AC drones
* Shielded drones are no longer damaged by AC.

V2 - 2018-04-24
* Added a new terrain dig mode, can now toggle between dig through and non dig through in the Map.crpl core (make sure to recompile after changing)
* Added conversion drones
* Changed z-indexes on tiles so they display properly on Linux and Mac

V1 - 2018-03-24
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on April 13, 2018, 03:11:46 AM
Can You open this template for not only map-makers?
Some KC players also want to create Your nice style games!  :)
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: GoodMorning on April 13, 2018, 08:47:24 AM
Edit: Nothing relevant any longer.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on April 15, 2018, 11:34:46 AM
Not now, please.

Grabz have plan to modify template and then open it to all.

For me recent template - good and nice! Like PAC template - easy to use.

P.S. Will be nice to get modified in the same way template of CWDig by Cornucanis...  :)

Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 24, 2018, 10:42:06 AM
Template updated to V2. I already had it done and it was rotting on my drive so I figured I'd give it some polish and release it...

V2 - 2018-04-24
* Added a new terrain dig mode, can now toggle between dig through and non dig through in the Map.crpl core (make sure to recompile after changing)
* Added conversion drones

Original attachment updated
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on April 24, 2018, 11:02:29 AM
Nice! Big thanks!  :)

Sorry that I created last several maps with old template.  :-[
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 24, 2018, 11:24:15 AM
Quote from: yum-forum on April 24, 2018, 11:02:29 AM
Nice! Big thanks!  :)

Sorry that I created last several maps with old template.  :-[
It's all good! :)

Let me know if there are any bugs/issues or if you have any feature requests!
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 24, 2018, 11:33:34 AM
Sorry, I just updated again in case anyone downloaded the old link, I forgot to update z-indexes on tiles so they display properly on Linux and Mac. If you download the latest version from now on, it should work fine on all systems.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on April 25, 2018, 01:31:15 AM
Quote from: Grabz on April 24, 2018, 11:24:15 AM
Quote from: yum-forum on April 24, 2018, 11:02:29 AM
Nice! Big thanks!  :)

Sorry that I created last several maps with old template.  :-[
It's all good! :)

Let me know if there are any bugs/issues or if you have any feature requests!

Possible bug: drones not moving...

1. Explane please more details about CONVERSION type of drone.
2. How works and how possible to use  "...toggle between dig through and non dig through..."?
3. Why CN not possible to land at the beginning of game?
4. How to make properly resize of map without disappearance gravity indicator?

Additional features (if possible):
1. Whether possible (as additional option) that the creeper spawned by the running CREEPER type drone will be only anti-creeper or alternate - creeper, anti-creeper, creeper, anti-creeper etc.?
2. Whether possible to introduce additional option for emitters - "start delay"?
3. Whether possible to introduce additional type of "flipe emitter" (as in PF - after nulifying start to generate anti-creeper)?
4. Whether possible to introduce additional option for speed of drones SUPER SLOW (about 5 times less than SLOW)?
5. Now 2 types of decayable terrain: fast and slow. Whether possible to introduce as additional option one more type of decayable terrain - "super slow" (about 3 times need for decay than "slow")?

Sorry for so many questions and suggestions!  :)
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 25, 2018, 08:15:53 AM
Yeah... Version 2 is kinda busted. I forgot I changed drone speed from text based SLOW/FAST to a floating point value (1.0) that's why they aren't moving. And I also forgot to include several textures for the conversion gateway/drone... All of these bugs will be fixed.

I'll have all of this fixed in Version 3 as well as add some of your suggestions, just a few questions:
Quote1. Whether possible (as additional option) that the creeper spawned by the running CREEPER type drone will be only anti-creeper or alternate - creeper, anti-creeper, creeper, anti-creeper etc.?
The first one is already possible if you set creeperDroneAmt to a negative value in the Gateway, however the drone will damage itself. Is that the behavior you want?

I can add a new type that alternates between the two too, but the above question applies here too.

Oh, and I am also changing it so shielded drones no longer get damaged on AC. This might affect your answer to my question.

Quote2. Whether possible to introduce additional option for emitters - "start delay"?
Will add!

Quote3. Whether possible to introduce additional type of "flipe emitter" (as in PF - after nulifying start to generate anti-creeper)?
Sure - just a question - what should the behavior be if it's nullified again? Flip it back to Creeper?  ;D

Quote4. Whether possible to introduce additional option for speed of drones SUPER SLOW (about 5 times less than SLOW)?
The droneSpeed change now being a floating point number should solve this.

Quote5. Now 2 types of decayable terrain: fast and slow. Whether possible to introduce as additional option one more type of decayable terrain - "super slow" (about 3 times need for decay than "slow")?
I'll have to think about this... the problem is that here I would prefer the speeds to be constant because then the player understand which terrain texture correspond to what decay speed - so I will have to make a new graphic for it. It shouldn't be too hard, though.

EDIT: Nevermind, here it is! (https://imgur.com/siBiDUW.png). 4x slower than slow, same way slow is 4x slower than medium.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 25, 2018, 10:06:03 AM
V3 - 2018-04-25
* Fixed drones not moving (V2 bug)
* Fixed CN not available from start (V2 bug)
* Added new type of decayable terrain (very slow)
* Drones now use a floating point value for speed rather than SLOW/FAST
* Emitters can now be given a start delay and they can also now be made flip emitters.
* Added new drone type CREEPER_ALT where the Gateway will alternate between spawning C and AC drones
* Shielded drones are no longer damaged by AC.

Original post updated.

Thank you very much yum for the feedback and bug reports. Everything should now be fixed, and I added all your suggestions. I also updated the tutorial in the original post with all the new features, I hope that answers all of your questions. If you see more bugs or have more ideas let me know and I'll get Version 4 going!
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on April 25, 2018, 11:44:56 AM
So quick response! Fantastic like "magic"!  :)

I will try it and report in near future.

Big thanks! You are THE GREAT MAP MAKER!

Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 25, 2018, 05:17:40 PM
V4 - 2018-04-25
* Added missing sound when flipping an emitter.
* Emitters with delay will now lose the timer display when the delay runs out.

Noticed some missing things after playing your latest map, yum, so I added them :)
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on April 25, 2018, 06:41:35 PM
Thanks!

Perhaps, not possible to dig terrain (with aether or energy pack) by Guppies as it was befor.

One more question: how possible to kill shielded drone (if I destroy Gate befor opening terrain where gate)? By snipers it is not possible. Anti-creeper also. I discover only one way - build some weapon (pulse cannon or mortar) and put on the way of this drones. But this is not elegant...  :)

Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 25, 2018, 07:23:55 PM
QuotePerhaps, not possible to dig terrain by Guppies as it was before.
Unfortunately impossible. You'll have to disable Guppies.

Quotehow possible to kill shielded drone
You can't. The idea is to "motivate" the player to open the terrain - that's the whole reason behind the shield.

QuoteI discover only one way - build some weapon (pulse cannon or mortar) and put on the way of this drones.
Now that you mention it, the drone should probably survive contact with a player weapon if it's shielded...

QuoteAnd explain please how to use  "...toggle between dig through and non dig through..."
Sure!

This is non-dig through (default behavior since version 2)
(https://imgur.com/bfG7f66.png)
Notice how the center pieces aren't connected? It's because all adjacent cells are tiles. Once the outer tiles are dug, the inner tiles will be.
(https://imgur.com/cUG0umw.png)

It basically disallows the player from doing this:
(https://imgur.com/sj3EAFu.png)

You can change it in Map.crpl (the top left invisible core) - there's now instructions on that in the Instructions section in the original post.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: GoodMorning on April 26, 2018, 03:44:06 AM
I think yum meant something like "If the Gateway is destroyed early, might there be a way to kill the drones thereafter". Perhaps I've read it wrong.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 26, 2018, 09:26:30 AM
V5 - 2018-04-26
* Drones now lose their shield if the Gateway is destroyed.
* Shielded drones no longer get damaged when colliding with player units. Shielded drones are now effectively impervious to anything.

Thanks GM - I forgot about this one. My month break from working on this template had me forget all the problems I had to fix :)
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 27, 2018, 11:21:31 AM
V6 - 2018-04-27
* Drones pathing has been slightly reworked to fix lag when moving the CN. Now drones don't repath each time the CN moves, but will reach the previous position of the CN and move to the next one. This means they will be slightly dumber, but with fast enough speeds the CN still won't be able to outrun them. Also Gateways now path to CN every second when moving, which should improve massive lag when it's moving over terrain and the pathfinder has to go through the whole map to try and find a path.
* Attempted to fix the bug with drones moving through terrain blocks sometimes.
* Gateways should now find pre-placed CN's.
* Added a version indicator to bottom left of the screen.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 27, 2018, 01:09:42 PM
V7 - 2018-04-27
* Drones no longer explode when colliding with units that are building.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on April 29, 2018, 01:55:52 AM
In last template CONVERSION drones not payout creeper. Tested for main template and V5 and V7.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on April 29, 2018, 03:20:31 AM
I answered this already on Discord, but for anyone wondering, conversion drones don't deposit creeper, just convert C->AC or AC->C.

However I now added a new option to Gateways that lets you specify creeper payload in V8

--

V8 - 2018-04-29
* Added a new "dronePayloadOnDeath" variable to Gateways that lets you specify the payload of creeper to drop when the drones are destroyed. Drones which have a payload of non zero don't explode AC around themselves on death.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: yum-forum on May 01, 2018, 05:18:34 AM
I created new GSM map "ANTHILL" (see attachment), but in game exist enormous lag.
In others even big GSM maps such lag was not exist.

What can be a reason of such lag?
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Thimotty on May 01, 2018, 06:25:47 AM
i have noticed similar lag in the new versions when me or the creeper clear squares. The moment a square is cleared game freezes briefly and when there are multiple squares cleared the freezing stacks.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Grabz on May 02, 2018, 09:40:35 AM
Quotei have noticed similar lag in the new versions
Are you sure it's in the new versions, or not just because you're making bigger maps with more Gateways in them?

There's only so much I can do performance wise... when a square is destroyed, Gateways need to recalculate paths to CN to see if there's an opening. If there's a lot of Gateways or the map is large (introducing more work for the pathfinder) the lag can be more severe.

I'll look into optimizations but there might not be too much I can do.
Title: Re: [CW3] CW2.5 Series Mapping Template
Post by: Thimotty on May 03, 2018, 06:07:12 PM
Yes, that could be the case, i've just checked and all old maps are about 80x130 or much lower.

You can limit pathfinding recalculations to 1-2 (or 10-20) with queue for the rest. Destroying new tile will kill the queue (but not the active recalculations) placing even units that are being recalculated now in the new queue for second recalculation.