Dropping a worker

Re: Dropping a worker

Postby Bertram » 08 Aug 2014, 10:08

Hi hwoarangmy,

I fear that with this kind of logic, they will all go to gold. Then, they will all claim then...
In fact, I think I would expect them to work more or less where they are. And definitely not to run all at the same task at the same moment.

I can understand the point. So if I understand, you're preferring when workers are choosing a new action when they have finished what they are doing, right?
(I mean in standard mode.)

In DK1, the creature AI is also checking whether "enough" workers are on some kind of action when dispatching them. Maybe that's something we could investigate.
I mean if you mark three reachable tiles to dig, only three workers should go and start digging, the rest would claim with the logic I propose.

Regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Dropping a worker

Postby hwoarangmy » 08 Aug 2014, 11:51

Bertram {l Wrote}:I can understand the point. So if I understand, you're preferring when workers are choosing a new action when they have finished what they are doing, right?
I mean OD is a strategy game. So, IMHO, I do not expect my creatures to behave perfectly if I do nothing. So if workers AI is not the most optimized, I would not take it as a bug.

Bertram {l Wrote}:In DK1, the creature AI is also checking whether "enough" workers are on some kind of action when dispatching them. Maybe that's something we could investigate.
I mean if you mark three reachable tiles to dig, only three workers should go and start digging, the rest would claim with the logic I propose.
That's something I had in mind, too. But I think it might be a problem with claiming. If you open a wall on some big empty space, for example, there will be plenty of tiles to claim and they might all go there. But that may not be what you want.

I would say that the current behaviour may be ok if its range was bigger (ie the workers go to dig even if they cannot see where you marked tiles).
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Dropping a worker

Postby Bertram » 08 Aug 2014, 13:07

Hi, :)

I mean OD is a strategy game. So, IMHO, I do not expect my creatures to behave perfectly if I do nothing. So if workers AI is not the most optimized, I would not take it as a bug.

Sure, even without such optimizations, players would still be able to build something, on that we agree. But you would expect them to act in a rather predictable way so you can plan ahead mentally.

That's something I had in mind, too. But I think it might be a problem with claiming. If you open a wall on some big empty space, for example, there will be plenty of tiles to claim and they might all go there. But that may not be what you want.

Well, here I must disagree. If a big new empty space is made available, your workers should claim it sooner or later whatever the logic behind, right? In DK1, if you open a big empty space, your workers do exactly that.
If that's not what you want, then you'd need to add a door and close it, or not dig from the start. But ok, we don't have doors support, yet. ;)

I would say that the current behaviour may be ok if its range was bigger (ie the workers go to dig even if they cannot see where you marked tiles).

On this we agree. I never claimed the behaviour should be perfect from the start and IMHO, this is the next step to add. :)

Regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Dropping a worker

Postby Akien » 08 Aug 2014, 13:18

Bertram {l Wrote}:
I would say that the current behaviour may be ok if its range was bigger (ie the workers go to dig even if they cannot see where you marked tiles).

On this we agree. I never claimed the behaviour should be perfect from the start and IMHO, this is the next step to add. :)

I agree. Yesterday was my first real attempt at actually playing the game, and I had trouble getting my workers to dig and expand my cave while they were busy claiming walls. The fact that I couldn't see marked tiles visually (most likely linked to issue 44 IIUC) did not help though :-)
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Dropping a worker

Postby hwoarangmy » 08 Aug 2014, 14:41

Bertram {l Wrote}:Well, here I must disagree. If a big new empty space is made available, your workers should claim it sooner or later whatever the logic behind, right? In DK1, if you open a big empty space, your workers do exactly that.
What I had in mind was calculating a score for each possible task. Something like (the coeficients are here only as an example):
- number of marked gold tiles * 2 (because it is the most important)
- number of marked dirt tiles * 1
- number of unclaimed accessible tiles * 1
- number of unclaimed claimable walls * 0.5
=> then, we just have to choose a task linking probability to each score.
The problem is for claiming. As we don't explicitely say what to claim, if you open a big area, all workers might stop gathering gold and everything to go claiming. Which is not what I would like. In fact, if I open a big space and I want to claim it, I will take some workers by hand and drop them. And that will be an easy task when we will have the creatures button to easily pick them (in this case, we should take the workers depending on their task => first idle, then claiming walls, ...)

Akien {l Wrote}:I had trouble getting my workers to dig and expand my cave while they were busy claiming walls
If you drop them next do diggable tiles, they should dig... Did they not ?
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Dropping a worker

Postby Akien » 08 Aug 2014, 14:56

