搜索结果: *

  • 用户:cucas
  • 按日期排序
  1. Modding Q&A [For Quick Questions and Answers]

    Namakan 说:
    Thanks,once again^^
    The_dragon 说:
    插入代码块:
    Flags: only some can be changed like itp_next_item_as_melee, allowing to make some cool items/features/hacks; 
              you can't change the type (it will be very very buggy or it won't work at all)
    So in theory I could add something like a throwable great lance?o_O

    Sure, why not. Whatever rocks your boat! :wink:
  2. Mount & Blade II: Bannerlord Developer Blog 9 - Ethnic Instruments

    zmogusnr1 说:
    cucas 说:
    My opinion, leave the original versions and stop spoiling the music with ugly effects! The realistic feeling itself provides ambience! If we want to go to hollywood we can watch those epic movies... If you really wanna throw money at the problem, just hire Jordi Savall!

    Most of the scarce games that actually manage to stick with their own or historical authenticity, like some Paradox Titles, manage to keep their players and expand. Don't make the same mistakes as the Total War series and sell yourselves out. Having said this and with all respect I have for Paradox Titles, I congratulate Taleworlds for following their own path, their own identity and authenticity.

    However, by adding this "epicness" thingy you're really changing exactly what should not be changed: the uniqueness and realism of each cultural piece. If you prefer, call it mastering, westernizing or whatever, but why even bother with all this trouble of putting the ethic feel into it, if you're just gonna ruin it immediately afterwards?! I mean, be rational for a second and think about it. Why toil and sweat to build your own solid castle and immediately tear it down to make it look the same as every other castle? o_O

    Because every other castle on the beach is alot more breathtaking and cooler than your single-scoop bucket castle.

    I beg to differ. I find M&B a lot cooler and more breathtaking that other titles. Although M&B obviously lacks a lot in many fields, no game has ever managed to even start grasping Action, RPG and Strategy elements the way Taleworlds managed in it's unique way and I figure it will only get better, not worse.

    Anyway, why are you even here? Go play in another one of those breathtaking castles you speak of! ;p
  3. Mount & Blade II: Bannerlord Developer Blog 9 - Ethnic Instruments

    My opinion, leave the original versions and stop spoiling the music with ugly effects! The realistic feeling itself provides ambience! If we want to go to hollywood we can watch those epic movies... If you really wanna throw money at the problem, just hire Jordi Savall!

    Most of the scarce games that actually manage to stick with their own or historical authenticity, like some Paradox Titles, manage to keep their players and expand. Don't make the same mistakes as the Total War series and sell yourselves out. Having said this and with all respect I have for Paradox Titles, I congratulate Taleworlds for following their own path, their own identity and authenticity.

    However, by adding this "epicness" thingy you're really changing exactly what should not be changed: the uniqueness and realism of each cultural piece. If you prefer, call it mastering, westernizing or whatever, but why even bother with all this trouble of putting the ethic feel into it, if you're just gonna ruin it immediately afterwards?! I mean, be rational for a second and think about it. Why toil and sweat to build your own solid castle and immediately tear it down to make it look the same as every other castle? o_O
  4. Modding Q&A [For Quick Questions and Answers]

    Say, how do you change party behaviors after they can no longer finish their given command?

    I spawned a leader party and minion parties. I ordered the minions to escort their good leader and they follow the leader just fine and dandy. The issue is that, when their leader dies, they will try to escort (accompany) the player!  :shock:

    So, how do I change their behavior after their leader is dead?

    Here is my code:
    插入代码块:
         (try_begin),
           (store_num_parties_of_template, ":num_parties", "pt_sea_raiders_warlord"),
           (lt,":num_parties",1),
           (store_random,":spawn_point",num_sea_raider_spawn_points),
           (val_add,":spawn_point","p_sea_raider_spawn_point_1"),
           (set_spawn_radius, 25),
           (spawn_around_party,":spawn_point","pt_sea_raiders_warlord"),
           (assign, ":warlordid", reg0),
         (else_try),
           (store_num_parties_of_template, ":num_parties", "pt_sea_raiders_warlord"),
           (ge,":num_parties",1),
           (store_num_parties_of_template, ":num_parties", "pt_sea_raiders_warband"),
           (lt,":num_parties",3),
           (spawn_around_party,":spawn_point","pt_sea_raiders_warband"),
           (assign, ":warbandid", reg0),
           (party_set_ai_behavior, ":warbandid", ai_bhvr_escort_party),
           (party_set_ai_object, ":warbandid", ":warlordid"),
         (try_end),

    I tried messing around and added this to some effect. After the leader dies they will stop escorting stuff. However the problem is that they will go numb now. They will just sit and wait without doing anything a normal AI does, like patrolling :sad:

    插入代码块:
           (party_set_ai_behavior, ":warbandid", ai_bhvr_escort_party),
           (party_set_ai_object, ":warbandid", ":warlordid"),
           (party_set_flags, ":warbandid", pf_default_behavior, 0),

    What I really wanted, was for them to retreat (or at least resume normal behavior) once the leader dies. You know retreating to their landing/lair or patrolling their spawn point. Maybe even escort their new leader again once he spawns, but I figure that, to do this, I would need to learn how search through parties and store them somewhere, before making a trigger to command them to do something... The retreating option sounds better anyway...
  5. One banner per faction?

    grailknighthero 说:
    I'm just going to answer here:

    This is the original code.  You will replace it with the code I write after it:

    插入代码块:
    (assign, ":num_khergit_lords_assigned", 0),
          
          (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end),
            (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
            (try_begin),
              (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
              (store_add, ":kingdom_3_banners_begin", banner_scene_props_begin, khergit_banners_begin_offset),
              (store_add, ":banner_id", ":kingdom_3_banners_begin", ":num_khergit_lords_assigned"),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
              (val_add, ":num_khergit_lords_assigned", 1),
            (else_try),
              (store_sub, ":hero_offset", ":kingdom_hero", kingdom_heroes_begin),
              (val_sub, ":hero_offset", ":num_khergit_lords_assigned"),#Remove khergits from offset since their banners are assigned above here
              (try_begin),
                (gt, ":hero_offset", khergit_banners_begin_offset),#Do not add khergit banners to non-khergit lords
                (val_add, ":hero_offset", khergit_banners_end_offset),
                (val_sub, ":hero_offset", khergit_banners_begin_offset),
              (try_end),
              (store_add, ":banner_id", banner_scene_props_begin, ":hero_offset"),
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
            (try_end),
            (store_character_level, ":level", ":kingdom_hero"),
            (store_mul, ":renown", ":level", ":level"),
            (val_div, ":renown", 2),
            (try_begin),
              (faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
              (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, 100),
              (store_random_in_range, ":random_renown", 250, 400),
            (else_try),
              (store_random_in_range, ":random_loyalty", 50, 100),
              (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, ":random_loyalty"),
              (store_random_in_range, ":random_renown", 100, 200),
            (try_end),
            (val_add, ":renown", ":random_renown"),
            (troop_set_slot, ":kingdom_hero", slot_troop_renown, ":renown"),
            (store_random_in_range, ":random_readiness", 0, 100),
            (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_join_army, ":random_readiness"),
            (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_follow_orders, 100),
            (troop_set_slot, ":kingdom_hero", slot_troop_player_order_state, spai_undefined),
            (troop_set_slot, ":kingdom_hero", slot_troop_player_order_object, -1),
          (try_end),
    
    #Correcting banners according to the player banner
          (troop_get_slot, ":selected_banner_spr", "trp_player", slot_troop_banner_scene_prop),
          (assign, ":end_cond", kingdom_heroes_end),
          (try_for_range, ":cur_troop", kingdom_heroes_begin, ":end_cond"),
            (troop_slot_eq, ":cur_troop", slot_troop_banner_scene_prop, ":selected_banner_spr"),
            (troop_set_slot, ":cur_troop", slot_troop_banner_scene_prop, banner_scene_props_end_minus_one),
            (assign, ":end_cond", 0),
          (try_end),

    replace spr_BANNER_ID = spr_your_banner_id

    I think this will work.  Test it out and tell me what happens.
    插入代码块:
          
          (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end),
            (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
            (try_begin),
              (eq, ":kingdom_hero_faction", "fac_kingdom_1"), #Swadia
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, "spr_BANNER_ID"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Vaegir
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, "spr_BANNER_ID"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, "spr_BANNER_ID"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Rhodok
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, "spr_BANNER_ID"),
            (else_try),
              (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Nord
              (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, "spr_BANNER_ID"), 
            (try_end),
            (store_character_level, ":level", ":kingdom_hero"),
            (store_mul, ":renown", ":level", ":level"),
            (val_div, ":renown", 2),
            (try_begin),
              (faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
              (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, 100),
              (store_random_in_range, ":random_renown", 250, 400),
            (else_try),
              (store_random_in_range, ":random_loyalty", 50, 100),
              (troop_set_slot, ":kingdom_hero", slot_troop_loyalty, ":random_loyalty"),
              (store_random_in_range, ":random_renown", 100, 200),
            (try_end),
            (val_add, ":renown", ":random_renown"),
            (troop_set_slot, ":kingdom_hero", slot_troop_renown, ":renown"),
            (store_random_in_range, ":random_readiness", 0, 100),
            (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_join_army, ":random_readiness"),
            (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_follow_orders, 100),
            (troop_set_slot, ":kingdom_hero", slot_troop_player_order_state, spai_undefined),
            (troop_set_slot, ":kingdom_hero", slot_troop_player_order_object, -1),
          (try_end),

    Umm.. I tried this, but it didn't work. I even tried some obvious fixes. The code looks different now, so I figure that that's probably why it didn't work :/

    Did anyone find a way around for 1.158? When lords defect do they keep the old banner or does it update?
  6. OSP Code Optimisation SimpleLoot

    I see. Well, you know what they say, it's the thought that counts! :wink:
  7. Modding Q&A [For Quick Questions and Answers]

    1. How do I enable landless roaming bandit parties (with their own faction) to conquer land autonomously?

    I want to spawn the remains of the roman "ghost legions", so that they reform and try to revive the empire.

    Maybe I could just instruct those parties to target a specific town center or to build one, idk...

    2. How do I enable bandit parties to raid villages?
    Lumos 说:
    After that, I deleted the entire game_start, re-wrote it from scratch, and now it takes less than three seconds. There's plenty of room for optimisation, but you should be careful when doing it, as you might miss something small which will later become a great pain in the arse.

    Could you share your game_start with us, Lumos? o:
    I wanna simplify mine as well. Anything I can do to speed things up is always useful :wink:
  8. OSP Code Optimisation SimpleLoot

    I hate when you need delays to get a value that's already there. I hope that's not the case...

    Is this the solution? Is it really unique or unlootable?
    http://forums.taleworlds.com/index.php/topic,296455.0.html

    If so, could you give me an example to make it work for this script, pretty please? I couldn't understand much, save that you made a dummy troop and messed around with the inventory...
  9. Modding Q&A [For Quick Questions and Answers]

    cucas 说:
    Hey, I'm trying to set up music to trigger only when you fight as a certain faction or fight against a certain faction. The thing is that it keeps triggering regardless of factions.

    What I'm I doing wrong here?

      ("ambushed_by_sarranid_1", "x.ogg", mtf_culture_6|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_culture_all),

    ("fight_as_sarranid_1", "xx.ogg", mtf_culture_6|mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_sit_ambushed, mtf_culture_all),

    Also, how do I make it work for other factions I created, like romans? This doesnt seem to work:

      ("ambushed_by_romans",  "xxx.ogg", mtf_rome|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_culture_all),

    I think I figured out why this is happening, now. Apparently, Native assigns bandits to the same culture as the Sarranids o_O

    Can someone confirm if I'm reading this right, please? Why does it work that way? It doesn't make any sense. What kind of crazy voodoo batsh!t is this?! I'm pretty sure I'm missing something important here.

    Anyway, I commented out what made this happened. Hopefully, this wont be a major screw up...
      ("get_culture_with_faction_for_music",
        [
          (store_script_param, ":faction_no", 1),
          (try_begin),
            (eq, ":faction_no", "fac_kingdom_1"),
            (assign, ":result", mtf_culture_1),
          (else_try),
            (eq, ":faction_no", "fac_kingdom_2"),
            (assign, ":result", mtf_culture_2),
          (else_try),
            (eq, ":faction_no", "fac_kingdom_3"),
            (assign, ":result", mtf_culture_3),
          (else_try),
            (eq, ":faction_no", "fac_kingdom_4"),
            (assign, ":result", mtf_culture_4),
          (else_try),
            (eq, ":faction_no", "fac_kingdom_5"),
            (assign, ":result", mtf_culture_5),
          (else_try),
            (eq, ":faction_no", "fac_kingdom_6"),
            (assign, ":result", mtf_culture_6),
    #      (else_try),
    #        (this_or_next|eq, ":faction_no", "fac_outlaws"),
    #        (this_or_next|eq, ":faction_no", "fac_peasant_rebels"),
    #        (this_or_next|eq, ":faction_no", "fac_deserters"),
    #        (this_or_next|eq, ":faction_no", "fac_mountain_bandits"),
    #        (eq, ":faction_no", "fac_forest_bandits"),
    #        (assign, ":result", mtf_culture_6),
          (else_try),
            (assign, ":result", 0), #no culture, including player with no bindings to another kingdom
          (try_end),
          (assign, reg0, ":result"),
        ]),
  10. Modding Q&A [For Quick Questions and Answers]

    Hey, I'm trying to set up music to trigger only when you fight as a certain faction or fight against a certain faction. The thing is that it keeps triggering regardless of factions.

    What I'm I doing wrong here?

      ("ambushed_by_sarranid_1", "x.ogg", mtf_culture_6|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_culture_all),

    ("fight_as_sarranid_1", "xx.ogg", mtf_culture_6|mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_sit_ambushed, mtf_culture_all),

    Also, how do I make it work for other factions I created, like romans? This doesnt seem to work:

      ("ambushed_by_romans",  "xxx.ogg", mtf_rome|mtf_sit_ambushed|mtf_sit_siege, mtf_sit_fight|mtf_sit_multiplayer_fight|mtf_culture_all),
  11. Modding Q&A [For Quick Questions and Answers]

    Lav 说:
    Most likely result of your code is that some town will start following another town. Except since it's static, it won't move. :smile:

    Haha, like this? :grin:
    插入代码块:
         (try_begin),
           (store_num_parties_of_template, ":num_parties", "pt_sea_raiders_warlord"),
           (lt,":num_parties",1),
           (store_random,":spawn_point",num_sea_raider_spawn_points),
           (val_add,":spawn_point","p_sea_raider_spawn_point_1"),
           (set_spawn_radius, 25),
           (spawn_around_party,":spawn_point","pt_sea_raiders_warlord"),
           (assign, ":warlordid", reg0),
           (try_begin),
             (store_num_parties_of_template, ":num_parties", "pt_sea_raiders_warband"),
             (lt,":num_parties",3),
             (spawn_around_party,":spawn_point","pt_sea_raiders_warband"),
             (assign, ":warbandid", reg0),
             (party_set_ai_behavior, ":warbandid", ai_bhvr_escort_party),
             (party_set_ai_object, ":warbandid", ":warlordid"),
           (try_end),
         (try_end),
  12. Modding Q&A [For Quick Questions and Answers]

    Dusk Voyager 说:
                (party_set_ai_behavior, [one of the follower parties], ai_bhvr_escort_party),
                (party_set_ai_object, [follower], [leader]),

    :smile:

    Erm, I tried this, but it doesnt work. I mean they spawn, but they wont follow/escort :/

    插入代码块:
         (try_begin),
           (store_num_parties_of_template, ":num_parties", "pt_sea_raiders_warlord"),
           (lt,":num_parties",1),
           (store_random,":spawn_point",num_sea_raider_spawn_points),
           (val_add,":spawn_point","p_sea_raider_spawn_point_1"),
           (set_spawn_radius, 25),
           (spawn_around_party,":spawn_point","pt_sea_raiders_warlord"),
           (try_begin),
             (store_num_parties_of_template, ":num_parties", "pt_sea_raiders_warband"),
             (lt,":num_parties",3),
             (spawn_around_party,":spawn_point","pt_sea_raiders_warband"),
             (party_set_ai_behavior, "pt_sea_raiders_warband", ai_bhvr_escort_party),
             (party_set_ai_object, "pt_sea_raiders_warband", "pt_sea_raiders_warlord"),
           (try_end),
         (try_end),
  13. Modding Q&A [For Quick Questions and Answers]

    Hey, I've got 2 questions.

    1. Let's say that I want those desert bandits to follow another desert bandit party that I just made up as their leader. How do I make these parties follow another party?

    Here is my closest guess
    插入代码块:
         (try_begin),
           (store_num_parties_of_template, ":num_parties", "desert_bandit_leader"),
           (lt,":num_parties",1),
           (store_random,":spawn_point",num_desert_bandits_spawn_points),
           (val_add,":spawn_point","p_desert_bandits_spawn_point"),
           (set_spawn_radius, 25),
           (spawn_around_party,":spawn_point","desert_bandit_leader"),
             (try_begin),
             (store_num_parties_of_template, ":num_parties", "desert_bandits"),
             (lt,":num_parties",10),
             (spawn_around_party,"desert_bandit_leader","desert_bandits"),
    # this here is the issue... I don't know how to order them around
           (try_end),
         (try_end),

    And

    2. How do I make horses level up with battle experience (perhaps battle counts)?
  14. Modding Q&A [For Quick Questions and Answers]

    Can someone help to create fire arrows?

    I've been at it for a while and I even tried the [KIT], but I still couldn't make it work.

    I don't need nothing fancy. No need or want for new textures or anything, just simple fire effects, please :smile:

    Please mind that I'm a really, really noob programmer. Sorry :sad:
  15. OSP Code QoL Randomly unisex troops

    Haha, That's probably why I wasn't able to implement this right. Still seeing weird stuff happening, like balding, rebellious trans units that weren't supposed to, for "some reason" ^.^;
  16. OSP Code QoL Randomly unisex troops

    interesting. thanks! :smile:
  17. Modding Q&A [For Quick Questions and Answers]

    _Sebastian_ 说:
    cucas 说:
    Could someone help me out to make fire arrows? The idea is to make them only work if it's not raining or snowing and give a damage boost (and maybe even burn the target).

    Here is what I got from my research (I adapted this from a multiplayer script on this thread, one of the issues was that the fire burnt on the tail rather than on the tip and it was only when the arrow hit the target (on_hit)):

    First of all, "agent_set_damage_modifier" only works on melee weapons.
    Use "agent_set_ranged_damage_modifier" (v1.158 operation.. so it wont work with WSE) instead, but dont forget to reset this modifier after the missile hits.
    Or... change the damage on "ti_on_agent_hit" in module_mission_templates.

    You particle effect's code should looks like this;
    插入代码块:
            (ti_on_init_missile,
    	[
    		(neg|multiplayer_is_dedicated_server),#only client side
                    (eq, "$g_rain_strength", 0),#no rain... this isn't a natives variable, you have to check the raining strength somehow and store it in a global variable
    
    		(set_fixed_point_multiplier, 100),
    		(set_position_delta,0,80,0),#arrow head position
    		(particle_system_add_new,"psys_torch_fire"),
    		(particle_system_add_new,"psys_torch_smoke"),
    		(particle_system_add_new,"psys_torch_fire_sparks"),
    	])

    Alright, seems doable. Not sure what to do about the weather, since I can't find where it is controlled. I'll also keep that script only for the cosmetics part. For the damage it seems more complicated, but instead of damage modifiers, then I will try using global variables or matrix/slots. In theory, should sound more or less like this.
    插入代码块:
    ["fire_arrows","Fire Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(3)|abundance(160)|weapon_length(95)|thrust_damage(30,pierce)|max_ammo(20),imodbits_missile,
    [
    #	(ti_on_init_missile,[ #doesn't work. I assume it's WSE, which I'd rather not use :/
    	(ti_on_weapon_attack,[ # like this?
    #	(ti_on_init_item,[ or like this
    		#pos1 - Missile hit position
    		#param_1 - Shooter agent
    		#pos1 and param_1 are parameters for ti_on_missile_hit, so not sure if they work here for ti_on_weapon_attack :/
    		#in here I would need to find a way to get rain or snow. could only find a way to set it on operations.py set_rain (set_rain,<rain-type>,<strength>), (rain_type: 1= rain, 2=snow ; strength: 0 - 100)
    		(try_begin),
    			#here we need a rain/snow condition check. if it doesn't rain/snow, then proceed. otherwise abort. So, I need to find where weather is set add a global variable and check it like so:
    			(eq, "$g_rain_onoff", 0),
    			(neg|multiplayer_is_dedicated_server),#only client side
    
    			#cosmetics: set projectile on fire
    			(set_fixed_point_multiplier, 100), # I wonder what this does...
    			(set_position_delta,0,80,0),
    			(particle_system_add_new, "psys_torch_fire"),
    			(particle_system_add_new, "psys_torch_smoke"),
    			(particle_system_add_new, "psys_torch_fire_sparks"),
    			(set_current_color,150, 125, 75),
    			(add_point_light, 10, 30),
    
    		(troop_set_slot, ":troop", slot_troop_fire_onoff, ":shooter"), #store on slot/matrix that attacker fired a fire_arrow
    (try_end),


    插入代码块:
    ti_on_agent_hit, 0, 0, [],
    [
    	(store_trigger_param_1, ":agent"),
    	(store_trigger_param_2, ":attacker"),
    	(store_trigger_param_3, ":damage"),
    
    	(agent_get_troop_id, ":attacker_troop", ":attacker"), #getting the shooter id to increase it's damage
    	(try_begin),
    		#condition to check if victim was hit by fire_arrows
    		#or maybe condition to check if attacker shot fire_arrows, or has fire_arrows equipped, like this? :/
    #		(troop_slot_eq, ":attacker", slot_troop_fire_onoff, 1), #does this work?
    		(troop_slot_eq, ":attacker_troop", slot_troop_fire_onoff, 0), # or like this?
    
    		#increase damage of shooter by 50%
    		(val_mul, ":damage", 1.5),
    	(try_end),
    
    	(set_trigger_result, ":damage"),

    Edit: Not even cosmetics work :sad:
  18. Modding Q&A [For Quick Questions and Answers]

    Could someone help me out to make fire arrows? The idea is to make them only work if it's not raining or snowing and give a damage boost (and maybe even burn the target).

    Here is what I got from my research (I adapted this from a multiplayer script on this thread, one of the issues was that the fire burnt on the tail rather than on the tip and it was only when the arrow hit the target (on_hit)):

    插入代码块:
    ["fire_arrows","Fire Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(3)|abundance(160)|weapon_length(95)|thrust_damage(30,pierce)|max_ammo(20),imodbits_missile,
    [
    	(ti_on_weapon_attack,[ # like this?
    #	(ti_on_init_missile,[ #or like this? I saw this code lying about, which could be more appropriate, but it's not on operations.py :/
    		#pos1 - Missile hit position
    		#param_1 - Shooter agent
    		#pos1 and param_1 are parameters for ti_on_missile_hit, so not sure if they work here for ti_on_weapon_attack :/
    		#in here I would need to find a way to get rain or snow. could only find a way to set it on operations.py set_rain (set_rain,<rain-type>,<strength>), (rain_type: 1= rain, 2=snow ; strength: 0 - 100)
    		(try_begin),
    			#here we need a rain/snow condition check. if it doesn't rain/snow, then proceed. otherwise abort.
    
    			#cosmetics: set projectile on fire
    			(particle_system_burst, "psys_torch_fire", pos1, 100), #like this?
    			(particle_system_add_new, "psys_torch_smoke"), #or maybe like this...
    			(particle_system_add_new, "psys_torch_fire_sparks"),
    			(set_current_color,150, 125, 75),
    			(add_point_light, 10, 30),
    
    			(store_trigger_param_1, ":shooter"), #getting the shooter id to increase it's damage
    			(agent_set_damage_modifier, ":shooter", 150), #increase damage of shooter by 50%
    		(try_end),
    	(try_end),
    	]),
    ]],

    Looks simple, right?
  19. Modding Q&A [For Quick Questions and Answers]

    Somebody 说:
    The engine is hardcoded to allocate only certain types of combat animations to items with certain flags (see header_items). You can always try combining existing animations to clear up slots or use up the two complete sets that aren't in use for Native. Shield bash and other actions aren't weapon animations - they take up one of the unused human animations and are called on-demand by a trigger.

    Thanks! Sounds like a messy job for a noob like me right now :razz:
  20. OSP Code QoL Randomly unisex troops

    Dusk Voyager 说:
    You're getting it, but there's no need for dummy genders. :smile:

    PS. Now that you've excluded heroes, does balding still happen?

    So far so good! :wink:
后退
顶部 底部