Bay 12 Games Forum

Please login or register.

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

Author Topic: History Generator Simulator  (Read 26660 times)

Antsan

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #45 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.
Logged
Taste my Paci-Fist

Lukeinator

  • Bay Watcher
  • Kophey
    • View Profile
Re: History Generator Simulator
« Reply #46 on: March 10, 2016, 01:15:53 pm »

This looks cool. I don't know how to get it to work though.
Logged
http://www.bay12forums.com/smf/index.php?topic=135480.0 My second FOOTBLEED game.
This thread is Bay12 incarnate.


Like the mermaid bones farm and the Kill-your-baby machine.

kytuzian

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

kytuzian

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

kytuzian

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

kytuzian

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

Antsan

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #51 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.
Logged
Taste my Paci-Fist

kytuzian

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

Antsan

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #53 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.
« Last Edit: April 05, 2016, 05:34:35 am by Antsan »
Logged
Taste my Paci-Fist

Antsan

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #54 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.
Logged
Taste my Paci-Fist

Cryxis, Prince of Doom

  • Bay Watcher
  • Achievment *Fail freshman year uni*
    • View Profile
Re: History Generator Simulator
« Reply #55 on: April 05, 2016, 07:30:06 pm »

PTW
Logged
Fueled by caffeine, nicotine, and a surprisingly low will to live.
Cryxis makes the best typos.

Antsan

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #56 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]
Logged
Taste my Paci-Fist

kytuzian

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

Antsan

  • Bay Watcher
    • View Profile
Re: History Generator Simulator
« Reply #58 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.
Logged
Taste my Paci-Fist

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: History Generator Simulator
« Reply #59 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.
Pages: 1 2 3 [4] 5 6 7