You must be logged in to post messages.
Please login or register

Pharaoh: Game Help
Moderated by VitruviusAIA, Gweilo

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Storage Yard (destination walker's) start, finish, and 'entry' squares
posted 08-23-08 13:02 ET (US)   
Having taken up the challenge of Brugle to discover the truth beneath the strange (unexpected) behaviour of Dock Cart Pushers in my Rostja (explained in Strange behaviour of Dock CPs delivering to SYs)...

[I will refer to a 'Cart Pusher' as 'CP' (to remain grammatically correct, for the plural I will add an 's' (although i hope most would get that!!))]

[When i refer to the tile a CP will 'enter' a Storage Yard this is the tile where the transaction of goods will occur. For example when a Dock CP goes to a Storage Yard, it is the tile that he will stop on where you see the goods disappearing from the Storage Yard and appearing on his Cart. (This is not to be confused with the tile where a CP from a Storage Yard is spawned or returns to.)]

[All diagrams are oriented with North diagonally up-left.]

[unless mentioned specifically when i refer to a CP it will be from either a dock, granary, or storage yard.

All information below is what i have discovered on my own game (V. 1.2 non-cleo). I don't claim that it is all without falt (I may have missed an important point) but i hope that the bulk of it is correct. Any comments and ideas would be gladly received.

***********************************************


Dock CPs delivering/getting from a storage yard



The prefered square of 'entry' for a dock CP is as follows:

.1 2 3 .
12SY4
115
106
.9 8 7 .


As a dock CP is a destination walker it can pass through as many roadblocks as it needs to, to get to its target square of 'entry', as long as that square is unroadblocked.

Storage Yard
Dock

Legend

(In this example, the dock CP would 'enter' the storage yard at the top right square (east).)

However, under certain circumstances, a dock CP may deliver/get from its favoured square of 'entry' whether it is roadblocked or not. This only occurs when there is an unroadblocked road tile on either square 1 or 12. This is thanks to the strange behaviour of a storage yard (pointed out to me by Trium3) where there is a 1x1 'active' building (the most northern tile) and eight squares of 'open' storage space. The 1x1 building seems to have special effects on the entire storage yard.

Storage Yard
Dock

Legend

In this example, the dock CP would 'enter' the storage yard at the top right square (east) even though it is roadblocked because square number 12 has a road tile present and is unroadblocked.

In addition to this, tiles 1 or 12 do not need to be connected to the dock for dock CPs to ignore roadblocked squares. This road system would work just as well:

Storage Yard
Dock

Legend

The dock CP would 'enter' the storage yard at the roadblocked square because square 1 has an unroadblocked road tile on it.

[EDIT: If there is an unroadblocked, unconnected, road tile on any square, other than 1, or 12, a dock CP will be generated but will then immediately disappear.]

So now, everyone smashing their mouse down in anger because dock CPs are entering at an unexpected location can understand why.

How can this be useful?

Because the generation of a labor seeker (still refering to storage yards), and the 'entry' of a dock CP are entirely unconnected, one can have his labor seeker going to 'find' people to work on a completely separate road network to that which the dock CP is travelling along to 'enter' the storage yard. For example:

Apartment
Storage Yard Storage Yard
Storage YardDock
Fire Warden
Architect
Apartment

Legend


In this example, a labor seeker for the top-left (northernmost) storage yard would be generated along the top road heading up (north-east) to the house, while the dock CP would 'enter' the storage yard at the roadblock.

Ofcourse, normally one would simply delete the road with the roadblock on it and drop the left-hand side (north-west) storage yards down a tile so that the labor seeker would head towards the house in the bottom-left (west), but if one were looking for a very efficient docking area, then this set-up would improve dock efficiency.

All these rules apply to dock CPs that are both collecting goods and delivering goods to the storage yard.


Storage yard CP start and finish points



So finally I have, I hope, figured out the other side to the storage yard.

The three 'types' of CP generated by a storage yard are:

1) 'getting'
2) emptying
3) delivering

(I hope that the names speak for themselves)

This is the prefered (non-roadblocked) start square for all three of these types of walker

.1 2 3 .
12SY4
115
106
.9 8 7 .


