Custom Map #4657: The Fallen Civilization - The discovery. By: JoaoPistori

Started by AutoPost, August 05, 2017, 09:02:40 AM

Previous topic - Next topic

AutoPost

This topic is for discussion of map #4657: The Fallen Civilization - The discovery


Author: JoaoPistori
Size: 224x184

Desc:
#CRPL - 3 towers that can be controlled by the player. #Easy map (I think) but you'll have to restart 1 or 2 times before finding the right upgrade order. #Start with only collectors. Feed the towers to get tech and unleash their power. Additional info on forums. This is the 1st (of 4 or 5) map of my new series: "The Fallen Civilization"! In this map, Lia and Abraxis find a sealed ancient temple and ruins of an older civilization, but they need to survive the creeper onslaught before investigsting the tempe

JoaoPistori

How to control the towers:
Before their weapons are activated (weapons are unlocked after feeding the tower at level 10), you just need to click over them or press the hotkey* to select/deselect.
While selected, they'll request packets. Right after they level-up, they'll be automtically deselected.

After their weapons are activated, they'll request ammo and ac automatically, and once fully charged, they will be able to fire. After firing their ammo/ac will reset to 0.
How to fire with them? Well, select it and an aim will appear under your mouse. Click (not the hotkey!) to set the target, but don't forget to see if the aim is colored: if aim is gray, means that you can't fire there*.
To set another target, you can select the tower again by clicking over it (not the aim) or pressing the hotkey, then click again to set the target where you want.
They can fire anywhere on the map, with the exeptions of each one:

*
Blue tower (hotkey U): Can't fire at void or over creeper with intensity higher than 10.0
Green-gray tower (hotkey I): Can't fire at void or over creeper with intensity higher than 1.0
Red-gray tower (hotkey O): Must fire over creeper or digitalis (can be only the digitalis growth). Note that it can destroy your units and remove the digitalis growth.

Edit:
Blue tower unlocks upgrades at forge;
Green-gray tower unlocks structures;
Red-gray tower unlocks weapons.

2nd map will have a very very different gameplay. It is almost ready but has (a lot of) problems with lag. I'll try to fix and upload it soon.

Karsten75

It may be worthwhile, for future maps, if you mention in the description that you have additional information in the forum. I'm not sure all the map players will automatically come here to look for instructions.

D0m0nik

You might want to read that description again Karsten  ;)

It is kind of lost in the middle of the description though.


D0m0nik

I like how the map the tech slows the start of the map down as you gather your resources. The limited units and huge amounts of creep over a large map gets a little sloggy but the new weps keep it fun, the red tower is amazing!

What exactly are the other two doing?

Spoiler
The green acts as a shield but is it also enhancing the units in some way? They all get a green halo, what is this?

I couldn't quite tell what the blue one was doing but it seemed to be helping! Is it just reducing the overall depth of creep?
[close]

Great map overall though, as usual the huge amount of work you put in shows and it is top quality throughout.

JoaoPistori

Thanks for playing and liking it! :D

Quote from: D0m0nik on August 05, 2017, 01:42:05 PM
What exactly are the other two doing?

Green tower:
Spoiler
The big shield just pushes the creeper (with EnableTowerField), and the "green halo" is another shield using EnableTowerField, but much stronger than the main one, with reduced range and with the objective of protecting only your units (insted of the entire field) while not pushing the creeper from a high distance.
This also means you can move the small-shielded units inside the "big shield field" into deep creeper that they push the creeper even more. At the initial idea I tried to set attributes like "destroy on damage" into false; "heal rate" with high value but it didn't seem to affect native player units, so I put everything to push creeper :P
That was also my response to spores - you can activate the shield under a unit you saw being targeted by a spore, and it will protect your units while you move weapons to destroy the creeper unleashed from the spore.
[close]

Blue tower:
Spoiler
Actually it was created not only to reduce creeper depth, but also to support your units to nullify na emitter together with the green tower, for example. In this situation the continuous damage would help better than the instantly damage from the red tower (which is the most powerful).
[close]

cecel123

Ran into a bit of an issue playing. I had to save the game and leave for a bit. when I loaded, he towers were unable to receive AC packets. When selected, they still receive ammo packets, but the it does not request AC at all.
"Mom, why would I do drugs when I have video games?"

Yle

Interesting game, the towers make you think what to do next.  But, I also ran into a problem, after saving the game and coming back I can't get the towers to build up AC anymore either.  Looks like it will be a long game with just the equipment accumulated during the first segment.  At least I can still build up the forge to maximum over time.  Any suggestions as to why the towers won't ask for AC?

Loren Pechtel

Interesting idea.  Three beams isn't enough to reliably stop 5 spores.  No thanks.

JoaoPistori

Quote from: Yle on August 08, 2017, 09:45:29 PM
Interesting game, the towers make you think what to do next.  But, I also ran into a problem, after saving the game and coming back I can't get the towers to build up AC anymore either.  Looks like it will be a long game with just the equipment accumulated during the first segment.  At least I can still build up the forge to maximum over time.  Any suggestions as to why the towers won't ask for AC?
Quote from: cecel123 on August 06, 2017, 04:29:36 PM
Ran into a bit of an issue playing. I had to save the game and leave for a bit. when I loaded, he towers were unable to receive AC packets. When selected, they still receive ammo packets, but the it does not request AC at all.

I'm not sure why this happened. I tested here many times, saving, reloading, exiting and closing the game and re-opening it, and they still requesting AC. Also, the code that allows them to request AC is just the next of the ammo packet request, like this:

[...]
Self const_requestpackets true SetUnitAttribute
Self const_canrequestammo true SetUnitAttribute
Self const_Requestacpackets true SetUnitAttribute
[...]

I'm sorry for this bug, but I see no "wrong things" with the code. Next time I'll try making a more complex one to set the attributes with awake and gameloaded functions to see if it fixes this bug.
Well, and thanks for playing!

Quote from: Loren Pechtel on August 08, 2017, 09:46:27 PM
Interesting idea.  Three beams isn't enough to reliably stop 5 spores.  No thanks.

1.
Spoiler
They are. But you'll need some weapons upgrades at forge. Range is the mainly, and move speed with micro-management will also do it if one or 2 spores pass too far from a beam.
[close]
2.
Spoiler
You can unlock more beams after upgrading the tower.
[close]


JoaoPistori

Quote from: RrR on August 11, 2017, 04:17:46 AM
The red beam destroys power zones!

Damn. That's true.

I used "GetUnitsInRange" command and thought it only targeted player units, so I didn't filter it for other units (powerzone, oremines, [...])

If you wish to check,

damage code alone is here:
Spoiler


        CurrentCoords 9999 4 4500000 false DamageCreeper #4.5 intensity per tic = 135 per second
CurrentCoords 3 0.02 true @DamageDigitalis
CurrentCoords 3 GetUnitsInRange 0 do
       ->unit
   <-unit 0.2 Damage
    loop

:DamageDigitalis
  #Load up the arguments.
  ->remove ->amount ->r ->y0 ->x0
  #Optimization: precalculate r^2.
  <-r dup mul ->r2
  #Consider a radius shaped box about the origin.
  <-r 1 add 0 <-r sub do
    <-r 1 add 0 <-r sub do
      #Cull squares in the box not in the circle.
      I dup mul j dup mul add <-r2 lte if
        #Translate to our site of action.
        I <-x0 add J <-y0 add #dup2
            #DAMAGE!
->dy ->dx
<-dx <-dy dup2 GetDigitalis <-amount sub SetDigitalis
<-dx <-dy GetDigitalis eq0 <-dx <-dy GetDigitalisGrowth and <-remove and if
    <-dx <-dy false SetDigitalisGrowth
endif
      endif
    Loop
  Loop
[close]

and full code is here:
Spoiler


# ThermalSpear.crpl
# Created on: 6/28/2017 1:55:03 PM
# ------------------------------------------

$Angle:0
$Duration:165
$BeamDuration:90
$range:4
$speed:1
$Xo:0
$Yo:0

once
self CONST_TAKEMAPSPACE false SetUnitAttribute
self CONST_SHOWHEALTHBAR false SetUnitAttribute
self CONST_DESTROYONDAMAGE false SetUnitAttribute
self CONST_NULLIFIERDAMAGES false SetUnitAttribute
self CONST_COUNTSFORVICTORY false SetUnitAttribute
    self CONST_SUPPORTSDIGITALIS false SetUnitAttribute
self CONST_SNIPERTARGET false SetUnitAttribute
self CONST_BEAMTARGET false SetUnitAttribute
self CONST_CREATEPZ false SetUnitAttribute
    self CONST_CELLHEIGHT 1 SetUnitAttribute
self CONST_CELLWIDTH 1 SetUnitAttribute
false OperateWhilePaused
Self "Animation" 0.75 SetImagePositionZ
self "Animation" 1.25 1.25 SetImageScale
    self "beam" "Custom3" SetImage
self "beam" 255 0 0 255 SetImageColor
<-tx <-ty SetCurrentCoords
0.5 ->BM_SCALEY
@Beam
8 ->n
255 <-BeamDuration div ->decrement
<-BeamDuration SetTimer0
false ->active
"Misc26" PlaySound
#ShowTraceLog
#<-Angle 0.017453 mul trace
#<-Angle 57.2958 mul trace
endonce

