Éa, Dawn of the Mortal Races (phase 1, pre-alpha code development and discussion)

@Calavente: May I point at that, at this point, none of us (excepting Pazyryk) know the big picture. Yes, at the moment, science focus seems great. There are other focuses alluded to, such as military/conquest focused, religious focus, "destroy the world" focus (a la Sheaim in FfH but not limited to just one civ, rather to one ideology); as well as other focuses not mentioned. Just be patient, man. Test the mechanics or not, as you prefer. In the meantime, wait.
 
All those modifiers (global or city) just add up to one modifier that is applied to base yield in each city
Ok, thanks. No blame intended or required, I just need to understand how the system works.

In the last one, if you only had the +50% in one city but not the other, then you would have wiped out research from the crappy city (goes to zero but never negative) but not the better one. This is an effect that I like because it pushes research-focused civs toward larger more developed cities since small outlying cities will be contributing nothing as Maintenance approaches 100%.
I like this effect too. It encourages specialized research cities.
[I guess I worry a little about how the AI would deal with it, might it still try to build basic research buildings even if they give no net value? But you might be able to teach the AI to not do that.]

Your maintenance penalty system is not nearly as problematic as I envisioned it might be, if the penalty can be canceled linearly by positive modifiers.
I think you should go with what you have and see how it plays.

My one question is; does the penalty keep going past 20 techs, ie -105%, -110%, etc.?

I don't share Calavent'e concern, it seems like you well understand opportunity costs and having multiple ways of advancing in power. If you don't want tech, then you don't build libraries and universities and use sage specialists, which frees you to use all those resources to build culture-producing stuff or military stuff or whatever instead.

I guess the important thing is that it not be very possible/feasible to get all the buildings. One way of doing this is to ensure that buildings give large bonuses, but have high construction costs. So you might be able to build multiple military units in the time it takes to build a university or theater or cathedral, but that building has a sizeable effect on beaker or culture or faith production.
 
but I'm thinking you explain in terms of "playing" and not in terms of "developing". And that is frustrating.
for me, expanding (just increasing the size of army/building more units/more cities) is not "developing" my civilization.
And it seems to me that the only paths of development you propose is through teching.

Yeah, I know I'm being kind of vague and mysterious about "different ways to play." I'm holding back some info just for marketing purposes (hey, why not?).

Perhaps the problem is that I keep using Raging Barbarians (Man or Heldeofol) as my counter example to high-tech approach. In that example, "development" is (by definition) very limited. Victory, for them, is also quite limited. The only thing they can really do is Conquest. And it is going to be an ugly sort of conquest because they don't have the culture to hold a big empire together very long (and yes, Éa is definitely going to incorporate Gedemon's Revolutions in some way... it was always my intention that culture is the "glue" for a large civ). This kind of play is not for the squeamish or those who speak of "development".