However, there is a complication. If there are two or more unconnected road networks that touch the storage yard, the game will decide which one is longest and will generate the CP on the square that touches the storage yard, conneted to the chosen road network (regardless of prefered square). Of course if the chosen road network touches the storage yard at multiple points then the normal sequence of prefered squares will decide which square (on the selected network) the CP is generated on. (This does apply to all three types of walker that I mentioned above).

With a 'getting' CP this information is arbitrary (unless distance travelled is of severe importance) as the CP will travel cross country to his detination. However, with the two other types of walker that I mentioned the starting tile is of much more importance.

So for an example:

BreweryStorage Yard
Storage Yard

Legend

In this example there are two storage yards and a brewery. We are concerned about the storage yard with the different road networks connected to it. (I have tried to keep it simple but of course real road networks could be much more complex)

The longest network is the one to the left (heading north-west). Therefore the CP would be generated on square 10 (even though the other storage yard and brewery are on the other road network). This would be catastrophic if the CP was of the emptying or delivering type as he would never be generated on the top (north-east) road network. So be warned.


All of this information applies to the finish points as well. The only thing that I can add is that, if you delete the start square after the CP has been generated, but before it reaches its destination:

1) For 'getting' CPs: then it will return by the fastest route (whether that be cross-country or by road)

2) For emptying CPs: then it will still return (following the path it took) to the tile it was generated on. (Even if all road tiles between the source storage yard and the destination are deleted.

3) For delivering CPs: then it will disappear after delivering what it was carrying.


Roadblocks can become ignored in the selection of the start square if another road network (even if it is one tile) touching the storage yard is unconnected and shorter than the road network you want the CP to be generated on (no matter which tile it is connected to the storage yard on).

For example:

Storage Yard
Brewery

Legend

In this example there are two unconnected road networks, one two tiles long, the other, twelve tiles long. The CP would be generated on the bottom (south-west) road network because it is longer. The unconnected road network to the left (north-west) mean that roadblocks are ignored in the selection for the start square, so the CP would be generated on top of the roadblock on square 7.

I can't really think of how this could be of use to players, but I know that it will explain CPs being generated on tiles that players weren't expecting.


As always, the critical view is accepted, although i hope it is mainly about language rather the information.

****************************************************
[EDIT] Above is a copy of reply 7 detailing everything I discovered about this subject. Below is my original post maintained so that anybody trying to follow this thread can do so. Of course, all replies relate to the original post, not what is written above!
****************************************************

Prefered tile of 'entry' for all CPs.

.1 2 3 .
12SY4
115
106
.9 8 7 .


roadblocking the prefered tile does not affect the operation. This is true for CPs from connected or disconnected storage yards.

If none of these squares are available then the storage yard CP will take the most direct route to the storage yard in question and 'enter' on the most direct, non-corner, tile.

Storage Yard CP start and finish square

A storage yard will spawn a CP to either 'get' a good from either a granary or another storage yard, or to deliver a raw material to a building to be processed into a finish product (such as clay to be taken to a potter to be turned into pottery). The diagram below shows the prefered squares for both the start and finish squares of a storage yard CP, 'getting' or delivering a good.

.1 2 3 .
12SY4
115
106
.9 8 7 .


[N.B. it is the same diagram as above]

When a storage yard CP is 'getting' a good from either a granary or another storage yard, it has has three phases (determined by me only for the sake of this post (the actual algorithm may be more complex than this)):

1) outbound journey
2) collecting the good ('entering')
3) return journey

If the finish square of the storage yard CP is deleted before the second phase (collecting the good) then the storage yard CP will return by the shortest route (possibly cross country) to its original finish square.

