Archid
Warlord
I would use a spreadsheet such as Calc or Excel to do this rather than create a C++ app. Both these apps have built in functions to generate random numbers.
I don't know that they have to generate numbers between two values, i will make this for me because i want to gain some C++ experience i have idea and this is not hard, when i finish i will upload to forum, more harder is to merge codes from two or more modes or write some new C++ mod component for game, that is some more realistic experience that this what i want to do.
If you want a completely random number in C++, then there are plenty of guides online. Here is one: http://www.cplusplus.com/articles/EywTURfi/I want to make little C++ console application for leaderheads which will random generate number between two numbers (example random number between 90 and 200) and write result in one xml file, from iWonderConstructRand to iFavoriteCivicAttitudeChangeLimit for now. Can someone help me about this code about random numbers generate how code will look, i will find something in books and on google. I will make in cmd because i don't know C# yet.
90 + (rand() % 111)
90 + getSorenRandNum(111, "log"))
Varies with WorldSize not GameSpeed
If I were to add the line: <iHealth>1</iHealth> to the "farm improvement", will it cause farms to give health? the same way a forest gives health? I wanna give the farm a health point (as an experiment).
will this work?
Also, is it possible to make resources' benefits like health and happiness only citywide? so they wouldn't be nation wide. Is it possible to do it easily, with a flip of a switch... or not really?
Also, is it possible to make resources' benefits like health and happiness only citywide? so they wouldn't be nation wide. Is it possible to do it easily, with a flip of a switch... or not really?
The only way to do this (in regular BtS anyway) that I can think of is to remove the health/happy from the resources and add buildings that give them if you have the resource, just like the granary already gives +1 health for corn, rice, and wheat and the forge gives +1 happy for gems, silver, and gold. If you want the health or happy for the resource you build the associated building in the city. You can still get it in every city with access to the resource, it just takes some production and time.
This might mess up how the AI values resources a bit, but not completely ruin the evaluation.
<Buildings>
<Building>
<BuildingClassType>BUILDINGCLASS_JAIL</BuildingClassType>
<BuildingType>BUILDING_INDIAN_MAUSOLEUM</BuildingType>
</Building>
</Buildings>
<DefaultPlayerColor>PLAYERCOLOR_PURPLE</DefaultPlayerColor>
The only way to do this (in regular BtS anyway) that I can think of is to remove the health/happy from the resources and add buildings that give them if you have the resource, just like the granary already gives +1 health for corn, rice, and wheat and the forge gives +1 happy for gems, silver, and gold. If you want the health or happy for the resource you build the associated building in the city. You can still get it in every city with access to the resource, it just takes some production and time.
This might mess up how the AI values resources a bit, but not completely ruin the evaluation.