Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Caravan prices  (Read 2141 times)

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Caravan prices
« on: January 04, 2016, 04:54:22 pm »

Duplicating my question from IRC the other day.

Seems caravan prices for weapons/armour get some multiplier (compared to item basic value) based on caravan's entity race adultsize property. Is it documented somewhere/is the exact formula known?

khearn

  • Bay Watcher
    • View Profile
Re: Caravan prices
« Reply #1 on: January 05, 2016, 12:59:50 pm »

You might want to post this in the dwarf mode discussion forum, not the Utilities and 3rd party applications forum.
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Caravan prices
« Reply #2 on: January 05, 2016, 02:48:19 pm »

You might want to post this in the dwarf mode discussion forum, not the Utilities and 3rd party applications forum.

Yep.

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Caravan prices
« Reply #3 on: January 12, 2016, 03:12:25 pm »

It seems weapon price is doubled if caravan's race adult size >= weapon "MINIMUM_SIZE" value. I can somewhat understand this.
But for armor, boots, etc. the price is doubled when adult size >= 7 and item's ARMORLEVEL > 0 or METAL_ARMOR_LEVELS is set. Which is weird as I can't understand where the value 7 comes from.

SEM58

  • Bay Watcher
    • View Profile
Re: Caravan prices
« Reply #4 on: January 12, 2016, 03:27:34 pm »

It seems weapon price is doubled if caravan's race adult size >= weapon "MINIMUM_SIZE" value. I can somewhat understand this.
But for armor, boots, etc. the price is doubled when adult size >= 7 and item's ARMORLEVEL > 0 or METAL_ARMOR_LEVELS is set. Which is weird as I can't understand where the value 7 comes from.

It may be a coincidence, but humans have [BODY_SIZE:12:0:70000] (as opposed to dwarves with [BODY_SIZE:12:0:60000]), so maybe it's just a case of count the 10,000s.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Caravan prices
« Reply #5 on: January 12, 2016, 04:07:20 pm »

It seems weapon price is doubled if caravan's race adult size >= weapon "MINIMUM_SIZE" value. I can somewhat understand this.
But for armor, boots, etc. the price is doubled when adult size >= 7 and item's ARMORLEVEL > 0 or METAL_ARMOR_LEVELS is set. Which is weird as I can't understand where the value 7 comes from.

It may be a coincidence, but humans have [BODY_SIZE:12:0:70000] (as opposed to dwarves with [BODY_SIZE:12:0:60000]), so maybe it's just a case of count the 10,000s.

Interesting idea, I'll check that.

Dozebôm Lolumzalìs

  • Bay Watcher
  • what even is truth
    • View Profile
    • test
Re: Caravan prices
« Reply #6 on: January 12, 2016, 05:53:00 pm »

Wait, guys, I know from somewhere that humans always want/pay double for weapons. That may be hardcoded, and unrelated to size.
Logged
Quote from: King James Programming
...Simplification leaves us with the black extra-cosmic gulfs it throws open before our frenzied eyes...
Quote from: Salvané Descocrates
The only difference between me and a fool is that I know that I know only that I think, therefore I am.
Sigtext!

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Caravan prices
« Reply #7 on: January 12, 2016, 06:26:19 pm »

Wait, guys, I know from somewhere that humans always want/pay double for weapons. That may be hardcoded, and unrelated to size.

It's definitely related to size, it's "always" like that because human size is greater than any weapon's MINIMUM_SIZE.

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: Caravan prices
« Reply #8 on: January 12, 2016, 06:29:18 pm »

Wait, guys, I know from somewhere that humans always want/pay double for weapons. That may be hardcoded, and unrelated to size.

It's definitely related to size, it's "always" like that because human size is greater than any weapon's MINIMUM_SIZE.

That's not so. Elves can use crossbows but I've never had them pay double for them. I think humans just like weapons.
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Caravan prices
« Reply #9 on: January 13, 2016, 02:41:03 am »

Wait, guys, I know from somewhere that humans always want/pay double for weapons. That may be hardcoded, and unrelated to size.

It's definitely related to size, it's "always" like that because human size is greater than any weapon's MINIMUM_SIZE.

That's not so. Elves can use crossbows but I've never had them pay double for them. I think humans just like weapons.

Well, I definitely can change the race of the caravan and see that prices change only depending on the body size.

Niddhoger

  • Bay Watcher
    • View Profile
Re: Caravan prices
« Reply #10 on: January 13, 2016, 02:00:13 pm »

Wait, guys, I know from somewhere that humans always want/pay double for weapons. That may be hardcoded, and unrelated to size.

It's definitely related to size, it's "always" like that because human size is greater than any weapon's MINIMUM_SIZE.

