Does anyone here, by any chance, play Dwarf Fortress? Specifically, Adventure/legends mode?
Dwarf fortress has a sort of "rumor"system, which spreads facts about the actions of both the player and certain NPCs, called historical figures. Things like, "Sam dueled Jack and cut of his ear in the year 1624", "Amy stole an artifact from the fortress Leatrode in 203", and "Jimmy is jerk". I think that facts and chatter like DF could really spice up the game. Is this kind of thing OXP-able?
DF-style Legends system?
Moderators: winston, another_commander
-
- Above Average
- Posts: 19
- Joined: Fri Jul 22, 2016 3:55 am
DF-style Legends system?
Last edited by NEANDERTHAL on Tue Aug 09, 2016 3:07 am, edited 2 times in total.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Dwarf Fortress: A Model Living World
Certainly! Comms Pack A (backup wiki link) adds some chatter to the comms system, based on events occurring to the ship in question (whether it's attacking or being attacked, fleeing, scooping loot, those sorts of things). Random chatter which isn't triggered by an in-game event, but is purely informational, is quite possible. There's basically 1 JS command involved:All you need is a reference to the ship that is sending the comms (what I've called 'NPCShip' in that sample), and the message to send. That will be the trickier part, I suspect - working out which ship is going to send what message, making sure they don't repeat themselves, making the messages varied.
Code: Select all
NPCShip.commsMessage("Hey, I heard that Amy stole an artifact from the main station in Lave", player.ship);
-
- Above Average
- Posts: 19
- Joined: Fri Jul 22, 2016 3:55 am
Re: Dwarf Fortress: A Model Living World
That's not what I mean. What I mean is a live database of all the notable things certain commanders do, and a way of remembering which systems those facts spread to. For example, Pirate A survives the destruction of his team by Hunter B and runs into a rock hermit for repairs. Then all commanders who circulate through the rock hermit after Pirate A is inside get "infected" with tales of the ferocity of Hunter B. This, of course, only works while the system is loaded.phkb wrote:All you need is a reference to the ship that is sending the comms (what I've called 'NPCShip' in that sample), and the message to send. That will be the trickier part, I suspect - working out which ship is going to send what message, making sure they don't repeat themselves, making the messages varied.
For unloaded systems one could abstract the flow of information. For each system, there would be one list of facts per role. The probability of information bleeding between role lists is proportional to the number of gal-cop-allied stations in the system, as they are the stations that permit (nearly) all types of commanders to enter.
To simulate the spreading of info between systems, a connectivity map would be generated for each role according to certain rules (for example, the trader role connectivity map would only connect two systems if they were reachable and if they could be traded between at a profit, and the galcop role connectivity map would only connect systems that are in range and have a lot of police) and the information spread across systems wold be limited to the connectivity maps of the roles that know that information. During this stage, redundant facts (facts that show up more than once in the same role list) are removed from their lists. These calculations are performed at each player witch-space jump, where lag is normal, with the exception of the connectivity maps, which should be generated only once and re-generated if they go missing. (Perhaps these could be pre-generated and included in the distribution of the OXP, but that would pump up file size).
There are also possibilities for conflicting facts, leading to conflicts. For example, Pirate Tom hates Leesti because he nearly died there, while Pirate Laura loves Leesti because she bought her new ship there. Tom tells Laura he hates Leesti, and Laura kills him for that. The rest of the pirates in the system then spread the word that Laura loves Leesti and creates a new fact that Laura killed Tom over a disagreement.
AN EXAMPLE:
Player Jon blows away a huge pirate group, leaving only Pirate Tim and Pirate Matt as survivors. Pirate Tim creates the fact that Player Jon is merciful and good, and Pirate Matt creates the fact the Player Jon is a coward who couldn't finish off the pirate group. The two pirates chat and disagree, and Pirate Tim kills Matt and creates the fact that Matt died because of his big mouth. Player Jon witchspaces away to another system, and the system calculations begin.
First, for the intra-system spread. Pirate Tim's facts that Jon is merciful and Matt's big mouth killed him are added to System 1's Pirate facts list. Seeing as there are a moderate amount of GC-friendly dockable objects in System 1, only the fact that Jon is merciful bleeds over to another list. In this case, the fact bleeds over to the bounty hunter's list. Now it is time to calculate inter-system spread. First, the pirate connectivity map is referenced, spreading the facts of Matt's demise and Jon's mercy to the Pirate facts lists of Systems 2 and 3, the only systems accessible to pirates from System 1. Then, the Bounty Hunter connectivity map is referenced, causing the BH facts list of System 1 to spread the fact of Jon's mercy to the BH facts list of System 3. The redundancy check is then run. While System three has the merciful Jon fact in both the BH and Pirate lists, this is not an issue.
________
...Well, dang. I just planned out an OXP. Does anyone know of a good tutorial so I can get started on this? Is this even possible? I could see it being used to simulate diseases, as well. Perhaps other OXPs could use it, too.
Re: DF-style Legends system?
I wonder if there's some sort of persistence for ships. One can follow ships through wormholes and find them on the other side, but I wonder if they are the same software entity. I'm not sure if Oolite actually does simulate ships outside of the current/nearby system(s).
I think what's suggested is quite big, so it might be a good idea to start small. I believe detecting complex interactions like "Joe got its export decimated by pirates" could be quite difficult to detect. However, some one-on-one interactions and simple events do exist. For instance, NPCs do say "thanks" when someone comes to the rescue, pirates do say "I'm taking too many hits", and sometimes one can see emergency jumps. That could be a simple basis to build a "social network". Then, maybe one can manipulate the populator so that a bunch of those interesting ships are spawned.
I think what's suggested is quite big, so it might be a good idea to start small. I believe detecting complex interactions like "Joe got its export decimated by pirates" could be quite difficult to detect. However, some one-on-one interactions and simple events do exist. For instance, NPCs do say "thanks" when someone comes to the rescue, pirates do say "I'm taking too many hits", and sometimes one can see emergency jumps. That could be a simple basis to build a "social network". Then, maybe one can manipulate the populator so that a bunch of those interesting ships are spawned.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: DF-style Legends system?
Ships travelling through wormholes are persistent. If you follow a ship that has hyperspaced, it will be the exact same ship on the other side. If you try to escape ships hunting you by entering hyperspace yourself, the exact same ships will follow you in the new system.Astrobe wrote:I wonder if there's some sort of persistence for ships. One can follow ships through wormholes and find them on the other side, but I wonder if they are the same software entity. I'm not sure if Oolite actually does simulate ships outside of the current/nearby system(s).
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: DF-style Legends system?
Nope.. got told about it.. looked it up.. read up about it..NEANDERTHAL wrote:Does anyone here, by any chance, play Dwarf Fortress?
Then concluded I'm not masochistic enough to play it!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: DF-style Legends system?
For what it's worth, Oolite since 1.82 (I believe) does track the players reputation with various groups. Who you side with, who you attack, does affect the way various NPC classes will respond to your presence.Astrobe wrote:I think what's suggested is quite big, so it might be a good idea to start small. I believe detecting complex interactions like "Joe got its export decimated by pirates" could be quite difficult to detect. However, some one-on-one interactions and simple events do exist. For instance, NPCs do say "thanks" when someone comes to the rescue, pirates do say "I'm taking too many hits", and sometimes one can see emergency jumps. That could be a simple basis to build a "social network". Then, maybe one can manipulate the populator so that a bunch of those interesting ships are spawned.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied