Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Igfig

Pages: 1 ... 23 24 [25] 26
361
DF Suggestions / Conflicts and Incomplete Knowledge
« on: November 12, 2009, 01:45:10 pm »
In DF Talk #4, Toady talked about how he'd like to have characters and entities develop more interesting conflicts than just "Our ethics disagree" (on the entity level) and "We like different things" (on the personal level).  His solution was to give each individual a set of motivations, which would clash with other motivations and cause difficult decisions, rivalries, and wars.

Quote from: Toady
[...]they all want things, but there has to be conflict in those wants, not just between two people but within a person as well; their responsibilities might conflict with the things that they want. Then you need to be able to resolve those conflicts.

This works great for modeling situations where there are two (or more) sides, and they want different things, and they're eager to take actions to pursue their goals.  Unfortunately, as Toady kinda sorta mentioned, it's not quite as effective in the cases when both sides want the same thing, and ought to be in agreement.

Quote from: Toady
[...] Right now [entities] bump into each other to do a peace agreement or whatever, but it doesn't really simulate what happened there. [...] You could simulate that event and of course it's more interesting when things go all wrong. I prefer to keep running it as a simulation where it just randomly decides based on if those two people really disagree, [...] rather than having it say 'there hasn't been a fight in this world for ten years so let's just start something'. Because the game could do that too.  I'd like to lean away from that stuff but if a guiding hand is needed ... well, I should probably just improve the simulation.

This kind of conflict, the kind where productive peace talks suddenly go sour, where friendships turn to hatred, where things fall apart despite everybody's best efforts to the contrary, don't really follow the conflict-of-interests mechanic.  There's more to these conflicts than just direct opposition, and so they'll never show up in the current model.  That's a shame; a lot of the saddest tragedies and funniest comedies fall into this category.  We're going to need a different conflict model.

As it happens, I have a few ideas about how this model could work.  Over the course of my life, I've seen and experienced more than my fair share of personal drama, in varying degrees and from every perspective.  In that time, I've come to notice that the great majority--perhaps as many as 90%--of these conflicts follow the same basic template: Offense, Interpretation, Response.

