Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: Ghostpaw on May 24, 2008, 11:45:00 am

Title: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 11:45:00 am
What does the [ART_FACET_MODIFIER] tag and the [ART_IMAGE_ELEMENT_MODIFIER] tag for entities do?
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 24, 2008, 11:51:00 am
They define how likely is a race to include certain creatures or items/events in their images and engravings.
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 11:53:00 am
quote:
Originally posted by Sean Mirrsen:
<STRONG>They define how likely is a race to include certain creatures or items/events in their images and engravings.</STRONG>

Alright so how do you use them and how are they different?

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 24, 2008, 12:46:00 pm
There's the readme for that. Or, more specifically, the "file changes.txt" file.

Here, I'll quote it and highlight the relevant bit:

quote:
Auxiliary file changes for 0.27.173.38a:

New entity tags
   [USE_EVIL_WOOD]
   [USE_GOOD_WOOD]
   [USE_EVIL_PLANTS]
   [USE_GOOD_PLANTS]
   [USE_GOOD_ANIMALS]
   [USE_ANY_PET_RACE]
   [USE_MISC_PROCESSED_WOOD_PRODUCTS]
   [IMPROVED_BOWS]
   [RESPECT_ANIMALS]
   [RESPECT_TREES]
   [LOW_SKILL]
   [INVADERS_IGNORE_NEUTRALS]
   [AT_PEACE_WITH_WILDLIFE]
   [EQUIPMENT_IMPROVEMENTS]
   [ABUSE_BODIES]
   [SPHERE_ALIGNMENT:<sphere>:<amount>]
      <STRONG><amount> is a multiplicative modifier that runs from 0 to 25600 with 256 being the neutral value
   [ART_FACET_MODIFIER:<facet>:<amount>]
      <facet> is one of: OWN_RACE, FANCIFUL, EVIL, GOOD
      <amount> as above
   [ART_IMAGE_ELEMENT_MODIFIER:<art>:<amount>]
      <art> is one of: CREATURE, PLANT, TREE, SHAPE, ITEM
      <amount> as above</STRONG>
   [ITEM_IMPROVEMENT_MODIFIER:<item>:<amount>]
      <item> is one of:
         ART_IMAGE
         COVERED
         RINGS_HANGING
         BANDS
         SPIKES
         ITEMSPECIFIC
         THREAD
         CLOTH
         SEWN_IMAGE
      <amount> as above
...
...


Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 01:55:00 pm
For ART_FACET_MODIFIER what do each of the following do:
-OWN_RACE
-FANCIFUL
-EVIL
-GOOD

For ART_IMAGE_ELEMENT_MODIFIER for the <art> can you specify a specific CREATURE, PLANT, TREE, SHAPE, or ITEM?

Also could an example of how radically the amount affects how likely is a race to include certain creatures or items/events in their images and engravings be given?

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 24, 2008, 02:12:00 pm
No, no specific creature, shape or item, just those tags.

Facets supposedly mean what races the images will usually depict. For example, an OWN_RACE facet combined with an ITEM image makes a picture of something related to the race in question, like a common accessory, or a recent artifact. EVIL combined with CREATURE would make images of goblins. Stuff like that, or so I understand it.

And, you have the range values given. If you put 25600 on both OWN_RACE and CREATURE, you'll get some very egocentric creatures, 99 out of 100 images will have them and their doings on them.

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 02:15:00 pm
quote:
Originally posted by Sean Mirrsen:
<STRONG>No, no specific creature, shape or item, just those tags.

Facets supposedly mean what races the images will usually depict. For example, an OWN_RACE facet combined with an ITEM image makes a picture of something related to the race in question, like a common accessory, or a recent artifact. EVIL combined with CREATURE would make images of goblins. Stuff like that, or so I understand it.

And, you have the range values given. If you put 25600 on both OWN_RACE and CREATURE, you'll get some very egocentric creatures, 99 out of 100 images will have them and their doings on them.</STRONG>


Thankyou for the clear explanation.  How about with 10,000?

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 24, 2008, 02:20:00 pm
Do I need to quote the file again? The default on each value is 256. Think how much 10000 is bigger than 256. I guess you'll only have 97 of 100 images depicting themselves.
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 03:07:00 pm
quote:
Originally posted by Sean Mirrsen:
<STRONG>Do I need to quote the file again? The default on each value is 256. Think how much 10000 is bigger than 256. I guess you'll only have 97 of 100 images depicting themselves.</STRONG>

How about 256 then?

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 24, 2008, 03:35:00 pm
Average. I mean, is it really that complicated? The game chooses from those variants at random. The numbers specify the relative chance that a variant will be chosen in any specific case. Given that 256 is default for all the variants given, then if you again specify any of these at 256, all variants will be present in a statistically equal amount. If you specify more, the variant will be chosen more often, and the higher the number, the more the probability. It's not like we're talking rocket science here, this is pretty basic modding stuff...
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 05:43:00 pm
Hmm.  I just wanted specific probabilities.
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 24, 2008, 05:46:00 pm
But, aren't the values specific enough? A simple comparison of numbers gives you the data you're looking for. I was specifically irritated by the "How about 10000/How about 256" question sequence...
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 06:39:00 pm
quote:
Originally posted by Sean Mirrsen:
<STRONG>But, aren't the values specific enough? A simple comparison of numbers gives you the data you're looking for. I was specifically irritated by the "How about 10000/How about 256" question sequence...</STRONG>

It seemed to me like you were purely guestimating which really made me uncomfortable about the accuracy of your values.  Look at it this way.  Going from 256 to 10,000, which is a 9,744 difference, raises makes the odds 97/100.  But a raise from 10,000 to 25,600, which has a difference of 15,600, only raises the odds to 99/100?  It might just be me but something seems off.  You have even failed to mention the baseline, default, odds are at 256 which will be critical with "guestimation".  What would really help in figuring out how radically these numbers change the outcome will be to find out how many different possible outcomes there are.

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Dasleah on May 24, 2008, 06:51:00 pm
...does it really matter? Do you need something so precise that 78.21% of your engravings are of animals?

The scale is just one of Toady's little things that only he truly knows the ins-and-outs of. All we know is 256 is the middle (so I'm guessing that's 50%).

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 24, 2008, 06:55:00 pm
Is it that important? The 99/100 wasn't calculation, it was exaggeration. The 97/100 was effective comparison - 10000/256 ~ 40, 100/40 ~ 2.5 ~ 3.   :)

edit: hm, beaten to it. Also, image element chooses from 5 varaints - meaning a 20% default chance for any given one.  ;)

[ May 24, 2008: Message edited by: Sean Mirrsen ]

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Surma on May 24, 2008, 06:58:00 pm
Are the values scaled to the total number? e.g. if you have all but 1 of them at the default value, and that 1 at 10000, is it (default * x) + 10000, or does it range from the 25600 * (x + 1)?

What I'm trying to abstract there is, say you have OWN_RACE:25600, FANCIFUL:256, EVIL:256, GOOD:256. would it scale from OWN_RACE/26368? Or would it scale from OWN_RACE/102400?

Having it scale from A/(w+x+y+z) makes more sense to me but, I'm just trying to be accurate.

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 07:08:00 pm
O well I guess I'll have to refer to my notes on propability and return with my own guestimations.  We wouldn't be having this problem if we had the source code but we don't and there is nothing we can do about.

[ May 24, 2008: Message edited by: Ghostpaw ]

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 24, 2008, 07:23:00 pm
I just realized I didn't completely understand something.  For ART_FACET_MODIFIER, what OWN_RACE refers to is pretty obvious.  But what I don't know is what FANCIFUL refers to and, to a lesser extent, what EVIL and GOOD refer to.
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Kagus on May 24, 2008, 07:45:00 pm
They are all creature tags.  Trolls are [EVIL], unicorns are [GOOD], griffons are [FANCIFUL].
Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Ghostpaw on May 25, 2008, 04:04:00 am
Well I have to say I am not satisfied with the previous poster’s explanation to my question.  When he stated that if OWN_RACE was assigned the value 25,600, that 99 out of 100 images will have that race doing something I accepted it.  However it did not give me much for a comparison to figure out how drastically the numbers affected the outcome so I asked for an example of what will happen if OWN_RACE was assigned the value 10,000 instead?  Instead of out right stating that he was pulling numbers out of his ass and that his previous example was full of shit, his attitude changed to that of an arrogant person and threatened to reference the file again and pulled out another number 97 out of 100 with an extremely questionable piece of evidence.  Is he saying that he is getting his numbers by how large of a difference the inputted value is to 256?  Now alarm bells are ringing through my head but I give him the benefit of the doubt so I ask for an example for the default value of 256 so I would have something to use as a reference point.  I did not get a direct answer even after asking for specifics and instead Sean Mirrsen just gets hostile.  Why did he get hostile?  Sean Mirrsen’s motives become only speculation at this point but I would say it has something to do with his inability to directly and confidently answer my question.  Afterwards he admits to have been playing me for a fool the entire time and really had no real information pertaining to the subject.  Not even any justifiable logical guesstimation.

However, I think I've finally figured it out.  At first I was thinking about how 25,600 was 100 times higher than 256.  To make things easier to follow lets assume that OWN_RACE was changed ffrom its default setting of 256 to [ART_FACET_MODIFIER:OWN_RACE:25600] with the other objects staying at 256.  A person would assume that OWN_RACE would also be 100 times more likely to be chosen over the other objects.  But what if all the objects numbers were modified to 25600?  The objects (OWN_RACE, FANCIFUL, EVIL, GOOD) can't ALL be 100 times more likely to occur.  That would be impossible.

