Bay 12 Games Forum

Finally... => Creative Projects => Topic started by: kytuzian on July 18, 2015, 06:37:49 pm

Title: History Generator Simulator
Post by: kytuzian on July 18, 2015, 06:37:49 pm
TL;DR

Unzip file. Navigate to folder in Terminal/Command Prompt/whatever. Type 'python history_generator.py'. Sit back and watch.

If you want to read more about the simulation, you can go to the GitHub page and read the readme, or you can watch the overview video.

Download:
http://www.mediafire.com/file/ffq0vi73rd7717u/History+Generator-2017-03-09.zip

GitHub:
https://github.com/Kytuzian/History-Generator

Video installation tutorial:
https://www.youtube.com/watch?v=QHqwqbvspxQ

Brief overview video:
https://www.youtube.com/watch?v=TEbOVTCy6yM
Title: Re: History Generator Simulator
Post by: ~Neri on July 18, 2015, 07:25:38 pm
I recommend tweaking how battles work. Irl, armies routed at 30% casualties. Fights to the death almost never happened.
Title: Re: History Generator Simulator
Post by: kytuzian on July 18, 2015, 09:00:34 pm
I recommend tweaking how battles work. Irl, armies routed at 30% casualties. Fights to the death almost never happened.

It was the easiest way to do it (because that'd be a whole other mechanic). I'll add it to the to-do list but it's not really a priority at the moment (I'd rather have a more complicated/comprehensive history).
Title: Re: History Generator Simulator
Post by: Bohandas on July 21, 2015, 11:54:18 am
ptw
Title: Re: History Generator Simulator
Post by: kytuzian on July 27, 2015, 09:33:58 pm
Alrighty. A new version, two major changes.

There is now a troop tree, rather than the previous system which was a normal list. Every nation gets a starting troops (just the one), then each troop can have up to two upgrades, which can have two upgrades, which have two more...

Every upgrade is better than the base unit, but it's not necessarily better than it's siblings. Also, every starting unit is now a melee unit.

Second, there is now a max battle size. It's currently 250, but it can be easily changed. Battles also run as far as possible, up to 1 frame every ms, compared to the previous 1 frame every 16 ms. Usually it won't run that fast though.

I also cleaned up the terminal output a little, but that isn't super important.

Download (here and in the OP):
http://www.mediafire.com/download/g81rek4b5k6xidc/History_Generator-2015-07-27.zip
Title: Re: History Generator Simulator
Post by: My Name is Immaterial on July 30, 2015, 03:44:20 am
I always like projects like this. PTW.
Title: Re: History Generator Simulator
Post by: XXXXYYYY on July 30, 2015, 03:57:59 am
PtW
Title: Re: History Generator Simulator
Post by: Ukrainian Ranger on July 30, 2015, 04:15:02 am
ptw
Title: Re: History Generator Simulator
Post by: kytuzian on July 30, 2015, 08:38:00 pm
I'm going to try to keep these updates fairly small and quick, so none of us (including myself) gets bored.

Anyway, this next update has a couple changes, some small, some fairly large.

Small change:
There are now trade caravans that travel between cities, providing a flat 10000 money bonus to the nation.

Large changes:
A nation now sends out an army (which you can watch on the map). It's size is proportional to the number of troops in it. When it reaches the target city, it attacks the city.

Cities can no longer be captured by a successful defense. Because, well, that was kind of stupid.

When a city is attacked, it is defended by a garrison (not the nation's army, not at the moment), which is anywhere between 1/10 and 1/2 of the cities population (it's random, planning on adding more variables later).

Time now progresses in months (12 in a year, always, might be changed later (although maybe not because I don't know if it really matters)). Population growth, tax gathering, group (caravan and army) movement all happen on a monthly basis, whereas other things (such as troop recruitment and founding of cities) occurs on a yearly basis.

Founding of cities is probably next to be added to a group, so it has to be sent out instead of just automatically building. Also, I want to add religions, and trade agreements between nations.

Download (and in the OP, of course):
http://www.mediafire.com/download/6klosk80mr1kwkx/History_Generator-2015-07-30.zip
Title: Re: History Generator Simulator
Post by: Bjornhattan on July 31, 2015, 02:02:57 pm
I think this has real legs. However I would make one or two suggestions. Firstly, I think that there are too many vowels in the city/nation names, and so perhaps you could have more letter combinations that contain consonants. In addition, I would like to see nation borders on the map. You could have them coming out from cities to a certain distance, with them also running as straight lines equidistant from border cities. I don't know how difficult this would be due to my limited use of Tkinter.

I'm really not knocking it though, it's fantastic and far better than I could do. I wish you very well.
Title: Re: History Generator Simulator
Post by: kytuzian on August 01, 2015, 08:11:56 pm
I think this has real legs. However I would make one or two suggestions. Firstly, I think that there are too many vowels in the city/nation names, and so perhaps you could have more letter combinations that contain consonants. In addition, I would like to see nation borders on the map. You could have them coming out from cities to a certain distance, with them also running as straight lines equidistant from border cities. I don't know how difficult this would be due to my limited use of Tkinter.

I'm really not knocking it though, it's fantastic and far better than I could do. I wish you very well.

The vowels thing I can do pretty easily, it's just a single variable I can tweak, but...the consonant frequency is also pretty high sometimes. I'm not really sure how I want to tweak it exactly, but I also like the weird names sometimes, because it's, you know, alien and strange. At the same time, I definitely want them to be pronounceable.

The other things...I have no idea. I do want to do that, but I don't know how. Eventually I will get to it.

Also, another tiny update.

I created the first bit of religion. The only things it has right now is a pantheon of gods (if polytheistic, otherwise just one, the god of 'everything'). Gods are just a name and list of domains, but doesn't affect anything. Religions also have a tolerance, which determines how likely they are to start wars over religion (1 tolerance is SUPER SUPER tolerant, 1 in 10000 chance, max is 100, 1 in 100 chance every month, which gets to be fairly high (because that's like, 8 years)).

Additionally, I fixed a pretty major bug where it would sometimes freeze if the attackers won the battle.

Download (and in the OP):
http://www.mediafire.com/download/7s8vp4xlxfljl6z/History_Generator-2015-08-01.zip

Also, I think I need to balance the defending armies more--possibly with barriers, walls, ballistae, et cetera. Not sure about that yet.
Title: Re: History Generator Simulator
Post by: kytuzian on August 07, 2015, 12:20:21 pm
Okay, so I changed a lot.


Download (and in the OP):
http://www.mediafire.com/download/9513vijbc33pd5s/History_Generator-2015-08-07.zip

