搜索结果: *

  1. Changing the Troop Cost

    Thanks man.
  2. Unable to make an immortal troop

    Berserker Pride 说:
    I read over it and that part of native code seems to deal more with what happens when a hero troop is defeated.  It mentions the escape chance if a hero is defeated and whether or not they become a prisoner.
    Still at the beginning of the code it asks for the ":collective_casualties" which would be all wounded and dead troops.
    I bet you could put a try block near the beginning there which could check for a specific troop.  Maybe using this operation
    party_stack_get_troop_id.  Still one thing that confuses me is that operation asks for which stack the troops are in and how do you really know?  Maybe arch3r knows the answer to that one. 
    I thought ":collective_casualties" would have something to do with it. Is there a way to have it check through all your troops till it finds the troop id? I wish I could find where ":collective_casualties" is tabulated so that I could somehow move all of the dead units for my troop directly into the list of wounded troops.
  3. Unable to make an immortal troop

    It's been awhile, can anyone give me any clues as to what that code means?
  4. Unable to make an immortal troop

    Arch3r 说:
    If you know some scripting you could try making a script to check how many you got of that troop before the battle, and make a script that checks it at the end of the battle and 'refill's your party with the troops till the original number.
    That's an alternative. The game actually has a script to determine how many of a certain type of troop you've lost. I was planning on finding this script and finding a way to have it overlook my troop type, or add the same number of troops of my troop type back into my party. I know for a fact that the game differentiates between troop types at the end of the battle because it displays the number of each troop type which has died or has been wounded. I'm not sure if it differentiates at the start of battle, and I don't want all of my troops to be immortal, just a few troop types.
    Ideally, I'll take the number of troops in my troop type that were killed and add them to the number of troops in my troop type that were wounded. That way, my troops won't magically get better.
    It's a shame that tf_unkillable doesn't work, because I'd like to be able to put 200 of my troop type in a castle, and have them be able to fight off enemies without any of them dying.
  5. Unable to make an immortal troop

    I realize this isn't everything I'll need to edit, but this seems relevant.
                (try_begin),
                  (ge, ":collective_casualties", 0),
                  (party_get_num_companion_stacks, ":num_stacks", ":collective_casualties"),
                (else_try),
                  (assign, ":num_stacks", 0),
                (try_end),
                (try_for_range, ":troop_iterator", 0, ":num_stacks"),
                  (party_stack_get_troop_id, ":cur_troop_id", ":collective_casualties", ":troop_iterator"),
                  (troop_is_hero, ":cur_troop_id"),
                  (call_script, "script_remove_troop_from_prison", ":cur_troop_id"),
                  (troop_set_slot, ":cur_troop_id", slot_troop_leaded_party, -1),
                  (store_random_in_range, ":rand", 0, 100),
                  (str_store_troop_name_link, s1, ":cur_troop_id"),
                  (str_store_faction_name_link, s2, ":faction_receiving_prisoners"),
                  (store_troop_faction, ":defeated_troop_faction", ":cur_troop_id"),
                  (str_store_faction_name_link, s3, ":defeated_troop_faction"),
                  (try_begin),
                    (ge, ":rand", hero_escape_after_defeat_chance),
                    (party_stack_get_troop_id, ":leader_troop_id", ":nonempty_winner_party", 0),
                    (is_between, ":leader_troop_id", kingdom_heroes_begin, kingdom_heroes_end), #disable non-kingdom parties capturing enemy lords
                    (party_add_prisoners, ":nonempty_winner_party", ":cur_troop_id", 1),
                    (gt, reg0, 0),
                    #(troop_set_slot, ":cur_troop_id", slot_troop_is_prisoner, 1),
                    (troop_set_slot, ":cur_troop_id", slot_troop_prisoner_of_party, ":nonempty_winner_party"),
                    (display_log_message, "str_hero_taken_prisoner"),
                  (else_try),
                    (display_message,"@{s1} of {s3} was defeated in battle but managed to escape."),
                  (try_end),
                  (try_begin),
                    (store_troop_faction, ":cur_troop_faction", ":cur_troop_id"),
                    (faction_slot_eq, ":cur_troop_faction", slot_faction_marshall, ":cur_troop_id"),
                    #Marshall is defeated, refresh ai.
                    (assign, "$g_recalculate_ais", 1),
                  (try_end),
                (try_end),
                (try_begin),
                  (ge, ":collective_casualties", 0),
                  (party_get_num_prisoner_stacks, ":num_stacks", ":collective_casualties"),
                (else_try),
                  (assign, ":num_stacks", 0),
                (try_end),
                (try_for_range, ":troop_iterator", 0, ":num_stacks"),
                  (party_prisoner_stack_get_troop_id, ":cur_troop_id", ":collective_casualties", ":troop_iterator"),
                  (troop_is_hero, ":cur_troop_id"),
                  (call_script, "script_remove_troop_from_prison", ":cur_troop_id"),
                  (store_troop_faction, ":cur_troop_faction", ":cur_troop_id"),
                  (str_store_troop_name_link, s1, ":cur_troop_id"),
                  (str_store_faction_name_link, s2, ":faction_receiving_prisoners"),
                  (str_store_faction_name_link, s3, ":cur_troop_faction"),
                  (display_log_message,"str_hero_freed"),
                (try_end),
  6. Unable to make an immortal troop

    Berserker Pride 说:
    Heroes are simply hardcoded to not die.  It probably isn't impossible to create a script that checks for dead versions of certain troops and adds a wounded one to your party though.  Let me know if you do it would be useful.  There was a tf_unkillable flag that does what you suggest but it has never worked unfortunately.
    I think I may have found an area in module_scripts that needs to be edited, but without having enough knowledge of the programming language, I'm not sure if I'm right. Would you care to take a look?
  7. Unable to make an immortal troop

    FrisianDude 说:
    tf_hero| ought to do the trick, as far as I know.
    Sadly, this does a few things, including only allowing one of that troop type to exist in a party. It also causes that troop type to act like a hero. For example, that troop type shows up in castles and in the arena, and you can change that troop type's equipment and skills.
    Thanks, but not exactly what I'm looking for.
  8. Unable to make an immortal troop

    Well, I'll be honest, I wouldn't know where to start. I usually mod by figuring out how existing scripts work and editing them according to what I want. I have no clue how to write my own. I'll look into it though, and if anyone beats me to it, let me know.
  9. Unable to make an immortal troop

    Well I want a troop that will only fall unconscious, not one that will never be defeated.
    It seems like there has to be a way to do this. Otherwise, how is it scripted with heroes?
  10. Unable to make an immortal troop

    I'm trying to create an unkillable troop type. I created them using the module system and added tf_unkillable in the correct spot, but when I test my mod they continue to die in battles. I also tried using the unofficial troop editor to make them unkillable, but to no avail. When I used the...
  11. Changing the Troop Cost

    You're right, but I want to edit the cost, not down the level of troops.
    By lowering the level, you make troops easier to upgrade to. What I want is a level 60 troop that costs 0 gold.
  12. Changing the Troop Cost

    I have modded using the Module System, and I understand it well, but I have no clue how to change the troop cost. Any thoughts? Ideally I want to be able to change the cost of different types of troops, but if there's an equation used for all troops, I'd work with that instead.
  13. RGL ERROR: get_skeleton_anim failed for: run_man_right

    I've been trying to run various Mount and Blade mods, and I continue to see this error. I have version 1.011, and I've searched the forums and found similar errors, but no solutions. It seems everyone else I've found with this error had 1.003 and just needed to update. I know quite a bit about...
后退
顶部 底部