Resources and Monopoly Trees

When i get the time i will have a look :) but think this is more chromes area for input than mine.
 
God, it's taking a lot longer to create the game text than I thought! :( I still haven't done the tile yields and prerequisite techs yet, these are the things that I don't think that I am able to implement in a balanced way. I will give the stuff to chrome for that purpose.

I'm done with the names of the buildings and the buildingclasses, as well as the building costs and dummy buildings. I've also cleared up some of the remaining typos. However, the full game text will have to wait until Chrome has decided on the bonuses that each building will give.
 

Attachments

So with this system all resources need to be Bonus? In what quantities on the map, all 1's? Also need frequency of resources reduced accross the board?

Edit:

Whats a NAP? (RESOURCE_NAP_STOREHOUSE)
 
@ Fires mainly, Any idea how hard it is to grant a specific Policy to a Civ via lua, after a certain event happens? Also is it possible to add another Catagory to the Policy Panel?
 
@ Fires mainly, Any idea how hard it is to grant a specific Policy to a Civ via lua, after a certain event happens? Also is it possible to add another Catagory to the Policy Panel?

It is very easy to give or take away policies using lua. Depending on what event you want to link it to will determine how hard it is.

If you want another policy category then it can be done :)

Edit: One thing to note is that if you give a civ a policy via lua it will still count towards that civs total number of policies, and make the next one cost more to earn, that might be a good or bad thing depending on what you want to do.
 
One thing to note is that if you give a civ a policy via lua it will still count towards that civs total number of policies, and make the next one cost more to earn, that might be a good or bad thing depending on what you want to do.

Bad for what I had in mind tbh
 
The way around it is to give a load of dummy policies at the start that don't do anything, then re-balance the policy costs so the cost of policies goes back down to normal, as if you had done nothing.

We can then use lua to switch out the dummy policies with the actual policies at anytime without increasing the cost.

:lol: hope that makes sense.
 
That sounds neat. Thinking hat back on.

Edit.

Limit to the number of policies? Also, it possible to make these policies un pickable?
 
I don't think many people have messed around with policies that much to know if there is a limit and what it is if it exists, so assume that there is non until you hit one :lol:

Yes you can make them un pickable, i remember reading a long time ago how it was done by spatz but cannot remember off top of my head.

Edit: this is what spatz said when i was wondering about negative happiness, the principle is the same:

Spoiler :
You can't give a negative Happiness value to Buildings. Or more specifically, you can give it, but it won't do anything. The only Happiness generators that appear to allow negative values are the Policy subtables, either the basic flat Happiness change or the building-specific change (i.e., the one used to give +1 Happiness per University). That later table is the one I leveraged within my own mod, to create five buildings with negative Happiness values. There are, however, quite a few issues:
1> You need to create a custom policy that will be given to every player.
2> Giving that policy to every player requires a start-of-game Lua event. This is very easy to code; before the last patch this event didn't work, but it's been fixed now.
3> Giving that policy to every player counts as having taken 1 policy for cost purposes, which means that policy costs will be thrown off drastically. I've already worked out what changes you'd need to make to the parameters to get something that approximates the vanilla game's curve. (In my own mod, however, I don't WANT the vanilla game's curve, so don't go by the numbers I have there.) I'll check when I get home, but the core game is 25/3/2.01 for the three policy cost parameters (which translates to 25 + (3*N)^2.01), and I believe it needs to be changed to 16/2/2.21.
4> If you place this new policy in an existing Branch, then the AI breaks horribly, because the AI has an override that forces it to finish any branch it's already started. So if you stuck it in Tradition, then every AI would see finishing Tradition as being his top priority.
5> If you place this new policy in a new branch that has no other policies (to where taking this policy completes the branch), then that'll count as 1 completed branch for the purposes of a cultural victory. This can be adjusted for by increasing the number needed to 6, but you'd want to change the display algorithm in SocialPolicyPopup.lua that shows how close you are to a cultural win, as well as the one in the Victory Progress screen, so that instead of X/5 it shows (X-1)/6.
Alternatively, you can add a second policy to that 11th branch, something that the player can't EVER normally take (have it require Future Tech or something), so that he can't ever complete that branch. No need to update the display algorithms then. (This is basically the path I took; my 11th branch is impossible to complete because of how it's structured, since each of the 10 other policies in it requires completing an entire branch.) Note that if the AI ever becomes eligible to take that second policy, it'll do so regardless of what Flavor values you give it; even with three -999s, I was seeing AIs still try to take it over anything else, and it was causing some AIs to get stuck and never take any policies.
6> You'd need to edit SocialPolicyPopup.lua anyway, because it'll break on that 11th branch otherwise. There are three or four IF checks to adjust.
7> The AI, by default, won't have more than 2 incomplete policy branches at any time. If you add more policies to the 11th branch to keep it from completing then you'll need to up this to 3, because the extra branch will always stay open.
8> You'll also need to edit InfoTooltipInclude.lua (I think that's the name, I'm at work right now), which creates the little help text popup when you mouse over a building or unit, to allow for negative values. By default it'll say "(happy face)+-X", so I just added a simple IF check to switch it to "(angry face)+X" if the value is negative. This kind of change is just a good idea in general, though, so I'd recommend doing it regardless.
9> Note: this unhappiness is inherently Unmodded. That is, it won't affect the population cap applied to Happiness from the Colosseum, Theater, etc.; if you've got a size-10 city and have +12 from happiness buildings and -2 from a negative-happiness building using this method, you'll be at +8 and not +10, because the +12 will get capped down to +10 and then the -2 will be applied.
10> The AI was still occasionally getting stuck and never picking a new policy, so I added an extra bit of Lua code where if an AI has more than twice the culture needed to take a new policy, it forces a random selection from the policies currently available.

On the bright side, once you've done this, you now have a hidden policy that every player has. This can be used to modify all sorts of other variables, like the unhappiness per population, in ways that require fewer updates to other tables. And the addition of an 11th branch opens up all sorts of possibilities; in my mod, for instance, I added ten "Super-Finisher" policies that only unlock when you take the Finisher for a branch. They're very strong policies, but they don't count towards a cultural win.


The lua bits aren't a problem, especially since i have already heavily modded the social policy page :), the only difficult bit left is the readjusting of the policies.
 
So with this system all resources need to be Bonus? In what quantities on the map, all 1's? Also need frequency of resources reduced accross the board?

Edit:

Whats a NAP? (RESOURCE_NAP_STOREHOUSE)

Not necessarily, really, they *could* be strategics. You can remove the allbonus segment of my file.

NAP means Nonfood Agricultural Product.
 
Back
Top Bottom