depthmod feature request and specific reasoning. - Page 2

depthmod feature request and specific reasoning.

Requests for features in the spring code.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: depthmod feature request and specific reasoning.

Post by Argh »

The only one is depthmod which says water does not slow me.
OK. So you want Units to prefer water, when they have to choose.

You want depthmod results that give a final speed greater than a pathing result on land to be weighted higher.

Problem there... IIRC, the pathfinder doesn't actually look at Unit speed, it merely looks at slope. Could be wrong there, but I don't recall seeing anything about the relative Unit speed per se, it just tries to solve for the fewest changes in slope.

I guess water could be treated as a bonus to the slope values or something. That might be a good solution.
Last edited by Argh on 21 Aug 2009, 22:52, edited 1 time in total.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: depthmod feature request and specific reasoning.

Post by zwzsg »

we cannot access pathing values in lua
Then instead of using the engine pathfinder, just build your own pathfinder in Lua. It's only the most algorithmy-difficult and CPU-expensive part of RTS coding after all.

the Devs aren't our slaves
Be your own slave!
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: depthmod feature request and specific reasoning.

Post by lurker »

By access he meant affect.

He wants them to seek deep water when the speed boost is enough to overcome going over slopes, in other words default pathfinding. He just needs a way to tell the pathfinder that they're faster in water.

Edit for responses during this: Yes it very much looks at speed. Go use a map with roads.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: depthmod feature request and specific reasoning.

Post by Argh »

I thought that it just preferred the roads due to a weighting in the typemap?

In either case, we circle back again... why not just make water areas a typemap, since Gundam uses custom maps already?
He wants them to seek deep water when the speed boost is enough to overcome going over slopes, in other words default pathfinding.
OK, so basically guys walking underwater? Again, looks like this could be solved with a typemap.
Last edited by Argh on 21 Aug 2009, 23:03, edited 1 time in total.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: depthmod feature request and specific reasoning.

Post by lurker »

The weighting is a speed modifier...

Because typemaps only have 4 categories and you'd have to overhaul the entire system for that to even start making sense to be manipulated by the engine?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: depthmod feature request and specific reasoning.

Post by Argh »

OK, so it's the speed modifier that counts?

Then a typemap would solve it, on custom maps, but he wants this to be default behavior, for all maps, where it treats depthmod like the speed bonus from a typemap?

I'm confused here. If it's really taking speed into account, and not just the heights and typemap, then why isn't this working already? Is depthmod / slopemod just not factored into final Unit speed until after pathfinding has occurred?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: depthmod feature request and specific reasoning.

Post by lurker »

There's no reason to have a "this is water" typemap.

If you would just read the thread thoroughly... He is unable to set speed via depthmod so he sets it via cob. This means the pathfinder is unaware of it. If depthmod could be negative this would be largely solved.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: depthmod feature request and specific reasoning.

Post by Argh »

There's no reason to have a "this is water" typemap.
No more arbitrary than "this is K-Bot ground" typemaps...
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: depthmod feature request and specific reasoning.

Post by lurker »

What? I'll be more clear. There is no need to take every type that intersects with water and turn it into two types, one on water and on on land. You also have to have more unit classes in each ground type, and base speeds for them. Please explain your plan, because it makes no sense to me.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: depthmod feature request and specific reasoning.

Post by smoth »

"Smoth knows triangles are puppies"
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: depthmod feature request and specific reasoning.

Post by SeanHeron »

My god, I'm really sorry I ever mentioned the typemaps now - I was only trying to point out what I thought might be a workaround. I'd not expected a borderline flamefest to ensue...

On topic: It shouldn't be a question that being able to set a modifier for units speeds depending on whether they're in water or not would definitely be a very useful setting (Edit: and not just monodirectional or whatever is possible now)! I certainly think that is something worth implementing (and should perhaps have stated so more clearly immediately...).
Last edited by SeanHeron on 21 Aug 2009, 23:36, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: depthmod feature request and specific reasoning.

Post by Argh »

1. KBOT movetypes are governed by KBOT being set in the name, IIRC.

2. Typemaps can give a speed bonus, i.e.:

Code: Select all

kbotmovespeed=1;//multiplier of kbot units speed after slope mods etc has been applied (default value=1)
3. There is no need for major duplication, as Smoth's Units in this example are all using that movetype with the depthmod anyhow- i.e., those special movetypes are already being "wasted".

So he'd just append KBOT to the movetype's names with a quick grep, same with the UnitDefs, and use the appropriate gray value on the typemap where water is. Voila, done.


While we're talking about this, I'm going to say it again: if the Typemap value wasn't read-only and wasn't restricted to four very arbitrary movement "types"... it would have some pretty nifty uses.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: depthmod feature request and specific reasoning.

Post by Kloot »

I thought it might be interesting to visualize for some people how depthMod actually affects a (ground) unit's speed in water, assuming a constant slope and slopeMod:

Image

It's pretty simple to invert the relationship for negative modifier values, so I'll do that.
Attachments
DepthMod.png
(55.6 KiB) Downloaded 58 times
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: depthmod feature request and specific reasoning.

Post by smoth »

thank you kloot.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: depthmod feature request and specific reasoning.

Post by Argh »

So basically it treats it as 0. What about the slopemod incurred by going down in depth?

Won't it take a pretty hefty depthmod to overcome that?

Just kinda curious as to how that's going to effect Unit speeds on, say, a map with very shallow water mixed with ground, vs. a map where you have deep water with sharp undersea cliffs.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: depthmod feature request and specific reasoning.

Post by smoth »

depends on how you want to setup your slopemod.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: depthmod feature request and specific reasoning.

Post by Argh »

I was just curious, since I set mine up to largely ignore slopes that don't stop movement entirely. Anyhow, that's just a minor wrinkle.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: depthmod feature request and specific reasoning.

Post by smoth »

Then odds are it will not effect it much.

if you had a slopemod of .5 and a depthmod of say 0.1 it should slow the unit down 0.6 if I understand it correctly or there are no gay formulas.
Post Reply

Return to “Feature Requests”