Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Object Relationship Database  (Read 1077 times)

Canis786

  • Escaped Lunatic
    • View Profile
Object Relationship Database
« on: December 17, 2009, 06:36:46 pm »

So I was thinking of what could help a lot of people when coming up with what to add to DF and I came up with the idea of crowd sourcing object relationships. Basically what my idea is anyone who wanted to help would go to a web page, and input some information for others to use so they don't have to spend time thinking "what can a goblin do?". Instead they would ask the database and get a list.

The general idea is we have two objects that are related by some type of relation ship.

Person has Hair

In this case the two objects are Person and Hair and the relation ship is has. A more complex set of relationships might be

Fire consumes fuel
Fire radiates heat
Heat ignites fuel

This would be a set of relationships that when applied together would allow for fire to essentially explode when it comes into contact with fuel. The thought process is fire grows as it consumes fuel. As fire grows so does the amount of heat it radiates. The heat ignites fuel around the fire thus increasing its size yet again. Then the cycle continues until there is no fuel left.

The web page would be incredibly simple and have a search (which I would ask everyone to use before they input some relationship to prevent a mass of similar entries). Basically you select from a list of objects already in the database (searchable) and a list of relationships (searchable) and apply it. You would also be able to add objects and relationships should they not be listed.

If I made such an application how many would be willing to add a few things here and there?
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Object Relationship Database
« Reply #1 on: December 17, 2009, 09:08:20 pm »

so they don't have to spend time thinking "what can a goblin do?"

Two central questions here.  First, do people actually wonder this?  Secondly, if they do, do they want the answer to be expressed as a series of abstract relationships?

A more complex set of relationships might be

Fire consumes fuel
Fire radiates heat
Heat ignites fuel

This would be a set of relationships that when applied together would allow for fire to essentially explode when it comes into contact with fuel. The thought process is fire grows as it consumes fuel. As fire grows so does the amount of heat it radiates. The heat ignites fuel around the fire thus increasing its size yet again. Then the cycle continues until there is no fuel left.

Is this about fires in DF, or in real life?  Either way it's incoherent, since that chain of events depends heavily on outside circumstances.  Trying to express all interactions in terms of these kinds of "simple" relationships is, well, absurd.

I'm still not sure what the purpose of this is.  Is it a reference for players?  What does it do that the wiki can't do?
Logged

Bricks

  • Bay Watcher
  • Because you never need one brick.
    • View Profile
Re: Object Relationship Database
« Reply #2 on: December 18, 2009, 02:17:44 am »

Yeah, I'm a little confused as to where you are going with this.  Extrapolating heavily, I guess you are trying to find a way to handle the relationships between game elements?  Currently, we 1) don't really have access to that level of code, and 2) the fact that DF is very much a simulation means that we don't have to encode for every possibility of every way things interact.  In fact, this is the absolutely worst way to program: try to anticipate every possibility and exception.
Spoiler (click to show/hide)
Logged
EMPATHY - being able to feel other peoples' stuff.

Morgus

  • Bay Watcher
    • View Profile
Re: Object Relationship Database
« Reply #3 on: December 18, 2009, 04:14:17 pm »

the absolutely worst way to program is something like dropping acid, unplugging your monitor, and rolling your face on the keyboard.

:P
Logged
Because it's so amusing to hear stories of the last recruit, pressganged into defending the fortress, making the critical shot that saves all the battle-hardened veterans... then going crazy because the cats have filled the dining room with miasma.

Canis786

  • Escaped Lunatic
    • View Profile
Re: Object Relationship Database
« Reply #4 on: December 18, 2009, 04:42:44 pm »

The objective doesn't have anything to do with code. The idea is to reduce the amount of time thinking about what specific objects can do and what they can react with. So instead of a person spending an hour or more trying to figure out how one object interacts with its environment they could query the database for that information.

When it comes to code people do ask "what can a goblin do?" and its much more complex then you think. Goblins can start a siege, retreat from a siege, send a child kidnapper, send a small ambush party, equip themselves with armor and weapons, break a dwarf into servitude, create massive towers,... there is a whole shit load of things goblins can do in game currently and a whole shit more possible things they could be programmed to do. The idea is to make that list so if Toady or someone else decides they wish to add something cool they have a massive list for ideas.

The Fire/Fuel isn't incoherent. It is a set of relationships between objects. You could have Fire ignites Fuel but that simplifies the overall idea. By using heat you allow for fire to increase the temperature of an area. You allow for fire that isn't hot enough to light specific fuels. The idea is that by breaking the simplified reaction down to smaller pieces you can allow for a more complex reaction that is easier to handle.
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Object Relationship Database
« Reply #5 on: December 18, 2009, 05:20:10 pm »

The objective doesn't have anything to do with code. The idea is to reduce the amount of time thinking about what specific objects can do and what they can react with. So instead of a person spending an hour or more trying to figure out how one object interacts with its environment they could query the database for that information.

When it comes to code people do ask "what can a goblin do?" and its much more complex then you think.  Goblins can start a siege, retreat from a siege, send a child kidnapper, send a small ambush party, equip themselves with armor and weapons, break a dwarf into servitude, create massive towers,... there is a whole shit load of things goblins can do in game currently and a whole shit more possible things they could be programmed to do.

