Terraintype user-defined movespeed...

Terraintype user-defined movespeed...

Requests for features in the spring code.

Moderator: Moderators

Post Reply
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Terraintype user-defined movespeed...

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post 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.
User avatar
Ling_Lover
Posts: 100
Joined: 26 Sep 2006, 11:50

Post 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
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Post 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.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post 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.
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

Is pathfinding aware of these nuances?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Where does the interface use the word KBot?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post 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.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post 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?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post 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.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post 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.
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Post 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..
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post 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)
Post Reply

Return to “Feature Requests”