Knuckle Cracker

Creeper World 3 => Custom Map Discussion => Colonial Space Map Discussion => Topic started by: AutoPost on February 27, 2014, 11:42:25 PM

Title: Custom Map #259: Navarone IV. By: First
Post by: AutoPost on February 27, 2014, 11:42:25 PM
This topic is for discussion of map #259: Navarone IV
(http://knucklecracker.com/creeperworld3/queryMaps.php?query=thumbnailid&id=259)

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!
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: First on February 27, 2014, 11:45:58 PM
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
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: First on February 27, 2014, 11:48:32 PM
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]
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: First on February 27, 2014, 11:52:28 PM
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]
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: Helper on February 28, 2014, 08:20:28 AM
Barn.
Burner.
Having a ball so far (8 minutes in).
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: SuperTerminator on February 28, 2014, 10:00:52 AM
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.
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: Grauniad on February 28, 2014, 10:10:37 AM
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 (http://knucklecracker.com/wiki/doku.php?id=crpl:crpltutorial:code_examples) 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.
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: planetfall on February 28, 2014, 06:04:53 PM
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" (?)
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: First on February 28, 2014, 09:44:28 PM
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.




Title: Re: Custom Map #259: Navarone IV. By: First
Post by: planetfall on February 28, 2014, 10:05:07 PM
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
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: speef on February 28, 2014, 10:29:53 PM
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).

Title: Re: Custom Map #259: Navarone IV. By: First
Post by: Jerdog on February 28, 2014, 10:56:33 PM
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.
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: Katra on February 28, 2014, 11:05:31 PM
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.)
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: First on February 28, 2014, 11:09:26 PM
QuoteAlso, I was unaware that "repaired" was a noun...

Sheesh, my grammar is as bad as my crpl code!
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: TLMike on March 01, 2014, 06:26:27 PM
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.
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: teknotiss on March 02, 2014, 09:37:26 AM
Quote from: TLMike on March 01, 2014, 06:26:27 PM
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.

i was a bit confused too since i saw First'd missed the noun and i sort of fill in that kind of "missed" typo automatically, so i had to go double check "repaired" was a verb (self doubt afflicts us all occasionally). grammer sarcasm is hard to pick up in text comments for me! ::)
i sort of thought PF was confused for a bit, then it struck me he was being funny ;)
context is lost in text, hence archeology being so tricky even when stuff written down :)
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: Loren Pechtel on March 18, 2014, 09:49:56 AM
Quote from: Katra on February 28, 2014, 11:05:31 PM
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.)

Same here.  I was adding the next strip of land to my base and I knew I had at least 20 seconds that the game could run without any attention.  Thus I had my eyes on another screen, when I look back to see how the terraforming is going I have the victory message.  I came here to figure out why.
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: SuperTerminator on March 26, 2014, 09:51:35 AM
Spoiler
I found that if you disable AC dispatch and build up a massive AC reserve while also building up berthas, you can beat the level faster.
[close]
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: GoodMorning on August 01, 2016, 07:27:18 PM
While this is a long-dead topic; the following is worth noting for "Suspicious score" purposes:

Spoiler

Sub 10min times are likely possible using the Forge. A Singularity on a pump for about 20sec causes conversion density at the Inhibitor.
The current 6min second place is likely to be deserving, though the <1min first is almost certainly not.
[close]
Title: Re: Custom Map #259: Navarone IV. By: First
Post by: jasons2645 on November 23, 2018, 02:42:13 PM
I just wanted to say that I really liked this map - one of my favorites!  Thank you for making it and posting it!