Building Priority Discussion Thread

Use this forum to discuss feature suggestions for Millénaire

Building Priority Discussion Thread

Postby MauveCloud » Tue May 15, 2018 3:31 am

I've noticed that the priorities set for buildings are all over the place, with no discernible logic to them.

For example, here is a mostly-complete list of priorities for the Byzantine buildings:
Code: Select all
Construction
1000000 Gift House
100000 Player Small House
100000 Player Large House
50000 Fisher
50000 Quarry
50000 Workshop
20000 Bakery
15000 Barracks Bed (sub-building of the Barracks)
5000 Sheep Farm
5000 Tavern
5000 Vineyard
3000 Guest House
3000 Inn
2000 Church (town hall for Chorio Orthodoxo)
500 Barracks
500 Market Hall
500 Grove
500 Presbytery
100 Silk Farm
100 Wayside Cross
100 Park/Oak/Birch
100 Shrine
100 Well
50 Forge
20 Watchtower
10 Chapel
5 Architect's Studio (but architect is a starting building for all standard village types to enable construction of other buildings)
5 Farm
5 Lumberman's House

Upgrades
50000 Quarry upgrade 1
5000 Tavern upgrade 1
2000 Church upgrade 1
500 Barracks upgrade 1
500 Market Hall upgrade 1
500 Quarry upgrades 2-3
500 Sheep Farm upgrade 1
500 Workshop upgrades 1-2
300 Architect's Studio upgrade 1
200 Church upgrades 2-6
100 Silk Farm upgrades 1-2
100 Wayside Cross upgrades 1-2
100 Oak/Birch upgrade 1
100 Shrine upgrade 1
100 Well upgrade 1
20 Tavern upgrade 2
20 Watchtower upgrade 2
10 Architect's Studio upgrades 2-4
10 Bakery upgrades 1-4
10 Barracks upgrade2 2-5
10 Market Hall upgrades 2-3
10 Chapel upgrades 1-2
10 Farm upgrades 1-3
10 Fisher upgrades 1-3
10 Forge upgrade 1-3
10 Lumberman's House upgrades 2-4
10 Sheep Farm upgrades 2-3
10 Silk Farm upgrades 3-4
10 Tavern upgrades 3-4
10 Workshop upgrade 3
10 Church upgrades 7-9
5 Lumberman's House upgrade 1
4 Vineyard upgrade 1
1 Park upgrade 1
1 Shrine upgrade 2


I don't know a simple way to get these automatically, so I haven't assembled a similar analysis for the other cultures yet, but I noticed that a couple of town halls actually had double the priority of the player housing and didn't specify different priorities for the upgrades, meaning they'd most likely focus on upgrading said town halls before building any new buildings. Also, I've looked at the code, and as far as I can tell, declaring a building as "core" or "secondary" does not give a boost to the effective priority of the building, though it can cause more of a building type to be constructed than specified by the "max" parameter of the building's definition.

I propose to standardize the priorities as below, but I'd like some feedback from the community before I set up a merge request, since some of you may be able to provide reasons to amend it.

Player-ordered buildings will all have priority 1000000 (one million).
Buildings that provide raw materials (e.g. farms, groves, quarries) will have priority 1000.
Defensive buildings (e.g. guard houses, watchtowers) will have priority 900.
Crafting buildings (e.g. forges, carpenter's houses, sculptor's houses) will have priority 800.
Path Nodes (e.g. fountains, parks) will have priority 700.
Town halls and trading buildings (e.g. markets, inns, bazaar) will have priority 600.
Religious buildings (e.g. temples, churches, altars) will have priority 500.
Pure leisure buildings (e.g. the Japanese bath house) and other buildings that are difficult to categorize will have priority 400.

Upgrades 1-4 will have one-tenth the priority of the initial construction, and upgrades 5 and beyond (for buildings that have that many) will have 1/100 the priority of the initial construction.
Core buildings will get +400 effective priority for initial construction, and secondary buildings will get +200.
MauveCloud
 
Posts: 50
Joined: Fri Oct 24, 2014 3:21 pm
Location: California

Re: Building Priority Discussion Thread

Postby Kinniken » Tue May 15, 2018 3:40 pm

Regarding the sections, "start" is obvious, "core" and "secondary" indeed make no difference which I admit is a bit odd, and "extra" is for buildings that are not listed before, up to their max value.

