Terp Terrain Detection Code

Started by IntelectualMind, March 29, 2016, 02:22:50 PM

Previous topic - Next topic

IntelectualMind

hey is there a way to make crpl detect if pixels are designated for terraforming if so could you tell me what it is and the perameters to use it
thx

milkev

personally i dont know, but this seems like something that would be amazing on maps, if you can edit it then you can disable terraforming in certain areas of the map or make it so the player is forced to terraform an area before moving into it.

GoodMorning

There is, I believe, currently no way to give Terp commands except while playing or editing. The closest CRPL can get is with SetTerrain/GetTerrain and the Override forms. See the wiki CRPL docs.

SetTerrainOverride, properly applied, could make the Creeper unaffected by the terrain. SetTerrain can reverse terraforming... but only after the level has changed.

Forcing the player to terraform before occupying can be done now, by changing heights in nearby cells. One cell in nine can be raised by one notch, making the ground uneven. This can easily be Terped level. Further unevenness can make it harder.

There exists a bug where flagging terrain for terraforming in editor, the making it void. Terps will then take a very long time to change it from 500 (void height, notionally, so that Creeper stays on land...) to a normal level. Thus, I hear, can a bridge be built through void, no CRPL required.
A narrative is a lightly-marked path to another reality.

IntelectualMind

it would be nice if virgil or madmag or someone could make a patch to set terrian like the terrain editor in game that would be awesome for some custom units
and thx both of you for the help. I have played CW, CW2, and CW3 love the games favs are CW and CW3

GoodMorning

This has been requested before, but the consensus is that it would rapidly become an overused feature, and that Virgil would better spend time on developing Particle Fleet, rather than extending CRPL.

The custom units don't really suffer all that much, as we can change terrain in other ways. It has a few applications, but not enough.
A narrative is a lightly-marked path to another reality.

Vanguard

Depending on purpose of the script, you could at least take a "screenshot"/snapshot of the map once at the beginning and compare it each 30 frames or something to a newly created snapshot of the map and react to terrain changes. Not as elegant, but surely a solution to some problems.

GoodMorning

To make it more efficient, you could only look at a small area, and only every few frames. SetTerrain is notoriously laggy.
A narrative is a lightly-marked path to another reality.