<-active if
    @Beam
GetTimer0 eq0 if
    "Weapons15" PlaySound
1 CurrentPixelCoords -2 1.35 1.35 0.1 CreateEffect
3 SetTimer0
endif
CurrentCoords 9999 4 4500000 false DamageCreeper #4.5 intensity per tic = 135 per second
CurrentCoords 3 0.02 true @DamageDigitalis
CurrentCoords 3 GetUnitsInRange 0 do
       ->unit
   <-unit 0.2 Damage
    loop
GetTimer1 eq0 if
    Self 0 Destroy
else
    GetQueuedMoveCount eq0 if
    <-range 2 gt if
    <-range 1 sub ->range
endif
#<-speed 1 sub ->speed
@GetTargetCoords
endif
endif
else
    GetTimer0 eq0 not if
        Self "beam" 255 0 0 GetTimer0 <-decrement mul SetImageColor
        Self "Animation" "Custom" <-n concat SetImage
        <-n 11 eq if
            8 ->n
        else
            <-n 1 add ->n
        endif
    else
        <-Duration SetTimer1
    true ->active
    "Weapons4" PlaySound
    Self "Animation" "none" SetImage
Self "beam" "Custom3" SetImage
Self "beam" 255 0 0 192 SetImageColor
4 SetTimer0
1.1 ->BM_SCALEY
@GetTargetCoords
    endif
endif

:Beam
    self CONST_PIXELCOORDX GetUnitAttribute ->BM_SX
self CONST_PIXELCOORDY GetUnitAttribute ->BM_SY
<-Xo <-Yo CellToPixel ->BM_PY ->BM_PX
<-BM_PX <-BM_SX sub ->BM_DX
<-BM_PY <-BM_SY sub ->BM_DY
<-BM_DY <-BM_DX atan2 ->BM_A
<-BM_SX <-BM_SY <-BM_PX <-BM_PY Distance ->BM_D
<-BM_D 24 div ->BM_SCX
<-BM_DX 2 div ->BM_PPX
<-BM_DY 2 div ->BM_PPY
SetImagePosition(self "beam" <-BM_PPX <-BM_PPY -25)
SetImageScale(self "beam" <-BM_SCX <-BM_SCALEY) #0.5
SetImageRotation(self "beam" <-BM_A)

:GetTargetCoords
    #dx = radius*cos(angle); dx = newX - oldX -> newX = dx + oldX
#dy = radius*sin(angle); dy = newY - oldY -> newY = dy + oldY
<-range <-Angle cos mul CurrentX add asint ->tx
<-range <-Angle sin mul CurrentY add asint ->ty
<-tx <-ty <-speed QueueMove
RandFloat 0.5 sub PI 2 div mul <-Angle add ->Angle ## -0.5pi to 0.5pi
#-0.5 pi mul <-Angle add ->Angle

#function GetRandomCoordsInsideRange (GRC_InsideRange)
#picks a mininum range (argument 1) and a maximum range (argument 2) and get a random CELL (not pixel)
#notation f1 f2 - x1 y1
#:GRC_InsideRange
    #->r_max ->r_min
#RandFloat <-r_max <-r_min sub mul mul <-r_min add ->random_range
#RandFloat 2 PI mul mul ->random_angle
#<-random_range <-random_angle cos mul CurrentX add asint ->random_X
#<-random_range <-random_angle sin mul CurrentY add asint ->random_Y
#<-random_Y <-random_X

#function DamageDigitalis
#picks the center coords (in cells), a range, amount and a "remove" bool
#Damage the digitalis especified by "amount", in a circle with center coords x,y with radius "range".
#if "remove" bool is true, it will remove the digitalis growth if it's health reaches 0 after damaging.
#notation: x y i f b -
:DamageDigitalis
  #Load up the arguments.
  ->remove ->amount ->r ->y0 ->x0
  #Optimization: precalculate r^2.
  <-r dup mul ->r2
  #Consider a radius shaped box about the origin.
  <-r 1 add 0 <-r sub do
    <-r 1 add 0 <-r sub do
      #Cull squares in the box not in the circle.
      I dup mul j dup mul add <-r2 lte if
        #Translate to our site of action.
        I <-x0 add J <-y0 add #dup2
            #DAMAGE!
->dy ->dx
<-dx <-dy dup2 GetDigitalis <-amount sub SetDigitalis
<-dx <-dy GetDigitalis eq0 <-dx <-dy GetDigitalisGrowth and <-remove and if
    <-dx <-dy false SetDigitalisGrowth
endif
      endif
    Loop
  Loop
[close]