Your list seems decent to me, though I would give crafting buildings and "inner" node buildings (those that can't be built too far away) higher priorities.

For core/secondary/extra priorities I'd rather do multipliers, maybe x4 for core and x2 for secondary buildings.

For the upgrades I could code an automated system with the kind of degressive values you propose. It could be overridden by hand for buildings where ugrades are important (Norman cattle farm, buildings with subbuildings at later levels...).
User avatar
Kinniken
Site Admin
 
Posts: 328
Joined: Thu Jul 21, 2011 4:51 pm

Re: Building Priority Discussion Thread

Postby MoonCutter2B » Tue May 15, 2018 3:43 pm

Will this be automatic or manually fixed in the .txt-files?
What about sub-buildings?
And townhalls (600) as start building gets + 400? That would mean 1:st upgrade is (600 + 400)/10 = 100 meaning the townhalls will not be upgraded at until all other buildings are built?

Or?
MoonCutter2B
 
Posts: 212
Joined: Tue Jun 11, 2013 5:56 am

Re: Building Priority Discussion Thread

Postby Kinniken » Tue May 15, 2018 3:54 pm

Not sure what Mauve had in mind, but I was thinking of having the priorities set in the files as they are today, but adjusted automatically based on the section and the upgrades.

Regarding the upgrades, dropping to 1/100th after the 5th upgrade seems too drastic to me.

One more thing, projects are not picked in strict priority order, but randomly weighted by priority. So if there are two options with priorities of 100 and 50 respectively, the first will be picked 2/3rd of the time, not always.
User avatar
Kinniken
Site Admin
 
Posts: 328
Joined: Thu Jul 21, 2011 4:51 pm

Re: Building Priority Discussion Thread

Postby MauveCloud » Tue May 15, 2018 4:15 pm

The core and secondary adjustments would have to be mostly automatic (whether I use an offset or a multiplier), because the building definition files don't know which tier they're at, and it will be different for different village types. However, I could look into making the adjustments configurable in the village definition files if people want that. I had been planning on manually setting the baseline priorities in the text files, which would allow some buildings with special needs (like the examples Kinniken mentioned) to be adjusted to compensate.

Also, I had not been planning on applying the core and secondary adjustments to upgrades, so townhall upgrades would have priority 60 by default. Perhaps that's too low, but I haven't entirely figured out what would be good there. Edit: maybe make the townhall upgrades a special case that don't get the 1/10 reduction to priority, so they'd be on par with making new buildings.

Regarding the upgrades, dropping to 1/100th after the 5th upgrade seems too drastic to me.

Yeah, you're probably right, but buildings with that many upgrades should get some reduction in priority for upgrades past the fourth. Other than town halls, there are very few buildings that have an "A5" or higher level, so I'm figuring those are mostly finishing touches.

Edit: alternative idea: instead of a fixed threshold based on a building having more than 4 upgrades, the priorities could have some sort of step down per level (say 20 for townhalls if they start at 600 for the first upgrade, 5 for other buildings).
MauveCloud
 
Posts: 50
Joined: Fri Oct 24, 2014 3:21 pm
Location: California

Re: Building Priority Discussion Thread

Postby felinoel » Wed May 16, 2018 5:44 pm

I always assumed the low priority for player housing was by design?
User avatar
felinoel
 
Posts: 941
Joined: Sun Jun 09, 2013 6:02 pm

Re: Building Priority Discussion Thread

Postby MauveCloud » Wed May 16, 2018 6:29 pm

Kinniken wrote:Your list seems decent to me, though I would give crafting buildings and "inner" node buildings (those that can't be built too far away) higher priorities.


I don't think crafting building should get a higher baseline priority than raw-material or defensive buildings, though with multipliers for core and secondary buildings, some of them might end up with higher effective priorities. I don't follow your logic for leaving the minDistance (edit: I meant maxDistance) on some of the node buildings. However, the well can also be interpreted as a "raw material" building (since water is essential for life itself), so I will give it a priority based on that.

felinoel wrote:I always assumed the low priority for player housing was by design?


How do you interpret one hundred thousand as a low priority? Only a few non-player buildings have higher priority than that, and those might have been set so high by mistake.
MauveCloud
 
Posts: 50
Joined: Fri Oct 24, 2014 3:21 pm
Location: California

Re: Building Priority Discussion Thread

Postby MauveCloud » Mon May 21, 2018 12:12 am

Just so it's clear, this is these are the priorities I ended up using for the merge request (the first on each line is for construction where applicable, though still there even for buildings it doesn't normally apply to, just in case; the others are for upgrades):

Town halls: 600, 600, 580, 560, 540, ...
Resource buildings (e.g. groves, quarries, farms): 1000, 100, 95, 90, ...
Defensive buildings (e.g. watchtowers, guard houses): 900, 90, 85, 80, ...
Crafting buildings (e.g. forges, carpenters, carvers): 800, 80, 75, 70, ...
Path nodes: 700, 70, 65, 60, ...
Trading buildings (e.g. inns, markets, bazaars): 600, 60, 55, 50, ...
Religious buildings: 500, 50, 45, 40, ...
Miscellaneous buildings: 400, 40, 35, 30, ...

Core buildings have x4 effective priority for construction, and secondary buildings have x2.

Buildings that need upgrades to enable sub-buildings or to gain special tags have had their baseline priorities for the upgrades leading up to those sub-buildings or tags doubled.

Note that sub-buildings of town halls are given priorities as if separate buildings, since they can be constructed (and upgraded) either before or after further town hall upgrades, unless only enabled after the final upgrade of a town hall (though I don't remember any town hall defined that way).
MauveCloud
 
Posts: 50
Joined: Fri Oct 24, 2014 3:21 pm
Location: California

Re: Building Priority Discussion Thread

Postby felinoel » Mon May 21, 2018 2:14 pm

MauveCloud wrote:
Kinniken wrote:Your list seems decent to me, though I would give crafting buildings and "inner" node buildings (those that can't be built too far away) higher priorities.


I don't think crafting building should get a higher baseline priority than raw-material or defensive buildings, though with multipliers for core and secondary buildings, some of them might end up with higher effective priorities. I don't follow your logic for leaving the minDistance (edit: I meant maxDistance) on some of the node buildings. However, the well can also be interpreted as a "raw material" building (since water is essential for life itself), so I will give it a priority based on that.

felinoel wrote:I always assumed the low priority for player housing was by design?


How do you interpret one hundred thousand as a low priority? Only a few non-player buildings have higher priority than that, and those might have been set so high by mistake.

Sorry, brain fart, I meant high priority.

EDIT:
Player buildings won't be built if all the other buildings are done, so I figured this was to prevent that from happening to a player building in queue.
User avatar
felinoel
 
Posts: 941
Joined: Sun Jun 09, 2013 6:02 pm


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest

cron