Custom Map #259: Navarone IV. By: First

Started by AutoPost, February 27, 2014, 11:42:25 PM

Previous topic - Next topic

AutoPost

This topic is for discussion of map #259: Navarone IV


Author: First
Size: 224x126

Desc:
Unleash the Big Guns at the battle of Navarone IV. Scripts, mechanics and tips on the CW3 forums. Click View Topic, and leave a comment!

First

Lots of crpl scripts in this one:

The creeper bullets:

# acbullet.crpl
# Created on: 2/26/2014 8:18:37 PM
# ------------------------------------------

$xOri:0
$yOri:0
$xTar:0
$yTar:0
$Payload:-2000
$Height:500.0
$Distance:0.0

once
#ShowTraceLog
30 SetTimer0
<-xOri <-yOri <-xTar <-yTar 5 QueueMove
5 SetTimer0
True ->HorizImage
endonce

GetQueuedMoveCount eq0 if
<-xTar <-yTar <-Payload AddCreeper
"Misc14" PlaySound
Self 0 Destroy
endif

CurrentCoords Swap ->xLoc ->yLoc
<-xLoc <-yLoc <-xTar <-yTar Distance ->dist
-1.0 4.0 mul <-Height mul <-Distance div <-Distance div ->term1
<-dist <-Distance 2.0 div sub <-dist <-Distance 2.0 div sub mul ->term2
<-term1 <-term2 mul <-Height add ->Offset
"Offset: " <-Offset Concat Trace
Self "main" <-Offset SetImagePositionY


GetTimer0 eq0 if
<-HorizImage if
Self "main" "Custom1_128" SetImage
False ->HorizImage
else
Self "main" "Custom2_128" SetImage
True ->HorizImage
endif
5 SetTimer0
endif

:awake
Self "main" "Custom1_128" SetImage
Self "main" 0.5 0.5 SetImageScale
Self CONST_CELLHEIGHT 3 SetUnitAttribute
Self CONST_CELLWIDTH 3 SetUnitAttribute
Self CONST_TAKEMAPSPACE 0 SetUnitAttribute
Self CONST_CONNECTABLE 0 SetUnitAttribute
Self CONST_COUNTSFORVICTORY 0 SetUnitAttribute
Self CONST_NULLIFIERDAMAGES 0 SetUnitAttribute
Self CONST_CREATEPZ 0 SetUnitAttribute
Self CONST_REQUESTPACKETS 0 SetUnitAttribute
Self CONST_REQUESTACPACKETS 0 SetUnitAttribute
Self CONST_CANREQUESTAMMO 0 SetUnitAttribute
Self CONST_SUPPORTSDIGITALIS 0 SetUnitAttribute
Self CONST_SHOWHEALTHBAR 0 SetUnitAttribute
Self CONST_MAXHEALTH 0 SetUnitAttribute
Self CONST_HEALTH 0 SetUnitAttribute
Self CONST_HEALRATE 0.0 SetUnitAttribute
Self CONST_BUILDCOST 0 SetUnitAttribute
Self CONST_ISBUILDING 0 SetUnitAttribute
Self CONST_DESTROYONDAMAGE 0 SetUnitAttribute
Self CONST_AMMO 0 SetUnitAttribute
Self CONST_SHOWAMMOBAR 0 SetUnitAttribute
Self CONST_MAXAMMO 0 SetUnitAttribute


The modified AC Bertha:

# acblastertower.crpl
# Created on: 2/26/2014 7:35:11 PM
# ------------------------------------------

$TargetTowerName:"Pump Tower"

once
#ShowTraceLog
#"Name" <-TargetTowerName GetCoresWithVar ": " Swap Concat Concat Trace
"Name" <-TargetTowerName GetCoresWithVar pop ->tarUnit
<-tarUnit "pumptower.crpl" "xLoc" GetScriptVar ->xTar
<-tarUnit "pumptower.crpl" "yLoc" GetScriptVar ->yTar
<-xTar ": " <-yTar Concat Concat Trace
endonce

Self CONST_AMMOAC GetUnitAttribute ->ACAmmo
Self CONST_MAXAMMOAC GetUnitAttribute ->MaxACAmmo