When a storage yard CP is delivering a good to an industrial building (this may be true for when it is set to 'empty' (but i haven't tested it)) such as a potter it has the same three phases (agian determined by me only for the sake of this post...). If the finish square is deleted before it has delivered ('entered') the building, the storage yard CP will deliver its good ('enter') and then disappear. The next storage yard CP will be spawned after the same 'gap' has passed as if the storage yard CP had returned to the storage yard.


I haven't tested any of these senarios with a granary CP, but i would assume it to be the same.

If i have made any errors please feel free to make them known as i would hate to be giving false information.

[This message has been edited by Cantique (edited 10-30-2010 @ 12:54 PM).]

Replies:
posted 08-23-08 18:05 ET (US)     1 / 12  
The preffered tile can be roadblocked.
What does this mean? Does it mean that roadblocking does not affect the operation, or that it does? I assumed that you meant that it did not affect which tile is selected, but it does. I just checked a storage yard with connections at your points 7, 8, 9, and 10, and dockers delivered to it at the lowest-numbered non-roadblocked tile.
If none of these squares are available then the storage yard CP will take the most direct route to the storage yard in question and 'enter' on the most direct, non-corner, tile.
What does this mean? If none of those squares are available then there is no non-corner tile available.
posted 08-24-08 05:55 ET (US)     2 / 12  
The preffered tile can be roadblocked.
What does this mean? Does it mean that roadblocking does not affect the operation
Yes. sorry if it was not clear, I will edit my original post.
I just checked a storage yard with connections at your points 7, 8, 9, and 10, and dockers delivered to it at the lowest-numbered non-roadblocked tile.
Brugle, you are absolutely correct. I just checked by having connections from dock to storage yard on only tiles 7, 8, 9, 10, 11, and 12, but placing roadblocks on all those tiles except 9. As you said, the dock CP 'entered' at tile 9 (the only tile without a roadblock). However, I know that i have seen dock CPs 'enter' a storage yard on a roadblocked tile.

After a bit of playing about I got the surprise of my life...

it seems, that a dock CP (I haven't yet checked if this is true with other CPs) will 'enter' on its prefered tile (roadblocked, or not) only if tile 1, or 12 are not roadblocked, and not connected to the dock.

this may seem complicated so i will put it another way. (i would put all this in another post but can't so here i go.

Brugle's random walker start and finish points thread, shows that a storage yard labor seeker's prefered starting square is:

.1 3 4 .
2 S.Y.5
126
117
.109 8 .


How are a storage yard labor seeker's prefered starting square, and prefered square of 'entry' for a dock CP linked?

Well, if tile 1, or 2 (labor seeker's prefered tile) are not roadblocked and are disconnected from the dock, then a dock CP will 'enter' on his prefered tile regardless of roadblocks.
If none of these squares are available then the storage yard CP will take the most direct route to the storage yard in question and 'enter' on the most direct, non-corner, tile.
What does this mean? If none of those squares are available then there is no non-corner tile available.
Sorry if i didn't make this clear. What i mean is that he will enter on the closest peice of ground (as there is no road tile)

I am still a long way from fully understanding this suubject and it will require much more work to properly get round it. but for the mean time I have this.

Any more critical points would be gladly received.

[This message has been edited by cantique (edited 08-24-2008 @ 05:59 AM).]

posted 08-24-08 12:59 ET (US)     3 / 12  
I'm not sure I'm following this, but it may help to understand some of the oddities about storage yards if you realize that the yard is really a composite of nine buildings - a 1x1 'active' building composited with 8 tiles of 'inert' space. Only the northern tile spreads desirability, for example.

In your diagrams, tiles 2 and 12 are the only ones connected to the active part of the building. Roadblocking these might well be expected to affect the operation of the building as a whole, though I can't offer a detailed explanation since I don't fully understand what you are describing


I'm actually surprised that tile 12 is the least preferred, but I haven't checked and I'm sure you have.

Incidentally, we seem to be suffering from a problem with links dumping us at the forum index instead of opening the thread. If you could edit your first post to name the thread in the link (instead of just the word "here") readers may be able to find it themselves until this is fixed.
posted 08-24-08 13:20 ET (US)     4 / 12  
In your diagrams, tiles 2 and 12 are the only ones connected to the active part of the building.
I suppose you mean tiles 1 and 12.
posted 08-24-08 14:33 ET (US)     5 / 12  
Trium3, I have edited my post to give the name of the thread that I linked to, however I think it is working again so it should be all right.
the yard is really a composite of nine buildings - a 1x1 'active' building composited with 8 tiles of 'inert' space.
That would help explain a lot. Like why roadblocks don't affect the 'entry' square when tiles 1 or 12 have road on them.

I think i'm beginning to get a grasp on this whole topic and will post a reply with all the information i have gathered as soon as possible. (now that the weekend is over that may be a while.)
posted 08-24-08 19:27 ET (US)     6 / 12  
I suppose you mean tiles 1 and 12
Oops. Indeed I do

Cantique - yes, the link seems to work properly now. I've had that problem before - don't know if it's just me, or maybe site maintenance

[This message has been edited by Trium3 (edited 08-24-2008 @ 07:29 PM).]

posted 08-25-08 13:00 ET (US)     7 / 12  
I think I can now put everything i know into one post. So here goes!

(Note: All diagrams and glyphs are oriented so North is diagonally up-left)


Dock CPs delivering/getting from a storage yard



The prefered square of 'entry' for a dock CP is as follows:

.1 2 3 .
12SY4
115
106
.9 8 7 .


As a dock CP is a destination walker it can pass through as many roadblocks as it needs to, to get to its target square of 'entry', as long as that square is unroadblocked.

Storage Yard
Dock

Legend

(In this example, the dock CP would 'enter' the storage yard at the top right square (east).)

However, under certain circumstances, a dock CP may deliver/get from its favoured square of 'entry' whether it is roadblocked or not. This only occurs when there is an unroadblocked road tile on either square 1 or 12. This is thanks to the strange behaviour of a storage yard (pointed out to me by Trium3) where there is a 1x1 'active' building (the most northern tile) and eight squares of 'open' storage space. The 1x1 building seems to have special effects on the entire storage yard.

Storage Yard
Dock

Legend

In this example, the dock CP would 'enter' the storage yard at the top right square (east) even though it is roadblocked because square number 12 has a road tile present and is unroadblocked.

In addition to this, tiles 1 or 12 do not need to be connected to the dock for dock CPs to ignore roadblocked squares. This road system would work just as well:

Storage Yard
Dock

Legend

The dock CP would 'enter' the storage yard at the roadblocked square because square 1 has an unroadblocked road tile on it.

[EDIT: If there is an unroadblocked, unconnected, road tile on any square, other than 1, or 12, a dock CP will be generated but will then immediately disappear.]

So now, everyone smashing their mouse down in anger because dock CPs are entering at an unexpected location can understand why.

How can this be useful?

Because the generation of a labor seeker (still refering to storage yards), and the 'entry' of a dock CP are entirely unconnected, one can have his labor seeker going to 'find' people to work on a completely separate road network to that which the dock CP is travelling along to 'enter' the storage yard. For example:

Apartment
Storage Yard Storage Yard
Storage YardDock
Fire Warden
Architect
Apartment

Legend


In this example, a labor seeker for the top-left (northernmost) storage yard would be generated along the top road heading up (north-east) to the house, while the dock CP would 'enter' the storage yard at the roadblock.

Ofcourse, normally one would simply delete the road with the roadblock on it and drop the left-hand side (north-west) storage yards down a tile so that the labor seeker would head towards the house in the bottom-left (west), but if one were looking for a very efficient docking area, then this set-up would improve dock efficiency.

All these rules apply to dock CPs that are both collecting goods and delivering goods to the storage yard.


Storage yard CP start and finish points



So finally I have, I hope, figured out the other side to the storage yard.

The three 'types' of CP generated by a storage yard are:

1) 'getting'
2) emptying
3) delivering

(I hope that the names speak for themselves)

This is the prefered (non-roadblocked) start square for all three of these types of walker

.1 2 3 .
12SY4
115
106
.9 8 7 .


However, there is a complication. If there are two or more unconnected road networks that touch the storage yard, the game will decide which one is longest and will generate the CP on the square that touches the storage yard, conneted to the chosen road network (regardless of prefered square). Of course if the chosen road network touches the storage yard at multiple points then the normal sequence of prefered squares will decide which square (on the selected network) the CP is generated on. (This does apply to all three types of walker that I mentioned above).

With a 'getting' CP this information is arbitrary (unless distance travelled is of severe importance) as the CP will travel cross country to his detination. However, with the two other types of walker that I mentioned the starting tile is of much more importance.

So for an example:

BreweryStorage Yard
Storage Yard

Legend

In this example there are two storage yards and a brewery. We are concerned about the storage yard with the different road networks connected to it. (I have tried to keep it simple but of course real road networks could be much more complex)

The longest network is the one to the left (heading north-west). Therefore the CP would be generated on square 10 (even though the other storage yard and brewery are on the other road network). This would be catastrophic if the CP was of the emptying or delivering type as he would never be generated on the top (north-east) road network. So be warned.


All of this information applies to the finish points as well. The only thing that I can add is that, if you delete the start square after the CP has been generated, but before it reaches its destination:

1) For 'getting' CPs: then it will return by the fastest route (whether that be cross-country or by road)

2) For emptying CPs: then it will still return (following the path it took) to the tile it was generated on. (Even if all road tiles between the source storage yard and the destination are deleted.

3) For delivering CPs: then it will disappear after delivering what it was carrying.


