[CW3] GRG / Christmas Time! Mapping Script/Template

Started by Grabz, May 09, 2018, 08:31:02 AM

Previous topic - Next topic

Grabz

This is an updated version of the script used in this map (see attachment): https://knucklecracker.com/forums/index.php?topic=29056.0

If you have questions/issues/suggestions write here or ask me on Discord at Grabz#4707 if you need a faster response.

Instructions

  • Put the script on an empty CRPL core anywhere on the map.
  • Change the seed (see below for script values instructions)
  • Set Forge Limit of Build Speed to 0. Not doing this is not gamebreaking, but the player upping build speed might make them build Collectors way too fast, and the script might not register them fast enough.
  • Set Unit build limits however you want, though make sure the player can place Collectors because those are the ones that turn into random units.

Also you should probably tell the player about the rules in the opening conversation, here's an example one:

Lia: Each time you build a Collector, there is a chance that it will turn into a random unit.
Lia: It can be our unit, or it can be an enemy unit... it could be anything! I love opening Christmas presents!

The script has some fields you can edit:


  • flukeChancePrc - The chance, in %, that a Collector will not turn into anything.
  • seed - The random seed. Set this to a number anywhere between 0 and 1000. Make sure to change this for each new map. If you don't know what to do, just pick a random number from https://www.random.org/ between 0 and 1000.
  • fullAmmo - Set to 1 if you want units to start with full ammo. Set to 0 if you don't.
  • newEnemiesCreatePZs - Set to 1 if you want all enemies to create PZs. Set to 0 if you want enemies created by Collectors to not create a PZ.

  • emitterC_delay - Start Delay of Emitter, when they spawn. -1 is default editor setting.
  • emitterC_interval - Emit Interval of Emitter, when they spawn. -1 is default editor setting.
  • emitterC_power - Power of Emitter, when they spawn. -1 is default editor setting.
  • emitterC_delay2 emitterC_interval2 emitterC_power2 emitterC_delay3 emitterC_interval3 emitterC_power3 - Settings for additional random Emitters. In order for these to spawn, you have to increase spawning chances of emitterC_2ChancePrc emitterC_3ChancePrc higher than 0. -1 is default editor setting.

  • emitterAC_delay - Start Delay of AntiEmitter, when they spawn. -1 is default editor setting.
  • emitterAC_interval - Emit Interval of AntiEmitter, when they spawn. -1 is default editor setting.
  • emitterAC_power - Power of AntiEmitter, when they spawn. -1 is default editor setting.
  • emitterAC_delay2 emitterAC_interval2 emitterAC_power2 emitterAC_delay3 emitterAC_interval3 emitterAC_power3 - Settings for additional random AntiEmitters. In order for these to spawn, you have to increase spawning chances of emitterAC_2ChancePrc emitterAC_3ChancePrc higher than 0. -1 is default editor setting.

  • inhibitor_delay - Start Delay of Inhibitor, when they spawn. -1 is default editor setting.
  • inhibitor_interval - Emit Interval of Inhibitor, when they spawn. -1 is default editor setting.
  • inhibitor_power - Power of Inhibitor, when they spawn. -1 is default editor setting.
  • inhibitor_aerange - Air Exclusion Field Range of Inhibitor, when they spawn. -1 is default editor setting.
  • inhibitor_delay inhibitor_interval inhibitor_power inhibitor_aerange inhibitor_delay2 inhibitor_interval2 inhibitor_power2 inhibitor_aerange2 inhibitor_delay3 inhibitor_interval3 inhibitor_power3 inhibitor_aerange3 - Settings for additional random Inhibitors. In order for these to spawn, you have to increase spawning chances of inhibitor_2ChancePrc inhibitor_3ChancePrc higher than 0. -1 is default editor setting.

  • sporetower_build - Build Time of Spore Tower, when they spawn. -1 is default editor setting.
  • sporetower_interval - Spore Interval of Spore Tower, when they spawn. -1 is default editor setting.
  • sporetower_payload - Spore Payload of Spore Tower, when they spawn. -1 is default editor setting.
  • aetower_range - Range of Air Exclusion Tower, when they spawn. -1 is default editor setting.
  • runnernest_interval - Spawn Interval of Runner Nest, when they spawn. -1 is default editor setting.
  • runnernest_maxpopulation - Max Runner Population of Runner Nest, when they spawn. -1 is default editor setting.
  • runnernest_movespeed - Runner Move Speed of Runner Nest, when they spawn. -1 is default editor setting.
  • runnernest_runnerhealth - Runner Health of Runner Nest, when they spawn. -1 is default editor setting.
  • runnernest_payload - Runner Payload of Runner Nest, when they spawn. -1 is default editor setting.
  • resourcepack_energy_amt - Amount of Energy of Energy Resource Pack, when they spawn. -1 is default editor setting.
  • resourcepack_ore_amt - Amount of Ore of Ore Resource Pack, when they spawn. -1 is default editor setting.
  • resourcepack_aether_amt - Amount of Aether of Aether Resource Pack, when they spawn. -1 is default editor setting.

  • emitterC_2ChancePrc - The chance, in %, that when an Emitter spawns, it will be of type 2.
  • emitterC_3ChancePrc - The chance, in %, that when an Emitter spawns, it will be of type 3. If the chance of type 2 and 3 don't add up to 100%, the leftover % is the chance for the default Emitter.
  • emitterAC_2ChancePrc - The chance, in %, that when an AntiEmitter spawns, it will be of type 2.
  • emitterAC_3ChancePrc - The chance, in %, that when an AntiEmitter spawns, it will be of type 3. If the chance of type 2 and 3 don't add up to 100%, the leftover % is the chance for the default AntiEmitter.
  • inhibitor_2ChancePrc - The chance, in %, that when an Inhibitor spawns, it will be of type 2.
  • inhibitor_3ChancePrc - The chance, in %, that when an Inhibitor spawns, it will be of type 3. If the chance of type 2 and 3 don't add up to 100%, the leftover % is the chance for the default Inhibitor.
  • resourcepack_oreChancePrc - The chance, in %, that when a Resource Pack spawns, it will be ORE.
  • resourcepack_aetherChancePrc - The chance, in %, that when a Resource Pack spawns, it will be AETHER. If the chance of ORE and AETHER don't add up to 100%, the leftover % is the chance for ENERGY.
  • aoo_massChancePrc - The chance, in %, that when an Artifact of Odin spawns, it will be MASS.
  • aoo_convertChancePrc - The chance, in %, that when an Artifact of Odin spawns, it will be CONVERT. If the chance of MASS and CONVERT don't add up to 100%, the leftover % is the chance for FREEZE.
  • guppy_acChancePrc - The chance, in %, that when a Guppy spawns, it will be AC. The leftover % is the chance for PACKET (aka. energy).

  • powerZoneChancePrc - The chance, in %, that when a specific unit spawns, a PZ will appear under it. The units are: "REACTOR" "SHIELD" "TERP" "GUPPY" "PULSECANNON" "MORTAR" "STRAFER" "BOMBER" "SPRAYER" "BEAM" "SNIPER" "BERTHA"

  • RELAY, REACTOR, TERP... - There is a value set next to each unit name in the script. This value corresponds to the frequency chance of this unit appearing from each random Collector roll.
    I'll use an example to explain. Let's say there were only three units - Relay, Reactor and Terp.
    If Relay is set to 10000, Reactor is set to 3000 and Terp is set to 500, the game will roll a random number between 0 and 13500 (10000+3000+500). Then, the chance of a Relay becomes ~74% (10000/13500*100%), the chance of a Reactor becomes ~22% (3000/13500*100%) and the chance of a Terp becomes ~4% (500/13500*100%).