You have some (let's say two) characters, A and B, and a bunch of events that occur.  ("Events" can be as simple as somebody saying something or as complex as the gradual decline and collapse of an empire.)  Then:

  • A receives information that B was involved in an event and is offended.  (This information may or may not be true, but A believes it is.)  E.g.: B says something to A that A finds hurtful; C tells A that B said something mean to C; A has a dream about B trying to kill him.
  • A considers what he knows about B, and uses that knowledge to interpret a feasible reason for why B might have involved in the event. (This interpretation is likely to be flawed, as A doesn't actually know B's true intentions.)  E.g: B must not want to be A's friend any more, and so is pushing A away; C must have wronged B somehow, so B is retaliating; B must be a demon, and so is controlling A's thoughts for fun.
  • A involves himself in an event in a way that he feels would be an appropriate response to B's intentions, as A perceives them.  (Note that A is not responding to the offensive event itself.)  E.g: A says something mean back to B; A invites B and C to lunch, each without each other's knowledge, in hopes that B and C will make up; A puts on a tin foil hat to protect his brainwaves.
  • B learns of this new event and A's involvement and is offendedE.g. B is hurt by A's nasty reply to his joke; B is offended that A would try to trick him like that; B finds A's hat kinda creepy.
  • The cycle repeats.

This model is surprisingly powerful.  Go ahead, give it a spin on movie/play/story plots, historical events, and episodes from your own life.  It won't cover everything, like those situations mentioned earlier where the sides have a legitimate disagreement, but it's still pretty damn good, if I may say so myself.

The real question here, however, is "How should we implement this in Dwarf Fortress?"  While I don't have the same self-indulgent certainty about this that I had on the basic offense-interpretation-response model, I do think that I have some pretty solid ideas.

The crux of the concept is knowledge representation, and more specifically incomplete knowledge.  Knowledge consists of a number of data (singular: datum) about various topics.  There'll be three types of knowledge that a being can possess:

  • Facts.  These are definite statements about the world and its inhabitants.  This includes data about all the stuff you'd find in the raws (e.g. creature definitions, ethics tokens, entity definitions), plus geography, history, entity properties, information about specific individuals, and lots of other stuff.  This can easily be represented with a slew of boolean variables, one for each datum, although the possibility that a being could "know" a false fact makes this a little more complicated.
  • Metaknowledge. Knowledge about what beings know.  This can get pretty convoluted, like if A knows B's secret and B knows that A knows and A knows that B knows that A knows but B doesn't know that A knows that B knows that A knows.  I'm not entirely sure how best to represent all this, since it's an arbitrarily large structure that's in constant flux, but Toady is a much better programmer than I am and I'm sure he'd have no trouble with it.
  • Physics. If facts are knowledge about the game world, then physics is knowledge about the game itself.  Data migth include stuff like "Not eating makes you die", or "A king with strong links to his home town is X% more likely to respond to threats to that town."  This allows beings to make deductions about the past and predictions about the future in interesting ways.  This could be represented as a set of rules "X -> Y", a limited simulation of a small portion of the world, or more likely some combination of the two.

Spoiler: "more about knowledge" (click to show/hide)

Okay, so.  Here's how it works.  When creatures interact, they do whatever they'd normally do.  Talk, fight, anything else that's in the regular rules.  In addition, each participant "mentions" a bunch of data.  "Mentioning" a datum adds it to the other participants' knowledge, along with some appropriate metaknowledge about the other participants and the datum.  In addition, each datum mentioned has an effect on each participant similar to if he had encountered the subject of that datum.  (For instance, someone who hates turtles would get a minor negative thought from someone talking about turtles.)

Spoiler: "more about mentions" (click to show/hide)

Now, lest you start to decry my idea as just a rehash of Clue with a bit of Dogs in the Vineyard and The Sims thrown in, here's the cool part.  Each time a datum is mentioned, the participants try to figure out the reason for that datum.  (This is the Interpretation step.)  They do this by applying the Physics rules they know to the subject of the datum, to the datum itself, and to any metaknowledge generated by the mention.  It's a pretty straightforward constraint satisfaction problem, but since nobody knows all the factors involved, any deductions will be naturally imperfect.  They'll fill in as many of the factors as possible with their own knowledge, but anything else they'll have to guess at.

When a participant decides that he's found the most likely reason for the datum, he adds the reason to his knowledge as a new datum.  He also adds any data that he had to fill in to make the reason work. With so much guesswork involved, there's a chance he made a mistake somewhere, so he gives each datum some kind of "certainty rating" that says how certain he is that it's true.  If applying a very certain datum to a very certain rule immediately implies a new datum, that datum will be very certain; if the reasoning requires a lot of guesswork, the result will be less certain. 

The more certain a participant is about a datum, the more likely he is to use it in an interpretation; that is, he'll prefer to use a certain datum over an uncertain one, and an uncertain one over one that he doesn't "know" at all.  The more a datum gets used in interpretations, the more certain it becomes, and the less certain any conflicting data becomes.  What this all means is that it's very easy for a bunch of bad circumstances to collide and cause a disaster.  One uncertain datum can influence someone's interpretation of other uncertain data until he's got a mass of mutually-reinforced suspicions, each baseless on its own, that all add up into absolute certainty about something that, from a distance, looks completely ridiculous.

Then he acts on his 'knowledge', and everybody wonders "What the hell was that for?  Is he angry at me?"

Spoiler: "some examples" (click to show/hide)


So, whaddaya think?

362
Toady mentioned "pain, swelling, oozing wounds, bruising, blisters, numbness, paralysis, fever, bleeding, coughing/vomiting blood, nausea, vomiting, unconsciousness, necrosis, impaired vision, drowsiness and dizziness as a starter set, with some possible extensions as they arise. If it makes sense, you'll be able to move those effects around from the initial site (for say contact or injection) to body parts by category/function (so you could have something cause headaches, for example, or make the gums bleed... one of the wikipedia snakes had that... not my fault)."

This is kinda tangential, but how do tissue layers interact with environmental effects, like temperature and gases?  Do outer layers insulate and protect inner ones?  Can poisons and wounds affect that by, say, changing tissue permeability or exposing inner ones?

I'm imagining a trap consisting of a long hallway kept at a constant temperature of 10079--just past the melting point of fat.  As enemies walk down it, all their fat liquefies and pools in their ankles.

Also imagining a situation where an adventurer must pass through a cloud of noxious gas, devastating to lungs but merely irritating to skin.  He puts on a mask and thinks himself adequately protected... until the gas starts to seep into his bloodstream through an open wound.

363
DF Modding / Re: Holy [carp], Fellow Modders! Custom Workshops!
« on: September 28, 2009, 09:58:50 pm »
Incidentally, what happens if you make a vermin with a ridiculous homeotherm value?  Do they just die and that's it?

Also, Shadetree, I love the library idea.  I wonder, though: is it possible to make an item that takes an unusual skill?

I mean, I assume the way your library works is that it has reactions that take in one book and output a book of the same sort every time, gaining skill as if the user had created an item using that skill.  Thing is, I think using a book of any sort will just end up giving the skills required to make a book.

It might be possible to have separate books on stone, wood, and bonecrafting, at least.  You'd just have to make the stonecrafting book have stone covers.

Or ooh, maybe you need to take an item of some sort with you when you read.  A piece of stone furniture for a masonry book, for instance.  Then the new piece of furniture produced would provide the skill.  Although the quality of the item would change, which is kinda weird.

364
DF Modding / Re: Holy [carp], Fellow Modders! Custom Workshops!
« on: September 21, 2009, 01:16:24 pm »
A sacrificial altar to Armok is probably the first mod I'll be making.  No idea how I'll do it, since I don't think creatures are smeltable yet.  A modded butcher shop might work if existing workshops weren't hardcoded.

It would take creatures (or maybe corpses) as reagents and produce enormous amounts of blood, and also souls if I can find a way to isolate a soul from a body.  These would be used for magic and awesome.

After that, in no particular order: mechanics that can make metal mechanisms, crafters and masons where you can specify their materials and output, glass furnaces that can only collect sand (so only my magma furnaces will make actual glass), alchemists' that can convert large amounts of common materials into small amounts of rare ones, and a greater variety of food workshops like bakeries (no more nonsensical foods like quarry leaf roasts).  Oh, and maybe some magical buildings to make use of the aforementioned souls.

365
DF Suggestions / Re: Different screw pump tile.
« on: September 20, 2009, 12:34:42 am »
So make the solid part flash from half-block to full-block.

Good ideas, Sizik.

366
DF Adventure Mode Discussion / Re: 9k not enought
« on: August 06, 2009, 02:03:48 pm »
If you're trying to sell items worth more than 9000, there are two ways to do it.  First, you can sell only a few items at a time, to make sure you don't underpay for anything; second, you can mark some of the merchant's goods for purchase, to reduce the amount of actual coin changing hands.

I often find enormous amounts of items near a cave, though never that many.

Items end up at caves because certain megabeasts and semimegabeasts like to steal items from the towns they sack.  The older and more successful the megabeast, the more items it will have stolen over the course of its life.

367
Hey, that's a really good idea.

I made an important discovery: screw pumps disassemble when you abandon a fortress.  Any lava flow we use will have to rely entirely on gravity.

368
Fraid not.  The only way to get land that was claimed by an earlier fortress is to reclaim.

Also, discovered a minor problem: it's actually not possible to build within five squares of the edge if you're outside. It's still possible to dig up to one away, though, and build stuff underground there, so we'll just have to use the lay of the land to our advantage.

369
Yeah, just checked the blocking and you're right about statues.  Never mind.

Okay, so yeah the best bet is water+lava.  The big question is of course, how can we put sides on the aqueduct without walling off the channel to the point of impassability?

I'm going to try a prototype.

370
I was actually thinking a while ago about how to make something like that work.  I think the trick is to set it up so you can do the final step in Adventurer mode, which will let you get past the edge-of-the-map problem.

I think what to do is build the big aqueduct right up as near to the edge as possible, so there's only a 2-square space at the edge of the square.  Then mod an adventurer with a really heavy ITEMCORPSE (neutronium statues or whatever), have four of them stand in the spaces on either side, and have them suicide.  It should look something like:

Code: [Select]
......,,,,,,
......,,,,,,
=====AA=====
......,,,,,,
......,,,,,,
=====AA=====
......,,,,,,
......,,,,,,

where the periods are one site, the commas are the other, and the A's are the adventurer corpses.

Now, if I remember correctly how fluids work, the statues should block any magma from getting out.  Have a fifth adventurer open the floodgates, and I think you should have a multi-site river of magma.

Hmm... I may actually have to try this if you don't.

371
DF Gameplay Questions / Re: Irritation- Don't go outside the walls!
« on: June 10, 2009, 11:44:55 pm »
Don't give them any reasons to go beyond the walls.  Usually they go there because they're picking something up, so change some of the standing orders on the Forbid Orders screen (accessed with O-F).  Also mass-forbid (d-b-f) everything outside the walls, just in case.

Other possible reasons to go far afield are to hunt (so don't give any dwarves the hunting labour) and to get water (so make sure you have plenty of booze and water sources within the walls).

If you're still having trouble, you can make it that the only way through the wall is via a solitary gate, which you can make out of either doors (which you can forbid when you don't want traffic) or grates/bars (which you can open/close with a lever).

The problem with this last method is that your framerate throws a fit if large parts of the map are completely inaccessible at some time.  You'll also have to put your trade depot outside the walls, so caravans don't bypass your site when the gate is closed.

EDIT: Oh, I see your problem.  Hmm.

372
Apparently water is a building material.  I had some in a stockpile; when I went to build a floor, one of the materials on the list was water.  I think it got cleaned up before my dwarves could install the floor, though.

373
DF Adventure Mode Discussion / Re: Draw your adventures
« on: May 27, 2009, 10:36:12 am »
My modded nightwing adventurer in the World of Traps And Attractions:


374
DF Modding / Re: I want my corpse to explode.
« on: April 08, 2009, 01:26:27 pm »
Yeah, the exploding decay thing didn't work right either.  Bones are still in the body, even if you can't see them.

I've been trying things involving HAS_MATGLOSS, setting the material to one set of values and the body to another, but it doesn't seem to work quite right either.

Just had an interesting idea, though.  On death, spawn a vermin with FIREBREATH but not FIREIMMUNE, so it will immediately burn everything and then die.  I remember hearing it was possible to spawn a living vermin with ITEMCORPSE, but I don't recall the details.  And I don't suppose you can give a vermin multiple organs, can you?

375
DF Modding / Re: I want my corpse to explode.
« on: March 30, 2009, 08:34:33 pm »
Hmm, not bad.  I didn't know you could specify FIXED_TEMP for rocks--the wiki didn't mention it--but we have fire now, at least.  Thanks for the heads-up.

I just had an idea, though I'm not sure how to implement it.  Is there a way to modify chunks to have a higher temperature than the base creature?  That is, when you tear a piece off of the creature, the chunk explodes?  Raising bone temperature doesn't work quite right, since you only get bone at a butcher's or after the corpse has decayed for a bit.  The corpse would only explode if you leave it lying around for a while.

...Actually, that sounds pretty cool.  I should try that.

Pages: 1 ... 23 24 [25] 26