<-ACAmmo <-MaxACAmmo gte if
Self CONST_AMMOAC 0 SetUnitAttribute
#"BerthaFire" PlaySound
2 -1 do
2 -1 do
"CRPLCORE" CurrentCoords CreateUnit ->newUnit
<-newUnit "acbullet.crpl" AddScriptToUnit
<-newUnit "main" "Custom1" SetImage
CurrentCoords Swap ->xLoc ->yLoc
<-newUnit "acbullet.crpl" "xOri" <-xLoc SetScriptVar
<-newUnit "acbullet.crpl" "yOri" <-yLoc SetScriptVar
<-xTar ": " <-yTar Concat Concat Trace
<-newUnit "acbullet.crpl" "xTar" <-xTar J 5 mul add SetScriptVar
<-newUnit "acbullet.crpl" "yTar" <-yTar I 5 mul add SetScriptVar
<-xLoc <-yLoc <-xTar J 5 mul add <-yTar I 5 mul add Distance ->Distance
<-newUnit "acbullet.crpl" "Distance" <-Distance SetScriptVar
<-newUnit "acbullet.crpl" "Height" 200.0 SetScriptVar
"SprayerFire" PlaySound
5 delay
loop
loop
endif


:awake
Self CONST_CELLHEIGHT 5 SetUnitAttribute
Self CONST_CELLWIDTH 5 SetUnitAttribute
Self CONST_TAKEMAPSPACE 1 SetUnitAttribute
Self CONST_SHOWHEALTHBAR 0 SetUnitAttribute
Self CONST_MAXHEALTH 100.0 SetUnitAttribute
Self CONST_HEALTH 100.0 SetUnitAttribute
Self CONST_HEALRATE 0.1 SetUnitAttribute
Self CONST_CONNECTABLE 1 SetUnitAttribute
Self CONST_COUNTSFORVICTORY 0 SetUnitAttribute
Self CONST_BUILDCOST 1000 SetUnitAttribute
Self CONST_REQUESTPACKETS 1 SetUnitAttribute
Self CONST_ISBUILDING 0 SetUnitAttribute
Self CONST_DESTROYONDAMAGE 0 SetUnitAttribute
Self CONST_AMMO 0 SetUnitAttribute
Self CONST_CANREQUESTAMMO 0 SetUnitAttribute
Self CONST_SHOWAMMOBAR 0 SetUnitAttribute
Self CONST_MAXAMMO 0 SetUnitAttribute
Self CONST_CREATEPZ 0 SetUnitAttribute
Self CONST_COUNTSFORVICTORY 0 SetUnitAttribute
Self CONST_NULLIFIERDAMAGES 0 SetUnitAttribute
Self CONST_AMMOAC 0 SetUnitAttribute
Self CONST_MAXAMMOAC 150 SetUnitAttribute
Self CONST_REQUESTACPACKETS 1 SetUnitAttribute
Self CONST_SHOWAMMOACBAR 1 SetUnitAttribute
Self CONST_ACPACKETREQUESTDELAY 5 SetUnitAttribute


The creeper pumps:

# pump.crpl
# Created on: 2/20/2014 8:20:20 PM
# By First - Happy crpling
# ------------------------------------------

#Pump interval, in frames
$PumpIntFrames:30
#Multiplier - see the CreeperMux and AntiCreeperMux multipliers, too
$CreeperPumpMux:10
$AntiCreeperPumpMux:10
#Reference Name
$Name:"Pump Tower"

once
#Event Timers - Pumping, and animating the image
<-PumpIntFrames SetTimer0
60 SetTimer1
#Persistent variable to track the current rotation of the image
0 ->Theta
#ShowTraceLog
"Name" "The Boss" GetCoresWithVar ": " Swap Concat Concat Trace
"Name" "The Boss" GetCoresWithVar pop ->tarUnit
<-tarUnit "bosstower.crpl" "xLoc" GetScriptVar ->xTar
<-tarUnit "bosstower.crpl" "yLoc" GetScriptVar ->yTar
<-xTar ": " <-yTar Concat Concat Trace
endonce

#Pump - first zero the creeper at the pump intake, then add it back with multipliers at the location of the inhibitor
GetTimer0 eq0 if
CurrentCoords GetCreeper ->CreeperAmt
"Creeper: " <-CreeperAmt Concat Trace
CurrentCoords 0 SetCreeper
<-CreeperAmt 0 gt if
<-xTar <-yTar <-CreeperAmt <-CreeperPumpMux mul 1.0 mul AddCreeper
else
<-xTar <-yTar <-CreeperAmt <-AntiCreeperPumpMux mul 1.0 mul AddCreeper
endif
endif

