Ok, another question for the Wise people who have the secret manual or anyone who dares to answer.
As the title says, the question is, can we use a global resource value from a city improvement? And if we can, how can we do it?
Thanks in advance for any answer
I seem to remember reading that you were able to use a local resource. If so, you can make the resource local but affect it through playerabilitybonus modifiers.
So instead of having City 1 produce +1 global resource and city 2 produce +1 global resource,
City 1 produce 1 local resource and multiplies local resources in all cities by +100%, city 2 produce 1 local resource and multiplies local resources in all cities by +100%.
Then you have in city 1 a REAL production of local +2.
Thanks for the answer Heavenfall
I'll try to give more details about what I am trying to do.
I am modding the use of resources trying to make it more strategic. So far I have modded population in cities to really mean something. In my mod each improvement uses population and city hubs don't produce resources in a flat rate, they produce resources per person. So the result is that if you don't have enough population to run all the improvementes in a city there is a penalty to resources production, and that if you have extra population it will result in a moderate extra resources production. At least that part works well
Now the next step is to make units use population too. Each unit would use a food permanently. So if you have 30 soldiers (grouped in several units) and one city, that city has 30 less food. With 2 cities they have 15 less food each, with 3 cities they have 10 less food each and so on.
I have tried several approaches, but had to discard all of them. And now is when things are becoming complicated, as I am trying more and more strange things to try to overcome engine limitations and obtain the effect I want.
My current attempt involves a global resource provided by the sovereign and each unit requiring one of those resources to be built. The result is that this resource provides a way to know how many trained units the player has. For example, if the sovereign provides 1000 units of that resource, and there is one scout built, the new total is 997. If I could read that number from a city hub and substract this number from 1000 I would know there are 3 trained units consuming food. Then I would have to divide that number by the number of cities and substract that from the city food.
But it doesn't work, as I have no found a way to read global resource values from an improvement.
For cities I have use A_Additive_CitiesNumber as you suggest, but for units I can't do that, as the soldiers count is made at the unit level not at the improvement level, and the resources produces by units do not scale with people in the unit. The only thing that gets scaled by people in the unit (that I know) is the production requirement and that's what I am trying to use such a complicated system.
And here is where I am stucked.
If I can't solve it I will just go with an approximation and assume all units are always 3 people units. Better this than nothing.
Ok, that was a long text. Sorry for being so boring
This is very similar to the specialist system that E:WoM had and I applaud your efforts as I think this was a far better system. If you can implement this system into the game I think it would do wonders for balancing troop numbers versus cities such that it doesn't just take money for troops it takes food which is often more difficult to find.
I can do that for sure. The question is if I can do it in an exact way or if I have to go with an approximation. The part of cities population already works and really makes a difference. A level 2 city with 199 population produces more than a level 2 city with 10 population.
Perhaps I will install E:WoM and look into the XML. Who knows? Maybe I will discover something in the XML that is no longer in LH but that the engine still understands and can be used.
There are legacy code functions that are in E:WoM that work with FE/LH but some are not as obvious you just have to keep plugging and chugging till you find what you need.
Thanks for the nice words halmal. I'll keep trying
I'm not a code gal, but may I suggest, re: food for troops. What about having each unit (figures in unit) draw food each turn from a settlement (its 'home') rather than from a newly created global food for troops mechanism? Each troop initially feeds off a settlement chosen at its graduation from training. Player has option to move the unit to another settlement and then give the order that the settlement in which the unit currently resides becomes the new supporter of the unit. From then on, wherever the troop moves, that settlement provides the food for the unit, (and consequently has less food for 'other purposes'). When the support order is given, the amount of food per turn is reduced in the settlement. This prevents units starving because food decreases in the settlement. When the player decides to enlarge the unit (add a figure via upgrade) the amount of food drawn also increases by one. If the sponsoring (home) settlement has no surplus, the upgrade is blocked. Find a new settlement (home). The idea here is to create another 'guns or butter' choice for players. Also, populous settlements are where the bulk of recruits come from which are then trained at the 'fortress' settlement. For those who role play, (or just want more color-immersion) giving the graduating unit a name related to its home comes to mind.
Thanks for your comments Elana.
Unfortunatelly I don't know a way to assign a unit to a city, not even to the city that created the unit. However, I have made big progresses in implementing the food upkeep thing. It is supposed to be working and now I am playtesting it and enjoying the proces (but of course that's something I did to make the game more similar to what I like, so it would be weird not to enjoy it ).
As you said, that's a "Guns or butter" choice. Either you use food to feed "peaceful" citizens or to maintain armies. Currently I am experimenting with 0.1 food per unit HP. An interesting side effect is that now I can make Pioneers use 30 food instead of 30 population, so the Pioneer is a charge for your economy not only at the time of producing it, but also all the time until it settles.
Out of curiosity any reason why not?
Many strategy (and other) games have some great mods that can really add interest and effectively extend the life of the game.
I was not specific enough when I made the comment. I meant mods for FE/EH. I actually make mods for Skyrim (nexus exclusives), and have heavily modded setups for skyrim, Oblivion, Fallout 3, and fallout New Vegas. I hobbled FCOM together before the wizards came up with a streamlined helper mod to do same. I assisted in the English translation of Nehrim. I just haven't modded FE/EH (yet) because I haven't taken the time to figure out how to do it, I don't know the XML (or whatever it is), and, most importantly, FE/EH seems to be in too fluid a state to invest a lot of time into a project that may lose much or all of its viability because the developer has continued to modify the game engine and thereby makes the mod unplayable, or crash city. BTW, I'm keeping an eye on the modding section for EH. Froggy just set up a place to put them all. Yea!
@ElanaAhova - cool.
I just haven't modded FE/EH (yet) because I haven't taken the time to figure out how to do it
A lot of basic modding stuff is really easy.
BTW, I'm keeping an eye on the modding section for EH. Froggy just set up a place to put them all.
You mean LH here right? Not sure what you mean, haven't seen anything specific for LH... isn't everything just in the FE Mod section or did I miss something?
There are many great features available to you once you register, including:
Sign in or Create Account