Corrupter.crpl (All credit for anything good to the Sleeper team.)

Started by GoodMorning, May 18, 2016, 08:21:04 AM

Previous topic - Next topic

GoodMorning

I have a working prototype of the Corrupter, which turns player units into their Sleeper counterparts.

The map attached has a demonstration, and is a direct adaptation of the most recent Sleeper map by Nicant (Ripped apart for testing).

I built the CRelay and CSiphon, and the images are adjusted from the wiki.

Slight issue occurs with the Strafer and Bomber, I think that the wrong unit is being targeted.The Thor is invisible, for some reason.

I do not intend to attack CNs, as adding Sleeper nodes is either an insta-win or insta-fail, depending on what commands I give.

CRelay adds AC in order to supply Creeper, so it will self-destruct in the example map. In the wild it should be immersed deeply enough to just lower the Creeper content.

CSiphon is nasty, making Creeper from the resource pack contents. E:1, O:10, A:100 Creeper/unit. Good for bootstrapping the Sleeper/something else fun.

Corrupter will make a CCollector if your unit dodges, and targets the closest unit by default. It self-destructs after a corruption attempt, so as not to be too powerful.

Would a CRPL expert be able to tell me what might be causing the air weapons to be acting strangely? Built with editor, and targeted with GetAllUnitsInRange, prioritising proximity. Picked with GetUnitType.

Potential changes: (fix bugs...) Guppy mode affects type of corrupted version, Creep ammunition is affected by corrupted unit ammunition (dumped Creeper), edits to CRelay to stop self-destruct, CRelay importing from local deep Creeper.

Potential applications: A Sleeper making this would be very powerful. So would a factory, which might, say, make Corrupters at intervals determined by player unit count. One in 30, say, each minute, would be corrupted. Every three corruptions, one gets targeted at something more valuable (Reactor, Relay, Bertha), and every half-hour or so the Creeper makes an attempt on your Forge. Corrupters would need a serious weakness in this case (who wants to lose a Forge every half-hour?). A Sleeper with a CSiphon could be very powerful.

Nicant: 1) Thanks, and 2) I changed the health of the CForge by 300x, to stop Strafers being so OP against it. Now it's almost as tough (3/4) as a Sleeper Node, just undefended. 3) I would like to explore more of the Creep Aether supply mechanism for the CSiphon, but can't quite follow what's going on, esp. as the Forge location seems to be mapmaker-specified. Also, whereabouts is the code ensuring that the COreMine has an ore patch? It looks to be buildable anywhere.
A narrative is a lightly-marked path to another reality.

Nicant

3) The aether supply system is not mapmaker-specified. This is how the aether system works. First the CForge Searches for all totem siphons and give the totem siphons the coordinates of the CForge. Once the siphons have the coordinates, they will start creating "Creep Rift" and they will give the rift the coordinates on where to fly to. Eventually, the rift will be on the same coordinates of the Forge and when that happens, the rift will get destroyed and add 1 to the overall CreepRift of the forge. If you are wanting the Siphon to send CreepRift to the forge you need to have add the code below to the Consistent AI area in the CForge and use the other CSiphon in this reply. You can use this if you want to! Ok, now about the OreMine. The OreMine can be placed anywhere! The Reason the OreMine only gets placed on ore deposits in Sleeper maps is because the sleeper node is the only thing that checks if there is an ore deposit. Hopefully this answers your questions! NOTE: have not tested modified siphon.

Code for CForge. It goes in the Consistent AI area.
"IsaCSiphon" "1" GetCoresWithVar @something ->CSiphons #This Code was made by GameGibu!
<-CSiphons GetListCount ->LIM9
0 ->ILOOP9
while <-ILOOP9 <-LIM9 lt repeat
SetScriptVar(GetListElement(<-CSiphons <-ILOOP9) "CSiphon.crpl" "ForgeX" <-CurrentX)
SetScriptVar(GetListElement(<-CSiphons <-ILOOP9) "CSiphon.crpl" "ForgeY" <-CurrentY)
<-ILOOP9 add(1) ->ILOOP9
endwhile
CW4 hype!!

GoodMorning

Just to be clear: The CForge, or the CForgeNew? The new version was my guess... ...but I am still unsure. I'll build it with the CForgeNew, anyway. (Note: If there isn't one, it will now wait. If there is, say goodbye to your Aether bonus.)
A narrative is a lightly-marked path to another reality.

GoodMorning

I have attached a map using this, but there seems to be a problem: the victory conditions seemed met, but victory was not declared.

Note: The phrase "It's a trap!" is accurate, but the trap isn't sprung until the player would expect to win. It can be anticipated.

For my part, the phrase "?? What's going on ? ??" is appropriate.

The trap is that after the main fight, when a lot of weapons are driving a wedge into the Creeper, and you Nullify the last enemy, the "factory" activates, converting every nearby unit into a Sleeper counterpart. It also pours out Creeper. It then starts converting your units progressively, faster when you have more. It must be Nullified to win.

This poses the four-pronged challenge of fighting it, and a sudden wave of Sleeper units, and the residual Creeper, and having suddenly lost your previously safe power supply. Parallel-building ~6 Nullifiers allows some to be completed before being corrupted.

Another, possibly related, problem is that the factory should be building Corrupters, but it seems that they are either invisible or teleporting, as nothing is seen until your unit turns purple.

Note that I have tried importing to the editor, and converting all terrain to void, without finding anything.
A narrative is a lightly-marked path to another reality.

Nicant

Quote from: GoodMorning on May 18, 2016, 09:21:32 PM
Just to be clear: The CForge, or the CForgeNew? The new version was my guess... ...but I am still unsure. I'll build it with the CForgeNew, anyway. (Note: If there isn't one, it will now wait. If there is, say goodbye to your Aether bonus.)
Use the CForgeNew. The Regular CForge is broken and is still there because i needed to copy some parts of the code from the CForge to the CForgeNew. When i put the CForge in the template, there will be no CForgeNew. Don't change the name of CForgeNew as that will mess the siphons up.
CW4 hype!!

GoodMorning

I just realised that I appealed for help, and forgot to attach the map.
Oops.
(I just played again, and not even a CRPL enemy-finder could help. Anyone? Anyone at all?)

Note: if played in edit mode, trace windows will show up. Don't worry about them, though two things are broken here, neither important:
For some reason an ore patch was removed along with a mine during testing, and this version still drops PZs when a unit is shifted before a Corrupter arrives, as well as the expected 100 Creeper.
A narrative is a lightly-marked path to another reality.