Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 7

Author Topic: History Generator Simulator  (Read 26413 times)

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
History Generator Simulator
« 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
« Last Edit: March 09, 2017, 09:27:56 pm by kytuzian »
Logged

~Neri

  • Bay Watcher
  • Now back to our regularly scheduled bark.
    • View Profile
Re: History Generator Simulator
« Reply #1 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.
Logged

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: History Generator Simulator
« Reply #2 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).

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: History Generator Simulator
« Reply #3 on: July 21, 2015, 11:54:18 am »

ptw
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: History Generator Simulator
« Reply #4 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

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #5 on: July 30, 2015, 03:44:20 am »

I always like projects like this. PTW.

XXXXYYYY

  • Bay Watcher
  • Been a long time.
    • View Profile
Re: History Generator Simulator
« Reply #6 on: July 30, 2015, 03:57:59 am »

PtW
Logged
Oooooooo. I know. ClF3. That should be a fun surprise.

Ukrainian Ranger

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #7 on: July 30, 2015, 04:15:02 am »

ptw
Logged
War must be, while we defend our lives against a destroyer who would devour all; but I do not love the bright sword for its sharpness, nor the arrow for its swiftness, nor the warrior for his glory. I love only that which they defend.

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: History Generator Simulator
« Reply #8 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

Bjornhattan

  • Escaped Lunatic
    • View Profile
Re: History Generator Simulator
« Reply #9 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.
Logged

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: History Generator Simulator
« Reply #10 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.
« Last Edit: August 01, 2015, 08:14:32 pm by kytuzian »
Logged

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: History Generator Simulator
« Reply #11 on: August 07, 2015, 12:20:21 pm »

Okay, so I changed a lot.

  • Trade caravans now go between different nations (these are more profitable then normal caravans). A message will come up in the console saying "x has begun sending caravans to y"
  • Units will now have their troop name, strength, and max health over them, so you can distinguish between units.
  • Time still runs while battles are going, but it slows down dramatically. (10 minutes every 100ms, instead of 1 month every 100ms). This allows the battle to happen, but also the game to progress. More importantly, it means that you no longer have to press enter every time a battle is going, the simulation just goes now. This also means multiple battles can run at the same time.
  • Ranged units now have ammunition (currently just 10x the number of soldiers. It's a common pool for the whole unit). When they run out, they will switch and charge into melee. This was changed because really powerful ranged units could just destroy the defender's ranks from afar without taking any losers
  • A nation's starting troop can now be ranged or melee. It's kind of strange sometimes, with a lot of soldiers just standing around on the battlefield shooting until the run out of ammo, but it works.
  • Units now become fatigued after every attack. Fatigue takes away from the unit's strength for attacking and defending, meaning very powerful units can no longer just tear apart entire armies by themselves.

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.
« Last Edit: August 07, 2015, 12:42:50 pm by kytuzian »
Logged

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: History Generator Simulator
« Reply #12 on: August 08, 2015, 10:02:20 pm »

On implementing borders between countries, you could look at Voronoi diagrams.

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.
« Last Edit: August 08, 2015, 10:05:36 pm by darkflagrance »
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

alamoes

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #13 on: October 12, 2015, 06:16:33 pm »

Bug found. 

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

Antsan

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #14 on: October 13, 2015, 10:18:53 am »

PTW
Logged
Taste my Paci-Fist
Pages: [1] 2 3 ... 7