Search results for query: *

  1. jcsm130988

    Spawnrate of Bandit Parties and Hideouts

    mmm but the thread has a BL(Bannerlord) prefix, or maybe this question is focused on WB(Warband)? emulating @Eärendil the Mariner, Bannerlord or Warband?
    Oh! Sorry, I didn't notice.
    PS.: I can't believe you guys are already modding Bannerlord, I can't wait to see what you'll come up with in a couple of months
  2. jcsm130988

    Spawnrate of Bandit Parties and Hideouts

    As kalarhan said,
    couple of things:
    1) are you using modsys (.py files) or .txt tweaks?
    2) what is your base module? Native? Floris? Something else? Which version? Like Native 1.174

    answers depends on that

    I made a similar question a few weeks ago

    https://forums.taleworlds.com/index...estions-about-the-script.395557/#post-9246250

    Hope that helps.
    Stay healthy.
  3. jcsm130988

    Three questions about the script

    Code:
    party_is_active                       =  132  # (party_is_active, <party_id>),
                                                  # Checks that <party_id> is valid and not disabled.

    Well, I feel quite dumb. Thanks! I'll see how that goes.
  4. jcsm130988

    OSP Kit Combat Fancy Damage Systems

    Here's a fancier version, with random knockback / knockdown, critical hits for missiles. It has been tested, and works.

    This is more advanced stuff, please read the comments before attempting to copy-pasta this code, it has a dependency.

    Code:
    common_damage_system = (ti_on_agent_hit, 0, 0, [],
    [
        (store_trigger_param_1, ":agent"),
        (store_trigger_param_2, ":attacker"),  
        (store_trigger_param_3, ":damage"),
        (store_trigger_param_3, ":orig_damage"),
        (agent_get_troop_id, ":troop", ":agent"),
        (agent_get_troop_id, ":attacker_troop", ":attacker"),  
    
        #Damage is lowered 5% per point of Ironflesh.
        (try_begin),
            (agent_is_human, ":agent"),#stop if not human
            (store_skill_level, ":ironflesh",  "skl_ironflesh", ":troop"),
            (gt, ":ironflesh", 0),
            (val_mul, ":ironflesh", 5),
            (assign, ":mod_damage", ":damage"),      
            (val_mul, ":mod_damage", ":ironflesh"),
            (val_div, ":mod_damage", 100),#Rounded here, but whatever.
            (val_sub, ":damage", ":mod_damage"),
        (try_end),
        #Damage is avoided 5% per point of Athletics
        (try_begin),
            (agent_is_human, ":agent"),#stop if not human
            (store_skill_level, ":athletics",  "skl_athletics", ":troop"),
            (gt, ":athletics", 0),  
            (val_mul, ":athletics", 5),
            (store_random_in_range, ":random_no", 1, 100),
            (try_begin),
                (le, ":random_no", ":athletics"),
                (assign, ":damage", 1),
                (try_begin),
                    (eq, ":troop", "trp_player"),
                    (display_message, "@You dodge the attack!"),
                (else_try),
                    (eq, ":attacker_troop", "trp_player"),
                    (display_message, "@{He/She} dodges the attack!"),
                (try_end),          
            (try_end),
        (try_end),  
        #Critical hits for missiles
        (try_begin),
            (is_between, reg0, "itm_missile_weapons_start", "itm_missile_weapons_end"),#special def in Blood and Steel source
            (store_random_in_range, ":random_no", 1, 100),
            (try_begin),
                (le, ":random_no", 5),
                (val_min, ":damage", 20),
            (try_end),
        (try_end),  
        #Random knockdown, with STR used to test
        (try_begin),
            (store_attribute_level,":strength",":attacker_troop",ca_strength),
            (store_attribute_level,":enemy_strength",":troop",ca_strength),
            (store_sub, ":strength_test", ":strength", ":enemy_strength"),
            (val_min, ":strength_test", 2),#2 percent knockdown, for weaker characters.
            (store_random_in_range, ":random", 1, 100),
            (try_begin),
                (neg|agent_is_ally,":agent"),#don't knock down allies
                (agent_is_human, ":agent"),#stop if not human          
                (agent_is_active,":agent"),#stop accidental CTD
                (agent_is_alive,":agent"),#same diff
                (agent_get_horse, ":horse", ":agent"),
                (eq, ":horse", -1),#don't knock down riders, maybe write some "lose yer horse" code later  
                (le, ":random", ":strength_test"),
                (agent_set_animation, ":agent","anim_shield_strike"),#see module_animations from Blood and Steel source for this anim definition
            (try_end),
        (try_end),
        (store_sub, ":diff_damage", ":damage", ":orig_damage"),
        (val_mul, ":diff_damage", -1),
        (store_agent_hit_points, ":hitpoints" , ":agent", 1),
        (val_add, ":hitpoints", ":diff_damage"),
        (agent_set_hit_points,":agent",":hitpoints",1),
    ])

    Oh, and one other thing: agent_deliver_damage_to_agent triggers this code. That has some pretty cool implications.

    Hello, I know this is an old post and this is a very noob question, but I'd like to know if this damage system works only for the player character or if it works for the NPCs too. Thanks.
  5. jcsm130988

    Walking animation messing the weapon animation

    Hello. As part of the mod I'm working on I've added a few animations, including several weapon animations, problem is when I walk, the walking animation is blended into the weapon animation and, well, as the title says, the walking animation messes the weapon animations, so my question is: would...
  6. jcsm130988

    Three questions about the script

    1) look at the comments (documentation) of the script_game_start. As stated, that one is only called once (at the moment you create a new campaign). It is not a repeated event. It is the setup for the campaign.

    2) A destroyed bandit camp is a state (party = bandit camp XXX, status = destroyed). You can identify that on your code and add/tweak the rule about spawning bandits

    bandit camps are either a static party (like a town) or a dynamic party (like a caravan). Look at your module_parties.py and figure out which one you are using
    - static parties are enabled/disabled, never destroyed -> listed on module_parties.py
    - dynamic parties are created/destroyed -> the recipe is listed on module_party_templates.py

    use that info to figure out the state of a bandit camp (does it exists right now?). Scripts like "spawn_lair" should help. Or search based on the lair slots (search module_constants.py).

    Once you know that you can add any rule you want about them or the bandits they control.


    Si I changed this code from module_game_menus.py:

    (try_for_range, ":bandit_template", bandit_party_templates_begin, bandit_party_templates_end), #SB : template range
    (party_template_slot_eq, ":bandit_template", slot_party_template_lair_party, "$g_encountered_party"),
    (party_template_set_slot, ":bandit_template", slot_party_template_lair_party, 0),

    (store_current_hours, ":cur_hours"),
    (val_add, ":cur_hours", 168), #spawn again 1 week later
    (party_template_set_slot, ":bandit_template", slot_party_template_lair_next_spawn, ":cur_hours"),

    (try_end),

    To this:

    (try_for_range, ":bandit_template", bandit_party_templates_begin, bandit_party_templates_end), #SB : template range
    (party_template_slot_eq, ":bandit_template", slot_party_template_lair_party, "$g_encountered_party"),
    (party_template_set_slot, ":bandit_template", slot_party_template_lair_party, 0),

    (store_current_hours, ":cur_hours"),
    (val_add, ":cur_hours", 1512), #spawn again 9 weeks later
    (party_template_set_slot, ":bandit_template", slot_party_template_lair_next_spawn, ":cur_hours"),

    Then I went to module_scripts.py and changed this:

    (try_begin),

    (party_template_get_slot, ":bandit_lair_party", "pt_forest_bandits", slot_party_template_lair_party),
    (gt, ":bandit_lair_party", 1),

    (store_num_parties_of_template, ":num_parties", "pt_forest_bandits"),
    (lt,":num_parties",16), #was 14 at mount&blade, 18 in warband, 16 last decision
    (store_random,":spawn_point",num_forest_bandit_spawn_points),
    (val_add,":spawn_point","p_forest_bandit_spawn_point"),
    (set_spawn_radius, 25),
    (spawn_around_party,":spawn_point","pt_forest_bandits"),
    (try_end),

    adding this:

    (try_begin),

    (party_template_get_slot, ":bandit_lair_party", "pt_forest_bandits", slot_party_template_lair_party),
    (gt, ":bandit_lair_party", 1),
    (neg|party_has_flag, "pt_forest_bandit_lair", pf_disabled, 1),
    (store_num_parties_of_template, ":num_parties", "pt_forest_bandits"),
    (lt,":num_parties",16), #
    (store_random,":spawn_point",num_forest_bandit_spawn_points),
    (val_add,":spawn_point","p_forest_bandit_spawn_point"),
    (set_spawn_radius, 5),
    (spawn_around_party,":spawn_point","pt_forest_bandits"),
    (try_end),

    Believe it or not, it took me a while to come out with that line of code. I did the same for every bandit type except looters, but you get the point, no need to copy every single one. Thing is, I'm getting this error message:

    Unrecognized opcode -2147479746.; LINE NO: 127:
    At script spawn_bandits
    At script spawn_bandits
    At script spawn_bandits
    At script spawn_bandits
    Unrecognized opcode -2147479746.; LINE NO: 157:
    At script spawn_bandits
    At script spawn_bandits
    At script spawn_bandits
    At script spawn_bandits

    Could you please help me figure out what's wrong with the code? Thank you for your help.

    Stay healthy.
  7. jcsm130988

    Three questions about the script

    get a editor like Notepad++ (with explorer plugin) or SublimeText (both are free).

    use full folder search (it looks in all files inside a folder)

    now do a chain search for your code. You are starting from the end-point (script spawn_bandits). Use that name "script_spawn_bandits" to see who calls it. Then who calls that one. And so on. Until you have the entire chain of events and you can understand the who, when, how and why.

    this way you can connect stuff like triggers with scripts, mission templates with scripts, scripts with tableaus, and so on.

    After searching as you suggested I think the trigger is on game start (at least that's how I understand it) and its:

    module_scripts.py:
    Python:
    scripts = [
    
    
      #script_game_start:
      # This script is called when a new game is started
      # INPUT: none
      ("game_start",
       [
         ...a lot of scripts...
    
          (try_for_range, ":unused", 0, 10),
            (call_script, "script_spawn_bandits"),
          (try_end),

    and the trigger is checked every 36 hours (?)

    module_triggers.py:
    Python:
      # Spawn some bandits.
      (36,
       [
           (call_script, "script_spawn_bandits"),
        ]),

    That's all fine, but what do I add now? I could edit how often the trigger is checked but that's not what I want, what I want is for bandits to stop spawning after destroying their lair (and then start spawning again after some months if possible).

    I'm sorry, I know I'm a noob but I'm still learning to use the module system (and Blender and GIMP and now also sublime text XD). Thank you for your patience.
  8. jcsm130988

    Question about family relations and courting

    Hello, as part of my mod I'm individually setting each family relationship and I'm leaving some (several in fact) lords and ladies without family relations (no parents, no wife/husband, no sons/daughters), but I've noted that the script for courting has some entries referring the lady's...
  9. jcsm130988

    Three questions about the script

    Ok, so I kind of made the garrison thing work out, I'll have to further test.
    The triggers for the spawn_bandits... I couldn't find it.
    The family relations seem to be working.

    If anyone could help with the bandits thing I would be very grateful
  10. jcsm130988

    Three questions about the script

    as you are not using Native I can only give some hints. You can wait for someone that has this modsys or ask on the mod forum for help as well.

    1) recruits for centers on Native use templates. So you can look where the operation party_add_template is used (Native is script_cf_reinforce_party). If your mod doesnt use that, then look for party_add_members operations. And walk the code to see where the limit.

    2) spawns of bandits means a trigger (event). Native uses script_spawn_bandits, called by the event handler (timer). You can look for something similar.

    3) Family relations on Native uses script_initialize_aristocracy. You can replace the random code for straight hardcoded relations (this X is father of Y). If you cant find that look for slots like "slot_troop_father"

    Thank you. I'll check those out
  11. jcsm130988

    Body-Head Color Tone Mismatch

    Happy to help, and yeah, you would have to play around with different colors
  12. jcsm130988

    Body-Head Color Tone Mismatch

    Thanks for the answer. But the problem is, I already checked the first hex colour codes that you made pink. The blue ones which you mentioned to hair, they are hair colours but the first ones are weird blue, green, grey etc. For example this one ''e3e8ef'' is a weird tone of blue. There are no human skin colours that way in the game.

    As I understand it, the color of the skin is a combination of the texture (check in body_meshes.brf what the .dds looks like) and the color indicated in the skins.py (that hex code). Try editing that code and see how that affects the skin color
  13. jcsm130988

    Three questions about the script

    couple of things:
    1) are you using modsys (.py files) or .txt tweaks?
    2) what is your base module? Native? Floris? Something else? Which version? Like Native 1.174

    answers depends on that

    1) modsys. I suppose I have to edit the module_script.py to achieve what I'm loking for
    2) It's -ahem- Dickplomacy. It's basically diplomacy plus other submods
  14. jcsm130988

    Body-Head Color Tone Mismatch

    I've read something about this in the forums, although I can't find the thread.

    ("womanface_young",0xffe3e8ef,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19, 0xff19100c]),

    This would be used as a tint that is applied to the skin texture of the mesh, although I haven't messed with that so I'm not sure how it works.

    This is used to determine the hair colors. First two are for the hair color when the slider is on the left and the last two are for the slider on the right. I've added some "skins" and changed these so I can confirm.

    You might try to change this to different values and se how that works. Good luck.
  15. jcsm130988

    Three questions about the script

    Hello, I'm trying to make a (single player) mod and have three questions regarding the garrison, spawn frequency and the wives and family relations. First, garrison: where is the max garrison determined? Say I want a town to have a max 200 troops garrison and a castle to have a max 10 troop...
  16. jcsm130988

    LSP Modern 3D Art Kate Bishop costume

    Hello, I've made a new armor model, in this case it's Kate Bishop's costume from Hawkeye by Fraction/Aja (specifically the last issue). The model was made using some outfits from The Reckoning as a base, so credits to La Grandmaster who made the mod and Nemerius who kindly gave me permission to...
  17. jcsm130988

    Problem with Swyter's Cartographer

    Nevermind, after fiddling with the cartographer.lua I've managed to make it work, although everytime I open the Cartographer (cmd) or reload the map.txt it reverts to the unmodded one, so I have to reload the .obj (the one I modded) everytime. It seems like the Cartographer is loading a version of the map.txt that it saved somewhere, no idea where.
  18. jcsm130988

    Problem with Swyter's Cartographer

    Ok, I've downloaded the latest version of the Cartographer and now I can't even make it work
  19. jcsm130988

    Problem with Swyter's Cartographer

    make sure you read the instructions that comes with the tool and that you execute the command to save the new map.txt

    plus check your file permissions on that folder (allows program to modify/create files)
    I've read the guide several times and pressed F5 several times, doesn't seem to be working. Weirdest thing is when a open the Cartographer and reload the map.txt the changes are there, so I don't know what's going on
  20. jcsm130988

    Problem with Swyter's Cartographer

    just make sure you are saving the new map.txt from Cartographer and that file is copied to your mod folder "/modules/myMod/map.txt".

    you can do that automagically if you do proper setup, or you can just copy+paste manually it there. As long you transfer the file, it is enough.

    if in doubt just check the date the file was modified last.
    Yes, I've checked and the map.txt remains the same, the Cartographer doesn't seem to be saving the new map.txt neither in the module nor in the folder of the Cartographer
Back
Top Bottom