Ransom Broker Prices - Mod system 1.010

正在查看此主题的用户

DMcain

Veteran
After getting fed up with 50d for whoever I sold to ransom broker, I did some poking in the module_scripts.py and noticed that by adding 1 line to script_game_get_prisoner_price, I could get the prices based on their level.

插入代码块:
  # script_game_get_prisoner_price
  # This script is called from the game engine for calculating prisoner price
  # Input:
  # param1: troop_id,
  # Output: reg0
  
  ("game_get_prisoner_price",
    [
      (store_script_param_1, ":troop_id"),
      (assign, reg0, 50),
      (try_begin),
        (is_between, "$g_talk_troop", ransom_brokers_begin, ransom_brokers_end),
        (store_character_level, ":troop_level", ":troop_id"),
        (assign, ":ransom_amount", ":troop_level"),
        (val_add, ":ransom_amount", 25), ## Default here is 10
        (val_mul, ":ransom_amount", ":ransom_amount"),
        (val_div, ":ransom_amount", 5), ## Default here is 6
      (try_end),
      (assign, reg0, ":ransom_amount"), ## I added this line
      (set_trigger_result, reg0),
  ]),

With this change I receive (default values in red):
  • Vaegir Knight - 480d (192d)
  • Vaegir Veteran - 304d (96d)
  • Vaegir Recruit - 168d (32d)

I'm still tinkering with it so units over level 20 have an increased ransom, and those under lvl 10 have a decreased ransom. I may even decide to add a multiplier for mounted troops. I'm not a code guru, but I've accomplished what i set out to do here. Maybe someone will find it useful, maybe not.
 
If you want a different pricing system for units under lvl 10, between 10 and 20 and over lvl 20, just make a try block for troop lvl:
插入代码块:
(try_begin),
    (lt, ":troop_level", 10),  #or use le if you want to include lvl 10
    (val_mul).. etc
(else_try),
    (gt, ":troop_level", 20), #or use ge if you want to include lvl 20
    (val_mul).. etc
(else_try),
    (val_mul).. etc.
(try_end),

Personally I think prices as high as you're quoting here would make you very rich very quickly if you get a reasonable sized army and some troops who use blunt weapons, but of course it's all a matter of choice :smile:
 
Yea, I agree that the ransoms there are a bit high. I'm still tinkering with the math on it trying to find a happy medium.

I did some more tinkering and here's what i got now:
插入代码块:
  ("game_get_prisoner_price",
    [
      (store_script_param_1, ":troop_id"),
      (assign, reg0, 50),
      (try_begin),
        (is_between, "$g_talk_troop", ransom_brokers_begin, ransom_brokers_end),
        (store_character_level, ":troop_level", ":troop_id"),
        (try_begin),
          (ge ,":troop_level", 20),
          (assign, ":ransom_amount", ":troop_level"),
          (val_add, ":ransom_amount", 25),
          (val_mul, ":ransom_amount", ":ransom_amount"),
          (val_div, ":ransom_amount", 5),
        (else_try),
          (lt ,":troop_level", 10),
          (assign, ":ransom_amount", ":troop_level"),
          (val_add, ":ransom_amount", 10),
          (val_mul, ":ransom_amount", ":ransom_amount"),
          (val_div, ":ransom_amount", 6),
        (else_try),
          (assign, ":ransom_amount", ":troop_level"),
          (val_add, ":ransom_amount", 15),
          (val_mul, ":ransom_amount", ":ransom_amount"),
          (val_div, ":ransom_amount", 5),
        (try_end),
        (try_begin), #mounted troops pay %100 more than the normal ransom
          (troop_is_mounted, ":troop_id"),
          (val_mul, ":ransom_amount", 2),
        (try_end),
      (assign, reg0, ":ransom_amount"),
      (set_trigger_result, reg0),
  ]),

Ok, after playing with the calculator a bit, I think I'm happy with this. Gives:
  • Vaegir Knight (lv 24) 960d
  • Vaegir Veteran (lv 14) 168d
  • Vaegir Recruit (lv 4) 32d
  • Nord Huscurl (lv 29) 583d

Anyone is welcome to take this and tinker with it to get what they want for their mods.

Take care and god speed.
 
Well if you look at it from a realism point of view, knights being worth a lot of money is not a bad thing, since they are supposed to be nobles after all, although lesser ones.

1600 is obviously excessive since some lords don't even pull in that much ransom, but I would have no problem with a knight being worth say 400-500d. BUT, only a knight.

I think the main problem is with balance of wage vs ransom.

But of course the most important thing is that you have a system you're happy with.
 
MartinF 说:
Well if you look at it from a realism point of view, knights being worth a lot of money is not a bad thing, since they are supposed to be nobles after all, although lesser ones.

1600 is obviously excessive since some lords don't even pull in that much ransom, but I would have no problem with a knight being worth say 400-500d. BUT, only a knight.

I think the main problem is with balance of wage vs ransom.

But of course the most important thing is that you have a system you're happy with.

Heh, you popped in as I was editing the previous post. I got the prices adjusted down to something I can work with. Mounted troops still pay 2x ransom, but is generally 1k or less.
 
后退
顶部 底部