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

Pharaoh: Game Help
Moderated by VitruviusAIA, Gweilo

Hop to:    
Welcome! You are not logged in. Please Login or Register.12 replies
Caesar IV Heaven » Forums » Pharaoh: Game Help » Invisible random walkers (and work camp laborers)
Bottom
Topic Subject:Invisible random walkers (and work camp laborers)
Trium3
Pleb
posted 01-10-09 11:31 ET (US)         
This is another of my 'useless information' posts, aimed only at readers who share my fascination with the deeper workings of these games. Nothing herein changes any 'rules' that have been established in the past and it is offered just for interest.

As is commonly known, most of the game's systems are tied to a 'cycle' of 51 'ticks' (small increments in sprite positions observable when running at slowest speed) and that there are 16 such cycles in a game month. On a particular tick in each cycle all production figures (percent complete) are updated. On a (different) particular tick in each cycle all cartpushers who are ready to spawn will do so. I had noticed that fire marshalls and architects spawn 2 ticks later than most walkers, and I believed (wrongly) that policemen spawned 17 ticks later.

I became puzzled when I was trying to synchronize two fire marshals and couldn't get them to spawn on the same 'tick', so I investigated (being one for noseying around in every corner).

In Brugle's Random walker start and finish points he describes the normal starting points for 'common' random walkers. The basic rule is that they spawn on the first non-roadblocked squarely adjacent tile encountered when starting NE of the northern tile and rotating clockwise. Brugle then goes on to describe some exceptions to this rule.

I have not looked at entertainers nor temple complexes, but in fact all other buildings observe this rule, and all walkers spawn on the same tick (actually, I'd better say 'most' ). What we have with architects, fire marshals, policemen, magistrates and tax collectors is a class of walker which spawns invisibly, then spends 2 ticks determining what to do next (which explains why an architect is often observed to spawn 2 ticks behind other walkers). You might be able to detect his presence by right-clicking in the vicinity of the building, or by holding a (unplaced) plaza tile over the road.

But that is not the end of the story. He then walks, still invisible, to the building's destination tile (though obviously not if he is already standing on it), which may be roadblocked. Only then do they cast off their veil and start a visible walk. Thus according to the configuration, the actual appearance of one of these walkers is delayed by 2, 17, 32 or 47 'ticks' relative to other (common) walkers.

Fire marshals and architects are a bit different. Instead of heading for the destination square they head instead for the square that they would have started on if it had not been roadblocked (I suspect something was changed here - if marshals and architects behaved like the other 'invisible' spawners they would start from the same tiles that their C3 equivalents do). But they still need an unblocked tile to start from.

Brugle did not deal with workcamps (because they are not random walkers) but laborers also exhibit this behaviour. They spawn invisibly at the same time as 'normal' walkers but appear 2 to 47 'ticks' later depending on whether they have to walk to a destination square first. Consider the following:

Work Camp Work Camp
Legend

In the left diagram (north is up-left) the laborer appears on the plaza tile, but actually spawns on the adjacent road tile. He appears 17 'ticks' after spawning. In the diagram on the right, he still appears on the plaza tile but delays by 15 'ticks' because the roadbloack forces him to spawn invisibly one tile further away from his eventual starting point. He appears 32 'ticks' after spawning and thus arrives at his job a little later. It's a trivial point, but in the case of a floodplain farm, all depending on timing, this may lose you one production cycle on some farms, which may lose a percentage point (8 units of product for each farm affected).

Here's another diagram:

Work Camp

Here the laborer spawns invisibly on the plaza tile on the horizontal road, but walks to the plaza tile on the vertical road before becoming vivible. He does so in a straight line, going through the building itself, and so takes three tiles of travel to get there. If the building were to emit a labor seeker simultaneously, the laborer would appear 47 ticks 'late'

Note that for all purposes I can think of (default walk lengths, maximum distances workcamp to farm, etc) it is the tile on which the walker becomes visible that is relevant, not the tile on which he first spawns. The only effect is to delay the appearance of the walker.

AuthorReplies:
Brugle
HG Alumnus
posted 01-10-09 13:09 ET (US)     1 / 12       
Trium3,
This explains a (minor) Caesar III puzzle, described in Is there a way to disable building collapses? (with "spawn" in that thread meaning "becoming visible"). After making a mistaken reply (and being corrected by Trurl aka lemmus), I make some crude observations similar to yours (although not your explanation) for C3 engineers in the second-to-last paragraph of reply #5.
Trium3
Pleb
posted 01-10-09 13:37 ET (US)     2 / 12       
Ah, I somehow knew it wouldn't be entirely new. I've read that thread before (I remember the map-editing discussion) but the bit about invisible engineers didn't stick.

I forgot to mention - those same walker types do not end their walks in the same way as others either. Visually, they turn to face their building's northern tile before vanishing (I don't remember if C3 walkers also do this). They are still present for as long as it would take to reach the northern tile from the point where they vanish. Presumably they are not considered to be back in their building while this is going on and it could result in them missing an expected re-spawn 'tick', further adding to Trurl's synchronization problem.
viazad
Pleb
posted 01-10-09 13:58 ET (US)     3 / 12       
Legend
Legend is actually here, since "forum merging" or what it was, years before me. Wasn't so trivial to find for a newb.

