Author Topic: patch: gather points/moving to corpses  (Read 1981 times)

claymore

  • Guest
patch: gather points/moving to corpses
« on: 6 January 2011, 15:02:22 »
This patch allows setting gather points for incomplete buildings (hoping I didn't break something here) and stops units from walking over to corpses after killing them, except for the CPU's units (ai has problems with this apparently).

Somebody who has a better IDE or some other refactoring tool set up, could you please rename "isComandable" to "isCommandable", or even remove this method altogether. I created a new method isCommandable2 because I don't know if the old method still has any use, but I've replaced all calls of it. (Difference is that the new one recognises incomplete buildings as commandable.) Again, here's hoping I didn't break something...

EDIT: Regarding moving to corpses, is it possible for the CPU to have queued commands? If that's the case, maybe the old condition on queue size has to be kept.
« Last Edit: 6 January 2011, 15:30:55 by claymore »

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: patch: gather points/moving to corpses
« Reply #1 on: 8 January 2011, 17:07:05 »
Can you explain why units walking over corpses after killing them is bad? Is this solely for ethical reasons, or does it have any gameplay implications? My point is, if this was a completely politically correct game units would possibly not kill each other in the first place. ;)

I surely like the idea of being able to set the meeting point for buildings while they are still being built. Since these topics seem to be different (to me), it may be a good idea to have separate patchsets, too.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

claymore

  • Guest
Re: patch: gather points/moving to corpses
« Reply #2 on: 8 January 2011, 18:25:11 »
The point is that in the middle of a battle involving ranged and non-ranged units, a freshly killed unit is still being bombarded with missiles. There's a lot of unnecessary friendly casualties due to this behaviour.

Outside of big skirmishes, units tend to venture further out than is desirable, which is a nuisance.

So, the reasons are solely gameplay. :)  I hadn't even thought of the ethical considerations.  :O

Separating patches is a good idea, I'm just lazy when it comes to creating new branches. :P

Cygal

  • Guest
Re: patch: gather points/moving to corpses
« Reply #3 on: 8 January 2011, 21:07:38 »
Separating patches is a good idea, I'm just lazy when it comes to creating new branches. :P

It's your work to provide clean patches, not the work of MegaGlest maintainers. Having a feature that works on your computer is only a fraction of the work!

How to get your code into an open source project is a good read.

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: patch: gather points/moving to corpses
« Reply #4 on: 8 January 2011, 21:42:23 »
How to get your code into an open source project is a good read.
The problem with his patches are that some people disagree with what they change/do...possibly including the MG developers.
But, some of them are cool, IMO.

claymore

  • Guest
Re: patch: gather points/moving to corpses
« Reply #5 on: 8 January 2011, 21:52:16 »
It's your work to provide clean patches, not the work of MegaGlest maintainers. Having a feature that works on your computer is only a fraction of the work!

Yes, obviously. I wasn't asking anyone else to separate them, I'll do it when I get round to it.

Conzar

  • Guest
Re: patch: gather points/moving to corpses
« Reply #6 on: 25 February 2011, 11:43:15 »
Is the problem with walking over corpses going to be fixed?  After trying to play through some of the scenarios, I find the game unplayable because I have to continue to move my units back to defend my base (they keep wondering off after killing a unit and easily get picked off at that point).  This is particularly a problem with ranged units where they move to the dead corpse instead of attacking the next target. 

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: patch: gather points/moving to corpses
« Reply #7 on: 25 February 2011, 11:49:45 »
+1

My understanding is that MG people *like* this behaviour.

I'd prefer them to stand ground.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: patch: gather points/moving to corpses
« Reply #8 on: 25 February 2011, 14:15:13 »
I don't mind if they walk over or not, it will suit different mods to have different settings which is why my only request is that this patch is switchable using an ini setting.

This is pretty much my feeling on all patches to Glest, I don't care what it is as long as you can turn it on and off. Once something has been thouroughly tested by the community the main Glest devs can then decide whether it should be on permanently.
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: patch: gather points/moving to corpses
« Reply #9 on: 25 February 2011, 14:52:18 »
I think it ought to be controllable by the player during the game on a per-unit basis, with the default for each unit-type being set in the unit INI, and if its not set there then a global default set in the game settings INI.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: patch: gather points/moving to corpses
« Reply #10 on: 25 February 2011, 15:15:06 »
This improvement/patch is not in MG yet, because its not as simple as some might think!
It affects the way the AI moves its units and also the way your units fight. Some of the things are wanted like:
"Don't walk over there and get killed by your own archers"

Others are not wanted like this:
The next enemy unit stands outside the visible range ( probabaly an archer ) and because your units don't move forward they did not help your melee units! (If you want your units not to moove, use hold position)

And all this has nothing to do with units running away from their position. This will still happen in both cases and is something different.

(update: Of course setting gathering points for units under construction is in MG )
 
« Last Edit: 25 February 2011, 16:09:08 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

claymore

  • Guest
Re: patch: gather points/moving to corpses
« Reply #11 on: 25 February 2011, 15:51:57 »
It does check for AI-controlled units, these are excluded from this behaviour.

Quote from: titi
The next enemy unit stands outside the visible range ( probabaly an archer ) and because your units don't move forward they did not help your melee units! (If you want your units not to moove, use hold position)

Isn't this *more* likely to happen when your units run away? This doesn't have anything to do with walking to corpses right?

Quote
And all this has nothing to do with units running away from their position. This will still happen in both cases and is something different.

I don't really understand what cases you're meaning.

But anyway, I guess this could be a configurable global or per-unit behaviour.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: patch: gather points/moving to corpses
« Reply #12 on: 25 February 2011, 16:20:16 »
It does check for AI-controlled units, these are excluded from this behaviour.

Quote from: titi
The next enemy unit stands outside the visible range ( probabaly an archer ) and because your units don't move forward they did not help your melee units! (If you want your units not to moove, use hold position)

Isn't this *more* likely to happen when your units run away? This doesn't have anything to do with walking to corpses right?
This has something to do with walking to corpses! If the enemy is dead they don't walk forward if they don't try to reach the corpses. This is whats get lost, so the player has to give a command again to attack.
Quote
Quote
And all this has nothing to do with units running away from their position. This will still happen in both cases and is something different.

I don't really understand what cases you're meaning.

I talk about a new attack type which is bound to a point(maybe region). Whenever all enemies in range are killed your units return automatically to their position they have to defend for example. This would be a new kind of attack on a position. I thought that this is what Conzar had in mind.

Quote
But anyway, I guess this could be a configurable global or per-unit behaviour.

Yes, many of the discussed things can be made configuarble per techtree!
Per player is not a good idea in many cases, because in multiplayer server and client have to behave the same way. SO all settings effecting the unit movement for example are a no go to set tehm user specific.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios