Knuckle Cracker

Creeper World 3 => Custom Map Discussion => Topic started by: Grabz on January 07, 2020, 11:04:55 AM

Title: [CW3] CW2.25 & Field Only Mapping Template
Post by: Grabz on January 07, 2020, 11:04:55 AM

CW2.25
The ultimate "CW2 in CW3" template
(https://imgur.com/7Ps2pkN.png)


Originally known as CW2.5, now featuring CW2.25 - more hours poured in, more goodies, more CW2, it's all in here, maybe.


Version control: https://github.com/grabz-dev/CW3-Fields-CW2.25/

Features:
Most of the template should be fairly user friendly, nevertheless, any do's, dont's, and tips are described below.

List of tips and tricks related to this mode:

1. Important notes:
Spoiler


  • Do not make the map too large. 256x256 is not supported. I have not thoroughly tested the limits but keeping the size of the map to up to ~20000 max cells is preferable.
  • If the map is too large, an error might be displayed. This error is also briefly displayed upon map load and should promptly disappear if everything is fine. Unfortunately this is the only way to errorcheck opcode limit issues in CW3.
  • Your primary method of placing units should be through cloning. The map will automatically position units within the 3x3 grid for you. Moving units is fine but you have to be precise.
  • Do not move or delete invisible cores in the top left corner of the screen - they all serve a purpose and in some cases their positioning is also playing a role.
  • Fields in editor mode might be wrong after recompiles. If you are testing the behavior of fields in your map, save->load the map after recompiling.
[close]

2. Global map properties:
Spoiler

The CRPL core you care about is this one:
(https://imgur.com/zTKg7b9.png)
The scripts you can modify the properties of are Map.crpl and MapRotatingWind.crpl.

Map.crpl

  • iWindRL - Gravity: Positive values push to the right, negative to the left. 10000 is equal to 1G of gravity on the display.
  • iWindUD - Gravity: Positive values push downwards, negative upwards.
  • iCreeperColorR - The red channel of creeper color. -1 to leave default. Valid amounts are between 1 and 255.
  • iCreeperColorG - The green channel of creeper color.
  • iCreeperColorB - The blue channel of creeper color.
  • iACColorR - The red channel of AC color.
  • iACColorG - The green channel of AC color.
  • iACColorB - The blue channel of AC color.

MapRotatingWind.crpl
  • fStartingRotation - The starting rotation, in radians.
  • fSecondsPerRotation - The amount of seconds it will take for the gravity arrow to perform full circle. 0 disables gravity rotation.

(https://imgur.com/tlkdXLh.png)
This indicator lets players see the current wind. 1G is 10000 of wind.
[close]

3. Tile properties:
Spoiler

Tile.crpl

  • iDecayableType - If 0, the tile doesn't decay in contact with Creeper. 1 is fast decay. 2 is medium decay. 3 is slow decay.
  • bStrong - If 0, the tile takes 6 ammo to destroy. If 1, it takes 30.
  • bCrazonium - If 0, the tile can be excavated. If 1, the tile cannot be excavated and is indestructible.
  • sSpecial - Special properties of this tile.

    • ORE - The tile becomes indestructible, and four ore deposits are spawned adjacent to it.
    • TECHNYTES - Hides a 50 Aether crystal.
    • GEM_RED - Hides a 60 energy crystal.
    • GEM_GREEN - Hides a 80 energy crystal.
    • GEM_BLUE - Hides a 100 energy crystal.
    • GEM_WHITE - Hides a 200 energy crystal.
  • sSkinImage - Leave empty to use the default image. Provide an image name to use that image as the background for this tile.
  • bIsSkinImageTiled - If 0, the background image is randomly rotated to reduce pattern repetition. If 1, the image is not rotated, which can be useful for tiled images.
[close]

4. Emitter properties:
Spoiler

Emitter.crpl
  • fPower - The amount of spawn (using AddCreeper).
  • iInterval - The amount of frames between emits (30 frames - emit every second).
  • iDelay - The amount of frames until the emitter should start working.
  • bFlip - Whether this is a flip emitter, and will turn C to AC and AC to C when nullified.
[close]

5. Gateway properties:
Spoiler

Gateway.crpl
  • iCommandNodeUID - -1, Do not touch.
  • iDronesMax - The maximum amount of drones that can be spawned by this gateway at once.
  • iDroneSpawnInterval - The interval in frames between drone spawns.
  • fDroneSpeed - The speed of the drones, in cells traversed per second.
  • iDroneHealth - The health of the drone. Snipers deal 20 damage per hit.
[close]

6. Field editor:
Spoiler

(https://imgur.com/CusM9b8.png)
It is important to note that the editor must be closed for the field editor to work. This has the unfortunate consequence that inputs might be caught by other things, so be careful.

  • Don't Paint - Turn off field painting.
  • Paint Fields - Enable field painting.
  • Erase Fields - Enable field erasing.
You can paint either only C (creeper) fields, AC or All (both). When choosing field direction, the center option is a pin field, which lets creeper enter but not leave - with the exception of wind, which does not respect pin fields. The option with the mouse icon will paint fields based on how you move your mouse.

(https://imgur.com/EmM1COc.png)
This button lets players turn off field visuals. This cannot be used in the editor, because the existence of images is impervious to proper functioning of the map after it is finalized.
[close]

7. Field rotator:
Spoiler

(https://imgur.com/Q0TOYUq.png)
This fella will rotate fields under its influence periodically. Any fields painted inside the rotator's range will be affected depending on the rotator's type.

FieldRotator.crpl
  • iWidthRadius - The half width of the rectangle size. 4 means the width is 9 (4*2+1).
  • iHeightRadius - The half height of the rectangle size.
  • sRotateMode

    • C - Only affects Creeper fields - blue.
    • AC - Only affects AC fields - white.
    • Any (or leave empty) - Affects all fields - green.
  • iInitialDelay - The starting delay of the rotator.
  • sAction0/1/2... - Starting from 0, this is the full list of actions the rotator will perform in order, before rotating back around in perpetuity.
    For example, if action 0 and 1 are set, the rotator will keep performing 0 1 0 1 0 1...
    The syntax is a comma delimited list of two entries, for example: 45,120 - which means rotate 45 degrees clockwise, then wait 120 game frames (4 seconds).
    Do not make the interval something extremely low (like 1 frame) or the game will lag.
    Some more examples:
    • 90,240 - Rotate 90 degrees clockwise, then wait 240 game frames (8 seconds)
    • -8,300 - Rotate 8 degrees anticlockwise, then wait 300 game frames (10 seconds)
[close]
Title: Re: [CW3] CW2.25 Mapping Template
Post by: Grabz on January 07, 2020, 11:05:33 AM
Changelog:

See attachments for releases:
Title: Re: [CW3] CW2.25 Mapping Template
Post by: teknotiss on January 12, 2020, 10:14:24 AM
cheers dude, nice one, and good notes too!

question though:  with the "wind" i am assuming a value of 0 in both will give a zero gravity effect, yes?
Title: Re: [CW3] CW2.25 Mapping Template
Post by: Grabz on January 12, 2020, 04:24:19 PM
Yep, wind by default is 0 on every regular CW3 map.
Title: Re: [CW3] CW2.25 Mapping Template
Post by: Grabz on January 20, 2020, 08:41:51 AM
Updated to version 1.1