excuse my weird English for i hadn't a chance to say one English word to a person since school-time, and i shouldn't suppose myself understandable, but for some paranoid reason i believe anyone on the Web can read my mind.
Trium3
Pleb
posted 01-10-09 14:56 ET (US)     4 / 12       
Thanks, viazad. I wasn't aware that the glyphy tool was generating the wrong link. Until someone fixes it I'll take care to hand edit it (or remove it altogether, like I did for the second diagram)
Brugle
HG Alumnus
posted 01-26-10 19:05 ET (US)     5 / 12       
Entertainers generated at an entertainment school behave similarly, as described in Entertainer going from school to venue start and finish points.
Brugle
HG Alumnus
posted 07-11-12 11:45 ET (US)     6 / 12       
Found 2 tiny mistakes here. [Actually, only 1.]

[Trium's explanation is correct. I don't know why I didn't understand it.] One is in the paragraph that starts "Fire marshals and architects are ". Fire marshals and architects (like other "invisible" random walkers) can start on a roadblocked tile, so I'd fix the problem by deleting the paragraph and changing the previous paragraph from "the building's destination tile" to something like "the tile where they start their visible walk".

The other [only!] error is "delayed by 2, 17, 32 or 47 'ticks'", which should also have 62 ticks, since magistrates may be delayed by that long.

[Added comments to show that 1 of the "mistakes" I saw wasn't a mistake.]

[This message has been edited by Brugle (edited 05-17-2016 @ 01:51 PM).]

andib2n
Pleb
posted 05-17-16 08:40 ET (US)     7 / 12       
Brugle did not deal with workcamps (because they are not random walkers) but laborers also exhibit this behaviour. They spawn invisibly at the same time as 'normal' walkers but appear 2 to 47 'ticks' later depending on whether they have to walk to a destination square first. Consider the following:

Work Camp Work Camp
Legend

In the left diagram (north is up-left) the laborer appears on the plaza tile, but actually spawns on the adjacent road tile. He appears 17 'ticks' after spawning. In the diagram on the right, he still appears on the plaza tile but delays by 15 'ticks' because the roadbloack forces him to spawn invisibly one tile further away from his eventual starting point. He appears 32 'ticks' after spawning and thus arrives at his job a little later. It's a trivial point, but in the case of a floodplain farm, all depending on timing, this may lose you one production cycle on some farms, which may lose a percentage point (8 units of product for each farm affected).

Here's another diagram:

Work Camp


Here the laborer spawns invisibly on the plaza tile on the horizontal road, but walks to the plaza tile on the vertical road before becoming vivible. He does so in a straight line, going through the building itself, and so takes three tiles of travel to get there. If the building were to emit a labor seeker simultaneously, the laborer would appear 47 ticks 'late'
How to figure out where the laborer spawns invisibly and where he becomes visible. I wish you can put numbers around the building, like Brugle did in his topic random walker start and finish points. I can see a logic in the 1st example, although I have no idea he spawns there but I expect where he becomes visible. It's like random walkers in Burgle's post. But I lose in the 2nd example. From random walker's logic he should become visible and start his journey on a SE road-tile (#5 in Burgle's numbering). But actually he spawns there and becomes visible on a road-tile touching the N-corner. I know it's correct, because I tested it, but I don't know why.

Another question about workcamp's laborers. In other topic you wrote, a workcamp generate a laborer every 4 workdays (1 workday = 1/16 month). Let's say the workcamp generates a laborer in the 1st workday (the 2nd will be generated in the 5th workday and ...) but the laborer is invisible. He waits 2 ticks then goes to the building's destination tile (15 ticks per square). On this tile decisions are made. If there is a job (on a farm or a contruction's site) he will spawn and go to do the job. My question is, what what happens if there are no jobs? Is he going to disappear, or wait until the next laborer will be generated?
Brugle
HG Alumnus
posted 05-17-16 13:36 ET (US)     8 / 12       
How to figure out where the laborer spawns invisibly and where he becomes visible.
I'll put it in different words. The laborer spawns invisibly where the work camp's citizen starts his walk. The laborer becomes visible where the work camp's citizen ends his walk.
I know it's correct, because I tested it, but I don't know why.
Because that's the way the game is programmed.
what what happens if there are no jobs? Is he going to disappear,
An invisible laborer who reaches the place where he would become visible disappears if there isn't a job.