It's hard to think of other true "low tech" styles. One I have in mind is a civ of pirates, which would get most of what they need (including more ships) through pirating rather than building libraries and universities for techs. They would have some true "development" in the form of taverns, smuggling rings, and so on. But that involves a lot of stuff that I haven't talked about yet (just rest assured that these don't involve high tier techs, though the might involve activity by some undisclosed GP classes/subclasses). They wouldn't be suitable for any of the 3 disclosed victory conditions, but one of the two secret ones would be quite fitting.

There is another sort of low tech magic society that depends largely on advancing through the Pantheism policy branch. But again, a lot of stuff I haven't introduced yet. (Most magic approaches will actually be high-tech.)

Most other approaches would fall into what I would call "mid-tech" approach. That means you have a broad array of useful 1st/2nd tier techs but probably are only going deep on one branch. That could be Navigation for a commerce focus or Architecture for a culture focused builder civ. Either of these have a lot of things to build in their cities and a lot of activities for their GPs (merchants for the former and engineers plus an artist or two for the latter). Most militaristic civs would fall into this range (they are not all barbarians) and be going deep down one tech branch (e.g., the metal line) but not able to go deep on more than one.
 
Hi, I just got CiV and downloaded your mod. I am looking forward for the final version (and Gods and Kings). :D

I can play the game smoothly, but there is one bug : the NEXT TURN button (on the left side of the screen) is not working. I can not end my turn by clicking it; I have to use ENTER instead. Is this known bug? Or maybe because I have incomplete DLCs?

Thanks!
 
@esvath, this is an early development version so I'm not really ready for bug reports (as I said in the first post). Reporting a bug now is kind of like saying a car is defective when you took it off the factory line before the transmission was installed. No harm done. It's just that I don't want folks posting "bugs" and feeling ignored.

The issue seems strange to me though. My best guess is post #2 item #1.

There will be no pay-DLC needed for this mod. But it will require G&K soon after that comes out.
 
Hey Pazyryk!

I am following the development of this mod with a lot of interest. Looks like it is gonna be a lot of fun. Do you need any other help besides artwork (which you really wouldn't like me to do ;) ).
 
Hey Pazyryk!

I am following the development of this mod with a lot of interest. Looks like it is gonna be a lot of fun. Do you need any other help besides artwork (which you really wouldn't like me to do ;) ).

I will eventually. There will be many creative text entries: backstories or quotes for 100s of GPs, techs, policies, magic items, etc.

But not quite yet...


Edit: Also, you don't need to be an artist to convert Civ4 unit art. You might need a PhD in computer science though...
 
Edit: Also, you don't need to be an artist to convert Civ4 unit art. You might need a PhD in computer science though...

Sigh... you are absolutely correct here. I tried to read and understand the guide to convert my Civ4 units to CiV, and failed miserably :sad: :(

If (someday, someone perform a miracle and) there is an easier way to convert these units, I'd be glad to help you. Until that (miraculous) time has arrived, I'd be glad to help you by playtesting or anything else. :goodjob:
 
A few have mastered it. You have to get the exact right version of two software programs, and then use lemmy101's homemade add-on to Nexus. I think I succeeded in getting it all installed, but then I was trying to forge new territory with improvement art rather than unit art, and didn't succeed (and haven't gotten back to units). There are clues dropped here and there through the two tutorial threads, but you have to more or less read all of it and then have a few hours to install/uninstall until you've sequenced all the outdated versions properly.

They sure ought to be aware of the problem. Hope G&K fixes this...
 
I've been working on Merchant AI and hope to have it up and running this weekend. This is the hardest of the GP "individual unit" AIs because the AI has to approximate the value and cost of traveling for Trade Routes vs something it might do at its present location (and pathing is an expensive function). The core mechanics are in and working: I can give an AI Merchant unit a target city and it will move to the city, enter it, and run the Establish Trade Route action (this is available to players too, if they don’t want to micro movement). So all the AI has to do is pick a good city to go to.

Trade Route basics and other Merchant activities. Trade Routes take 8 turns to establish, and they hook up a foreign city (the one the Merchant is presently in) to one of yours (the largest available) and give gold based on city sizes (base gold = the size of the smaller of the two cites) at both cities. Trade routes are "suspended" during war (until peace + 10 turns) and are cancelled outright if one of the cities changes hands. Since trade routes are always reciprocal, you are doing your neighbor a favor (at no cost to them) so you need to be careful. On the other hand, the favor you are doing them is appreciated and reflected by improved relations (they treat it as a gold gift) and possible reluctance to DoW on you (the AI will look at lost gold from trade routes when considering DoW). Merchants can also establish a Trade Mission in a foreign capital (+10% on all trade gold you get with this civ) and Trade Houses in one of your cities (+10% on all trade gold you get from this city). And, like any other GP, they can Take Residence in any of your cities (+10% gold in that city) or Take Leadership (+10% gold in all cities). The latter action is automatic for the AI if the civ is currently leaderless and the GP is in the vicinity of the capital, even though that restricts the GP to this area. Merchants will have additional actions as the mod develops, which will each have to be added to the AI logic below.

AI. In general, Merchants are going to want to get out and about making Trade Routes, considering Take Residence only if potential trade targets are very poor and Trade House only if the city has a lot of current Trade Routes. For the time being at least, the AI is going to “cheat” here and know where cities are even in regions unexplored (sorry if that bothers you...the base game AI does this too; but I may change it to “known cities” later if AI performance is sufficiently good). When a merchant is looking for something to do, it runs a function that attempts to assign a marginalBenifit for a set of x nearest cities (domestic and foreign, including CSs). "Pathing" is expensive, but simple distance calculation is very cheap, so the merchant first sorts all cities based on distance to the unit’s own current location. Then it tests whether a path to the cities is possible (starting with the closest) and does this until it has 10 reachable target foreign cities, or gives up (it will give up if there is a large “gap” where the next closest city is not reachable). I’m using Redox path finding so I should be able to get “travel distance”. It now has a list of x cities (that include up to 10 foreign cities if that many were reachable) for which it will calculate a marginalBenifit as follows:

Value
  • Approximate total base trade value. 0 for domestic. For foreign, it takes into account potential new trade routes with all of myWorthwhileTradeCities* and the test city’s own size (or guessedGrowthPotential**).
  • Value of Trade House. Domestic only based on a city’s current trade yield (which is zero if no trade routes yet).
  • Proximity to other cities on this list. This is calculated after everything else, and takes into account distance to the other x-1 cities and their marginalBenifit (calculated before proximity calculation and before Turns to travel)
Value deductions
  • Current friendship level? (friendly: -10%; neutral: -40%; guarded: -70; hostile: -100%. CS not allied to me: -20%.)
  • Trust / threat level? (broken promises, warmonger, top of power graph, etc.; CSs are evaluated based on their current ally. Up to -100%)
  • Proximity of foreign civ to mine? (-30% for being close, up to -70% for real border pressure; this is for full civs only)
  • Threat to city? (up to -100% if we think this city is in danger of capture, whether domestic or foreign)
  • Is this city on another Merchant’s target list? (-100% if at top of their list, going to -80% if 2nd, -60% if 3rd, and so on; this is to encourage Merchants to go in different directions if you have >1)
Cost
  • Turns to establish the total number of trade routes
  • Turns to travel from current location
*myWorthwhileTradeCities. This is an assembled list of values corresponding to each of your cities that are deemed worthwhile in terms of trade routes. The value is the greater of either present city size or (if the city is < 50 turns old) guessedGrowthPotential**. Cities scoring low (< 5) are not put on the list. Recalculated when asked for, but not more than once every 5 turns.

**guessedGrowthPotential. This is calculated once for each city at founding (or recalculated at turnover) and is a very rough guess at the city&#8217;s potential size (in a ~50 turn time frame) from surrounding terrain/resources. Value becomes nil after a city is 50 turns old (or 50 turns after turnover), which forces functions to use actual current city size. Used by AI for a variety of things.

Many of the calculation parameters are going to be "best guesses" or very rough approximation (trading accuracy for speed), but it should work well if these are somewhat reasonable.

Once the merchant AI has calculated marginalValue for each city in this list, it will target the single best city. Once in its target city, it automatically runs through its options and does the most valuable thing. It should be another 8+ turns before the Merchant needs to update this function again. If < 8 (e.g., the merchant is there and can&#8217;t do the action for some reason), then the function is blocked and the Merchant goes with what it has from the last update (this is so we don&#8217;t get in an endless loop on this expensive function).

Note: actual "pathing routes" are not needed for these Trade Routes for two reasons:
  1. Pathing routes are expensive to calculate and this was a huge time drag in Civ4. Once a Trade Route is established, it is cheap to get city sizes and calculate yield each turn.
  2. I'm assuming that if you got your Merchant to the other city then your civ has the capacity to trade with the other civ. Let's all assume that there are roads or paths not shown, and that a trade route isn't totally stopped just because a little bit of road got damaged.
 
that seems nice AI coding :D
 
One question; is the great merchant vulnerable to attack, like workers or settlers?
If so, then more complicated AI (both for making judgements and for escort) would be required.
 
One question; is the great merchant vulnerable to attack, like workers or settlers?
If so, then more complicated AI (both for making judgements and for escort) would be required.

At the moment, GPs are totally invisible. Not the weak Submarine Invisibility that you can see from an adjacent tile, but a total invisibility based on my own Lua hack (in fact, they are not even on the map between turns). They are therefore invulnerable to attack.

In the future, there will be interactions between GPs (e.g., they could fight each other) or between normal "army" units and GPs (e.g., the GP could be detected and then killed or captured). The idea is that they do interact with other units but in a way that is very different from normal units. For now, however, my starting point is that they are just totally invisible and safe from attack.

As for GP units and AI, they are all 100% controlled by my Lua in everywhere they go and everything they do. They can't even poop without my code telling them to do so. It's a huge undertaking but this is something I knew I was in for when I designed the GP system.
 
As for GP units and AI, they are all 100% controlled by my Lua in everywhere they go and everything they do. They can't even poop without my code telling them to do so. It's a huge undertaking but this is something I knew I was in for when I designed the GP system.
Jeese, no wonder you're doing 12 phases. But really, that's well thought of. :goodjob:
 
Also tech and policy choices. This is the major reason why phase 1 is still a few months to "playable". I'd say it was 20% of my planning and effort from September to December, but has been about 80% since then. After this weekend, the core generic AI system for GPs is about 90% done. This is the part that tries to do a benefit/cost analysis of all possible actions (accounting for travel time and hurt/help to other players). After that, each class has to be added with its specific actions and their value calculations. I had Merchants running around establishing trade routes late Saturday night. But then I tore it apart to move some specific merchant AI to the generic GP AI. This has been an ongoing process where I add something specific, get it working, then tear it apart and rebuild it as a generic system. The idea is that it will be much easier to add a new GP class in the future.
 
For now, however, my starting point is that they are just totally invisible and safe from attack.
Ok good, that seems wise.

They can't even poop without my code telling them to do so.
Please tell me you don't have code for that....

One question, are you worried about run-time at all? Or will there be few enough GPs that it probably doesn't matter?
 
One question, are you worried about run-time at all? Or will there be few enough GPs that it probably doesn't matter?

I do worry especially when pathing is involved. In my initial (non-optimized) code, each merchant was taking about 0.1 seconds per turn (on average) with perhaps half of that on pathing (using Redox's A* algorithm). They aren't trying to path to every city but rather a short list based on my own heuristics. And A* itself has an optional heuristic that I'm not even using now. So I can probably speed up both parts of that. Merchants are more problematic than other GPs because their main "targets" are foreign cities.

Most civs will have something like 3 - 5 GPs at any given time (after they've played for a while and accumulated some bonuses from policy openers and other things).
 
I'm an AI (specifically a great person controlled by AI). How do I value things?

So I've coded all my GP actions so that every action can be tested without actually doing it, and the test function (TestEaAction) returns a bunch of values in addition to a simple boolean "bAllow". These values include expected instant yield (if any), expected per turn yield (if any), identity of other affected player (if any) and other stuff. We also know how long it will take to complete an action (that's in the action table) and how long it will take us to get from where we are to the plot where we can do the action (from A* pathing algorithm).

To simplify things a bit, we can try to balance the mod so that 1 gold = 1 production = 1 science = 1 culture, very roughly speaking. This is not at all true in base Civ5 where most folks would agree that 1 production is worth more than 1 of the other yield types. But you could deflate base Civ5 YIELD_PRODUCTION easily enough by making it more available (+2 per mine or whatever) and making stuff cost more to build. We will never really get to yield type equivalence in the mod but we can try to approach it. The only reason to do this is to simplify the discussion below, so that 100p can be valued the same as 100g. In reality, this is not too important because a merchant will generally be comparing options that all affect gold, an artist options that all affect culture, and so on. (Though wonders build by Engineers will have more diverse effects...)

Time dependence. 100 gold now is always better than 100 gold in the future. We could devise a complicated formula for this, but a linear "loss of value over time" function should work. This should probably be somewhere in the range of 1% per turn, so that a thing is counted as half-value if the payoff is 50 turns in the future. This also gives us a way to value "per turn" yields assuming these are constant (which they usually aren't, but we'll assume that anyway). A per turn yield needs to be multiplied by [1+0.99+0.98+...+0.01] = 50.5. So a trade route that currently generates 10 gpt is valued at 505. Given a choice, a merchant will do that rather than something with an instant 500 gold payoff. But it would take the instant payoff if it was 510 gold.

But we need to factor in time "cost" for having the GP do this action at all: a 20 turn action costs twice as much as a 10 turn action (and that has to include both the time to complete the action and the time to get there). Let's compare 500 instant gold after 8 turns with 2000 instant gold after 25 turns. The first is time-discounted to 460 gold and the latter to 1500. But we need to divide these by the actual effort (i.e., turns spent by GP), giving us 57.5 and 60 respectively. So the latter wins this one but only just barely. For simplicity we can treat a per turn yield in the same exact way. It takes 8 turns to establish a trade route so, in the 10 gpt example above, we just take the 505 value and hit it with an 8% time discount, then divide by 8 (= 58).

Just for comparison, remember that a GP can Take Residence in a city giving a 10% boost in some yield type (appropriate for GP class). This is an instant yield with 1 turn cost to the GP. So no time discount or divisor: the instant value is just 10% of current (base) city yield. But you would have to have >500 base yield to compete with the examples above, which is not going to happen in most cases. However, it will compete with crappy trade route possibilities, especially when we account for some other stuff in the next two paragraphs. The GP will come around to this eventually if the city has high base yield (of the GP's type) and the GP has exhausted other good options.

But then there are other considerations. It is good to build a unique Wonder because you are excluding others from building it. It is usually bad to build a trade route because it benefits the other civ as much as yours. Let's just call this a "harm value" and give it a positive value if it hurts another player (directly or indirectly) and negative value if it helps them. A trade route is pretty equal in the benefit it does us and the other player (actually more for them because no effort) so let's set that harm value to -110% of our own value (-63.8). We should multiply this by an "other-player" multiplier. We don't really care if we harm or help a city state, so this is just zero (modded harm value = 0). But if a civ is high in the power graph and/or we really don't like them, then the multiplier should be approaching -100% of our value (modded harm value ~ -63.8). In this case the "negative harm" from a trade route cancels the value that we would get. But a mid-power civ that we are neutral with might get a value of -30% or so (we could just derive that from their percent of the power graph) giving us a modded harm value of -17.4. Add that to our value and we have 58 - 17.4 = 40.6. The harm value of building a unique wonder is pretty abstract (who are we harming?) so we can just set the multiplier to +100% / number of full civs (a positive number because it is good to harm others).

Then you have "risk". My GP merchant could just Take Residence in a city and know they will get x gold on the next turn (no risk). A wonder near the capital is also fairly risk-free (it could be pillaged but then repaired), so let's give that 10% risk. Trade Routes are risky because they might be suspended by war (they reactivate 10 turns after peace declared) or destroyed outright if either city changes hands. But remember that we are really only valuing things much (>50%) for the next 50 turns or so...we can benefit substantially even if that city doesn't last forever. Risk for a trade route should start at 20% and run up from there (say 80% if it belongs to a weak civ next to a warmongering strong civ). So my trade route of 10 gpt that will take me 8 turns to build with a civ that is 30% of the power graph (that I am neutral with) and a city that I consider "medium" risk (risk = 40%) now has a value of 40.6 - 40% = 24.4. It's still a pretty good option so that I'd have to be yielding base >244 gold in a city before a merchant would consider Take Residence rather than the trade route. But if it was going to be 8 turns of travel in addition to 8 turns to build, then it just depends on exact yields and where the merchant happens to be.

There are also things that are just plain hard to value. Attaching a Warrior to a military unit is good value if the unit is near the front and we are at war (or headed to war), but valueless otherwise. For this I can just make up a value based on experience with other action values. A fortress would be valued based on its position at a strategic point (near a contentious border or a valuable city) and would be high in war or peace.

How does this work in action?

When an AI GP is free (not going anywhere or doing anything) and has movement then it will generate a "shortlist" of potential targets. These might be all cities (both foreign and domestic) for a Merchant, or domestic cities plus potential wonder tiles for an Engineer, or domestic cities plus strategic points plus some units for a Warrior. The short lists are based on my own heuristic and specific for each class. We don't need to look at all cities for a merchant. But we should certainly look at the closest to us and (in addition) the biggest in the world. We have to make sure we can get to the tile (using A* algorithm, which also tells us how many turns it takes to get there). In general, the plot the GP is currently on is also on the shortlist.

Once we have a short list, then we can run through the list more carefully. Basically we just run TestEaAction on each possibility for each target on the shortlist, which returns proxy values as I indicated in the first paragraph above. These values are then run through calculations outlined above to generate a single "marginal value" (accounting for everything above, including travel time). The GP picks the best single value and then...if it is on the target plot already, it does the action. If it is not on the plot, it sets that as destination and goes there. When a GP is either doing something or headed somewhere, it won't stop to rethink (though it could be uninterrupted by external AI, for example if the civ is suddenly leaderless).
 
Spoiler long post :
I have noted some things :

1) regarding the AI value of "taking residence" vs value of trade route.
Shouldn't "taking residence" be counted as an "instant "trade route with no benefit to other civs"? with the gain being 10% of current prod: thus, as for trade routes, it's value should be counted by multiplying turn gain by 50.5. A merchant residence in a 92 gold producing city should then have a value of 464 gold, in order to evaluate if another action is more desirable.
(and it take 0 turns to accomplish)

Indeed, it seems better to have 10% of 92 every turn (9/turn) than go on a 24turn trip (8turns to go, +8 turns to cast, + 8turns to come back and re-establish the residence (+10%)) to gain an additional 10gold per turn.
According to you, the worth of the mission is 505, layered over 16 turns (cast + travel) = a worth of turn of 31 gold/turn.

However, I noted some inaccuracies :
1) to compare with staying in residence, there is a need to count the time needed to come back to the residence.
2) further, the first gain of the mission (10gold) is delayed by 8 turns of casting and moving to the location : therefore, according to your reasoning, the perceived worth of the first gain should be applied a -8% factor, decreasing : thus, establishing a trade mission with a 8turns casting time should not have a value of 505, but "only" a value of 10*(0.92+0.91+0.90+&#8230;.+0.01)&#8230;=42*10=420
3) further, a trade mission has a "cost" of 100 gold. The perceived value of the mission should then be 420 minus the cost : 320

Thus, in case of already being in the city it is layered over 8 turns = 40 g of "turn worth".

However, if one needs to quit a residence to go to the city and come back to residence, it is a 24turn roundabout trade mission. The delay before the first 10gold income is 16 turns, the value of the trade mission is therefore 10*(0.84+0.83&#8230;), which is 357, minus the 100gold cost : 257&#8230; layered over a 24turn roundabout mission : the worth of one turn of mission is about 11gold/turn.
Taking a residence in a the city with 111 gold/turn seems much more clever than going on the roundabout trip. (and not 500 as you said)

2) regarding the "real value" of residence
Further, taking residence (10%gold in city) seems to always be better than trade house (10%gold from trade routes for this city; plus it costs 300g, plus it takes 25 turns to cast).
However, you said that residence would be chosen last. (well, residence in last city is worse than trade house in capitol&#8230; but for any city, residence is better than trade house; unless the residency is already taken by another GP).


3) regarding the method you disclosed for establishing the AI worth:
a)It seems you forgot the "cost" of the mission: gold, production&#8230;Etc.

I am trying to apply the reasoning, using your method, to some of the GP "mission" already disclosed:

GE : a foundry takes 25 turns, costs 500p, and gives 10pturn on tile.
gain =10*50.5 = 505, cost = 500 (from surrounding cities), net gain =5, net worth = 5/25 = 0.2 = not much value.
Having the GP in residence in a city is worth more if the city produces only as much as 2p&#8230;.
(with "perceived benefit" at 25 turn : gain=325p... cost = 500p. perceived net gain : -175p... the AI should never build one).

(in reality, as perceived by the player, as it costs 500p, and gives 10p... it has a return on investment of.... almost 75 turns : 25 before seeing some output + around 50 to compensate the loss (depending on your p %modifier); so I understand that it sould have almost no value for an AI that looks roughly to the 50 next turns)

GM : Establish trade mission : takes 25 turns to cast, costs 300g, and gains 10% commerce with said civ), cost =300 ; net gain = -300. The trade mission is worth something Only if 10% of trade with said civ is worth more than 300 (so 60/turn civwide (60/turn * 50.5 = 3030 => 10% = 303) and then the net gain is only 3 !!! and the net worth is 3/25 = 0.1. (not counting the time needed to get there)
Having a GM in residence is worth more if the city produces only as much as 1gold&#8230;.(not counting the time needed to get there, and only if you already get 60gold / turn in commerce with this civ).

GM : Establish trade house : takes 25 turns to cast, costs 300g, and gains 10% commerce in city said civ), cost =300 ; net gain = -300. The trade mission is worth something Only if 10% of trade with of said city is worth more than 300 in the next turns (so 60/turn civwide (60/turn * 50.5 = 3030 => 10% = 303) and then the net gain is only 3 !!! and the net worth is 3/25 = 0.1. (not counting the time needed to get there)
Having a GM in residence is worth more if the city produces only as much as 1gold&#8230;.(not counting the time needed to get there, and only if you already get 60gold / turn in TRADE in this city).


- And for all those cases, I'm not counting that the time before the completion of the action is not counted as reduced perceived gain for per/turn gains. As the first gain from the action is delayed by 25 turns so it should only be worth 75% &#8230; the value of the action should be X*28.5 &#8230; (0.75+0.74+&#8230;+0.01=28.5) and not X*50.5... so real gain should be reduced even more!!

For all thoses cases, it seems very easy to have "stay in residence" get a much high value&#8230; indeed : no cost + no travel distance + no casting time!


Conclusion :

I'm thinking that maybe the cost of mission AND/OR the casting time is too important with regard to gain.
(maybe have the cost/casting time be an OR : either it take 25 turns, OR it costs 300g/500p ...Etc)
Maybe the costs/casting times could be reduces OR the gain improved.

AND

Maybe the relative value of some things could be changed :
eg :
Taking residence +10%
Trade house : +25% for trade in city (so it can sometimes be better than taking residence)
Trade mission : +25% with civ (so it can sometimes be better than building a trade house)
Trade route seems ok
 
@Calavente

I did not forget travel time. It is always included in every calculation. (In my example above, I just assume the GP is already there.) This is going to be the deciding factor in many cases, though most GP classes (other than merchant and sometimes warrior) are going to be hanging about the home territory.

Your treatment of a per turn gain that starts in the future is better than mine. I did it the way I did so that I would only have to calculate a single multiplier value for all "per turn" effects (rather than applying 0.92 + 0.91+...). But the difference is enough that I should probably do it correctly. I'll just have to figure out the equation so I don't have to apply a series in every case.

But I did forget Great Works cost! That's because I'm bogged down in programming and haven't gone back to my info post. I'll include that above. However, your point is very important. If the action evaluates to < 0 even under ideal conditions (e.g., foundry at a high production city) then there are two possibilities: 1) my time deduction of 1% per turn is too harsh or 2) my Great Works cost is too high. Probably the latter. But learning that is one of the reasons for this exercise (in addition to making good AI).
 
Top Bottom