#Text for the PopupText
GetTimer1 eq0 if
<-CreeperAmt 0 gt if
"Pumping: " <-CreeperAmt <-CreeperPumpMux mul 10.0 mul Floor 10.0 div Concat "/sec" Concat SetPopupText
else
"Pumping: " <-CreeperAmt <-AntiCreeperPumpMux 10.0 mul Floor 10.0 div Concat "/sec" Concat SetPopupText
endif
endif

#Spin the image - I bashed this until I got approx the spin rate I wanted
<-CreeperAmt 10.0 div 2 mul 3.1416 mul ->Rate
<-Rate 120.0 div <-Theta add ->Theta
Self "main" <-Theta SetImageRotation

:awake
CurrentCoords Swap ->xLoc ->yLoc


The "ghost" Inhibitor that hides under the real Inhibitor and takes damage from the AC.

# bosstower.crpl
# Created on: 2/26/2014 2:32:05 PM
# ------------------------------------------

$Name:"The Boss"

once
#ShowTraceLog
#<-xLoc ": " <-yLoc Concat Concat Trace
30 SetTimer0
endonce

GetTimer0 eq0 if
0.0 ->CreeperCells
2 -1 do
2 -1 do
<-xLoc I 2 mul add <-yLoc J 2 mul add GetCreeper ->CreeperAmt
<-CreeperAmt 0 lt if
<-CreeperCells 1 add ->CreeperCells
endif
loop
loop

Self CONST_HEALTH GetUnitAttribute ->Health
<-Health <-CreeperCells sub ->Health
"Health: " <-Health Concat Trace
Self CONST_HEALTH <-Health SetUnitAttribute

<-Health 0 lte if
Self 0 Destroy
endif

30 SetTimer0
endif

:destroyed
CreateList ->KillList
CurrentCoords 5 GetEnemyUnitsInRange pop <-KillList AppendStackToList
while <-KillList GetListCount 0 gt repeat
<-KillList 0 GetListElement ->killUnit
<-KillList 0 RemoveListElement
<-killUnit Self eq not if
<-killUnit 0 Destroy
endif
endwhile


:awake
CurrentCoords Swap ->xLoc ->yLoc

Self "main" "None" SetImage
Self "main" 3.0 3.0 SetImageScale
Self CONST_CELLHEIGHT 9 SetUnitAttribute
Self CONST_CELLWIDTH 9 SetUnitAttribute
Self CONST_TAKEMAPSPACE 1 SetUnitAttribute
Self CONST_CONNECTABLE 0 SetUnitAttribute
Self CONST_COUNTSFORVICTORY 0 SetUnitAttribute
Self CONST_NULLIFIERDAMAGES 0 SetUnitAttribute
Self CONST_CREATEPZ 0 SetUnitAttribute
Self CONST_CONNECTABLE 0 SetUnitAttribute
Self CONST_REQUESTPACKETS 0 SetUnitAttribute
Self CONST_REQUESTACPACKETS 0 SetUnitAttribute
Self CONST_CANREQUESTAMMO 0 SetUnitAttribute
Self CONST_SUPPORTSDIGITALIS 0 SetUnitAttribute
Self CONST_SHOWHEALTHBAR 1 SetUnitAttribute
Self CONST_MAXHEALTH 100.0 SetUnitAttribute
Self CONST_HEALTH 50.0 SetUnitAttribute
Self CONST_HEALRATE 0.1 SetUnitAttribute
Self CONST_BUILDCOST 1000 SetUnitAttribute
Self CONST_ISBUILDING 0 SetUnitAttribute
Self CONST_DESTROYONDAMAGE 1 SetUnitAttribute
Self CONST_AMMO 0 SetUnitAttribute
Self CONST_SHOWAMMOBAR 0 SetUnitAttribute
Self CONST_MAXAMMO 0.0 SetUnitAttribute

First

Here's how the mechanics of this map are intended to work:

Spoiler

The creeper pumps suck out creeper from their location, multiply it by 10x then pump it back to the Inhibitor, creating a positive feedback loop that gets really deep, really fast.
[close]

Spoiler

Pumping AC into the pumps also pumps 10x AC back to the inhibitor.
[close]

Spoiler

The blue Berthas take AC as ammo and fire AC on the pumps.
[close]

Spoiler

AC kills the Inhibitor. Kill the Inhibitor with AC, and win the game
[close]

First

Here are a few tips if you're getting stuck:

Spoiler

You will need lots of AC. Upgrade your AC Ore efficiency using the Forge to up your AC bombardment.
[close]

Spoiler

Use of lots of regular Berthas. Lots. Build enough Reactors to support them. Target the area around the pumps to block (or reduce) creeper getting into the pump.
[close]

Spoiler

