Page 1 of 1

Terraintype user-defined movespeed...

Posted: 07 May 2007, 10:08
by SpikedHelmet
Right now there are only four variations of "movespeed" - kbot, tank, hover, ship. As I've learned (through testing) this is based on TA movementclasses (ie, everything was either a "kbot3a" or "tank8d" or whatever)... so these tags look for those words at the beginning of the movement class (so for instance, movementclass=kbot; and movementclass=kbot54321; will both be picked up under the "kbotmovespeed" tag).

This is really constaining for modders as we can't set set speeds for other types of units. For instance, a light truck and a heavy tank...

So I'd like to request someone write a patch that will allow terraintype in map .smd files to use any user-defined movement class for movespeed... for instance, if I typed "omfgpwnz0runitmovespeed=5904825;" I'd like for it to look for a unit with the movementclass "omfgpwnz0runit".. not that I'd do something so silly, but you get my point!

Please and thank you.

Posted: 08 May 2007, 01:51
by AF
The issue here is this locks maps into certain specific mods.

There's also the mantra that typemaps should be used sparingly and minimaly anyway.

Posted: 08 May 2007, 04:08
by Ling_Lover
what about if it just looked for the string in the movement class
so "tank" would still find "tank heavy"
but "heavy tank" would find "heavy tank blahblahblah"

so it's a similar way of working, just gives more flexibility

Posted: 08 May 2007, 07:52
by KDR_11k
AF wrote:The issue here is this locks maps into certain specific mods.
Yeah but the current system locks all maps into TA mods.

Posted: 08 May 2007, 13:22
by Nemo
There's nothing wrong with mod-specific maps. As mods drift further and further away from TA style gameplay, they will become more and more necessary.

And typemaps used well are not a problem.

Posted: 08 May 2007, 17:55
by rattle
Agreed. It makes only sense for units to slow down on rough terrain and speed up on roads for example in a realism based mod such as S44.

Posted: 09 May 2007, 01:38
by MadRat
Is pathfinding aware of these nuances?

Posted: 09 May 2007, 08:02
by KDR_11k
This was a feature for a long time now although it's limited to certain names right now. If pathfinding isn't aware of it that isn't a new issue.

Posted: 09 May 2007, 10:47
by zwzsg
Loosely related, but I wish the TA specific name "kbot" would be replaced by a more generic "walker". Not in the internal code, just in the interface. For instance, in a mod with infantry, human infantry can't be called kbot, but they are still walkers

But that was when I thought the engine used the upright=1; tag to differentiate between kbots and vehicles. If instead it uses the first characters of the movement class, then forget what I said and instead indeed follow Spiked's idea.

Ideally a TDF of the mod would list the terrain type to look for each movementclass, with something to also provide a string of replacment terrain type names in case the first ones don't exist.

Posted: 09 May 2007, 13:07
by KDR_11k
Where does the interface use the word KBot?

Posted: 09 May 2007, 22:22
by zwzsg
Ok, actually it use the letter K, and not the word kbot.

When mouseovering nothing but terrain, it displays "Speed T/K/H/S" at the third line of the tooltip.

Posted: 09 May 2007, 22:49
by Pxtl
Hardly anyone uses this feature, especially for TA-specific maps (I'd love to see a KP map that capitalized on some coloured movement zones for roads and suchlike). Still, it does need to be made mod-agnostic, rather than TA-based.

I'm still waiting for a mod-specific answer to Geotherms too - what happens if modders want different types of "Only-can-build-this-unit-here" zones?

Posted: 09 May 2007, 22:53
by trepan
/luaui echo Spring.GetGroundInfo(1215, 3817) --> Earth, 1.2300000190735, 500, 1, 1, 1, 1
(name, metal, hardness, tankSpeed, kbotSpeed, hoverSpeed, shipSpeed)

Combined with LuaRules AllowUnitCreation(), you could have map/mod combinations
that only allow certain types of units on certain types of terrain. With a mod widget, you
could also relay that information to the user when they are selection the build site.

Posted: 10 May 2007, 00:33
by Erom
Pxtl wrote:(I'd love to see a KP map that capitalized on some coloured movement zones for roads and suchlike)
Working on it. :)
Pxtl wrote:I'm still waiting for a mod-specific answer to Geotherms too - what happens if modders want different types of "Only-can-build-this-unit-here" zones?
Yeah, abstracting this would be pure win.

Posted: 10 May 2007, 02:05
by zwzsg
Erom wrote:
Pxtl wrote:(I'd love to see a KP map that capitalized on some coloured movement zones for roads and suchlike)
Working on it. :)
Me too.

Preview! Blue will be fast, red will be slow, the rest will be normal speed.

Posted: 10 May 2007, 13:14
by SpikedHelmet
It'd also be very helpful for buildings etc, to determin typemaps that allow some buildings and not others etc.. actually that would be VERY helpful..

Posted: 10 May 2007, 21:43
by knorke
zwzsg wrote:
Erom wrote:
Pxtl wrote:(I'd love to see a KP map that capitalized on some coloured movement zones for roads and suchlike)
Working on it. :)
Me too.

Preview! Blue will be fast, red will be slow, the rest will be normal speed.
cool cool.
but keep in mind that those lines some KP-maps have as terrain look strange when zooming far-out. (they pixelize to randomness)