TDF Request: minimumRange

TDF Request: minimumRange

Requests for features in the spring code.

Moderator: Moderators

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

TDF Request: minimumRange

Post by Argh »

Yup... I'm dragging this old chestnut out again... maybe somebody can find the time to code it, because I'm tired of hacky, not-working-very-well workarounds for this.

minimumRange works like this: if distance atan (XYZ) < minimumRange, then weapon fails. Expressed in Spring units (aka "elmos"), therefore 8 units = 1 square. Should be applied during the target-acquisition phase- if target failed, then new target is chosen.
User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

How should this affect the unit behavior when the target is inside weapon1 range?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Run away.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Post by Nemo »

There's a hacky script workaround, if you're pressed for something in the meantime Argh. Just add a weapon with a range equal to the minimum distance the unit can shoot at, and lock the main weapon while that short range clone is active. You'd have to find some way to keep it from trying to move to get both weapons in range though...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I actually have written a pretty elegant lockout that works pretty well, but it's not really the issue. If minimum-range worked properly, we could have "rings" of damage based on range with less computation than Rattle's fix, which feels too clunky for me tbh, and we could also build field-effect weapons, among other things.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Post by Nemo »

Argh wrote: If minimum-range worked properly, we could have "rings" of damage based on range with less computation than Rattle's fix, which feels too clunky for me tbh, and we could also build field-effect weapons, among other things.

You can already do all of this. Its how armor combat works in '44. Funnily enough, we were recently discussing switching off the 'different weapons represent the same gun at various ranges' deal to rattle's patch, should it prove reasonably accurate, just because of how much more clear of a solution it is for the player and the immensely smaller headache for us.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

COB scripted solutions play havoc with skirmishAIs/GroupAIs/Lua Widgets. A value used internally or at least accessible by AIs/widgets is much much better aswell as relieving a possible lag with more complicated and nonstandardized COB scripting practices.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Post by Nemo »

Well, sorry AF, but I'm designing my mod for humans, playing against other humans. If it happens to work with an AI too, great, but they're not really priority number one. No offense; a lot of the AI work is awesome, but I'm not going to sacrifice potential features to maintain AI compatibility. That means using whatever resources I can, "non-standard" scripting and mod controlled LUA included.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Argh wrote: If minimum-range worked properly, we could have "rings" of damage based on range with less computation than Rattle's fix
Which do you think takes less computation: One exponential function on impact or searching for units in range for multiple weapons?
Post Reply

Return to “Feature Requests”