Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4672 closed enhancement (wontfix)

Smarter workers

Reported by: Wildcat26 Owned by:
Priority: Nice to Have Milestone:
Component: UI & Simulation Keywords:
Cc: Patch:

Description

Worker tasks could be automated to allow the player to focus more on strategy than micro-managing idle workers, making the game more fun. For example, if a worker is idle, waiting for direction from the player, and also carrying resources, they could automatically deliver those resources to the closest drop site.

Change History (4)

comment:1 by elexis, 7 years ago

Keywords: idle workers removed
Milestone: Backlog
Resolution: wontfix
Status: newclosed

There are two hotkeys to find idle units @wiki HotKeys

A player should always queue actions, like rightclick a dropsite and then shift rightclick the next resource, or shift rightclick many houses.

Units should not start to do things on their own if they became idle. It should be possible to put them at one place and have them stay there.

For example they might be behind an enemy city and would then just start walking to the dropsite on the other side of the map.

Micro-management is what distinguishes a good player from a better player. Repetitive task should still be reduced, but not this way IMO. It could be discussed on the forums where more players read things. We should have a ticket only for exact task descriptions.

comment:2 by Wildcat26, 7 years ago

Okay, thank you for the quick reply, elexis.

I could look into this on the forums instead of adding the idea to a ticket, and would also have to modify this tweak to "IDLE" in UnitAI.js to limit the drop site search range, avoiding the scenario you mention of otherwise idle workers crossing the map to drop off resources.

// if we're carrying anything then we should drop it off
var cmpResourceGatherer = Engine.QueryInterface(this.entity, IID_ResourceGatherer);
var genericType = cmpResourceGatherer.GetMainCarryingType();
if (genericType != null)
{
	var nearby = this.FindNearestDropsite(genericType);                    
	if (nearby)
	{
		this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
		return true; // (abort the FSM transition since we may have already switched state)
	}
}				

comment:3 by elexis, 7 years ago

Well if you're able to put together an actually working patch we might reconsider, but I'm skeptical that we will agree with units doing things without having received commands. mimo and fatherbushido have a valuable input on such simulation patches (in case you write a forum post, ping them with @nickname).

comment:4 by Wildcat26, 7 years ago

The mod is working as I originally envisioned, but with your valuable feedback I've posted about this on the forum under Suggestions for 0 A.D.

Note: See TracTickets for help on using tickets.