How to change upkeep cost and upgrade cost for units?

Users who are viewing this thread

Greetings
I was trying to mod few things and thanks to great tutorials I find on this forum I really do it.
And it was fun. Thanks for that.
But I can not find any answers for:
How to change upkeep cost and upgrade cost for units?

If anyone can share their knowledge with me I will be the most gratefull. It can be both ways by modifying txt or by using a Python.

Also I have question about changing how look troop trees. I mean I can add new units and I can change their upgrade paths but in the upgrade tree their looks all the same before modification.
Thanks for any help.
 
u can modify the upgrade tree at the bottom of troops.py file

upgrade costs are fixed for every specific level, like betwen 6-12 its 10 then 12-18 20 denar /..... something like that

u should search scripts , its not very difficult to change it
 
this is where u gotta look for in scripts, somewhere around line 4065

  # script_game_get_upgrade_cost
  # This script is called from game engine for calculating needed troop upgrade exp
  # Input:
  # param1: troop_id,
  # Output: reg0 = needed cost for upgrade
  ("game_get_upgrade_cost",
    [
      (store_script_param_1, ":troop_id"),
     
      (store_character_level, ":troop_level", ":troop_id"),
     
      (try_begin),
        (is_between, ":troop_level", 0, 6),
        (assign, reg0, 10),
      (else_try), 
        (is_between, ":troop_level", 6, 11),
        (assign, reg0, 20),
      (else_try), 
        (is_between, ":troop_level", 11, 16),
        (assign, reg0, 40),
      (else_try), 
        (is_between, ":troop_level", 16, 21),
        (assign, reg0, 80),
      (else_try), 
        (is_between, ":troop_level", 21, 26),
        (assign, reg0, 120),
      (else_try), 
        (is_between, ":troop_level", 26, 31),
        (assign, reg0, 160),
      (else_try), 
        (assign, reg0, 200),
      (try_end), 
       
      (set_trigger_result, reg0),
  ]),


u can change the numbers, 160 , 200 which are costs and levels,

other than that im not sure if there is something related to triggers that u have to change, becuz i dont know whats the use of reg0 here
 
Back
Top Bottom