So that got me thinking to how I would use these values.  I would assign each object to a section of a range of values (now to be referred to as a set) and have a randomly generated number using the computers own internal clock as a seed along with a long complicated formula to create unpredictability and have the resulting value compared to the whole or established range of values (now to be referred to as the range of values).  I would then have any value equaling or rounded to 0 to be rejected while any other values will be compared to the range of values.  If the value is not within the range of values it will be rejected.  All accepted values will be compared to each object’s set and if the resulting value is also found in that object’s set that object will be selected.

“*” will represent the multiplication sign without the quotes.

So how would this work with the ranges 0-25,600? Well quite easily once I figured out how I would do it.  Simply assign the first object to a set from the range of values from 0 + (1*inputted value).  The other object’s set will be established from the range of values starting from the [end value of the previous object’s set] + 1 to [previous object’s end set value] + (1 * inputted value).  For clarities sake I will use an example.  Let’s assume OWN_RACE was assigned [ART_FACET_MODIFIER:OWN_RACE:25600] while all other objects (FANCIFUL, EVIL, GOOD) will be using their default values of 256.  Let’s also assume that OWN_RACE will be the first object whose set is defined.  It will start out as 0 + 25600.  The answer is 25600 so OWN_RACE’s set will be;

[OWN_RACE set: 0 – 25,600]

Let’s now assume FANCIFUL will be the next object whose set is defined.  It would work like this.  25,600 + 1 to 25,600 + (1* 256).  This would give a set range of;

[FANCIFUL set: 25601 – 25856]

Now let’s assume EVIL will be the next object set to be defined.  This would be how it would be calculated from my theory.  25,856 + 1 to 25,856 + (1* 256).  Again this would give a set range of;

[EVIL set: 25857 – 26112]

By now you will have figured out the pattern but I’ll complete the last object’s set to be able to go on to my next point.  Let’s assume GOOD will be the last object whose set is defined.  Like the others it could work like this.  26,112 + 1 to 26,112 + (1* 256).  The set range for GOOD is now;

[GOOD set: 26113 – 26368]

Now the whole range of values is 0 – 26,368.  Now to discover the real  probability of an objects likelihood of appearing simply take its inputted value and divide it by the end value of the range of values.  To use our previous example I will find out the probability of OWN_RACE being selected.  25,600 / 26,368 = 0.97087.  This gives OWN_RACE a 97% chance of being selected!  

If anyone finds anything wrong with what I’ve thought up of feel free to give me some feedback or even to just ask for clarification.

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 25, 2008, 04:40:00 am
The only solid fact is that we don't know anything about how the system operates. From the comments we can see that the values are multiplicative, which seems to imply that there's a certain preset chance for each, and the values we edit are modifiers for those, so depending on the initial values (which may not even be equal) the percentage correlation can vary wildly. We can only edit the variables in realtion to whatever's set in the game by default. In this sense, yes, EVERY variant can be 100 times as frequent.

And I wasn't offensive, I was merely annoyed. The "Vogon-after-destroying-a-planet-and-discovering-a-hitchhiker" kind of annoyed.   :) Without knowing the inner workings of the system, there's no way to accurately specify any kind of value and measure it against another. Especially when there isn't so much as a hint at an incentive to actually have that kind of accuracy. What's the point of knowing three billion digits after the floating point in PI, when a hundred yields millimeter accuracy in planetary orbit calculations?

Also, you might have taken a simpler approach at your goddam calculations. 25600 is 100 times as frequent as 256. With other values at 0, the chance for this one to be selected is 100%. Add three 256 values to the three other variants, each 1% of the 25600. Now deduct 3% from 100. The net result is roughly 97%.  :D I won't be surprised if the method works with sufficient accuracy for other value combos.,,

[ May 25, 2008: Message edited by: Sean Mirrsen ]

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Deon on May 25, 2008, 04:54:00 am
Sean, obviously you shouldn't be annoyed about questions. If you don't like them, don't answer them =).
At first I thought they were stupid ones too, but after reading questors' posts I realised that they had a sense.

As for me, I use relative numbers to make sure my percent (i.e. 512 for plants and leave all other things default 256 - thus I suppose that my plants will be 1/3 chance while types are 1/6).

[ May 25, 2008: Message edited by: Deon ]

Title: Re: ART_FACET_MODIFIER and ART_IMAGE_ELEMENT_MODIFIER
Post by: Sean Mirrsen on May 25, 2008, 05:08:00 am
When I offer help, I usually follow through, unless I get bored and lose interest. This wasn't the case, and the questions seemed normal until I got mistaken for a supercomputer with direct access to DF source code.

Speaking of which, I wonder what SkyNet would do if it found DF...