By the way, I see that part of my reply #6 is wrong, so I'll correct it.

[This message has been edited by Brugle (edited 05-17-2016 @ 01:50 PM).]

andib2n
Pleb
posted 05-18-16 05:56 ET (US)     9 / 12       
Thanks Brugle

I'm currently redesigning my construction's block for Meidum. The last attempt I finished the mission in 132 months, 8 months longer than Max's record, damn. Btw. I used the construction's block from Rostja mission with minor changes, and realized it was not good enough in Meidum, because here there were no materials to import (the limiting factor in Rostja). So answers help me a lot.

And I have another question. During a construction of a pyramid the stonemansons are walking to their position on pyramid to do their next duty. We know there are no jobs for workcamp's laborers in this moment. The laborer can spawn, walk invisible and disappear. Then the stonemansons (at least a pair of them) are on their positions and call for stone. That means there are new jobs for the laborer. The question is, are the jobs added to the to-do-list immediately or have they to wait for the new workday?

I think the answer is the 2nd, but not 100% sure. If it's really the case, so a laborer that have to walk invisible 3 squares is bad and should be avoided. It can happen that the workcamp never send a laborer to do a job, because the job is already taken by a laborer from another workcamp, because he spawn earlier. To make it worse, this another workcamp is some squares further.
Brugle
HG Alumnus
posted 05-18-16 08:38 ET (US)     10 / 12       
The question is, are the jobs added to the to-do-list immediately or have they to wait for the new workday?
I don't understand the question. When there's a job to do, there's a job to do. When the next laborer becomes visible, he is given a job (perhaps that one).
It can happen that the workcamp never send a laborer to do a job, because the job is already taken by a laborer from another workcamp, because he spawn earlier. To make it worse, this another workcamp is some squares further.
Yes--having too many work camps can slow down construction.
Henipatra
Pleb
posted 05-24-16 04:00 ET (US)     11 / 12       
Interesting. In that first example, with the workcamp and the roadblock, I would expect the worker to spawn BELOW the roadblock, not above it, since that road square actually touches the workcamp.

Of course, laborers don't care about roadblocks so that could be a factor.

But I have often seen random walkers (like water carriers and bazaar traders) walking in the wrong area, because they started NOT in the first non-roadblocked road square going round from the east side of the north corner.

Can anyone explain this to me?

Henipatra
Brugle
HG Alumnus
posted 05-24-16 08:44 ET (US)     12 / 12       
In that first example, with the workcamp and the roadblock, I would expect the worker to spawn BELOW the roadblock, not above it,
As Trium said, the laborer does spawn below the work camp, invisibly. He becomes visible after he walks to the tile above the work camp.
I have often seen random walkers (like water carriers and bazaar traders) walking in the wrong area, because they started NOT in the first non-roadblocked road square going round from the east side of the north corne
Sometimes a trader from an upgraded bazaar will "teleport" and start her walk some distance from the bazaar. (To avoid this, I sometimes keep a bazaar from upgrading, perhaps by building a fort nearby.) I don't know of any reason for a water carrier or trader from a non-upgraded bazaar to spawn in an unusual place--if you have a saved game that shows this, would you send it to the address in my profile, mentioning Pharaoh in the email subject?
You must be logged in to post messages.
Please login or register

Hop to:    

Caesar IV Heaven | HeavenGames