Reference image of all the default settings:
Spoiler
[close]

V7 attachments:
For quicker response, reply to me directly at Grabz#4707 on Discord. Find me on the KC server: https://discord.gg/knucklecracker

Grabz

#1
Changelog:

V7 - 2018-05-13
* Added a new option that allows for enemy units created by Collectors to not spawn PZs.
V6 - 2018-05-11
* Now allows three types of emitters, antiemitters and inhibitors - with different power, interval and delay, as well as chances of spawning.
* Added a % chance for a PZ to spawn, whenever one of these units spawns: "REACTOR" "SHIELD" "TERP" "GUPPY" "PULSECANNON" "MORTAR" "STRAFER" "BOMBER" "SPRAYER" "BEAM" "SNIPER" "BERTHA"
V5 - 2018-05-10
* Fixed emitter delay/spore tower build time working based off the start of the game rather than the time of unit creation.
V4 - 2018-05-10
* Creeper payloads/powers no longer should to be multiplied by 1000000
* Input variables that should be floats, are now floats
* Fixed Guppies having both ENERGY, AC and ORE at once with full ammo enabled
* Guppies now have a chance to spawn as ENERGY only or AC only, with only respective ammo filled (ORE exempt because there's no way to fill a Guppy with ore)
V3 - 2018-05-09
* Added fullAmmo setting
* Added the ability to change default values for all units
V2 - 2018-05-09
* Added seed so mapmakers can change the default RNG positions
* Fixed an issue with 0,0 coordinates
V1 - 2018-05-08
* Original release featured in the first map
For quicker response, reply to me directly at Grabz#4707 on Discord. Find me on the KC server: https://discord.gg/knucklecracker