hwoarangmy {l Wrote}:
Akien {l Wrote}:I had trouble getting my workers to dig and expand my cave while they were busy claiming walls
If you drop them next do diggable tiles, they should dig... Did they not ?

I must admit I wasn't sure that pick and drop was part of the gameplay, I thought of it as a dev feature, so I was expecting nearby workers to prioritize their work to guess what their evil lord wants them to do first :-)

I never really played DK, but maybe pick'n'drop was part of its gameplay? My closest gameplay experience would be Dwarf Fortress, where the action prioritization seems quite advanced but only quite hard to manage, sometimes one would like to be able to pick a dwarf and force him to do what you want :-p
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Dropping a worker

Postby Bertram » 08 Aug 2014, 15:10

What I had in mind was calculating a score for each possible task. Something like (the coeficients are here only as an example):
- number of marked gold tiles * 2 (because it is the most important)
- number of marked dirt tiles * 1
- number of unclaimed accessible tiles * 1
- number of unclaimed claimable walls * 0.5
=> then, we just have to choose a task linking probability to each score.

Yes, looks fine also. And may make it look less robotic. I'd request the coefficients reflect the objectives order discussed earlier, then. :)

The problem is for claiming. As we don't explicitely say what to claim, if you open a big area, all workers might stop gathering gold and everything to go claiming. Which is not what I would like. In fact, if I open a big space and I want to claim it, I will take some workers by hand and drop them.

With the coefficient system, this may happen, as the number of claimable tiles would explode. Thus, this should be tainted by the distance from the tile maybe, IMHO.
With what was discussed earlier, I though that if the workers don't stop their task immediately if another one is available (unless attacked), this case will work, right?

I must admit I wasn't sure that pick and drop was part of the gameplay, I thought of it as a dev feature,

In every DK I played, it was a way to force one worker to do something, so yeah, it's part of the gameplay. :)
You could even slap them to make them go quicker for a few seconds. :twisted: </evil-mode>

And that will be an easy task when we will have the creatures button to easily pick them (in this case, we should take the workers depending on their task => first idle, then claiming walls, ...)

Eh eh. Yes.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Dropping a worker

Postby Danimal » 08 Aug 2014, 15:40

Hi guys; i get a bit lost in all your conversation but the one thing i have clear is that workers should stick to their given by hand work; they should only auto-choose on priorities when they are working by themselves, thats its not being ordered dropped near something. Why? Because sometimes you will want a wall fortified rather than gold mined or claimed tiles, your life can depend on cutting a route for a hero group or claiming a path to a special. Outside of that, distance and priority would be good parameters for deciding

Edit: we are getting slaps as well in the future, dont doubt it :cool: we alredy have a pretty cool hand ready to replace windows mouse arrow
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Dropping a worker

Postby Bertram » 13 Aug 2014, 08:35

Hi Danimal, :)

Following one of the latest hwoarangmy's patch, the workers are more reliable when dropped now. Taken from here:
https://github.com/OpenDungeons/OpenDun ... e.cpp#L797
{l Code}: {l Select All Code}
// If a worker is dropped, he will search in the tile he is and in the 4 neighboor tiles.
// 1 - If the tile he is in is treasury and he is carrying gold, he should deposit it
// 2 - if one of the 4 neighboor tiles is marked, he will dig
// 3 - if the the tile he is in is not claimed and one of the neigbboor tiles is claimed, he will claim
// 4 - if the the tile he is in is claimed and one of the neigbboor tiles is not claimed, he will claim
// 5 - If the tile he is in is claimed and one of the neigbboor tiles is a not claimed wall, he will claim


When the next rolling release is out, feel free to test all that! :)

Edit: we are getting slaps as well in the future, dont doubt it :cool: we alredy have a pretty cool hand ready to replace windows mouse arrow

Is everyone ok to add the hand in game? If so, I'll open an issue on github so we don't forget about it.

Regards,
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Dropping a worker

Postby hwoarangmy » 13 Aug 2014, 12:56

We can always open the issue for later. If the cursor is nice, no reason to not use it :)
hwoarangmy
 
Posts: 567
Joined: 16 Apr 2014, 19:13

Re: Dropping a worker

Postby Bertram » 13 Aug 2014, 13:01

Ok, I opened the issue.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Re: Dropping a worker

Postby Danimal » 13 Aug 2014, 13:20

Keeperhand is the name and is already included (and animated) since a long time by Skorpio
User avatar
Danimal
OD Moderator
 
Posts: 1407
Joined: 23 Nov 2010, 13:50

Re: Dropping a worker

Postby Bertram » 13 Aug 2014, 15:13

Yep, I added a link to it in the issue.
User avatar
Bertram
VT Moderator
 
Posts: 1652
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: Bing [Bot] and 1 guest