Author Topic: Is there a way to see, if a Bertha has hit next to a CRPL core?  (Read 377 times)

BilboGCL

  • Full Member
  • ***
  • Posts: 121
Is there a way to see, if a Bertha has hit next to a CRPL core?
« on: September 08, 2017, 10:16:04 am »
Hi,
I'm looking for a method to detect, if an emitter has been hit by a Bertha and to establish some punishment for that. As a pseudo-code I'd see a core like this:

- Area 5x5 around the core, this core right under an emitter
- If Bertha hits, either spit a lot of creeper in this area OR set a new emitter on a random place on the map *eg*

If anyone has an idea (or, as I'm a CRPL-noob even better, a code-snippet) you'd made an old hobbit happy!

Greetings from The Shire!

Edit: Why the heck didn't I read the formerly post - sorry for double-posting, mods, you may delete this post!
« Last Edit: September 08, 2017, 10:18:31 am by BilboGCL »

Builder17

  • Map Maker
  • *****
  • Posts: 755
  • My account picture is from Nitrome Mutiny.
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #1 on: September 08, 2017, 11:58:17 am »
Previous post is about removing bertha shells before these land, not double post IMHO.

Detecting big changes in creeper height around emitter might work.

Eg: there was 60 creeper while ago under emitter, then it decreases to 0 when bertha hits.

Edit: Code is untested.

(click to show/hide)
« Last Edit: September 08, 2017, 12:03:23 pm by Builder17 »

Karsten75

  • Hero Member
  • *****
  • Posts: 6361
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #2 on: September 08, 2017, 01:40:55 pm »
Only caveat with the "big change" method is that a singularity field may effect such a change...

You guys might want to make a wishlist for "Game next" - in that case I'd put on that list that  (at least major) weapons should expose their target to nRPL, as well as "shot fired", eg.
"Any leftover cabbage can and will be mixed with mayo"
   - Cole's Law

GoodMorning

  • Map Maker
  • *****
  • Posts: 2984
  • (Pusillanimous)
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #3 on: September 08, 2017, 08:04:14 pm »
A Bertha shell does 100 damage to the impacted Creeper. I would take 95 as the threshold, and experiment with the Singularity interaction.

V has mentioned some unspecified big changes approaching for the next game in scripting. Starting a wishlist now is possibly a useful way to go, since it's much easier to build things in than it is to add them later. Which board, K75?
A narrative is a lightly-marked path to another reality.

Builder17

  • Map Maker
  • *****
  • Posts: 755
  • My account picture is from Nitrome Mutiny.
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #4 on: September 09, 2017, 02:39:45 am »
1. Singularity can be disabled from forge limits, but map maker decides about that.

2. Could BilboGCL reply back to this thread?

BilboGCL

  • Full Member
  • ***
  • Posts: 121
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #5 on: September 09, 2017, 12:36:42 pm »
Sorry for the late reply!

The code snippet you've added checks if the creeper is lower than 5 and releases creeper if so, so it is an emitter and does not really help. But nevertheless I thank you.

The idea with loosing a lot of creeper per frame could help but offers several pitfalls:

- singularity weapon
- a dozen of more or less synced mortars could do the same damage (correct me if I'm wrong)
- a massive(!) airstrike by strafers might trigger this effect, too.

I wanted to establish an emitter that can't be fought by a Bertha, but it should be possible to fight it with conventional weapons, I don't want to punish high firepower but

And for my skills in CRPL: The easy script for the hornet (map "catch me if you can") took me one and a half hour, so you see that I really have to think what and how to do ;)

So, if there isn't a way to check for berthas, I have to forego and think of other meannesses *eg*

Greetings from The Shire!


Karsten75

  • Hero Member
  • *****
  • Posts: 6361
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #6 on: September 09, 2017, 02:20:04 pm »
Within the limits of CW3 CRPL, we're on the right track. I don't rightly recall as I type this, but a precautionary check on quantity of Aether might tell you if the Singularity weapon was fired. You can check for the presence of Mortars and calculate max damage of that many mortars.  Strafers and blasters are essentially ineffective against a 100+ emitter. Strafers deal as much damage as Blasters.

SO you'll not get a perfect solution, but you may get a workable solution.  Someone might micro-manage around all of these checks, but it would be a PITA. Eg, they could just apply the Aether to upgrades - but you could limit upgrade capability for those selections that are unlimited.


Postscript (There was CRPL in the wasp map??  ???
"Any leftover cabbage can and will be mixed with mayo"
   - Cole's Law

BilboGCL

  • Full Member
  • ***
  • Posts: 121
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #7 on: September 09, 2017, 03:27:49 pm »
OK, but I think until I'm able to do so, I have to learn a bit more of CRPL, so I think I have just to use it more often - learning by doing normally works for me.

Not in "The Wasp" map but in the hornet map ("Catch me if you can"), and you can't oversee it!

Greetings from The Shire

GoodMorning

  • Map Maker
  • *****
  • Posts: 2984
  • (Pusillanimous)
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #8 on: September 09, 2017, 06:14:33 pm »
So far as I know, Aether-related mechanics are not exposed to CRPL. A Singularity is a unit that can be detected, though.

I What with the Mortar targeting algorithm, it's unlikely in the extreme that the specific cell this script inspects would be hit that hard. 90 Creeper damage at once doesn't tend to happen in a single frame without special effort.

I'd place a half-dozen copies of the script, looking only at their own cell and spaced around the Emitter.
A narrative is a lightly-marked path to another reality.

BilboGCL

  • Full Member
  • ***
  • Posts: 121
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #9 on: September 10, 2017, 03:27:29 pm »
OK, I have tried it and ... I failed!

This was my code:
(click to show/hide)

When I tried
Code: [Select]
<-new (<-old 90 sub) lt if the result was always true :O

To be honest, I even don't see the difference in the two if-lines, by my current (missing) knowledge they should do exactly the same.

Sorry for the newbie questions, but somehow I'm lost in the use of variables with rpl

Greetings from The Shire!

GoodMorning

  • Map Maker
  • *****
  • Posts: 2984
  • (Pusillanimous)
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #10 on: September 10, 2017, 06:36:39 pm »
First, it breaks because you are assigning old to new on the last line, not new to old.

Second, the effect of that warp notation is to reverse the order of arguments to the lt.

Hope that helps.
A narrative is a lightly-marked path to another reality.

BilboGCL

  • Full Member
  • ***
  • Posts: 121
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #11 on: September 10, 2017, 07:55:53 pm »
Yeah - it helped a lot - no idea what I thought about that last line, stupid me ;)

However, right now I don't get the effects of the wrapped notation, but atm no need to try explaining it to me ;)

Now I have all I need, Thanks a lot

Greetings from a happy hobbit!

GoodMorning

  • Map Maker
  • *****
  • Posts: 2984
  • (Pusillanimous)
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #12 on: September 10, 2017, 08:09:13 pm »
It's a short explanation, and it may help someone else; I'll put it here in case:

(click to show/hide)

When comfortable with the rest of it, most people seem to drop the warp notation.
A narrative is a lightly-marked path to another reality.

BilboGCL

  • Full Member
  • ***
  • Posts: 121
Re: Is there a way to see, if a Bertha has hit next to a CRPL core?
« Reply #13 on: September 11, 2017, 11:39:50 am »
OK, thanks, I think I got it!

Btw: If anyone else uses the script: Don't use digitalis, at least test it very carefully! In my test cases, digitalis brought the creeper away from the core a bit too fast, bad surprise! And if you place it right under a high value emitter, you might have problems if you run it in test-mode (not-finalized map) after clearing creeper from the menu...

Greetings from The Shire!
« Last Edit: September 11, 2017, 11:45:17 am by BilboGCL »