Control more totems to boost your tech faster and get a better score.
[close]

Spoiler

Build your base faster, so you can start working on the bombardment sooner, while the creeper level is lower.
[close]

Helper

Barn.
Burner.
Having a ball so far (8 minutes in).

SuperTerminator

Because I didn't read the topic before doing the level, the ending of that was a major surprise. Ironically, I did all that you posted in the topic, and before I knew it, I had reversed the pumps and won. Kind of a shocker for everything to spontaneously combust.
I tried making CW3 custom maps once upon a time. I kinda failed. My maps were too large/stupidly long/stupidly easy. I think I only ever made one really good map, and its not for people who hate spores. I mean it'd be good shock therapy xD

Grauniad

The majority of players won't need or want to inspect the scripts. I would suggest you move the scripts out of this topic to the CRPL code examples in the wiki and then simply put a link in this thread to your section(s) in the wiki. :) May make this topic more user-friendly and easier to scroll.
A goodnight to all and to all a good night - Goodnight Moon

planetfall

One of my next super units was going to be an AC bertha, mutters something unintelligible to self...

Excellent map. One thing of note, the popup text for the pumps is inconsistent.

Creeper: "Pumping: [rounded to tenths]/sec"
Anticreeper: "[really long decimal]/sec"
Nothing: "010/sec" (?)
Pretty sure I'm supposed to be banned, someone might want to get on that.

Quote from: GoodMorning on December 01, 2016, 05:58:30 PM"Build a ladder to the moon" is simple as a sentence, but actually doing it is not.

First

Graunaid wrote:

QuoteThe majority of players won't need or want to inspect the scripts. I would suggest you move the scripts out of this topic to the CRPL code examples in the wiki and then simply put a link in this thread to your section(s) in the wiki.

Yep, good idea.

planetfall noticed:

QuoteCreeper: "Pumping: [rounded to tenths]/sec"
Anticreeper: "[really long decimal]/sec"
Nothing: "010/sec" (?)

Ah, oops! Sloppy coding on my part. This is not the intended behavior. Intended behavior is rounded to tenths, with "0.0/sec" when there is nothing.

I'm thinking that a great feature for submitting maps would be an additional option on the "Finalized Worlds" menu, in addition to "Play", "Delete" and "Upload", would be "Update". This feature would allow me to push a corrected, modified, or otherwise repaired, without requiring a whole new submission to CS.





planetfall

Quote from: First on February 28, 2014, 09:44:28 PM
I'm thinking that a great feature for submitting maps would be an additional option on the "Finalized Worlds" menu, in addition to "Play", "Delete" and "Upload", would be "Update". This feature would allow me to push a corrected, modified, or otherwise repaired, without requiring a whole new submission to CS.

I seem to recall either G or V saying there were technical problems with this.

Also, I was unaware that "repaired" was a noun :P
Pretty sure I'm supposed to be banned, someone might want to get on that.

Quote from: GoodMorning on December 01, 2016, 05:58:30 PM"Build a ladder to the moon" is simple as a sentence, but actually doing it is not.

speef

That was fun.  I felt like the "AC destroys the inhibitor" mechanic ended the map when I was just getting started (but I guess without that mechanic, you'd just flood the map with AC and have nothing left to do but blow up helpless emitters).


Jerdog

Yes.  Very fun.  I think it's more satisfying to nullify the boss.  I even had the guppys ready to fly.  The sudden win was a surprise.

Katra

I had just finished filling every available bit of high ground with berthas and reactors and was beginning the process of fighting my way out to more totems (via terp; to make more gun space at the front) when kaboom. Surprise victory. (I wasn't bothering to watch the effect of the AC berthas or my artillery division while I built and terraformed.)
Power. Power! I must have more POWER!

First

QuoteAlso, I was unaware that "repaired" was a noun...

Sheesh, my grammar is as bad as my crpl code!

TLMike

Quote from: planetfall on February 28, 2014, 10:05:07 PM
Quote from: First on February 28, 2014, 09:44:28 PM
.... This feature would allow me to push a corrected, modified, or otherwise repaired, without requiring a whole new submission to CS.

Also, I was unaware that "repaired" was a noun :P

I'm almost positive PF was being sarcastic. "Repaired" in this case is an adjective, although it's primarily a verb (e.g., I repaired this toaster). "Corrected" and "Repaired" are meant to modify a noun which you did forget to add; (I would prefer that this read "a corrected, modified, or otherwise repaired map...).

Let the above serve as evidence the next time someone calls me a nerd.