DF-style Legends system?

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

Post Reply
NEANDERTHAL
Above Average
Above Average
Posts: 20
Joined: Fri Jul 22, 2016 3:55 am

DF-style Legends system?

Post by NEANDERTHAL »

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?
Last edited by NEANDERTHAL on Tue Aug 09, 2016 3:07 am, edited 2 times in total.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4612
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

Post by phkb »

Certainly! [EliteWiki] 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:

Code: Select all

NPCShip.commsMessage("Hey, I heard that Amy stole an artifact from the main station in Lave", player.ship);
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.
NEANDERTHAL
Above Average
Above Average
Posts: 20
Joined: Fri Jul 22, 2016 3:55 am

Re: Dwarf Fortress: A Model Living World

Post by NEANDERTHAL »

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.
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.

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.
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 609
Joined: Sun Jul 21, 2013 12:26 pm

Re: DF-style Legends system?

Post by Astrobe »

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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6547
Joined: Wed Feb 28, 2007 7:54 am

Re: DF-style Legends system?

Post by another_commander »

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).
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.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: DF-style Legends system?

Post by Diziet Sma »

NEANDERTHAL wrote:
Does anyone here, by any chance, play Dwarf Fortress?
Nope.. got told about it.. looked it up.. read up about it..


Then concluded I'm not masochistic enough to play it! :lol: :wink:
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
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: DF-style Legends system?

Post by Diziet Sma »

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.
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.
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
Post Reply