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

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

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

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

Post 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.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

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

Post by Anarchid »

VoidWater is non-physical and only affects rendering, so an AI shouldn't have much reasons to want to know that.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

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

Post 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?).
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

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

Post 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.
lamer
Posts: 153
Joined: 08 Mar 2014, 23:13

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

Post 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.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

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

Post 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)
8611
XTA Developer
Posts: 242
Joined: 29 Dec 2014, 08:22

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

Post by 8611 »

Lua<-->AI communications :arrow: viewtopic.php?f=15&t=26298
Post Reply

Return to “AI”