Author Topic: Zandman's tweak musings #3: Different prices for different prisoners -[RESOLVED]  (Read 332 times)

0 Members and 1 Guest are viewing this topic.

Zandman

  • Sergeant at Arms
  • *
    • View Profile
    • Zandmod I
  • Faction: Vaegir
Seeing that demigod TheMageLord and others have started fixing almost all the things that annoy me in this otherwise beautiful game, I thought I'd start asking around for even more fixes.

Now I know very little about modding, tweaking and programming myself, so I have no way of knowing whether what I'm asking for is impossible or easy. If impossible or something best suited for a separate mod job, just tell me and I'll lock the thread.


#3: I've always found it highly logical that a well-trained enemy knight should give me a better price from the slave trader than, say, a scrawny peasant. So what do I get? 50 denars? Crap! I've seen this work in mods before, so:

- How can I get paid per prisoner level? -[RESOLVED: I am obviously blind and/or stupid not to notice this fix]
- Is it at all possible to get a bonus for bringing prisoners from a faction you're at war with, so that a level 10 "neutral" prisoner (a bandit, e.g.) will give you less than a level 10 member of a rival faction? -[RESOLVED: All thanks to PerXX's sense of logic]
« Last Edit: October 22, 2008, 09:52:55 AM by Zandman »
(download HERE! )

PerXX

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Zandman's tweak musings #3: Different prices for different prisoners
« Reply #1 on: October 22, 2008, 08:37:20 AM »
From the sticky at the top of this very page:

Making prisoner value dependent upon level is already mostly in the code. Theres just a line left out (I'm not sure if it was intentional or not). Heres how to add the line in and make it dependent on level. Find this in scripts.txt:
Quote
game_get_prisoner_price -1
 11 21 1 1224979098644774912 2133 2 72057594037927936 50 4 0 33 3 144115188075855885 360287970189639821 360287970189639831 2171 2 1224979098644774913 1224979098644774912 2133 2 1224979098644774914 1224979098644774913 2105 2 1224979098644774914 10 2107 2 1224979098644774914 1224979098644774914 2108 2 1224979098644774914 6 3 0 2075 1 72057594037927936
Add this in right between the 6 and the 3 and change the 11 to a 12:
Quote
2133 2 72057594037927936 1224979098644774914
Your new script should look like this:
Quote
game_get_prisoner_price -1
 12 21 1 1224979098644774912 2133 2 72057594037927936 50 4 0 33 3 144115188075855885 360287970189639821  360287970189639831 2171 2 1224979098644774913 1224979098644774912 2133 2 1224979098644774914 1224979098644774913 2105 2 1224979098644774914 10 2107 2 1224979098644774914 1224979098644774914 2108 2 1224979098644774914 6 2133 2 72057594037927936 1224979098644774914 3 0 2075 1 72057594037927936
The value has already been calculated by the rest of the script, they just forgot to assign the new value - that's what the extra line does. The actual calculation is level + 10, square that and divide by 6. So a looter is 4+10 = 14, squared =  196, div by 6 = 32.667, rounded down to 32 (the game only saves whole numbers, decimals are just discarded). A Nord Huscarl, on the other hand, is worth 28 +10, squared = 1444, div by 6 = 240. Slightly less for the weak, way more for the strong.

Note that by default this does not work with Ramun the slave trader, or tavernkeepers (if you made the other tweak), due to a check in the script to limit the calculation to ransom brokers. You can change the check to include Ramun and tavern keepers if you like, just change the 360287970189639821 360287970189639831 to this:
Quote
360287970189639808  360287970189640122
What that does is broaden the range to include Ramun on the left side and all the tavernkeepers on the right side. I assume the only reason of this check would be that Ramun was supposed to pay a set price of 50 while ransom brokers relied on the level of the troop, so Ramun would pay more for looters and such but less for higher tier troops.

Also, this is not compatible with red.murder's tweak - if you make it use the calculation it will overwrite the 50. I'll list them both so people can chose which one they want.


Rivacheg Raid,
They don't actually group up in big groups, what that does is make separate nearby groups join together when you attack one. So if you have 3 sea raider parties chasing you, and the closest one attacks, all 3 will attack. Or if you have 3 running from you and you jump on one, the other two help. The same way lords help eachother.

Zandman

  • Sergeant at Arms
  • *
    • View Profile
    • Zandmod I
  • Faction: Vaegir
Re: Zandman's tweak musings #3: Different prices for different prisoners
« Reply #2 on: October 22, 2008, 08:56:48 AM »
Thanks - can't believe I didn't notice that.
Part two of my question still stands, though.
(download HERE! )

PerXX

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Zandman's tweak musings #3: Different prices for different prisoners
« Reply #3 on: October 22, 2008, 09:45:19 AM »
No problem, I do the same thing sometimes :)
Regarding your second question, I personally wouldn't feel that would make much sense. Slavetraders are traders much like every other merchant, not affiliated with a specific nation. Thus he shouldn't care about any wars (other than the fact that it means more prisoners for him), so there's no real reason why he should pay different prices, from prisoners your nation is currently in war with.

Zandman

  • Sergeant at Arms
  • *
    • View Profile
    • Zandmod I
  • Faction: Vaegir
Re: Zandman's tweak musings #3: Different prices for different prisoners
« Reply #4 on: October 22, 2008, 09:51:00 AM »
You know what... that actually makes a lot of sense.
I think I agree with you on that one.
(download HERE! )