Roadblocks can become ignored in the selection of the start square if another road network (even if it is one tile) touching the storage yard is unconnected and shorter than the road network you want the CP to be generated on (no matter which tile it is connected to the storage yard on).

For example:

Storage Yard
Brewery

Legend

In this example there are two unconnected road networks, one two tiles long, the other, twelve tiles long. The CP would be generated on the bottom (south-west) road network because it is longer. The unconnected road network to the left (north-west) mean that roadblocks are ignored in the selection for the start square, so the CP would be generated on top of the roadblock on square 7.

I can't really think of how this could be of use to players, but I know that it will explain CPs being generated on tiles that players weren't expecting.


As always, the critical view is accepted, although i hope it is mainly about language rather the information.

[This message has been edited by cantique (edited 08-27-2008 @ 02:30 PM).]

posted 08-25-08 15:30 ET (US)     8 / 12  
the strange behaviour of a storage yard ... where there is a 1x1 'active' building ... and eight squares of 'open' storage space
Not strange--almost expected, given the way that a storage yard stores goods. (I didn't expect that an unroadblocked road touching the storage yard's N tile would cause a different roadblocked tile to be used, but it sort of fits into the rest of the game's programming.)
tiles 1 or 12 do not need to be connected to the dock for dock CPs to ignore roadblocked squares ... one can have his labor seeker going to 'find' people to work on a completely separate road network to that which the dock CP is travelling along to 'enter' the storage yard
Only if the road network that the docker uses has more tiles than the road network touching the storage yard's N tile. Unless you either understand the implications of unconnected road networks (I don't) or run tests to see what happens, I recommend not letting unconnected road networks touch buildings unless you do not care which road network walkers use for the building.

