Page 1 of 1

[C++] How to access WaterDamage, VoidWater map params?

Posted: 12 Feb 2015, 17:07
by lamer
Can't find a simple way to read WaterDamage, VoidWater map params.
doc
I'm eager to add

Code: Select all

float Map::GetWaterDamage();
bool Map::IsVoidWater();
into AI interface.
But maybe i missed something?

There is a workaround (borrowed from RAI), but thats ugly.

Re: [C++] How to access WaterDamage, VoidWater map params?

Posted: 12 Feb 2015, 17:31
by Anarchid
VoidWater is non-physical and only affects rendering, so an AI shouldn't have much reasons to want to know that.

Re: [C++] How to access WaterDamage, VoidWater map params?

Posted: 12 Feb 2015, 18:35
by lamer
An AI attempt to build navy in VoidWater would be interesting. But how should ai know that AstroTurf_v2 has no navy? WaterDamage > 1e+10?
Can't say that i totally undertand RAI but it actually using VoidWater for terrain analysis (maybe its only relevant for other mods, not ZK?).

Re: [C++] How to access WaterDamage, VoidWater map params?

Posted: 12 Feb 2015, 19:29
by Anarchid
An AI attempt to build navy in VoidWater would be interesting. But how should ai know that AstroTurf_v2 has no navy? WaterDamage > 1e+10?
Can't say that i totally undertand RAI but it actually using VoidWater for terrain analysis (maybe its only relevant for other mods, not ZK?).
I would consider it a passable somewhat heuristic given that no maps with traversible voidwater currently exist. But the actual mechanism to prevent construction or travel in voidwater is either waterdamage or a gadget.

Re: [C++] How to access WaterDamage, VoidWater map params?

Posted: 12 Feb 2015, 21:08
by lamer
Ok, then its only

Code: Select all

float Map::GetWaterDamage();
so far. And gadgets could push some GameRulesParam, but gadget interaction is another story/topic.

Re: [C++] How to access WaterDamage, VoidWater map params?

Posted: 13 Feb 2015, 12:32
by Anarchid
Pushing a GRP would allow things like lavarise lava being accessible to AI, but yes, that's a different story :)

(imagine AI pathing around lavarise lava hurrr)

Re: [C++] How to access WaterDamage, VoidWater map params?

Posted: 13 Feb 2015, 12:45
by 8611
Lua<-->AI communications :arrow: viewtopic.php?f=15&t=26298

Re: [C++] How to access WaterDamage, VoidWater map params?

Posted: 13 Feb 2015, 23:32
by lamer