Opened 12 years ago

Closed 12 years ago

#1310 closed enhancement (duplicate)

Make domestic herd animals capurable

Reported by: leper Owned by:
Priority: Should Have Milestone:
Component: UI & Simulation Keywords: simple
Cc: Patch:

Description (last modified by historic_bruno)

Domestic herd animals like sheep and goats should change ownership to the player with a unit in conversion range capable of converting said animal, if there are no enemy units in range.

  • To achieve this behaviour one should add a RangeQuery to the "ANIMAL" state in UnitAI.js.
  • The animal would become property of a player, and have their colour for it's selection ring

A code sample for the ownership change

  var cmpNewOwnership = Engine.QueryInterface(ent, IID_Ownership);
  cmpNewOwnership.SetOwner(cmpOwnership.GetOwner());
  • The animal can be recaptured by another player.

Some points that should already be this way (just used for reference/documentation)

  • The animal can only be tasked to move by the player who owns it
  • Any player (whether they own the animal or not) can stil kill and harvest from it.
  • Domestic animals created by the player (goats, sheep etc) should automatically be owned by that player

Note: #997 specifies some additional enhancements, but those are NOT needed for the completiton of this ticket.

Change History (6)

comment:1 by Kieran P, 12 years ago

Description: modified (diff)

comment:2 by Kieran P, 12 years ago

Description: modified (diff)

comment:3 by leper, 12 years ago

Description: modified (diff)

in reply to:  description comment:4 by Philip Taylor, 12 years ago

Replying to leper:

Domestic herd animals like sheep and goats should change ownership to the player that has the most units in visibility range of the animal (other animals shouldn't be counted).

If I remember correctly, the way it works in Age games is that an animal will only switch to player N if there is one (or more) unit from player N in range and no units from any other player. That seems better than picking whichever player has the greater number of units in range, since it will prevent animals behaving neurotically when e.g. near a battle where the relative number of units is changing frequently.

comment:5 by historic_bruno, 12 years ago

I agree that's simpler and also the behavior as described by #997. If it's based on numbers, it becomes like a "tug of war" over animals which is kind of silly.

Why should capturing animals be treated differently than capturing buildings or other units? They seem to share much of the same requirements.

Last edited 12 years ago by historic_bruno (previous) (diff)

comment:6 by historic_bruno, 12 years ago

Description: modified (diff)
Milestone: Backlog
Resolution: duplicate
Status: newclosed

Per IRC discussion I'm going to close this ticket for now as a duplicate of #997, otherwise we may end up with people working on separate solutions to the same problem and it's a slightly misleading separation (At first glance anyway, it seems capturing animals is almost identical to capturing other entities) I will link back to this ticket and copy relevant info for whoever begins working on #997.

Note: See TracTickets for help on using tickets.