That's not so. Elves can use crossbows but I've never had them pay double for them. I think humans just like weapons.

Well, I definitely can change the race of the caravan and see that prices change only depending on the body size.

Elves actually pay more for items with natural imagery on them (trees and such), and will pay less for items with metal spikes.  Also, "edged" weapons have an inherent doubling of price over blunt weapons.  This is why maces are always far cheaper than swords of hte same quality/material/decorations. I look out for this when embarking on metal-poor sites, as I can get more metal for my buck just buying the blunt weapons (crossbows count as blunt I think).

I never payed attention to the increased price of large items versus normal, as they never come in the same caravan.  Human caravans are bugged right now too, so I haven't had a current one to check out.
Logged

Kumquat

  • Bay Watcher
    • View Profile
Re: Caravan prices
« Reply #11 on: January 13, 2016, 02:33:58 pm »

There are three entity tags that define what sort of art and improvements they like:

ART_FACET_MODIFIER, ART_IMAGE_ELEMENT_MODIFIER, and ITEM_IMPROVEMENT_MODIFIER.

For instance elfsies have [ITEM_IMPROVEMENT_MODIFIER:SPIKES:0] which means they give zero value to spikes.
Dworfs have it [ITEM_IMPROVEMENT_MODIFIER:SPIKES:384] which I believe gives 1.5x value.
Logged

Button

  • Bay Watcher
  • Plants Specialist
    • View Profile
Re: Caravan prices
« Reply #12 on: January 13, 2016, 04:24:21 pm »

It's definitely related to size, it's "always" like that because human size is greater than any weapon's MINIMUM_SIZE.

That's not so. Elves can use crossbows but I've never had them pay double for them. I think humans just like weapons.

Well, I definitely can change the race of the caravan and see that prices change only depending on the body size.

I wouldn't be surprised if there was a size component, but there is also a human preference for weapons. In vanilla, without trade agreements, humans always value masterwork bone crossbows at 240 DB, elves always value masterwork bone crossbows at 120 DB, and dwarves always value masterwork bone crossbows at 120 DB. All three races wield crossbows one-handed.

Are you hacking the caravan races in-place? It might be that they're still using the entity-level prices for whatever they belonged to when they spawned.
Logged
I used to work on Modest Mod and Plant Fixes.

Always assume I'm not seriously back

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Caravan prices
« Reply #13 on: January 13, 2016, 06:29:41 pm »

It's definitely related to size, it's "always" like that because human size is greater than any weapon's MINIMUM_SIZE.

That's not so. Elves can use crossbows but I've never had them pay double for them. I think humans just like weapons.

Well, I definitely can change the race of the caravan and see that prices change only depending on the body size.

I wouldn't be surprised if there was a size component, but there is also a human preference for weapons. In vanilla, without trade agreements, humans always value masterwork bone crossbows at 240 DB, elves always value masterwork bone crossbows at 120 DB, and dwarves always value masterwork bone crossbows at 120 DB. All three races wield crossbows one-handed.

Are you hacking the caravan races in-place? It might be that they're still using the entity-level prices for whatever they belonged to when they spawned.

Found this one - it's because of [SPHERE_ALIGNMENT:WAR:512]

So for weapons, the price (actually, only the base value without improvements) is multiplied by (SPHERE_ALIGNMENT:WAR / 256) if race body size >= weapon MINIMUM_SIZE. Ok, now to the armor...

For armor, it seems, the price is increased if armor level > 0 and body size >= 7 (this is strange).
For shields, the same regardless of body size.
For ammo, the price is always increased.

No other SPHERE_ALIGNMENT values seem to affect any prices.

Niddhoger

  • Bay Watcher
    • View Profile
Re: Caravan prices
« Reply #14 on: January 13, 2016, 08:14:19 pm »

Found this one - it's because of [SPHERE_ALIGNMENT:WAR:512]

So for weapons, the price (actually, only the base value without improvements) is multiplied by (SPHERE_ALIGNMENT:WAR / 256) if race body size >= weapon MINIMUM_SIZE. Ok, now to the armor...

For armor, it seems, the price is increased if armor level > 0 and body size >= 7 (this is strange).
For shields, the same regardless of body size.
For ammo, the price is always increased.

No other SPHERE_ALIGNMENT values seem to affect any prices.

This makes sense, actually, as humans are the only race known to war with itself.  Even goblins who murder each other left and right don't wage full-scale war against other goblins.  Only humans will wage war against ANYONE else.  I've even noticed this tooling around legends viewer.  A large island (one EMBARK tile) away from the main continent had 3 civilizations on it, 2 human and 1 elf.  The largest human civ racked up something like 15 wars in 500 years, most of them against the other human.
Logged