搜索结果: *

  • 用户:Pr123
  • 按日期排序
  1. Make village recruits depend on the faction you are in

    Originally It wasn't meant to work with highlanders own kingdom kit. But it won't be much work if you want it to be compatible with it. Less than 30 lines of code.

    JethroKirby, do you use any other scripts/modifications? If I remember correctly, it should work correctly with no other modifiactions, however it was a loooong time ago the last time I tested it and I have no longer the original script left. And it should give you your faction troops from anywhere on the map. And I think you don't have to modify any other file, but I don't remember exactly.
  2. Make village recruits depend on the faction you are in

    Strange. For me it worked perfectly. Could you copy your script_update_volunteer_troops_in_village and paste it here?
    Edit: Did you use a savegame? It's probably not the problem, but who knows.
  3. SP Native Modern *Calradia: Modern Warfare* Coder Wanted!

    nemeruis 说:
    new rus tank model

    31341639.jpg

    Eh, it's more like an APC.
  4. Make village recruits depend on the faction you are in

    My code?

    You replace your script_update_volunteer_troops_in_village with the one I wrote earlier(in my last post). Or if you want SPD_Phoenix code do the same thing, just copy his code. Also do the modifications he said.

    edit: You will find script_update_volunteer_troops_in_village in module_scripts.
  5. Make village recruits depend on the faction you are in

    Thank you SPD_Phoenix! You helped a lot! Though I tried your new script and still nobody wished to join me. Perhaps I am doing something wrong. Will give it another test later.

    Anyway, I modified my code a little and now it works. Just had to change "$kingdom_1" to "fac_kingdom_1". It's still a bit messy because, let's say, you joined the swadians and you are recruiting from the nord lands, it says *** nord recruits wish to join you, but you get swadian tier 1 troops.

    edit: My code is not as good though, because in my code you will always get tier 1 troops.

    edit2: Made a better piece of code, that does the same thing, but correctly. This time you should get better tier units aswell. Also the text when you recruit someone is correct.
    Here's the code
    插入代码块:
      # script_update_volunteer_troops_in_village
      # INPUT: arg1 = center_no
      # OUTPUT: none
      ("update_volunteer_troops_in_village",
        [
           (store_script_param, ":center_no", 1),
           (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
           (party_get_slot, ":center_culture", ":center_no", slot_center_culture),
    	   #pr start
    		(try_begin),
    			(eq,"$player_has_homage",0),
    			(assign, ":volunteer_troop", "trp_farmer"),
    		(else_try),
    			(eq,"$player_has_homage",1),
    			(faction_get_slot, ":center_culture", "$players_kingdom", slot_faction_culture),
    			(faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
    		(else_try),
    			(faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
    		(try_end),
    		#pr end
           (assign, ":volunteer_troop_tier", 1),
           (store_div, ":tier_upgrades", ":player_relation", 10),
           (try_for_range, ":unused", 0, ":tier_upgrades"),
             (store_random_in_range, ":random_no", 0, 100),
             (lt, ":random_no", 10),
             (store_random_in_range, ":random_no", 0, 2),
             (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),
             (try_begin),
               (le, ":upgrade_troop_no", 0),
               (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0),
             (try_end),
             (gt, ":upgrade_troop_no", 0),
             (val_add, ":volunteer_troop_tier", 1),
             (assign, ":volunteer_troop", ":upgrade_troop_no"),
           (try_end),       
           (assign, ":upper_limit", 7),
           (try_begin),
             (ge, ":player_relation", 5),
             (assign, ":upper_limit", ":player_relation"),
             (val_div, ":upper_limit", 2),
             (val_add, ":upper_limit", 10),
           (else_try),
             (lt, ":player_relation", 0),
             (assign, ":upper_limit", 0),
           (try_end),
    
           (val_mul, ":upper_limit", 3),   
           (store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"),
           (val_div, ":upper_limit", ":amount_random_divider"),
           
           (store_random_in_range, ":amount", 0, ":upper_limit"),
           (party_set_slot, ":center_no", slot_center_volunteer_troop_type, ":volunteer_troop"),
           (party_set_slot, ":center_no", slot_center_volunteer_troop_amount, ":amount"),
         ]),
  6. SP Native Modern *Calradia: Modern Warfare* Coder Wanted!

    It might not have many new features, but it still could be fun to play. I haven't played, I do not know.
    edit: woops. was looking at the wrong page, ignore this post.
  7. Make village recruits depend on the faction you are in

    Thank you for your reply!

    I tried your script, but it did not work correctly.
    First, I changed script_village_recruit_volunteers_recruit back to like it was in native, then I replaced my script_update_volunteer_troops_in_village with your script_update_volunteer_troops_in_village. Also there was a small mistake in your script, you had (lt, ":random_no", "10"), but I think it should have been (lt, ":random_no", 10),. Anyway, I built the module and started the game. Visited about 10 villages, no one wished to join my group, joined a faction, visited about 20 villages, still no recruits in any village. So, if anybody has the time/patience, please help.

    Still I wonder what is $players_kingdom equal to if you join a faction. It isn't equal to $kingdom_1, I think a variable named $kingdom_1 doesn't even exist. So if anybody does know, please say.

    Also, what exactly does xxx_set_slot(like faction_set_slot) and xxx_get_slot(like faction_get_slot) do? :oops:
  8. Make village recruits depend on the faction you are in

    Hello! I am trying to modify the script script_village_recruit_volunteers_recruit so that the recruits you get from a village would depend on the faction you are in. So far the only modification that I made and works like I want it to is this:   #script_village_recruit_volunteers_recruit   #...
  9. Javelins, throwing axes getting stuck in shields

    Modified the throwing axe.
    I tried changing the damage to blunt, but it had no effect.
    Also i did not find any notable differences in the tags.
    Changing the model also has no effect.
    So it seems that it all does depend on the animation, I changed the throwing axe animation to the throwing stone one and the axe did not get stuck, it dissapeared if it hitted anything.

    Looks like it is hard-coded.
  10. SP Native Modern *Calradia: Modern Warfare* Coder Wanted!

    Not that it won't be finished, I'm sure it will, if you get a decent coder, but the other aspects of the game. Personally, I did not like the story, also modern warfare is not a good thing for mount and blade. Taking cover could be done, but it depends on how well it is done. Also, it needs crouching etc. etc. I'm pretty sure these things can be added to the game, but it depends on how well they're done.

    Anyway, good luck.
  11. SP Native Modern *Calradia: Modern Warfare* Coder Wanted!

    I have a strange feeling, that this mod will fail, but good luck.
  12. Javelins, throwing axes getting stuck in shields

    Hello! Does anybody know on what condition the throwing axe, javelin or something else gets stuck in a shield? It seems that the only condition is the throwing animation. If you use the rock throwing animation, then it wont get stuck, no matter what it is. However if you use the javelin or...
  13. script_game_get_item_buy_price_factor

    Thank you very much! You solved every problem I had with this script(and with get_item_sell_price_factor)!

    Wow... I can't believe how stupid I can be. The script just makes operations with variables. val_mul multiplies, val_add adds... It's just too simple. But I blame my lazyness. It's all his fault.

    Edit:You were right. Editing :price_factor does make all items more expensive.
  14. script_game_get_item_buy_price_factor

    Hello! I just got into modding and I have a question about this script: Using common sense I understand that this script calculates the price for buying an item, but I would like that someone explains the script, because my programming/coding skills in python are rather poor. First question...
后退
顶部 底部