Is this map cursed?

Started by planetfall, June 21, 2016, 04:14:49 PM

Previous topic - Next topic

GoodMorning

I look forward to this very much. Another new game mode, it seems.
A narrative is a lightly-marked path to another reality.

Gameboytm101

#16
I finally got around to playing the newest version.
In addition to texture flickering prior to the Celestial Core being built, I found out something else.
I managed getting a Slip Emitter to 2/2 stability, but nothing happened. Whether this is:

  • Intended
  • Not Yet Implemented
  • Requires a Locked Unit to make use of
or just
  • A bug
I'm unsure of.

As for the texture flickering issue, have you tried importing scripts from your other maps that don't have this problem?

GoodMorning

I think that stability has to go over 100%, then the slip starts losing health.

Perhaps the texturing issue could be fixed by making a new map and reloading the scripts, then rebuilding?
A narrative is a lightly-marked path to another reality.

planetfall

Quote from: Gameboytm101 on June 22, 2016, 09:32:31 PM
I finally got around to playing the newest version.
In addition to texture flickering prior to the Celestial Core being built, I found out something else.
I managed getting a Slip Emitter to 2/2 stability, but nothing happened. Whether this is:

  • Intended
  • Not Yet Implemented
  • Requires a Locked Unit to make use of
or just
  • A bug
I'm unsure of.

As for the texture flickering issue, have you tried importing scripts from your other maps that don't have this problem?

This is map 4 of an unreleased series so this mechanic was explained earlier. You need to have greater stability than the displayed number to actually cause damage. Having equal to that number halves creeper output and prevents it from healing.

The maps in question have the same exact scripts. A bug in CelResBar would cause a divide by zero error if the celestial core was lost or not yet built, which was not a problem in the prior map featuring it because the core is on the map at the start and the mission fails if it gets destroyed.

I have made a discovery! If all ore packs are removed, the problems cease. Same as if all white holes are stabilized or deleted. So something that runs when white holes are unstabilized hates ore packs, or something in vanilla ore pack code hates what's going on in the white holes. And my test map where I make all these scripts, which works fine normally, suddenly gains the same symptoms if you clone ore packs everywhere.

It's a pity because I wanted to try making finite ore a fun thing. *grudgingly adds ore mine tech and makes it cost double out of spite*

This is a really weird bug and since multiple people are experiencing it V should probably take a look at it with his more-information-y dev tools, but I guess cw3 is old, the bug is niche, and the fleet of particles takes priority. Something to look forward to at least!
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.

GoodMorning

Well, that narrows it down to a very short list of code pieces. Does the build state of the Celestial Core relate to it?
A narrative is a lightly-marked path to another reality.

planetfall

... can confirm I was utterly wrong as it keeps happening. Deleting the CelResBar core seems to fix it. As does building the celestial core. Which means that the code causing the CelResBar to be invisible when essence capacity is 0 is the issue. And that was the main change from the prior map that worked. So I've made it simply always display and that seems (have not tested a HUGE amount) to fix it. I REALLY want to know what's so offensive to the game engine about this snippet:


<-EssenceCapacity eq0 <-EssenceBonus eq0 and if
Self "main" 0 0 0 0 SetImageColor
Self "bar" 0 0 0 0 SetImageColor
"" SetPopupText
return
else
Self "main" 0 0 0 255 SetImageColor
Self "bar" 255 200 0 255 SetImageColor
endif
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.

GoodMorning

Perhaps "bar" is a reserved name for the packs scripts, or "main" is interfering due to a UID issue?

Another issue I had noted is the inability to double-click to select the Stabilisers, which is probably not implemented, but seems intuitive, because we can do so much that works in normal units. Then again, this would probably give you even more headaches about placement validity. However, it would probably be their primary movement command.

Does this mean that the ore mine is out again?

And finally, if stabilising WHs seemed to fix it, could it be between the two?
A narrative is a lightly-marked path to another reality.

GoodMorning

I've managed to incidentally "curse" a map by setting a unit image badly. The layering didn't break down, but the Creeper became invisible patchily, and other units lost some main images. Even terrain layering acted oddly w.r.t. the editing cursor for units. Reloading the game hasn't helped.

Even a new map breaks as soon as the script runs, and the Core is deleted rapidly. Any ideas? Possibly something breaks when I change the image and immediately delete the Core?

Script attached.
A narrative is a lightly-marked path to another reality.

planetfall

I eventually found that the issue was due to setting two images (using the same image) on a ScreenMode core invisible with SetImageColor - making them invisible with SetImageScale seemed to work without issue. But that isn't at play here...

Here's my guess. You have here:


CurrentCoords 1 RandCoordsInRange @Target


Which, to my understanding, also considers the center cell. Thus, in 20% of cases, the core calculates the pixel distance to be zero, which causes problems when you reach lines like these:


Self CONST_PIXELCOORDX <-CPC_X <-PD_X <-PD div add SetUnitAttribute
Self CONST_PIXELCOORDY <-CPC_Y <-PD_Y <-PD div add SetUnitAttribute


As for the core deleting itself, I did a quick ctrl-f for "health" and "damage," but everything looks fine in that department.

Another possible culprit is the :split function using SetUnitAttribute rather than SetScriptVar.
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.

GoodMorning

Whatever it is seems to be killing it in the first few frames, probably the first, as a test didn't show the trace when expected.

This was written some time ago without compiling in between, and fails the first compile attempt by missing quotes. Then it starts breaking the map when it executes.

Never mind, if you located the issue, then this belongs elsewhere.
A narrative is a lightly-marked path to another reality.