What you seem to be describing is UML with the addition of "relationships" or "abilities" that you haven't adequately defined at all.  "Creating massive towers" counts as a relationship?  What is that a relationship between?  Goblins and towers?  Goblins and pieces of stone?  Goblins and stone-hauling jobs?  Goblins and blueprints?  How do you handle polymorphism, such as the fact that dwarves and goblins share most of their "abilities"?  Your data model will be either a) too floaty and imprecise to be useful to anyone or b) more complicated than the game's own execution.  No way around it.

The Fire/Fuel isn't incoherent. It is a set of relationships between objects. You could have Fire ignites Fuel but that simplifies the overall idea. By using heat you allow for fire to increase the temperature of an area. You allow for fire that isn't hot enough to light specific fuels. The idea is that by breaking the simplified reaction down to smaller pieces you can allow for a more complex reaction that is easier to handle.

Tell me what these relationships would look like.  Are "heat," "fire," "temperature," "area," and "fuel" all different tables?  What are their schema and join tables?

You said you wrote a thesis on parallelism, so I'll give you the benefit of the doubt that you aren't insane/stoned.  Could you maybe point to a database that serves a similar purpose, e.g. abstractly modeling the execution of a program?
« Last Edit: December 18, 2009, 05:24:15 pm by Footkerchief »
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Object Relationship Database
« Reply #6 on: December 18, 2009, 05:33:55 pm »

Excuse me, how is it related to the modding thread?

Everything moddable is expressed with a few tokens which define the only possible relations. You spend MAXIMUM 1 minute to look for a desired info, and it's if you can't read faster than 1 word per second (which is some kind of disease, I forgot).

Quote
So instead of a person spending an hour or more trying to figure out how one object interacts with its environment
Excuse me, but if a person spends an  HOUR trying to figure out how one object interacts with its environment and it's not a quantum physics related problem, a simple web page wouldn't help him, he would have to contact a doctor instead.

What's a purpose of this, and while it's here, how is it related to The Modding Thread?

P.S. I am really interested in this:
Quote
This would be a set of relationships that when applied together would allow for fire to essentially explode when it comes into contact with fuel. The thought process is fire grows as it consumes fuel. As fire grows so does the amount of heat it radiates. The heat ignites fuel around the fire thus increasing its size yet again. Then the cycle continues until there is no fuel left.
It's impossible in-game. Where do you want to simulate it?
« Last Edit: December 18, 2009, 05:38:56 pm by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Object Relationship Database
« Reply #7 on: December 18, 2009, 05:43:15 pm »

Excuse me, how is it related to the modding thread?

If you mean modding forum, I'm wondering that too, but honestly it's as good here as anywhere else.
Logged

Lancensis

  • Bay Watcher
    • View Profile
Re: Object Relationship Database
« Reply #8 on: December 18, 2009, 08:21:04 pm »

... there is a whole shit load of things goblins can do in game currently and a whole shit more possible things they could be programmed to do. The idea is to make that list so if Toady or someone else decides they wish to add something cool they have a massive list for ideas.

You want to track every possible and theoretical interaction between every object in the game? Like, for a rock, you'd have "grind into gravel" "break teeth on" "hurl into sun" and every other thing it is possible to do with a rock, and another object. This list would be infinite. I'm guessing you don't intend it to be so, but for every feasible or desirable result, there'd still be an immense list of useless things to be done.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Object Relationship Database
« Reply #9 on: December 18, 2009, 08:48:43 pm »

Let's stay calm and wait for the OP to explain the reason.

Footkerchief: yeah, my bad, I meant modding forum :D. It could be somewhere in forum games though :P.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Canis786

  • Escaped Lunatic
    • View Profile
Re: Object Relationship Database
« Reply #10 on: December 18, 2009, 10:28:32 pm »

I placed it here as it was the most fitting place I could find. The idea is that it would help modders who are looking to add something to the game, they don't know what they wish to add, but they know they want to add something. Now as Lancensis stated the potential list is infinite, and that is why you use the knowledge of a group to help you come up with more then you could on your on in a reasonable time period. While my examples are simple there must be times when you are working and you wish to add some more units types but can't think of anything that relates to your theme (if you have one). In that case you could query the information other people have inputted to come up with related objects or at least get some inspiration. Say you wished to add a whole mess of demons to the game that are based off real legends. You could spend the time and find the more well known ones rather quickly or (assuming people have added it to the database) you could run a search on objects related to demons and come up with a list of types of demons, what demons can do, do they use tools, who are their enemies, who are their allies. All that information to help you create a more complete mod. Sure small details like the fire / fuel example I gave may never be implemented but that could give rise to an idea about some unit type, some item, or some type of building.

The whole point is that it would act as a place to look up a wide range of objects related to something you are searching for. Based off peoples initial reaction I don't believe it would get the use it requires inorder to be useful. It might have to do with the way I described it, or my idea has too wide of scope. It is an idea none the less that could help a lot of people who are having a brain fart.
Logged

Blargityblarg

  • Bay Watcher
  • rolypolyrolypolyrolypoly
    • View Profile
Re: Object Relationship Database
« Reply #11 on: December 19, 2009, 03:23:39 am »

I think I get what he's getting at.

He wants to make a database of all the creatures, items and features in DF, with a list of what they can do/ are useful for.

Basically, it's the Wiki.

Sorry mate, it's been done. It could do with some less misinformation, but it's already there.

Logged
Blossom of orange
Shit, nothing rhymes with orange
Wait, haikus don't rhyme