Production and Upkeep. In which order do they happen?

Discuss anything related to warbarons.

Production and Upkeep. In which order do they happen?

Postby Zywus » Thu Jun 15, 2017 9:35 pm

If someone has a negative surplus and not enough gold to cover that, no units are produced. But in which order is everything calculated?

Are units produced before upkeep is calculated? Do they not pay upkeep on the turn they're produced?

I'll try to illustrate with an example:
Let's say I have a Upkeep of 100 gold and a income of 120, with 0 gold in my treasury.
At the start of m my turn additional units are produced, totaling extra upkeep of 30 gold.

Which scenario is then correct?

1:
Income is collected, the treasury is now at 120
New units are produced, raising my upkeep to 130
Upkeep, (with the new units included) are subtracted, leaving with a negative surplus of -10 for the next turn, meaning no more units will be produced next turn unless I increase my income or reduce my upkeep.

2:
Income is collected, the treasury is now at 120
Upkeep is calculated (including the new units), since there's not enough gold to produce the new units, no new units are produced.
Upkeep (100 gold) for the already existing units are subtracted , leaving me positive surplus of 20 gold.
Next turn (assuming no changes in income/upkeep), the 20 gold gets added to the income of 120, meaning I now have enough gold to build the new units and get 10 gold left.

3: Income is collected, the treasury is now at 120
Upkeep is calculated (including the new units), since there's not enough gold to produce all new units; after the existing unit's upkeep of 100 gold have been paid, new unit's are randomly created for the 20 guld left over, until the remaining gold is not enough for the next randomly chose unit.

Or some other scenario?
Zywus
 
Posts: 17
Joined: Wed May 18, 2016 7:29 pm

Re: Production and Upkeep. In which order do they happen?

Postby KGB » Fri Jun 16, 2017 12:01 am

I don't know for sure since I didn't code it's definitely not #2 because I've run into this situation before. My guess is the answer is #1 because that would be the easiest to code.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Production and Upkeep. In which order do they happen?

Postby SnotlinG » Thu Jul 06, 2017 12:14 pm

It works like this:
Players gold is calculated first:
Upkeep + income + current gold.
If the playergold is < 0, it is set to 0 (you cannot have negative gold)

Then, if playergold is > 0 production will happen. So you basically dont pay upkeep for the units the round which they are built.
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Production and Upkeep. In which order do they happen?

Postby KGB » Fri Jul 07, 2017 12:39 am

Snotling,

So according to your code then the answer is neither 1,2 or 3 since he'd have 20 gold left + all his new units.

One other question. Do you play gold for units in transit or only when they arrive?

KGB

P.S. Still think it's a bug that allies that come with heroes / are found in ruins cost upkeep. They should have their upkeep cost set to 0.
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Production and Upkeep. In which order do they happen?

Postby SnotlinG » Fri Jul 14, 2017 6:06 am

KGB wrote:So according to your code then the answer is neither 1,2 or 3 since he'd have 20 gold left + all his new units.

Thats correct.

KGB wrote:One other question. Do you play gold for units in transit or only when they arrive?

They cost gold even in transit, since for the game the unit do exist at that time.

KGB wrote:P.S. Still think it's a bug that allies that come with heroes / are found in ruins cost upkeep. They should have their upkeep cost set to 0.

I know warlords worked that way, but is that really better? Finding allies is usually a quite good reward, and if they have 0 in upkeep it would then be even better...
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Production and Upkeep. In which order do they happen?

Postby Chazar » Fri Jul 14, 2017 8:28 am

SnotlinG wrote:
KGB wrote:P.S. Still think it's a bug that allies that come with heroes / are found in ruins cost upkeep. They should have their upkeep cost set to 0.

I know warlords worked that way, but is that really better? Finding allies is usually a quite good reward, and if they have 0 in upkeep it would then be even better...

Note that the old Warlords automatically disbanded units at random if there was not enough gold to pay the total upkeep.

Since Warbarons does not disband any units, I think it is much better to have allies requiring upkeep now!

It avoids yet another difficult-to-learn special rule which rarely has a visibly-big effect. Furthermore, producing high-turn units is already unattractive enough and does not need yet another disadvantage over gaining them via gambling with hero offers.
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm

Re: Production and Upkeep. In which order do they happen?

Postby KGB » Fri Jul 14, 2017 10:13 pm

SnotlinG wrote:I know warlords worked that way, but is that really better? Finding allies is usually a quite good reward, and if they have 0 in upkeep it would then be even better...


Chazar wrote:Since Warbarons does not disband any units, I think it is much better to have allies requiring upkeep now!

It avoids yet another difficult-to-learn special rule which rarely has a visibly-big effect. Furthermore, producing high-turn units is already unattractive enough and does not need yet another disadvantage over gaining them via gambling with hero offers.


I disagree with this for 2 reasons.

1) Often you find allies in L2/L3 ruins in WAY out of the way places on the map especially on 100x and bigger maps. If you manage to hit say 2-3 Devils/Dragons/Archons or other expensive units and they are 5-10 turns from reaching the main front lines then you are paying 15+ per turn per unit that's wasted so it can cost you 50+ gold per turn for allies you can't use so that it might be 500+ gold penalty by the time they are useful. Compare that with instead finding 2000+ gold in the same ruin that you can use immediately (production, upgrades, heroes etc) and it's a very bad thing to get Allies in many cases. It's even worse on maps where you sometimes find Allies in ruin and they can't leave (no ports on an island or serpents/kraken in water with no coastal cities). Players tend to just leave the allies there not realizing they are paying an infinite tax for doing that. I personally dread searching ruins behind the lines for this reason.

2) When you purchase an Ally with a hero you are already paying for the Ally. In most cases the cost for that Ally is almost 1/2 the cost to buy production in a city (eg 1100 for a dragon vs 2400 production cost). You've more than paid enough for it. Plus again hero offers often happen far from the front lines so once again you are paying for many turns of not being useful.

I believe those are the primary reasons they had 0 cost in Warlords because you couldn't control where they arrived like you can with production / vectoring and because you already paid for them.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am


Return to Game discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron
Not able to open ./cache/data_global.php