There was also a weird bug where the game would sometimes freeze during a battle, but I believed that has been fixed now. If any bugs happen, please let me know, and take a screenshot or otherwise provide as much information as possible.
Title: Re: History Generator Simulator
Post by: darkflagrance on August 08, 2015, 10:02:20 pm
On implementing borders between countries, you could look at Voronoi diagrams (https://en.wikipedia.org/wiki/Voronoi_diagram).

You could generate a Voronoi diagram where each city is a point, then color each polygon with the color of the nation that owns it. Or look into one of the other algorithms with similar goals.
Title: Re: History Generator Simulator
Post by: alamoes on October 12, 2015, 06:16:33 pm
Bug found. 

It freezes sometimes after a battle when reinforcements don't work. 
Title: Re: History Generator Simulator
Post by: Antsan on October 13, 2015, 10:18:53 am
PTW
Title: Re: History Generator Simulator
Post by: Illyris on October 13, 2015, 12:29:22 pm
.
Title: Re: History Generator Simulator
Post by: kytuzian on October 13, 2015, 12:33:15 pm
Bug found. 

It freezes sometimes after a battle when reinforcements don't work. 

I don't remember exactly what changes I made, but here is the newer version, and I believe it fixes that bug:
http://www.mediafire.com/download/1myv71lwx89me7b/History+Generator-2015-10-13.zip

One of the major changes is that there is now an event log (for trade agreements, declarations of war).
Title: Re: History Generator Simulator
Post by: alamoes on October 13, 2015, 04:02:50 pm
Thank you. 
Title: Re: History Generator Simulator
Post by: kytuzian on December 31, 2015, 09:00:07 am
Alrighty. New version here, several changes, a couple of which is pretty major.

Download:
http://www.mediafire.com/download/kky29wl5ou70pli/History+Generator-2015-12-31.zip

Major Changes:
The world is now made of cells (tiles, if you like). Currently they're 5x5 pixels, but you can change the value to whatever you want in utility.py, its the CELL_SIZE variable.

Cities are no longer circles, but a bunch of adjacent cells. They expand by taking on more cells, and are more likely to take cells that are already surrounded by several owned cells.

Groups no longer have varying movement speed but all move at the same speed. All groups take up exactly one cell, regardless of actual size.

Minor Changes:
Nations now have capital cities. These don't really do anything, except the capturing nation gains more morale when they capital an enemy's capital, and the losing nation loses more morale. At the moment, both of these values are twice what capturing/losing a normal city is, but I could change it to be more drastic pretty easily. A new capital is chosen randomly, but weighted by population, so larger cities have a higher chance of becoming the new capital.

Non-religious wars are now more likely to be fought between nations that are closer together.
Attacks are now more likely to be made by nations on cities that are closer to one of their cities.
Both of these changes are pretty much the same, instead of just being a random choice of one of the nations/cities to attack, its now weighted by distance. This only makes sense, as you are much more likely to be angry with your neighbors than with people halfway across the world, and its must more logistical to attack the people who are close to you.

Major Bug Fix:
Fixed a bug where a units upgrades were sometimes set to None, resulting in a plethora of issues. I have yet to test it by running it all night or anything, but it run for a little bit without bugs--enough, at least, for me to say its relatively stable.

Minor bug fixes:
Like, probably some, but I don't really remember any of them.
Title: Re: History Generator Simulator
Post by: Antsan on January 01, 2016, 08:10:26 am
I found a bug:

Code: [Select]
The Meritocracy of Zouym has triumphed with 54 remaining troops!
They have taken the city of Udmqx from The People's Oligarchy of Xa.
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1539, in __call__
    return self.func(*args)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 590, in callit
    func(*args)
  File "./history_generator.py", line 129, in main_loop
    i.move_armies(flatten([nation.moving_armies for nation in self.nations if nation != i]))
  File "/home/thomas/Downloads/Spiele/History Generator/History Generator/civil.py", line 348, in move_armies
    moving_army.step(armies)
  File "/home/thomas/Downloads/Spiele/History Generator/History Generator/group.py", line 25, in step
    self.on_end(self)
  File "./history_generator.py", line 314, in do
    self.attack(attacker, attacker_city, attacking.members, defender, city)
  File "./history_generator.py", line 334, in attack
    if not battle.check_end_battle():
  File "/home/thomas/Downloads/Spiele/History Generator/History Generator/martial.py", line 516, in check_end_battle
    self.battle_over(self)
  File "./history_generator.py", line 362, in end_battle
    attack_city.capture(battle.a_army, a)
  File "/home/thomas/Downloads/Spiele/History Generator/History Generator/civil.py", line 48, in capture
    self.nation.cities.remove(self)
ValueError: list.remove(x): x not in list
can't invoke "event" command: application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"
Title: Re: History Generator Simulator
Post by: kytuzian on January 01, 2016, 08:54:52 am
Yep, yep, got that one, along with several others and some new features. I do appreciate it though.

Download:
http://www.mediafire.com/download/47uyue9xrqdd4bn/History+Generator-2016-01-01.zip

2016-01-01

Major changes:
- Cities now have two types of cells, city and surrounding. Surrounding generates food, people consume food. If there isn't enough food, city tiles can switch into surrounding tiles, and surrounding tiles can be lost altogether.
- If two nations have neighboring cities, they must either be at war with each other or trading with each other. They can no longer be neutral.
- Cities now recruit troops on a monthly, rather than yearly, basis. This should drastically increase the size of battles.

Minor changes:
- Removed cornsilk and snow as possible colors for nations, because they're essentially white and can't really be seen.
- Added WAY more colors for nations.
- Changed default cell size from 5 to 4.
- City names now show above the average location of all their cells, as opposed to just their first cell, as it previously worked.
- Cities no longer change their name when their ownership is changed.
- Battle's window title now shows the name of the city being fought for.
- Tweaked rate at which nations will trade with each other, so trading is less likely.
- Increase rate at which nations declare war for non-religious purposes.
- Added morale bonus for cities which have enough food to feed themselves.
- Decreased chance of revolts.
- Doubled group movement speed.
- Factored the number of nations into the revolt chance. (More nations = fewer revolts)
- Greatly increased the cost of founding cities (10x more expensive).
- Decreased soldier's recruitment cost and upkeep.
- Armies will now return to their owning nations cities if the city they meant to attack is no longer of the war.
- Reinforcing armies will now attack their destination if it has been taken over by an enemy. Otherwise, they will also return to the original nation.
- Armies from defeated cities will now leave and return to another city of the nation if there is one. If there isn't one, they will stay and fight to the end.
- Removed the header for each month, instead printing the date along with each message.
- Added this changelog file to the release.

Bug fixes:
- Fixed bug where crash would occur when city had already been taken and was attacked again.
- Fixed bug where nations could trade with nations they were already at war with.
- Fixed issue with reinforcing other cities hanging up the game.
- Stopped nations from declaring war on themselves, because that's stupid.
Title: Re: History Generator Simulator
Post by: kytuzian on January 02, 2016, 05:45:28 pm
Finally starting to add some GUI to this program, hopefully it will be more enjoyable now that you can sort of interact with it (although still not directly influence anything yourself, of course).

Download:
http://www.mediafire.com/download/pupxhfv1a2e3t5z/History+Generator-2016-01-02.zip

Changes:
Major changes:
- Added fairly simple GUI to a new control window to allow for the control of time passing. Run continuously makes the simulation keep running until the box is ticked again.
- Garrisons are no longer a separate army, but rather randomly drawn from the city's population (at most half of the population) when it is attacked.
- Armies now consume food, and will partially disband if there isn't enough food (a random amount, based on how much food is missing).
- Added GUI for examining cells and cities (just click on a cell to open it).

Minor changes:
- Added more constants instead of magic numbers at the top of various files.
- Allowed troops to defend themselves against projectiles.
- Gave units more ammunition based on the number of soldiers in their unit and their discipline.
- Removed more printing from console.
- Added the current year to the main window title.
- Tuned down soldier costs a little, to decrease ridiculously large army sizes.
- Added a display for the city's population and army size.
- Cities can now completely starve. This shoud fix the problem with millions of little cities clogging up the map view.
- Fewer people leave cities when there isn't enough food to feed all of them (randomized).
- Not having enough food now decreases morale (in addition to increasing morale when there is enough food).
- Cities are now more likely to expand when they have more surrounding farmland.
- Increased chance for caravans to go the nation's own cities over trade partners.
- Nations can no longer have the same color (although some colors are pretty similar anyway).
- Removed some similar colors.
- Slowed down the default simulation speed (delay between steps).

Bug fixes:
- Fixed bug that made it more or less impossible for cities to actually build any improvements.
- Fixed bug where soldiers would use their opponents discipline to determine their fatigue.
- Fixed bug where army couldn't return if an attack failed and its nation lost all its cities.
- Fixed bug where losses wouldn't scale with FOOD_PER_PERSON.
- Fixed bug where offices wouldn't actually be simulated.
Title: Re: History Generator Simulator
Post by: kytuzian on January 03, 2016, 06:34:09 pm
Alright, some more changes, mostly just adding new GUIs to inspect various aspects of the simulation. Also I made a video explaining how to install and run the simulator:
https://www.youtube.com/watch?v=QHqwqbvspxQ

Download:
http://www.mediafire.com/download/z52vuy847f8dp6c/History+Generator-2016-01-03.zip

Major changes:
- Created informational GUIs for nations, religions, and armies.

Minor changes:
- Stopped cell information window from opening on a focus switch to the map view.
- Added a city founded event.
- Added city's history to its information window.
- Food now spoils based on several factors, the amount of food, the age of the city, and the number of cells in the city.
- Reorganzing some event data.
- Increased the average life expectancy.

Bux fixes:
- Fixed crash when attempting to add more improvements.
- Fixed issue with cities not producing any money.
- Fixed issue with troop radius not properly scaling.
Title: Re: History Generator Simulator
Post by: My Name is Immaterial on January 03, 2016, 08:08:56 pm
so many updates
i've got whiplash
:P
Title: Re: History Generator Simulator
Post by: Skyrunner on January 04, 2016, 09:45:52 am
No screenshots? :o
Title: Re: History Generator Simulator
Post by: MarcAFK on January 04, 2016, 09:51:16 am
Very interesting.
Title: Re: History Generator Simulator
Post by: Antsan on January 04, 2016, 09:56:48 am
I haven't checked the latest version yet, but unless this means what I want (which I doubt)
Quote
- Stopped cell information window from opening on a focus switch to the map view.
Could you add an option to not display battles? It's annoying when I let this run in the background and every two seconds the battle window pops up in front of whatever I am doing at the time.
Title: Re: History Generator Simulator
Post by: Sacasco on January 04, 2016, 04:07:10 pm
Wow. I am incredibly impressed. How have I never seen this before?
I've thought occasionally about how I'd do something like this and while you've approached it very differently to my thoughts, I can't argue with the results.
You seem to have built, looking through a couple of the scripts very briefly, a lot which isn't yet used. I'm curious, what are you planning to use people and offices for? (Unless I'm being stupid and have missed it...)
Are the reinforcements other armies arriving or something else entirely? How are you working out the rate at which reinforcements arrive and how many start on the battlefield?
I don't know whether this is a bug or intended behaviour (the eternal conundrum...), but most nations seem to be using almost entirely ranged units.

A few comments:

So yes, seriously impressed by this and looking forward to seeing it progress!
Title: Re: History Generator Simulator
Post by: kytuzian on January 04, 2016, 11:24:31 pm
so many updates
i've got whiplash
:P

And now, for another update:

The biggest changes here are the religion ones, although there are some other significant ones.

Download:
http://www.mediafire.com/download/314aisep5mbvhbl/History+Generator-2016-01-04.zip

Major changes:
- Cities from the same nation now merge together when they have a neighboring square, ideally reducing the overall amount of overlapping cities. Merged cities will display events from all previous merged cities.
- Religions tolerance is no longer a single number. It is now calculated from a base tolerance, modified by the gods domains and their importances.
- Religions can now change over time, changing their tolerance (gods can be added and removed from the pantheon, assuming they're polytheistic).
- Added lots of new events for all the religion stuff.

Minor changes:
- Events are now outputted on a monthly, rather than yearly, basis.
- Reduced the chance of religions being monotheistic (20% by default).
- Events in the nation/city display screens are now displayed in chronological order (as opposed to the no order from before).
- Made tolerance for religions actually make sense (higher tolerance is more tolerant, rather than less).
- Gods now have an importance attributes that tracks how important the god is to the civilization.
- Keeping the civilization's capital city for a year adds morale.
- Added a new option to the main control screen that allows battle windows to be minimized by default.
- The controls window will now reopen if closed.
- People now have an effectiveness stat that affects how well they perform the duties of their office (higher tax multipliers).
- Offices can now provide a morale bonus every year for the nation.

Bug fixes:
- Fixed bug where nation actually could be the same color as each other.
- Fixed bug where gods sometimes displayed no domains in the information window.

No screenshots? :o

I just added a couple basic ones to the OP. I should probably start adding them with updates from now on.

I haven't checked the latest version yet, but unless this means what I want (which I doubt)
Quote
- Stopped cell information window from opening on a focus switch to the map view.
Could you add an option to not display battles? It's annoying when I let this run in the background and every two seconds the battle window pops up in front of whatever I am doing at the time.

You're right, that means that the first click (to focus on the window when its not already focused), won't open the information window for the cell. However, I did address your problem in this release, there's now a checkbox you can click on and all the battle windows will start minimized instead of popping up over whatever you're doing.

Wow. I am incredibly impressed. How have I never seen this before?
I've thought occasionally about how I'd do something like this and while you've approached it very differently to my thoughts, I can't argue with the results.
You seem to have built, looking through a couple of the scripts very briefly, a lot which isn't yet used. I'm curious, what are you planning to use people and offices for? (Unless I'm being stupid and have missed it...)
Are the reinforcements other armies arriving or something else entirely? How are you working out the rate at which reinforcements arrive and how many start on the battlefield?
I don't know whether this is a bug or intended behaviour (the eternal conundrum...), but most nations seem to be using almost entirely ranged units.

A few comments:
  • In battle, I'd make the arrows fly faster. As in, at least two or three times as fast. Archers seem to be having a lot of trouble dealing with smaller units or fast-moving ones, and that could deal with that problem, as well as improving their ability to deal with a large number of units. This should also stop units running out of ammunition so quickly.
  • I'd recommend removing some of the lighter colours, as I am having difficulty seeing them on the world map, and find it impossible to see their arrows, especially.
  • Some battles last a long time, simply because the reinforcements are coming on so slowly. Like I said earlier, I don't know how it works, but it seems a bit odd having over 700 reinforcements arriving in units of 10 at a time.
  • I'd also either make the armies smaller or have each individual represent multiple soldiers. I feel that the battles are slightly too large for the system you're using.

So yes, seriously impressed by this and looking forward to seeing it progress!

Thank you! Out of curiosity, what's different from the way you would have approached it? And yes, you're correct, there's a lot that has no use or minimal use (people and offices are among them, as offices do affect the amount of money gained from taxes, but that's pretty much it). There's also alliances, but those do literally nothing. I finally fleshed out religions a bit, but I plan to do a lot more there too.

Reinforcements are more troops from the same army arriving. Essentially, each battle is a series of skirmishes. I created this system because it made the battles run much much faster, having 10000, 20000, or possibly more troops on the screen at a time is just too slow. As for using all ranged units, well, they shouldn't. It's a 50-50 chance for each unit type, so it should be pretty even. Based on my own observations, it seems to be working as intended (although perhaps that's not the right ratio for ranged to non-ranged unit types, but that's a separate problem).


Thanks again!
Title: Re: History Generator Simulator
Post by: Antsan on January 05, 2016, 12:48:07 am
You're right, that means that the first click (to focus on the window when its not already focused), won't open the information window for the cell. However, I did address your problem in this release, there's now a checkbox you can click on and all the battle windows will start minimized instead of popping up over whatever you're doing.
Thanks! That helps a lot.

Quote
Reinforcements are more troops from the same army arriving. Essentially, each battle is a series of skirmishes. I created this system because it made the battles run much much faster, having 10000, 20000, or possibly more troops on the screen at a time is just too slow. As for using all ranged units, well, they shouldn't. It's a 50-50 chance for each unit type, so it should be pretty even. Based on my own observations, it seems to be working as intended (although perhaps that's not the right ratio for ranged to non-ranged unit types, but that's a separate problem).
I think I have seen that there are different unit types (further divided than only ranged/close combat, based on unit size, attack/defense, movement speed…). It also seems that reinforcements always arrive in a certain order, that is, first comes one unit type and when those are all done for the next unit type appears and so on.
It seems strange.
Also it often enough happens that one army sends much more per skirmish than the other one despite having less reinforcements overall. The army sending more troops at once seems to be at an advantage.
Some fights can be pretty one-sided, completely independent of unit size. Some units just mop up opposing units. It almost seems as if one soldier there can kill hundreds of enemies before dying. Just now I observed a battle where close-combat units were doing moderate damage to ranged units. When the ranged units ran out of ammo and went to close combat themselves, they suddenly dominated the battlefield.
Title: Re: History Generator Simulator
Post by: exdeath on January 05, 2016, 06:37:13 am
Cool. I am also doing some generator.

But my one is more simplified on some aspects and more detailed on others.
It doesnt continue to generate history.
But can generate, scifi (hard or soft), fantasy (low or high), science fantasy and normal worlds, with or without historical and scientifical realism.
But my one is more a textual thing than a graphical one.


Another coincidence is that I am also making on python.
Anyway, you can use python to exe program, to turn your code into executables and then people will not need to have python to run.

Will create a thread about it when get home.
Title: Re: History Generator Simulator
Post by: Antsan on January 05, 2016, 07:34:16 am
Another thing about battles: I have seen some ranged squads that were way more effective as soon as they ran out of ammo and started engaging in close combat. When they are attacked before running out of ammo they insist on continuing to use their ranged weapons, though.
I get why you'd want to use a ranged weapon instead of charging into battle. That one makes perfect sense, especially when you need to cross some distance in which you do no damage while receiving damage from enemy archers (or whatever they are).
It doesn't make sense to fire ineffectively into the guy who's charging at you and already at close distance when you could do way more damage (and thus prevent your demise) by using your close combat weapon.
It would be cool if every ranged unit had a close-combat distance. If an enemy squad gets closer than that, they should change to melee and charge to meet their attackers.

Quote
Anyway, you can use python to exe program, to turn your code into executables and then people will not need to have python to run.
I prefer source distributions. I am on Linux, meaning that I cannot run python programs packed up in an *.exe when I could run them just fine if they were distributed in source form.
Title: Re: History Generator Simulator
Post by: kytuzian on January 05, 2016, 07:18:58 pm
Okay, so this is an average-looking release, but it took a bit of work because a lot of the underlying systems had to be changed (especially for the names). The main thing in this release is that ranged units are now more balanced and make more sense (thanks to Antsan's suggestions), and that nation names are a lot more interesting.

Nation names are now composed of three main sections, the modifiers, the government type, and the places. Modifiers are words like "Grand", "Illustrious", "Federated", et cetera, that just describe the nation. While these were previously in the simulation, a nation only had one, but now the nation can have any number (including 0) modifiers. I added a couple more government types (Socialist State, Khanate, Hegemony, Sultanate, Principality, and Commonwealth), but there's still just one for each nation. Finally, the places. Each nation now starts out as a city state (so if its name was, for example, "The Grand Republic of Omkirna", then its starting city would be named "Omkirna"). When a nation founds a new city or captures one, it can add the new city's name to it's place name list, which can change its name to, for example, "The Grand Republic of Omkirna and Ueuaew". Nations are more likely to take other city's names if they are more tolerant (I think this makes sense).

Finally, nation's names can also change naturally over time, adding/removing modifiers as well as place names (although place names can only be lost if the city is no longer under the nation's control and the nation has at least one other name). Sometimes this leads to antiquated names referring to cities that the nation no longer controls, but I like to call that a feature, rather than a bug (and it was intended anyway).

Examples:
The Glorious Glorious Principality of Fuzpyuoc, Rayvxjshqii, and Fgqfohyayvfteesya (obviously its pretty glorious)
The People's Illustrious Federated Republic of Lyyn

Also note, these are exceptionally long names. Nations like "Democratic States of Zympeyiiiue" are still common, and much more likely to be seen.

As for the ranged units, they will now switch to melee when their target gets too close, and switch back to ranged once their target is far enough away. Additionally, ranged units only have half their strength when fighting in melee.

A ranged unit which just valiantly fought off a melee attack.
(http://i.imgur.com/75tP909.png)

Download:
http://www.mediafire.com/download/fb9bpxje8gw5px5/History+Generator-2016-01-05.zip

The full changelog:

Major changes:
- Ranged troops now switch to melee when their target gets too close (and switch back once their target is far enough away, if applicable).
- Nations names are now composed of various modifiers, a government type, and several place names.

Minor changes:
- Ranged troops are now half as strong in melee.
- Removed some more light colors.
- Added a couple more government types.
- Added some more government name modifiers.
- Slightly optimized battles.
- Units will now switch their targets to the closest unit every few steps even if their previous target has not been fully killed.
- Under the hood stuff for events with nations (ids so we can keep track of nations even with changing names).
- Nation list in the control menu no longer shows the age of the nation.
- Slightly increased projectile movement speed (5 to 6).

Bug fixes:
- Fixed battle sizes (now troops are actually in the right proportions).

I think I have seen that there are different unit types (further divided than only ranged/close combat, based on unit size, attack/defense, movement speed…). It also seems that reinforcements always arrive in a certain order, that is, first comes one unit type and when those are all done for the next unit type appears and so on.
It seems strange.
Also it often enough happens that one army sends much more per skirmish than the other one despite having less reinforcements overall. The army sending more troops at once seems to be at an advantage.
Some fights can be pretty one-sided, completely independent of unit size. Some units just mop up opposing units. It almost seems as if one soldier there can kill hundreds of enemies before dying. Just now I observed a battle where close-combat units were doing moderate damage to ranged units. When the ranged units ran out of ammo and went to close combat themselves, they suddenly dominated the battlefield.

Another thing about battles: I have seen some ranged squads that were way more effective as soon as they ran out of ammo and started engaging in close combat. When they are attacked before running out of ammo they insist on continuing to use their ranged weapons, though.
I get why you'd want to use a ranged weapon instead of charging into battle. That one makes perfect sense, especially when you need to cross some distance in which you do no damage while receiving damage from enemy archers (or whatever they are).
It doesn't make sense to fire ineffectively into the guy who's charging at you and already at close distance when you could do way more damage (and thus prevent your demise) by using your close combat weapon.
It would be cool if every ranged unit had a close-combat distance. If an enemy squad gets closer than that, they should change to melee and charge to meet their attackers.

I prefer source distributions. I am on Linux, meaning that I cannot run python programs packed up in an *.exe when I could run them just fine if they were distributed in source form.

First off, thanks for all the feedback.

Yes you are correct, there are five properties that affect a unit in battle. Their strength, health, discipline, fatigue, and whether they are ranged or not. I'll update the OP with a more thorough explanation, but essentially it is as follows. The strength and base health of the unit are displayed (in that order) above the unit in a battle.


Yes that is how the reinforcements work right now. I will probably fix that, but for now, I think it's alright. Yes you are right, that apparently had been a bug for a long time, but I have now fixed it. Thanks! The reason that some units seem to mop up the battlefield while other fights are much more even is that the attackers have a fully trained army, whereas the defenders are all levies drawn up from the general population. Armies in the defending city only actually participate in the battle if its the nation's last city, otherwise they run away to other cities owned by the nation.

Yeah it didn't make any sense to keep shooting even while in melee, but I changed it now.

Anyway, you can use python to exe program, to turn your code into executables and then people will not need to have python to run.

In addition to being more portable, I feel providing the source is better because then people can look through it and modify it or whatever else they want. I suppose I could do both, but nobody's complained about the lack of a .exe.
Title: Re: History Generator Simulator
Post by: Antsan on January 06, 2016, 01:11:22 am
Thanks for making these changes! I'm glad to have helped.
Looks really cool how the shooters run to meet their attackers. From the first few battles I've seen now it looks like their survivability went up, but that's rather hard to judge. At least it doesn't feel anymore like they're getting slaughtered without putting up resistance and a single melee unit normally doesn't destroy multiple waves of ranged units anymore.

Quote
- Units will now switch their targets to the closest unit every few steps even if their previous target has not been fully killed.
Dedication is good, but it can be overdone. Good the soldiers now understand this, too.

Quote
- Fixed battle sizes (now troops are actually in the right proportions).
Yeah, that didn't seem right.

Quote
The reason that some units seem to mop up the battlefield while other fights are much more even is that the attackers have a fully trained army, whereas the defenders are all levies drawn up from the general population. Armies in the defending city only actually participate in the battle if its the nation's last city, otherwise they run away to other cities owned by the nation.
Ah, that makes sense.
I see potential for diversifying nations here: Give every nation some fraction between 0 and 1. That fraction determines what portion of an army stays in an attacked town for defense. Take the square root of this number if the capital city is attacked. That same fraction would be used to determine how large the armies are that get send out for attack – larger fractions mean less troops are sent, to keep them prepared for defense.

A problem with the world map: It is obviously larger than the part that is shown in the map window, but scrolling around is not possible, as far as I can tell, so I never get to see some of the cities. There have been a few games where many (a majority of?) battles happened in cities I couldn't see. Maybe even just center the map on the city last attacked?
Title: Re: History Generator Simulator
Post by: kytuzian on January 07, 2016, 05:55:33 pm
Alright--a new release. I was a little busy last night, and didn't have time to test out any of the changes I made during the day. But now I have, and I think everything is mostly stable (though I haven't run an all-night test yet). I also made a couple more changes today.

The major change here is that now nation types affect the nation. The particulars are in the change log, but every nation type affects one of the follow five stats in some way:


Offices and people are now also slightly different, with people living to older ages and being able to hold more than one office, and hold office more than once. Offices also now have term limits (for now they all do, but that'll change once I add rulers and such).

Download:
http://www.mediafire.com/download/qomovday4wv423q/History+Generator-2016-01-07.zip

Changelog:
2016-01-07

Major changes:
- People can fill multiple offices at the same time, and can fill offices again after their term ends.
- Government type bonuses, each + or - refers to a quarter buff/debuff (++ is x2, -- is x0.5).
    - Socialism: food ++, morale --
    - Democracy: morale ++, efficiency -
    - Republic: morale +
    - Theocracy: morale +, tolerance --
    - Kingdom, Principality, Khanate, Sultanate: conscription +, morale -
    - Hegemony: conscription ++, morale --
    - Confederacy: morale +, efficiency -
    - Meritocracy: efficiency++, morale -
    - Aristocracy, Oligarchy: conscription +, efficiency -
    - States, Commonwealth: None

Minor changes:
- Removed even more light colors that are essentially white.
- Battle window title now uses short nation names rather than full names.
- Tweaked lose and gain god chances.
- Tweaked lose and gain modifier chances (for nation names).
- Tweaked some window sizes.
- Nations are no longer destroyed when they lose all their cities, but most lose all their cities and armies.
- Made world wrap around.
- Increased average life expectancy to 30 (from 20).
- Offices now have term lengths.
- Removed the "person has died!" message.
- Removed all religion printing messages.
- Added religion history to religion information window.

Bug fixes:
- Fixed for real this time the bug where nations could be the same color as each other.
- Fixed bug where revolts would create a new city instead of just having the cities that revolted.
- Speculatively fixed issue where population could go below 0.
- Fixed bug where nations would not be removed from trade treaties when destroyed.

Looks really cool how the shooters run to meet their attackers. From the first few battles I've seen now it looks like their survivability went up, but that's rather hard to judge. At least it doesn't feel anymore like they're getting slaughtered without putting up resistance and a single melee unit normally doesn't destroy multiple waves of ranged units anymore.

Quote
The reason that some units seem to mop up the battlefield while other fights are much more even is that the attackers have a fully trained army, whereas the defenders are all levies drawn up from the general population. Armies in the defending city only actually participate in the battle if its the nation's last city, otherwise they run away to other cities owned by the nation.
Ah, that makes sense.
I see potential for diversifying nations here: Give every nation some fraction between 0 and 1. That fraction determines what portion of an army stays in an attacked town for defense. Take the square root of this number if the capital city is attacked. That same fraction would be used to determine how large the armies are that get send out for attack – larger fractions mean less troops are sent, to keep them prepared for defense.

A problem with the world map: It is obviously larger than the part that is shown in the map window, but scrolling around is not possible, as far as I can tell, so I never get to see some of the cities. There have been a few games where many (a majority of?) battles happened in cities I couldn't see. Maybe even just center the map on the city last attacked?

Yeah, it look like they're surviving better, but I can't really tell. Their halved strength is also affecting that, of course.

Hmm, that's a possibility. I think I might do that, and maybe make offices able to affect that as well.

Actually it isn't, the cities just can't expand past it. Now I've made the world wrap around though (but I'm not sure this is the optimal solution, just the easiest. I might make the world bigger than the screen later, but I'm not really sure because that's a pretty drastic change with how everything is set up), so they just expand to the other side.
Title: Re: History Generator Simulator
Post by: Antsan on January 08, 2016, 09:40:54 am
Actually it isn't, the cities just can't expand past it. Now I've made the world wrap around though (but I'm not sure this is the optimal solution, just the easiest. I might make the world bigger than the screen later, but I'm not really sure because that's a pretty drastic change with how everything is set up), so they just expand to the other side.
Well, that change certainly fixes that problem, but this makes me wonder – the cities certainly weren't displayed on the map. So, where were they?

One thing I noticed was that city growth is unlimited (as long as there's no other cities in the way). The need for food alone doesn't seem to be sufficient for limiting that. Maybe introduce building material as a limited resource that can only be obtained from nature (and then gets depleted) or by tearing down parts of already built stuff? That doesn't seem too sensible. Hrm…
Title: Re: History Generator Simulator
Post by: kytuzian on February 09, 2016, 12:54:01 pm
Alright. Well it's been a while, but that time has not been spent working on the history generator as I got distracted with another project and was otherwise busy.

Main new things in this version are that ranged units now aim ahead of their targets (so they are still useful at range), and there are several types of buildings, as opposed to the generic "improvements" that the previous system used.

Download:
http://www.mediafire.com/download/q7yf62s944gifgj/History+Generator-2016-02-09.zip

Full changelog:
2016-02-09

Major changes:
- Added a general history screen for both religions and the entire world.
- Units now aim ahead of their targets so they aren't useless at long range.
- Added a bunch more types of buildings with different effects.
    - Houses: Population capacity: 100, Tax rate: x1.001, Cost: 100
    - Farm: Population capacity: 10, Food output: 100, Cost: 200
    - Fishery: Population capacity: 5, Food output: 150, Cost: 200
    - Ranch: Population capacity: 5, Food output: 200, Cost: 300
    - Mine: Population capacity: 20, Money output: 500, Cost: 600
    - Market: Tax rate: x1.01, Money output: 1000, Cost: 1500

Minor changes:
- Removed some more similar colors.

Bug fixes:
- Fixed how socialism affects food production (previously was twice what it was supposed to be).

Well, that change certainly fixes that problem, but this makes me wonder – the cities certainly weren't displayed on the map. So, where were they?

One thing I noticed was that city growth is unlimited (as long as there's no other cities in the way). The need for food alone doesn't seem to be sufficient for limiting that. Maybe introduce building material as a limited resource that can only be obtained from nature (and then gets depleted) or by tearing down parts of already built stuff? That doesn't seem too sensible. Hrm…

Yeah I noticed that too, but it seems to have been fixed now, and I haven't seen it come back up, so I'm not too concerned.

That's also true, but I don't think it's really a big deal because the cities don't seem to become too big (big, but not too big). Right now their growth is limited by how many cells they occupy, although that's a little artificial and I would like it to be limited by some sort of building material.

I'm also planning on having actual terrain, which should make it much easier to do that.
Title: Re: History Generator Simulator
Post by: Worldmaster27 on February 13, 2016, 01:13:24 am
PTW, this sounds cool, best of luck!
Title: Re: History Generator Simulator
Post by: Antsan on February 14, 2016, 07:08:50 pm
Only downloaded the new version now, haven't played it yet.

Terrain should do nicely, especially with regions in which building stuff is impossible or extremely hard – mountains, oceans, lakes, swamps…
Regarding the size of cities: I think there's a mismatch between what I expect the size of the world to be and what you intend it to be. I don't know, somehow the fact that the whole map is closed an wrapping implied that I am looking at something Earth-sized. Even if it was only the size of Asia or even Europe, the cities still would be excessively gargantuan.

But now that I think about it, if the map was actually Earth- or Asia-sized, the resolution probably wouldn't be large enough to allow city growth across the grid and I think it would be very limited with Europe-size, too.

What is the size of the map intended to be?
Title: Re: History Generator Simulator
Post by: exdeath on February 16, 2016, 06:44:19 am
Add specific tile sizes and multitiles to, with that, have something dwarf fortress dont have.
Also it becomes easier to think about stuff later, as some example human walking speed, jump, falling damage and etc... is totally unrelated in DF
Title: Re: History Generator Simulator
Post by: Antsan on February 26, 2016, 06:27:41 am
I think there are missing parentheses in civil.py
I already fixed it on my machine and the crashes this has been causing have ceased.

In line 523:
Code: [Select]
            improvement_chance = self.building_count() // int(log(self.population))+ 1This is causing a division by zero, which is what you probably wanted to deal with by adding this +1 at the end. The problem is, of course, that division has higher priority than addition, so it should look like this:
Code: [Select]
            improvement_chance = self.building_count() // (int(log(self.population)) + 1)
Title: Re: History Generator Simulator
Post by: kytuzian on March 05, 2016, 10:09:00 am
Alright, a new version, although I still haven't been working on it that much, but I think I finally have some time to dedicate to this some more.

First off, I put the project onto GitHub:
https://github.com/Kytuzian/History-Generator

However, I will continue to post simple download links, so here it is:
http://www.mediafire.com/download/hmrcp1az762c6cd/History+Generator-2016-03-05.zip

And now, the changes:
2016-03-05
Major changes:
- Officially added research to the game (the file had been there, just unused), although there are very few researches and most don't do anything yet.
- Added weapons such as swords, spears, axes, et cetera to the game, as well as ranged weapons such as stones, slings, bows, et cetera.

Minor changes:
- Allowed time to be advanced by a specific number of years.

Bug fixes:
- Fixed some find-replace errors.
- Fixed occasional divide-by-zero error in civil.py (improvement_chance). Thanks Antsan!

Only downloaded the new version now, haven't played it yet.

Terrain should do nicely, especially with regions in which building stuff is impossible or extremely hard – mountains, oceans, lakes, swamps…
Regarding the size of cities: I think there's a mismatch between what I expect the size of the world to be and what you intend it to be. I don't know, somehow the fact that the whole map is closed an wrapping implied that I am looking at something Earth-sized. Even if it was only the size of Asia or even Europe, the cities still would be excessively gargantuan.

But now that I think about it, if the map was actually Earth- or Asia-sized, the resolution probably wouldn't be large enough to allow city growth across the grid and I think it would be very limited with Europe-size, too.

What is the size of the map intended to be?

If you have any ideas for how to do the terrain, I'd appreciate them. I've looked a little into noise generation stuff, but I haven't found a good one for Python yet (although I'm sure they exist), so that'd be great if someone could link me to one. Otherwise, I'll just keep looking.

To be honest, I'm not entirely sure what the size of the map is intended to be either. I never really had an intention. If I had to guess, I'd say probably like, the size of a smallish country (Ireland, perhaps). Keep in mind, you can adjust the tile size all the way down to 1 pixel (from 4), so it could be up to 4 times larger than that. And if I add scrolling, it could be any size, really (and it might not be that hard, at least, not as hard as I originally imagined, as I can probably just add scrollbars).

Add specific tile sizes and multitiles to, with that, have something dwarf fortress dont have.
Also it becomes easier to think about stuff later, as some example human walking speed, jump, falling damage and etc... is totally unrelated in DF

I think I've already got things that Dwarf Fortress doesn't have (research now, showing battles between nations, random languages, changing nation names, probably a couple others), and the goal isn't to replicate Dwarf Fortress really, except in that both include world generation.
Title: Re: History Generator Simulator
Post by: kytuzian on March 06, 2016, 08:32:04 pm
http://www.mediafire.com/download/kqsuz80l8yd84ab/History+Generator-2016-03-06.zip

2016-03-06
Major changes:
- World is now scrollable, and four times the size (twice as large in either direction).
- Added ability to zoom (change tile size from 1 to 30).
- Units are now armed with multiple weapons, a primary weapon, and a side arm (always melee). Melee units do not use their side arms yet.
- Material of unit's weapons now affect how much attack/defense they have.
- Added the "lab" building (adds to research rate).

Minor changes:
- Removed control window and moved controls to the main window.
- Tile size increased from 4 pixels to 6 pixels.
- Starting nation amount increased from 5 to 8.
- Group movement speed increased from 3 tiles/step to 5 tiles/step.
- Added more weapons (pike, crossbow, claymore, javelin, shortsword, sling staff, et cetera).
- Changed amount of ammunition based on ranged weapon (stones: 6, sling: 25, javelin: 3, bow: 15, crossbow: 15, sling staff: 20)
- Changed reload time based on ranged weapon (stones: 40, sling: 50, javelin: 40, bow: 100, crossbow: 300, sling staff: 60)
- Changed how reloading works (units shoot much more concentrated volleys now).
- Modified research rate (now a random number based on the population, instead of a fixed amount based on the population).
- Added more researches (Steel, Improved Housing (x1.5 to population capacity of buildings), Improved Mining (x2 to money output of mines))

Bug fixes:
- Fixed bug where improved agriculture did not affect the nation's farm buildings.
- Fixed bug where the game would crash if a nation's tolerance was 0.
- Fixed bug where cities could try to merge twice, removing both cities and destroying the nation.
- Fixed error where cities were not removed properly from their previous owning nation (I think, let me know if there are any errors in the console, if you would).
- Fixed error where cities were not properly transferred to the revolting nation during a revolt.
- Fixed bug where buildings were never actually built in cities.
Title: Re: History Generator Simulator
Post by: Antsan on March 09, 2016, 07:17:53 am
Quote
If you have any ideas for how to do the terrain, I'd appreciate them.
Well, this is a far shot, since it's really computationally intensive, but it has really awesome results:
Worldengine (https://github.com/Mindwerks/worldengine)
That thing does pretty good plate tectonics and then computes biomes, but startup time if you used this would probably be a few minutes or maybe even an hour, depending on size. Maybe generate with a smaller resolution and then scale up and smooth?
Title: Re: History Generator Simulator
Post by: kytuzian on March 09, 2016, 07:57:46 am
Download:
http://www.mediafire.com/download/w88pb73w373wha6/History+Generator-2016-03-09.zip

2016-03-09
Major changes:
- Added armor of a few basic types (cloth, leather, chainmail, plate).
- Levies are now recruited from cities when attacks are sent, and they return home if the target city is conquered.

Minor changes:
- Added some more weapons (Atlatl, Hammer)
- Slightly changed the weapon lists for starting troops (no more daggers, dirks, or rondels).
- Tweaked some weapon stats.
- Time no longer advances during battles (because honestly, a battle should never be THAT long).
- Decreased population growth rate.
- Capital cities can no longer revolt.
- Added resources other than money and food (metal, leather, cloth, and wood). Currently unused.
- Added new buildings to produce the resources (leatheworker, weaver, and woodcutter).
- Decreased troop count, increased the average tier of troops.
- Made the world slightly bigger so it's a square.

Well, this is a far shot, since it's really computationally intensive, but it has really awesome results:
Worldengine (https://github.com/Mindwerks/worldengine)
That thing does pretty good plate tectonics and then computes biomes, but startup time if you used this would probably be a few minutes or maybe even an hour, depending on size. Maybe generate with a smaller resolution and then scale up and smooth?

That's looks really cool, but I was looking for something that's more of a quick noise generator, and I think I've found something. Thanks though.
Title: Re: History Generator Simulator
Post by: Antsan on March 09, 2016, 01:42:03 pm
Quote
- Capital cities can no longer revolt.
I don't know. It seems obvious, but many modern capitals are actually rather progressive in relation to other parts of the country and I certainly can imagine a revolution starting in a capital city.

Quote
That's looks really cool, but I was looking for something that's more of a quick noise generator, and I think I've found something. Thanks though.
Thought as much. As I already said, it seems to be overkill for this project.

I've just had an idea: I swa these giant armies and realized that populations really were growing really damn fast. I see you already did something about that, but my first thought was to add natural disasters. They were popular in some games but at whole I think they're underrepresented in civilization simulations.
Title: Re: History Generator Simulator
Post by: Lukeinator on March 10, 2016, 01:15:53 pm
This looks cool. I don't know how to get it to work though.
Title: Re: History Generator Simulator
Post by: kytuzian on March 10, 2016, 02:07:17 pm
New update. Finally we have some basic terrain, although I'm unsure about how I want to expand it. I'm thinking some rainfall stuff to determine forests, and using the temperature I already have to create snow/ice.

Download:
http://www.mediafire.com/download/xkpbhb7fo0vdjcw/History+Generator-2016-03-10.zip

2016-03-10
Major changes:
- Added terrain (land, water, and sand).
- Additionally, temperatures are higher by the equator.
- Food production is affected by temperature, as well as the number of water tiles around the tile.

Minor changes:
- Made houses significantly cheaper.
- Greatly decreased the population capacity of tiles (city to 100, surrounding to 1) because buildings should provide most of the city's population capacity.
- Removed green colors that were too similar to the land color.
- Increased levy amount.
- Increased group movement speed from 5 to 10.
- Changed run continuously checkbutton to "Run until battle" button.

This looks cool. I don't know how to get it to work though.

Did you watch the video tutorial? If so, just let me know which part is confusing and I can help.

Quote
- Capital cities can no longer revolt.
I don't know. It seems obvious, but many modern capitals are actually rather progressive in relation to other parts of the country and I certainly can imagine a revolution starting in a capital city.

Quote
That's looks really cool, but I was looking for something that's more of a quick noise generator, and I think I've found something. Thanks though.
Thought as much. As I already said, it seems to be overkill for this project.

I've just had an idea: I swa these giant armies and realized that populations really were growing really damn fast. I see you already did something about that, but my first thought was to add natural disasters. They were popular in some games but at whole I think they're underrepresented in civilization simulations.

Hm. I suppose that also makes sense. I don't know if I'll change it though, because honestly I don't know how much of a difference it really makes.

Yeah, I found a really really simple implementation to use for my project, and I think it's definitely within the range of acceptably fast.

That's a good idea--I'll probably implement that when I get to the rest of the weather stuff, though. Right now, I just decreased military recruitment, population growth, and population capacity of cities, which has a similar effect. Also it paves the way for better progression, as better technologies will be a real improvement, as population is no longer a nigh-inexhaustible resource.
Title: Re: History Generator Simulator
Post by: kytuzian on March 13, 2016, 10:26:00 am
Download:
http://www.mediafire.com/download/4vfbcnbm6c6jfj2/History+Generator-2016-03-13.zip

2016-03-13
Major changes:
- Weapons now have different ranges.
- Rainfall is now simulated to generate forests.
- World no longer wraps around.

Minor changes:
- Increased troop's defense to ranged attacks.
- Improved some weapons reload times.
- Increased defending garrison size.
- Tweaked food production multipliers.
- Removed some more colors.
- Changed display string for nations (removed size and changed "Improvements" to "Buildings")

Bug fixes:
- Made levies actually return to the population, instead of joining the army.
- Fixed bug where units would fight with their sidearm instead of their primary.
Title: Re: History Generator Simulator
Post by: kytuzian on April 02, 2016, 12:21:38 pm
Download:
http://www.mediafire.com/download/hewd7libcu1d58m/History+Generator-2016-04-02.zip

Basically, this release makes the simulation a lot less ridiculous (A LOT). It's still a work in progress, of course. No fancy new features, but you'll no longer see civilizations that have quintillions of monies or cities that can fit trillions of people--in the year 70, no less.

Major changes:
- Buildings now each have a specific size, so only so many buildings can fit within a cell.
- Made the amount of soldiers raised for garrisons and conscripted forces more consistent.

Minor changes:
- Converted food to be a normal resource.
- Removed some more colors.
- Buildings are now contained within cells, not within the nebulousness of a "city".
- Markets and houses no longer change tax rate, but tax score.
- Changed population growth formula.
- Added building GUI to cells which are part of a city.
- Made world smaller (to improve start up time).
- Made houses more expensive.
- Lowered javelin ammunition from 4 to 3.

Bug fixes:
- Fixed bug where cities did not merge resources properly.
- Made buildings be properly affected by the various bonuses.
- Fixed bug where trying to get cell information crashed the program.
- Fixed bug where buildings' productions were not modified by the production multipliers of the terrain.
Title: Re: History Generator Simulator
Post by: kytuzian on April 03, 2016, 09:15:50 pm
Download:
http://www.mediafire.com/download/89x124wtdctauy1/History+Generator-2016-04-03.zip

Lots of balance stuff, as well as some setup for future features.

Major changes:
- Units now carry a visual representation of their primary melee weapon (just a straight line thus far).
- Nations will now periodically rearm their soldiers with different weapons (not necessarily better ones).
- Armies will now always defend the city they are stationed in.
- Units now move at different speeds.

Minor changes:
- Added new weapons (mace, shortbow, longbow, falx, kopis).
- Tweaked some weapon stats.
- Lowered amount of money gained from caravans.
- Decreased tax rates.
- Lowered the rate at which new nations were created (not revolts).
- Armies no longer reinforce random cities (causing performance issues and didn't really help anyway).
- Nations now declare war less often.
- Added wooded and padded armor.
- Increased soldier recruiting costs and upkeep.
- Decreased population growth rate.
- Decreased city expansion rate.
- Increased research points for technologies.
- Some optimization.
Title: Re: History Generator Simulator
Post by: Antsan on April 04, 2016, 03:29:55 pm
Heh, I like the different weapons. It's always a joy to see the guys with the Sarissas coming in. Although I guess this is the point where you'd need some better AI, because right now these things are mainly this effective because everyone is running right into them – if they'd spread out a bit before converging on their target, the long weapons would be way less effective, I assume.

Regarding optimization: It isn't unusual for the simulation to do nothing for a few minutes before battles or maybe after a battle when continuing with the simulation. It's kind of hard to discern with how close battles can be to each other. I assume it's battle preparation, though. Somehow makes more sense.

City size looks a lot better now, though they're still a bit on the large side for my tastes. I don't know, I guess that's a question of taste at this point.
It's really nice that there's not a ton of different nations anymore. This way I can actually make out a bit who is fighting whom and it's nice to perceive a bit of back-and-forth between two warring nations. Now it's not only nice to look at the sprawl but also to root for one side or the other.
Title: Re: History Generator Simulator
Post by: kytuzian on April 04, 2016, 08:39:09 pm
Download:
http://www.mediafire.com/download/bdyz8z6e88z8y2c/History+Generator-2016-04-04.zip

Mostly more balance changes, bug fixing, and performance improvements.

2016-04-04
Major changes:
- Nations now have a small pool of weapons and armor from which they can arm their soldiers.
- Weapons and armor now make soldiers more expensive.
- Projectiles now travel at different speeds.

Minor changes:
- Some more optimizations.
- Nations are more likely to spawn closer to the center.
- Made cities more likely to be founded.
- Increased amount of upgraded troops.
- Upgrading troops now costs money.
- Added polehammer.
- Decreased chance of adding new names to a nation's name.
- Increased battle size.
- Decreased food production.
- Made religious wars much more likely.
- Increased money productions.
- Increased army recruitment.

Bug fixes:
- Fixed bug where weighted_random_choice always was weighted towards lower values.
- Fixed bug where levies weren't properly sent home.
- Fixed bug where person wouldn't be properly removed from office after his term was up.
- Fixed bug where nation could be destroyed before actually being destroyed.
- Fixed bug where buildings would stay in a tile even after it had been destroyed.

Heh, I like the different weapons. It's always a joy to see the guys with the Sarissas coming in. Although I guess this is the point where you'd need some better AI, because right now these things are mainly this effective because everyone is running right into them – if they'd spread out a bit before converging on their target, the long weapons would be way less effective, I assume.

Regarding optimization: It isn't unusual for the simulation to do nothing for a few minutes before battles or maybe after a battle when continuing with the simulation. It's kind of hard to discern with how close battles can be to each other. I assume it's battle preparation, though. Somehow makes more sense.

City size looks a lot better now, though they're still a bit on the large side for my tastes. I don't know, I guess that's a question of taste at this point.
It's really nice that there's not a ton of different nations anymore. This way I can actually make out a bit who is fighting whom and it's nice to perceive a bit of back-and-forth between two warring nations. Now it's not only nice to look at the sprawl but also to root for one side or the other.

Yeah AI is definitely on the list. However, I think I'm going to do AI for nation/city management first, because I think that's a more pressing issue.

I've been looking for the cause of that for a while, and I think I've found it now, so it should run much faster now.

Yes, indeed. I'm also looking into making names easier to pronounce, because it's kind of hard to relate (at least for me), to strangely named nation like Toaqkmohiiaua, rather than Phaag, and therefore, harder to root for them. But that's sort of low priority, I'd rather keep going with bug fixing, balanceing, performance improvements.
Title: Re: History Generator Simulator
Post by: Antsan on April 05, 2016, 03:58:45 am
Sea Green is a bad color for the map. It's kind of hard to see in forests.

"Simply" not allowing soldiers to get closer to each other than whatever should already do a lot for battles, I think. Of course I have no idea how simple that actually is.

An idea to restrict city size more absolutely would be to make food production (not solely) dependent on non-city squares nearby. Shrinking cities or razing conquered ones would start making more sense.

Quote
Yes, indeed. I'm also looking into making names easier to pronounce, because it's kind of hard to relate (at least for me), to strangely named nation like Toaqkmohiiaua, rather than Phaag, and therefore, harder to root for them. But that's sort of low priority, I'd rather keep going with bug fixing, balanceing, performance improvements.
Understandable you want to do other stuff first.
When you get to name generation, I'd recommend Markov Chains. They're not fail-proof, but they certainly are awesome. Even more so, if you keep a separate instance running for each nation, feeding that instance with new names they used. This way they might diversify their languages over time.

Quote
I've been looking for the cause of that for a while, and I think I've found it now, so it should run much faster now.
Hmmm… I haven't been running the game for as long as yesterday yet. The problem is still present, although I'm not sure whether it is as bad as it was yesterday.
Title: Re: History Generator Simulator
Post by: Antsan on April 05, 2016, 06:35:38 pm
Yeah, the problem definitely still persists. After not even a century I can have waiting times of around an hour for a battle to finally start.
Title: Re: History Generator Simulator
Post by: Cryxis, Prince of Doom on April 05, 2016, 07:30:06 pm
PTW
Title: Re: History Generator Simulator
Post by: Antsan on April 06, 2016, 01:08:28 pm
Yeah, the problem definitely still persists. After not even a century I can have waiting times of around an hour for a battle to finally start.
You know what? Scratch that. I'm stupid.
I downloaded the archive and left it at that. The version I was running was still the previous one. [Insert facepalm here]
Title: Re: History Generator Simulator
Post by: kytuzian on April 07, 2016, 07:02:30 am
Download:
http://www.mediafire.com/download/a59mn6ogqz3z84w/History+Generator-2016-04-06.zip

2016-04-06
Major changes:
- Units now move and fight as a unit.
- Cities now also have morale, in addition to nations, which determines their likeliness of seceding during a revolt.

Minor changes:
- Removed some more colors that were hard to see.
- Changed default battle speed.
- Slightly increased population growth rate.
- Removed stones as a weapon.
- Decreased battle size.
- Made war slightly rarer.
- Ranged troops no longer display their weapons until they are within melee range.
- Decreased morale increase and increased morale decrease.

Bug fixes:
- Fixed bug where units were given the wrong amount of ammunition sometimes.
- Fixed bug where abandoned city cells were white instead of their appropriate terrain color.

Yeah, the problem definitely still persists. After not even a century I can have waiting times of around an hour for a battle to finally start.
You know what? Scratch that. I'm stupid.
I downloaded the archive and left it at that. The version I was running was still the previous one. [Insert facepalm here]

Whew. I was running the simulation on my computer and trying to find it, but I hadn't run into it so I thought it was going to be a pain to debug. I assume the issue is gone for you now?

"Simply" not allowing soldiers to get closer to each other than whatever should already do a lot for battles, I think. Of course I have no idea how simple that actually is.

An idea to restrict city size more absolutely would be to make food production (not solely) dependent on non-city squares nearby. Shrinking cities or razing conquered ones would start making more sense.

Quote
Yes, indeed. I'm also looking into making names easier to pronounce, because it's kind of hard to relate (at least for me), to strangely named nation like Toaqkmohiiaua, rather than Phaag, and therefore, harder to root for them. But that's sort of low priority, I'd rather keep going with bug fixing, balanceing, performance improvements.
Understandable you want to do other stuff first.
When you get to name generation, I'd recommend Markov Chains. They're not fail-proof, but they certainly are awesome. Even more so, if you keep a separate instance running for each nation, feeding that instance with new names they used. This way they might diversify their languages over time.

If I understand your comment correctly, that is what I have just done. If I did not...I did something anyway.

Well that's not the only factor. The buildings in the cell as well as the climate of the cell affect production.

Okay, thanks for the suggestion.
Title: Re: History Generator Simulator
Post by: Antsan on April 07, 2016, 11:36:14 am
Yeah, the delay is gone now. I'm really sorry for sending you on a futile bug hunt. :-[

There's a new bug, though:
Code: [Select]
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1540, in __call__
    return self.func(*args)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 590, in callit
    func(*args)
  File "./history_generator.py", line 301, in main_loop
    self.diplomacy()
  File "./history_generator.py", line 435, in diplomacy
    self.handle_revolt(i)
  File "./history_generator.py", line 419, in handle_revolt
    revolted_nation.mod_morale(MORALE_INCREMENT * cities_revolted_count * int(log(army_revolted + 2)))
I guess you need to replace every instance of cities_revolted_count (on lines 419 and 422 in history_generator.py) with revolted_cities.count
Made the change locally, I'll see how this plays out.
Title: Re: History Generator Simulator
Post by: kytuzian on April 07, 2016, 11:38:55 am
Yeah, the delay is gone now. I'm really sorry for sending you on a futile bug hunt. :-[

There's a new bug, though:
Code: [Select]
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1540, in __call__
    return self.func(*args)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 590, in callit
    func(*args)
  File "./history_generator.py", line 301, in main_loop
    self.diplomacy()
  File "./history_generator.py", line 435, in diplomacy
    self.handle_revolt(i)
  File "./history_generator.py", line 419, in handle_revolt
    revolted_nation.mod_morale(MORALE_INCREMENT * cities_revolted_count * int(log(army_revolted + 2)))
I guess you need to replace every instance of cities_revolted_count (on lines 419 and 422 in history_generator.py) with revolted_cities.count
Made the change locally, I'll see how this plays out.

Eh it's okay. I didn't spend that much time on it, it was mostly just letting my computer run while I was busy.

Argh. I can't believe I missed that. It should be
Code: [Select]
len(revolted_cities), by the way.
Title: Re: History Generator Simulator
Post by: Antsan on April 07, 2016, 12:25:51 pm
Seems you missed something else, too.
line 385 in history_generator.py
Code: [Select]
                            nation.remove_city(revolted_city)
replace with:
Code: [Select]
                            nation.remove_city(city)
At least I assume it should be city, because that's the variable you're iterating with.
Title: Re: History Generator Simulator
Post by: Antsan on April 08, 2016, 02:42:28 pm
Regarding revolting cities: It seems they don't update their color properly.
Title: Re: History Generator Simulator
Post by: kytuzian on April 08, 2016, 10:00:07 pm
Download:
http://www.mediafire.com/download/xl92dmwh1r0903u/History+Generator-2016-04-08.zip

2016-04-08
Major changes:
- Added significantly more researches.

Minor changes:
- Renamed some researches.
- Decreased base population capacities.
- Increased money productions.
- Allowed individual soldiers to move slightly faster than their unit (so they can form up better).

Bug fixes:
- Fixed some bugs with revolts (thanks Antsan).
- Fixed bug with the GUI showing army details.
- Fixed bug where units would reload despite not being in range.
- Properly placed center of unit (in the center on the front rank).

Seems you missed something else, too.
line 385 in history_generator.py
Code: [Select]
                            nation.remove_city(revolted_city)
replace with:
Code: [Select]
                            nation.remove_city(city)
At least I assume it should be city, because that's the variable you're iterating with.

Argh again. Yep. I guess I didn't test this release as thoroughly as I should have (or programmed as carefully as I should have).

Regarding revolting cities: It seems they don't update their color properly.

Hm. You're right. Thanks for all the help, by the way.
Title: Re: History Generator Simulator
Post by: Antsan on April 10, 2016, 04:39:25 am
I love to help. This simulation is already quite good and it's promising to become really awesome.

Say, could you reintroduce an option to run the simulation without any interruption at all? As it is, I need to restart it every time there's a battle. In times when there's multiple battles per year that can get really tedious.
Title: Re: History Generator Simulator
Post by: kytuzian on April 10, 2016, 07:30:41 am
Download:
http://www.mediafire.com/download/3b507v5464orchp/History+Generator-2016-04-10.zip

2016-04-10
Major changes:
- Added famous people (full list of roles below), which replace the old office system. Some currently have no purpose other than for flavor text.
    - Rulers: Increase morale of nation
    - Administrators: Increase tax rate of nation
    - Scientists: Increase research rate of nation
    - Revolutionary: Decrease morale of nation
    - Philosopher, writer, artist, oracle, priest, hero, general: Nothing yet

Minor changes:
- Added hunting lodge.
- Added ability to view notable people of a nation.
- Increased probability of sending caravans.
- Added ruler to nation's information GUI.
- Some small optimizations.
- Re-added "run continuously" option.

I love to help. This simulation is already quite good and it's promising to become really awesome.

Say, could you reintroduce an option to run the simulation without any interruption at all? As it is, I need to restart it every time there's a battle. In times when there's multiple battles per year that can get really tedious.

Thank you! As it is, I personally think it's still very lacking (from what I envision), although I am making some progress. Also, I did add a much more comprehensive list of things I want to add (planned.md in the Github repository).

Well, yes, I could (and just did). A couple things about that though:

1. While you can't have it run forever, there is the "Advance by" thing, which lets you advance it by hundreds of years (or more) at a time. Given how the simulation usually takes a while to run, that's almost equivalent to forever.

2. With the previous run continuously option, trying to pause the simulation would freeze it sometimes, and I have no idea why. Therefore, re-implementing the run continuously will probably bring that problem back. If you keep the between step time (the simulation speed) at or above 300 ms though, it seems to pause more reliably, so you might want to try that if you're having problems.
Title: Re: History Generator Simulator
Post by: Antsan on April 10, 2016, 01:56:57 pm
I just saw a giant nation, age 125, ruled by a revolutionary, age 126. That doesn't seem right. Do people have a maximum age already? And a minimum age to become active?

I realize this is still in its early stages. Still, it's a lot of fun to watch. The idea of what might be only helps. ;D
Title: Re: History Generator Simulator
Post by: Antsan on April 11, 2016, 02:10:05 am
Just saw something absurd: Units with spears were attacking units with hammers. The soldiers with the spears were all killed when attacking the hammermen without the hammermen ever being in reach.
I assume this happens due to the hammermen winning the attack as soon as the attack is started when they are in reach of the spears.
I think loosing a roll should only reduce health points if the loosing unit is in reach of the enemies' weapons.
Title: Re: History Generator Simulator
Post by: kytuzian on April 11, 2016, 06:52:52 am
I just saw a giant nation, age 125, ruled by a revolutionary, age 126. That doesn't seem right. Do people have a maximum age already? And a minimum age to become active?

I realize this is still in its early stages. Still, it's a lot of fun to watch. The idea of what might be only helps. ;D

Yeah, right now I have it so that every year, there's a 1 in 60 chance that the person will die, with the idea that the average person will live to be approximately 60 (well-off person, anyway, and I think all of the notable people qualify). Naturally, people sometimes die early, and...sometimes live to be 126 years old. I think I need to change it though, because, just testing it out, I see that some people live in excess of 200 years, which is just wrong. Although...this is an alien planet, so there's technically no reason that it has to be a roughly 100 year life span.

Just saw something absurd: Units with spears were attacking units with hammers. The soldiers with the spears were all killed when attacking the hammermen without the hammermen ever being in reach.
I assume this happens due to the hammermen winning the attack as soon as the attack is started when they are in reach of the spears.
I think loosing a roll should only reduce health points if the loosing unit is in reach of the enemies' weapons.

Yep that's what happened. It used to make sense to do it that was (it's from way back in the day when everybody had the same weapon), but now I need to change it. However, before I change it, I think I'm going to add in "reload times" for melee weapons, because not all weapons can attack at the same speed, and it could slightly balanced the field between longer weapons like spears and a shorter weapon like a hammer (because otherwise you'd never get close enough with a hammer).
Title: Re: History Generator Simulator
Post by: kytuzian on April 15, 2016, 08:08:47 am
Download:
http://www.mediafire.com/download/a2shdqnzczn7bz1/History+Generator-2016-04-15.zip

Not much new stuff here.

2016-04-15
Major changes:
- All weapons now have a reload time, which reflects how quickly a soldier can attack with them.
- Restructured and properly applied technology bonuses to resource production.

Minor changes:
- Troops no longer increase strength, health, and discipline by as much as they go up tiers.
- Priests can now make a religion more or less tolerance (if effectiveness is greater than 1, more tolerant, if less than 1, less tolerant.)
- Ruler no longer adds any bonus to nation other than morale.
- Changed reloading speed.
- Dramatically decreased the chance of a notable person being born.

Bug fixes:
- Fixed bug with ranged units and aiming ahead.
Title: Re: History Generator Simulator
Post by: XXXXYYYY on May 09, 2016, 09:28:10 pm
Oh wow, has this changed in the time I've been gone. Full world map, with procedurally generated map, individual buildings, a full upgrade list, wow. Quite good!

I can't seem to pan around when in a zoomed in view. Is there a keybind I'm missing?

Bugs/Errors I've found:
Spoiler (click to show/hide)
Title: Re: History Generator Simulator
Post by: kytuzian on May 10, 2016, 02:26:05 pm
Oh wow, has this changed in the time I've been gone. Full world map, with procedurally generated map, individual buildings, a full upgrade list, wow. Quite good!

I can't seem to pan around when in a zoomed in view. Is there a keybind I'm missing?

Bugs/Errors I've found:
Spoiler (click to show/hide)

http://www.mediafire.com/download/38l2qt2fi3djt64/History+Generator-2016-05-10.zip

That was an incredibly stupid error. I don't even know how that happened. It's fixed.
Title: Re: History Generator Simulator
Post by: kytuzian on May 17, 2016, 06:11:08 am
Download:
http://www.mediafire.com/download/6f3fs3a1hc11uuz/History_Generator-2016-05-16.zip

First update containing actual content in a long time.

Now we have art, and more sensible caravans (actually trade resources, prices fluctuate according to consumption, at least a little). See the Art and Art Details sections of the readme on the GitHub page () for more details about the art.

2016-05-17
Major changes:
- Caravans now actually carrying goods from place to place (food, leather, et cetera), as well as a generic "trade goods" (so that caravans always make at least some money).
- Added fluctuating prices for goods in cities.
- Artists, writers, and composers now create works of art.

Minor changes:
- Added taverns, libraries, and caravansaries (increases the chances of sending out a caravan).
- Tweaked some building stats.
- Added a research that increases the amount of building space available.
- Decreased chance of war declarations.
- Added composers.
- Simplified date to (year, month, day) (instead of (year, month, day, hour, minute)).
- Changed the rainfall generation print out to a progress bar.

Bug fixes:
- Fixed bug where dead people still did things.
Title: Re: History Generator Simulator
Post by: kytuzian on May 29, 2016, 08:27:40 am
Download:
http://www.mediafire.com/download/i4hvdoi7ve1cx4d/History+Generator-2016-05-29.zip

I didn't add much functionality in this release, but there are many more stats now available (such as battle statistics, and unit statistics). The plan is to use this information to allow the AI to make more informed decisions when re-arming their units, rather than just randomly choosing new weapons. Also I've made a lot of little improvements to art stuff.

2016-05-28
Major changes:
- Added statistics to battles (projectiles launched, projectiles hit, troops lost, troops killed, et cetera).
- Made units keep track of their stats, adding a new stats tracker every time they are rearmed.
- Added information GUI for culture (just displays art for now).

Minor changes:
- Improved languages so that words are more pronounceable.
- Added culture button to nation's information GUI.
- Miscellaneous message improvements.

Bug fixes:
- Fixed issue where some types of drawings would have no material.
Title: Re: History Generator Simulator
Post by: Ninteen45 on June 01, 2016, 04:52:22 pm
Download:
http://www.mediafire.com/download/i4hvdoi7ve1cx4d/History+Generator-2016-05-29.zip


Zip is empty.
Title: Re: History Generator Simulator
Post by: kytuzian on June 01, 2016, 06:10:31 pm
Download:
http://www.mediafire.com/download/i4hvdoi7ve1cx4d/History+Generator-2016-05-29.zip


Zip is empty.

Your download must have been corrupted somehow, because it's not. It's 61.74 KB.
Title: Re: History Generator Simulator
Post by: kytuzian on July 28, 2016, 01:56:50 pm
Download:
http://www.mediafire.com/download/h5nkociw3d643ep/History+Generator-2016-07-28.zip

A bunch of improvements to the art generation stuff mostly. Also, a fun fact, it's been about one year since I uploaded the first version. I think I got all of the bugs out of the new art generation system, but if I missed anything, please let me know.

2016-07-29
Major changes:
- There is no longer just one stat. Now there is also an art creation rate (with others to come).
- Works of art will now sometimes have basic content (this is mostly for prophesies, but will be expanded upon later).
- Many changes to the string generation system to make it significantly more useful.
- If a nation is completely conquered, all of its notable people and art are now transferred to the conquering nation.

Minor changes:
- Added historians and allowed them to write works.
- Scientists can now write scientific essays.
- Oracles can now issue prophesies (currently do nothing).
- Each profession now has its own base art create chance (in addition to the randomization).
- The game will now store a list of all the battles fought including the location, belligerents, date, result, and statistics.
- Added some more options to the culture form generator (weapons, armor, battles, nations).
- The program now writes a more readable version of the event log (exactly the same stuff that appears in the console while the program is running).
- Increased name variety.
- Added an information GUI for individual pieces of art.
- Added a nation eliminated event.
- Note: Currently all art is registered as being "Lost". This is not actually the case, it's just due to not creating the system whereby art is actually stored in specific cities.

Bug fixes:
- Minor fixes to the art generation stuff to fix some capitalization and excessive spacing.
- Added the notion of countable/uncountable to the form generator so that we don't get things like "Ode to a Water" anymore (will now always be "Ode to the Water").
- Fixes to the string generation system for capitalization.
- Nation's information screen no longer displays dead people.
- Fixed bug where game would notify you of a person's death every year, every if they were already dead.
Title: Re: History Generator Simulator
Post by: kytuzian on August 01, 2016, 01:24:40 pm
Download:
http://www.mediafire.com/download/iun1z10dluctqu7/History+Generator-2016-08-01.zip

2016-08-01
Major changes:
- Nations now all have a relations value for every other nation, which determines how hostile/accepting they are of that nation. This value is used for treaties and such.
- Added treaties to the game. Treaties, for now, simply provide an interface for the simulation to check how each treaty is developing, and use that information to determine the nations' relations.

Minor changes:
- Battle statistics now include deaths as well as kills.
- Added more descriptions/content to the various art forms.
- Took out abstract art for now--I want to improve it's subject/content generation before I put it back, and it needs a lot of reworking.
- WAY decreased frequency of holy wars (because every was at war with everybody, which is ridiculous).
- Changed the factors that affect starting trade agreements.
- Slightly tweaked some building values.
- Improved the string generator further (allowed custom tags to be added to a specific generator).

Bug fixes:
- Fixed issue with battle statistics where not all troop kills were counted.
- Fixed bug where the simulation would complain that it "cannot advance a negative amount of time" then attempt to do it anyway, causing an error.
- Various fixes to the art generation forms.
- Fixed bug where holy wars were not marked as actually being holy wars.
Title: Re: History Generator Simulator
Post by: 90908 on August 04, 2016, 05:42:30 pm
ptw
Title: Re: History Generator Simulator
Post by: Heretic on August 16, 2016, 10:01:02 am
PTW
Title: Re: History Generator Simulator
Post by: StrangeMood on August 19, 2016, 04:31:08 am
This sounds pretty neat. The .zip files seem empty to me, though... what am I doing wrong?
Title: Re: History Generator Simulator
Post by: NobodyPro on August 20, 2016, 05:33:28 am
Right click and export the contents using WinZip, that worked for me.
Title: Re: History Generator Simulator
Post by: MauritianStruggle on November 14, 2016, 06:18:02 pm
ptw
Title: Re: History Generator Simulator
Post by: kytuzian on November 24, 2016, 11:35:16 pm
Finally a new update. This one contains a bunch of stuff that I actually did months ago, but I didn't feel it was large enough to release. Now there's a bit more stuff, although it's hardly fleshed out at this point.

Also I made a video giving a brief overview of the History Generator:
https://www.youtube.com/watch?v=TEbOVTCy6yM

Download:
http://www.mediafire.com/file/ai7blnxtm6wg9bt/History+Generator-2016-11-25.zip

2016-11-24
Major changes:
- Changed artists to have more of an identity, rather than just a random art producer. Artists can now switch professions, become specialized in producing a certain kind of art, or have a penchant for certain topics.
- Made nations' relations actually affect their likelihood of trading and going to war.
- Religions are now kept track of separately from nations, and nations can have a mix of religions in them.
    - New people born in a city have a random chance to be ANY religion, or even start a new religion.
    - Generally people will follow the religion of their own city, however.

Minor changes:
- Now all names generated by a nation's language will be remembered, so if an artist creates a work with any name from his language in it, it won't get re-translated.
- Improved the generator further (can now conjugate verbs).
- Added an information window for people.
- Simplified the displayed city name.
- Made relations changes make a little more sense (based on the amount per year, rather than just the straight amount).
- Notable people now live in a city, and will occasionally move around the world. This has no other effects at the moment.
- Writers will now sometimes write myths.

Bug fixes:
- Fixed the weighted random selector to like, actually handle the weights correctly (whoops).
- Sort of fixed bug where the game would crash while creating a new treaty.
Title: Re: History Generator Simulator
Post by: Lukeinator on December 08, 2016, 07:44:41 pm
Just saw this, going to try it out.
Title: Re: History Generator Simulator
Post by: ☼Another☼ on December 08, 2016, 11:42:04 pm
Looks very good. I'd recommend you put up screenshots and features on the OP.
Title: Re: History Generator Simulator
Post by: kytuzian on December 30, 2016, 09:32:18 pm
Looks very good. I'd recommend you put up screenshots and features on the OP.

There's a feature list/explanation on the readme on the Github page. As far as screenshots go, I'll probably add some eventually, but I have some videos up showing it working.

Also, another update. The main focus of this one was performance, so now there are two new ways to run battles extra fast.

Download:
http://www.mediafire.com/file/58eshb3uc857hs5/History+Generator-2016-12-30.zip

2016-12-30
Major changes:
- Battles can now be run without graphics, which speeds up the rate at which
they run. Battles can also be run in "fast" mode--this greatly speeds up the
battle speed, but it also removes many features from the normal battles, so
you won't get the same results.

Minor changes:
- Notable people now have a religion, and their roles are affected by their religion (for example, a person who follows a religion that worships a prominent war god is more likely to be a general).
- Changed reloading speed to be simply the troop's discipline plus a random
either 0 or 1.

Bug fixes:
- Fixed a bug where art was trying to get a religion to base it's artwork off of.
Title: Re: History Generator Simulator
Post by: Lukeinator on January 28, 2017, 04:29:04 pm
Does anyone know how to get this to run on mac?
Title: Re: History Generator Simulator
Post by: Ninteen45 on January 29, 2017, 03:23:02 pm
Your zipped files appear empty to me.  Only yours. odd.
Title: Re: History Generator Simulator
Post by: kytuzian on January 29, 2017, 07:29:22 pm
Does anyone know how to get this to run on mac?

I normally program on a Mac (and, naturally, also test it there), and I've never had any problems with it running. Could you be more specific with the issue you're having?

Your zipped files appear empty to me.  Only yours. odd.

That is strange. I guarantee there's something in it. You can verify by looking at the download page (it says the file size is 78.95 kB). I tried uploading a new zip file, if that doesn't work, try going to the GitHub page and clicking "Clone or download" then click "Download ZIP". It'll be a slightly updated version, but I think it's just as stable.

Here is the new download link:
http://www.mediafire.com/file/eyvi7o7i7odvco0/History+Generator-2016-12-30%282%29.zip
Title: Re: History Generator Simulator
Post by: Ninteen45 on January 30, 2017, 01:42:22 pm
Does anyone know how to get this to run on mac?

I normally program on a Mac (and, naturally, also test it there), and I've never had any problems with it running. Could you be more specific with the issue you're having?

Your zipped files appear empty to me.  Only yours. odd.

That is strange. I guarantee there's something in it. You can verify by looking at the download page (it says the file size is 78.95 kB). I tried uploading a new zip file, if that doesn't work, try going to the GitHub page and clicking "Clone or download" then click "Download ZIP". It'll be a slightly updated version, but I think it's just as stable.

Here is the new download link:
http://www.mediafire.com/file/eyvi7o7i7odvco0/History+Generator-2016-12-30%282%29.zip

Yup that has it. It's 150kb
Title: Re: History Generator Simulator
Post by: Reelya on February 05, 2017, 06:18:08 am
I really like this project, reminds me of something (also DF inspired) I made ages ago (I'm talking like ~2009 or so). BTW I started with a 2D square map, but later managed to get them running around making empires on a spherical world, which was really cool. Somehow I lost that specific branch of the code however :/

That spherical world code ended up as a Elite-style flight sim where you can travel between solar systems in real-time, but I'm actually thinking to do a space / roguelike / strategy game where you in fact have planets with cities and little armies marching around, cities, wars you can view from space.
Title: Re: History Generator Simulator
Post by: kytuzian on March 09, 2017, 09:27:42 pm
I really like this project, reminds me of something (also DF inspired) I made ages ago (I'm talking like ~2009 or so). BTW I started with a 2D square map, but later managed to get them running around making empires on a spherical world, which was really cool. Somehow I lost that specific branch of the code however :/

That spherical world code ended up as a Elite-style flight sim where you can travel between solar systems in real-time, but I'm actually thinking to do a space / roguelike / strategy game where you in fact have planets with cities and little armies marching around, cities, wars you can view from space.

I'm planning on allowing a player to explore the history of the random world that is generated, archaeology style. I haven't really started with that yet though.

Speaking of which:

Here is a new release. I have the basics of a saving/loading system (that is, to say, the saving part). I also have begun to think of ways that the generator can be improved, as I feel like its not very coherent, and its too hard to tell what is going on. To this end I have added a wayh to more easily see where the armies are going by having it display the path that the army is taking. Here is the download, hopefully without the issue that seems to plaguing other people where the zip file is empty:

http://www.mediafire.com/file/ffq0vi73rd7717u/History+Generator-2017-03-09.zip

Changelog:
2017-03-10
Major changes:
- Treaties can now end (so wars don't last forever, and neither do trade deals).
- Added the ability to save, but no loading yet (soon) so its kind of useless, but eh. Soon.

Minor changes:
- Trade treaties now keep track of the money that each side has made.
- The world now has a name.
- Added a start up menu.
- Armies move in an easier to see way.

Bug fixes:
- Fixed bug where treaties were not properly kept track of.
- Fixed bug where caravans influenced a cities religion before they actually got there.
- Fixed a bug where the advance by feature didn't register the number entered.
- Fixed a bug where the advance once button advanced repeatedly.