Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How is Legends Mode programmed?  (Read 1785 times)

UselessMcMiner

  • Bay Watcher
  • praise jeebus
    • View Profile
How is Legends Mode programmed?
« on: December 19, 2018, 05:56:53 pm »

How was it created? I know there's a fat chance in hell that i'll make something like DF how was the legends mode programmed? I can't really wrap my head on how it was made. And I need to figure that out if I want a history generator in a game.
Logged
Quote
The scouts have been fighting a giant capuchin for the past month now. They still haven't killed it.

Obsidian 1053

The Sentries are still fighting the capuchin. For two monthes they have done nothing but punch this monkey.

therahedwig

  • Bay Watcher
    • View Profile
    • wolthera.info
Re: How is Legends Mode programmed?
« Reply #1 on: December 19, 2018, 06:50:55 pm »

I think it's basically that it plunks down some histfigs(which is the little ai that represents each dwarf and other figure in game), and asks them each week of history what they want to do. I also think the entities(any group of humans, such as governments, civs, bandit camps, etc) themselves have a little AI so that they go about building stuff. There's also entity pops which are abstracted populations governed by those entities, otherwise the game would not fit on anyone's ram.

the biggest complexity here is building the options available for the histfigs(fight, build, travel, marry, authoring a book), as well as giving the histfigs the ability to do some longterm planning and giving it a notion of resources to do things. That's been what the devlog has been going on about.
Logged
Stonesense Grim Dark 0.2 Alternate detailed and darker tiles for stonesense. Now with all ores!

sketchesofpayne

  • Bay Watcher
    • View Profile
Re: How is Legends Mode programmed?
« Reply #2 on: December 19, 2018, 11:27:14 pm »

If you listen to the DF Talk podcasts you get an idea of how it worked and was developed at various stages of the game's history.  Tarn talks about how world gen wars work and how settlements are modeled.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How is Legends Mode programmed?
« Reply #3 on: December 21, 2018, 05:11:32 pm »

Technically, Legends Mode is just the user interface that the game provides so you can browse through a world's history to see what happened. What you're really asking about is World Generation, and that's a very complicated process that's been gradually evolving over the past 10+ years.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

UselessMcMiner

  • Bay Watcher
  • praise jeebus
    • View Profile
Re: How is Legends Mode programmed?
« Reply #4 on: December 21, 2018, 06:20:45 pm »

Yeah I guess I wish I had the source code to look at the source code. But I know i'll be old and gray before that happens.
Logged
Quote
The scouts have been fighting a giant capuchin for the past month now. They still haven't killed it.

Obsidian 1053

The Sentries are still fighting the capuchin. For two monthes they have done nothing but punch this monkey.

CyberianK

  • Bay Watcher
    • View Profile
Re: How is Legends Mode programmed?
« Reply #5 on: February 04, 2019, 06:54:23 am »

Having worked on many obsolete legacy business software that one guy wrote over years theres probably only one person on earth who roughly understands the DF source code and that might never change :)
Logged

Untrustedlife

  • Bay Watcher
    • View Profile
    • My Website
Re: How is Legends Mode programmed?
« Reply #6 on: February 04, 2019, 10:22:43 am »

I think it's basically that it plunks down some histfigs(which is the little ai that represents each dwarf and other figure in game), and asks them each week of history what they want to do. I also think the entities(any group of humans, such as governments, civs, bandit camps, etc) themselves have a little AI so that they go about building stuff. There's also entity pops which are abstracted populations governed by those entities, otherwise the game would not fit on anyone's ram.

the biggest complexity here is building the options available for the histfigs(fight, build, travel, marry, authoring a book), as well as giving the histfigs the ability to do some longterm planning and giving it a notion of resources to do things. That's been what the devlog has been going on about.

An entity is any group of ANY creatures not just humans. (and there can be many different types creatures in an entity)
« Last Edit: February 04, 2019, 10:25:57 am by Untrustedlife »
Logged
I am an indie game dev!
My Roguelike! With randomly generated creatures Roguelegends: Dark Realms
My Turn Based Strategy game! Which you can buy on steam now!DR4X
My website untrustedlife.com