Bay 12 Games Forum

Please login or register.

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

Author Topic: History Generator Simulator  (Read 1494 times)

exdeath

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

Antsan

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

kytuzian

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


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.

  • Strength: Affects how likely a unit is to successfully attack or defend (from melee or projectile attacks), as well as projectile damage.
  • Health: How many hits melee hits a unit can take before dying. Ranged is slightly different, with the projectiles damage being randomly determined from the shooter's strength.
  • Discipline: Affects how quickly ranged units shoot, as well as how quickly units become fatigued.
  • Fatigue: Will decrease attack/defense rolls as it grows.
  • Ranged: Obviously whether the unit shoots projectiles or attacks in melee by default

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.
« Last Edit: January 05, 2016, 07:46:11 pm by kytuzian »
Logged

Antsan

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

kytuzian

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

  • Morale
  • Food
  • Efficiency
  • Tolerance
  • Conscription

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.

Antsan

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

kytuzian

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