It turns out that both your examples with unconnected roads work as intended, but wouldn't if the road network touching the storage yard's N tile was several tiles longer. (I saw that by testing.)
How can this be useful?
The example of unconnected roads is contrived. However, it is often useful to know which road tile a docker will use. The thread linked from the opening post has a good example of a docker taking a shorter route to a roadblocked tile. My Baki has an example of a docker taking a shorter route (to the bricks/wood storage yard) because it does not use the roadblocked tiles.

[This message has been edited by Brugle (edited 08-25-2008 @ 03:34 PM).]

posted 08-25-08 16:16 ET (US)     9 / 12  
Brugle, thanks for the quick reply.
Only if the road network that the docker uses has more tiles than the road network touching the storage yard's N tile.
Wow. I didn't know that. During testing I just added on a short stretch of unconnected road to tile 1 (in my diagrams) and looked at what happened. I don't like the idea that the game's algorithm will look at entire road networks to compare the length and decide if the dock road network is longer (to allow roadblocks to be ignored) or shorter (to not allow roadblocks to be ignored).
Unless you either understand the implications of unconnected road networks (I don't) or run tests to see what happens
I presume that you are talking about the start, finish and 'entry' points of CPs other than the dock CP. I plan to test this out (when i have time) and add it to my post, now that I have been made to rethink my point about tile 1 or 12 being unconnected. I would presume that all CPs 'entering' the storage yard would follow the same rule as a dock CP (but don't hold me to it), and that the start and finish points of a storage yard's CP would be the same as a dock CP's (but not have the added rule of tile 1 or 12 affecting the prefered square).

I hope to get back soon with this information. (I will post a message to bump the thread when i edit my post.)
I recommend not letting unconnected road networks touch buildings unless you do not care which road network walkers use for the building.
Ofcourse, normally I wouldn't, however in this case as the only random walker that a storage yard generates is its labor seeker, so long as I have housing on the unconnected stretch of road, it would be safe to do this. However, in light (en lieu?) of what you have written about road network length afecting if dock CPs will in fact use a roadblocked square for 'entry' I may be more careful implementing this strategy. (If I ever do. It seems to me to be one of these things that is worth knowing, rather than trying to forcibly implement it into a city.)
My Baki has an example of a docker taking a shorter route (to the bricks/wood storage yard) because it does not use the roadblocked tiles.
I just couldn't resist having a look!
posted 08-25-08 18:04 ET (US)     10 / 12  
I find some aspects of your results surprising.

I don't think it is generally held that the game actually examines two road networks on demand to see which is the largest. The more likely scenario is that the game maintains separate arrays (or perhaps 'linked lists') of connected locations. In determining whether two locations are connected the game then needs only to check if they are in the same list, without needing to actually find a route.

I've always assumed that when adding a building which touches more than one network the game is forced to choose one list over the other(s) and arbitrarily chooses the largest. I would therefore have expected that if the game decides your SY is connected to the house to the north it could not simultaneously see it as connected to the dock, so I am surprised that it can make use of two unconnected networks. However, it is a composite building ... hmmm.

I would have a couple of questions - what does the labor seeker do at the end of his walk? Does he return to the SY normally or does he vanish? And while you comment:
I would presume that all CPs 'entering' the storage yard would follow the same rule as a dock CP (but don't hold me to it),
what about non-roadbound pushers? Which network do they think the building belongs to? And where does the SY's own cartpusher spawn if delivering/getting goods? Presumably he SY could not deliver to (say) a workshop on the road towards the house?

I realize you have some of those questions on your to-do list and I await your findings with interest
posted 08-25-08 18:30 ET (US)     11 / 12  
the game's algorithm will look at entire road networks to ... decide ... (to allow roadblocks to be ignored) or ... (to not allow roadblocks to be ignored)
As far as I can tell, the game does not look at road networks to decide about roadblocks--it sometimes looks at unconnected road networks to decide which one to use. In this case, when given a choice of tiles on unconnected road networks touching a storage yard, a docker apparently chooses a tile on the longer road network.
I presume that you are talking about the start, finish and 'entry' points of CPs other than the dock CP.
No, I am talking in general.
I would presume that all CPs 'entering' the storage yard would follow the same rule as a dock CP
I would presume not. I don't know about Pharaoh, but in Caesar III the rules are different for dockers, for cart pushers from other warehouses (storage yards) getting from the warehouse, for market (bazaar) buyers, and maybe for others. I think that C3 cart pushers from producers (workshops, farms, etc.) delivering to warehouses follow the same rules as dockers. Pharaoh could, of course, be different.
the start and finish points of a storage yard's CP would be the same as a dock CP's (but not have the added rule of tile 1 or 12 affecting the prefered square)
If one set of cart pushers has an additional rule and another set doesn't, then their rules are different, no?
in this case as the only random walker that a storage yard generates is its labor seeker, ...
In this case, it's not random walkers I am concerned about, it's dockers.
what you have written about road network length afecting if dock CPs will in fact use a roadblocked square
Sorry for being misleading. As far as I know, road network length does not affect decisions about roadblocks, it only affects decisions about which road network to use. In your cases, the storage yard touched a roadblocked tile on one network and a non-roadblocked tile on the other.
posted 08-27-08 14:26 ET (US)     12 / 12  
This post is to bump the thread. I have edited post #7 to include the start and finish points of storage yard CPs under a new heading. I have also edited the post in the 'how can this be useful?' section (in the EDIT tag). I hope all the information is correct however it is very possible that I have made some blunders.

[This message has been edited by cantique (edited 08-27-2008 @ 02:29 PM).]

Caesar IV Heaven » Forums » Pharaoh: Game Help » Storage Yard (destination walker's) start, finish, and 'entry' squares
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Caesar IV Heaven | HeavenGames