Search results for query: *

  1. xaliber

    OSP Kit Combat Camel Kit! - Makes horses react to camels

    Zarthas said:
    Tested yours Xaliber, it works very nicely!

    Do you mind if I post your OSP-Improved version at the top? Would be easier for people to find maybe.

    Hey, sorry for the extra late reply. Sure, feel free! I just tweak it a bit.
  2. xaliber

    Modding Q&A [For Quick Questions and Answers]

    Hello all, I think I might need more help again...

    I've been trying to make a new food item, but it doesn't seem to give morale bonus (when I hover the item it says, "Morale +0" instead of "Morale+7"). Where can I set the morale bonus? And where I can set the selling price?

    This is what I've done so far

    Code:
     ["special_meat","Fibrous Meat", [("raw_meat",0)], itp_merchandise|itp_type_goods|itp_consumable|itp_food, 0, 95,weight(15)|abundance(10)|food_quality(100)|max_ammo(40),imodbits_none],

    Check if rotten

    module_scripts.py said:
    ("game_get_item_extra_text",
        [
          (store_script_param, ":item_no", 1),
          (store_script_param, ":extra_text_id", 2),
          (store_script_param, ":item_modifier", 3),
          (try_begin),
            (is_between, ":item_no", food_begin, food_end),
            (try_begin),
              (eq, ":extra_text_id", 0),
              (assign, ":continue", 1),
              (try_begin),
                (this_or_next|eq, ":item_no", "itm_cattle_meat"),
                (this_or_next|eq, ":item_no", "itm_special_meat"), ## Xal edit special meat
                (this_or_next|eq, ":item_no", "itm_pork"),
    (eq, ":item_no", "itm_chicken"),

                (eq, ":item_modifier", imod_rotten),
                (assign, ":continue", 0),
              (try_end),
              (eq, ":continue", 1),
              (item_get_slot, ":food_bonus", ":item_no", slot_item_food_bonus),

    ...

    ## etc
  3. xaliber

    Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    xaliber said:
    jacobhinds said:
    xaliber said:
    Oooh, so that's what the variable is used for. Thanks Caba'drin!

    The other question, can I count how many horses player have inside the (try_for_range) loop? I find (store_item_kind_count), but it seems it doesn't count all horses collectively? (so it only counts 3 Courser, 1 Steppe Horse, etc)

    Local variables persist through try_blocks, so use one of those. A val_add operation can be used to count the number of entities that fit a given criteria by adding 1 to the variable whenever those criteria are met.

    I'm sorry, but I don't quite follow... so I have to iterate "try" to check every type of horses? Something like this?

    Code:
    	("action_do_the_horse",[
    					(assign, ":has_horse", 0),	
                                            (try_for_range, ":cur_horse", horses_begin, horses_end),
    						  (player_has_item, ":cur_horse"),
                                                      (assign, ":has_horse", 1),
    					(try_end),
                                            (eq, ":has_horse", 1),
    
                                            # Count horse
                                            (try_begin),
                                                      (player_has_item, "itm_sumpter_horse"),
                                                      (store_item_kind_count, ":total_this_horse", "itm_sumpter_horse")
                                                      (val_add, ":total_horse", ":total_this_horse"),
                                            (else_try),
                                                      (player_has_item, "itm_saddle_horse"),
                                                      (store_item_kind_count, ":total_this_horse", "itm_saddle_horse")
                                                      (val_add, ":total_horse", ":total_this_horse"),
                                            (else_try),
                                                      (player_has_item, "itm_steppe_horse"),
                                                      (store_item_kind_count, ":total_this_horse", "itm_steppe_horse")
                                                      (val_add, ":total_horse", ":total_this_horse"),
                                            (else_try),
                                                       ## etc ....
                                            (try_end),
                                            (assign, reg6, ":total_horse"),
                                 ],"Check horse condition (you have {reg6} horses).",

    that would work, but it is like taking a trip to the moon when all you want is to cross the street.
    Use Caba's snippet, change the assign to a sum (val_add) and you will have your horse count

    you should read the basic tutorial/guides on modding and syntax:  :arrow: http://forums.taleworlds.com/index.php/topic,240255.0.html
    Ikaguia said:
    also, you should do (assign, ":total_horses",0), at the beginning, before using val_add on it

    Ooh, so (try_for_range) loops every instances of everything listed in horses_begin and horses_end? Now I understand. :smile: I've read the guide but I didn't know how try_for_range works.

    Thanks kalarhan and Ikaguia! It works nicely.
  4. xaliber

    Modding Q&A [For Quick Questions and Answers]

    jacobhinds said:
    xaliber said:
    Oooh, so that's what the variable is used for. Thanks Caba'drin!

    The other question, can I count how many horses player have inside the (try_for_range) loop? I find (store_item_kind_count), but it seems it doesn't count all horses collectively? (so it only counts 3 Courser, 1 Steppe Horse, etc)

    Local variables persist through try_blocks, so use one of those. A val_add operation can be used to count the number of entities that fit a given criteria by adding 1 to the variable whenever those criteria are met.

    I'm sorry, but I don't quite follow... so I have to iterate "try" to check every type of horses? Something like this?

    Code:
    	("action_do_the_horse",[
    					(assign, ":has_horse", 0),	
                                            (try_for_range, ":cur_horse", horses_begin, horses_end),
    						  (player_has_item, ":cur_horse"),
                                                      (assign, ":has_horse", 1),
    					(try_end),
                                            (eq, ":has_horse", 1),
    
                                            # Count horse
                                            (try_begin),
                                                      (player_has_item, "itm_sumpter_horse"),
                                                      (store_item_kind_count, ":total_this_horse", "itm_sumpter_horse")
                                                      (val_add, ":total_horse", ":total_this_horse"),
                                            (else_try),
                                                      (player_has_item, "itm_saddle_horse"),
                                                      (store_item_kind_count, ":total_this_horse", "itm_saddle_horse")
                                                      (val_add, ":total_horse", ":total_this_horse"),
                                            (else_try),
                                                      (player_has_item, "itm_steppe_horse"),
                                                      (store_item_kind_count, ":total_this_horse", "itm_steppe_horse")
                                                      (val_add, ":total_horse", ":total_this_horse"),
                                            (else_try),
                                                       ## etc ....
                                            (try_end),
                                            (assign, reg6, ":total_horse"),
                                 ],"Check horse condition (you have {reg6} horses).",
  5. xaliber

    Modding Q&A [For Quick Questions and Answers]

    Oooh, so that's what the variable is used for. Thanks Caba'drin!

    The other question, can I count how many horses player have inside the (try_for_range) loop? I find (store_item_kind_count), but it seems it doesn't count all horses collectively? (so it only counts 3 Courser, 1 Steppe Horse, etc)
  6. xaliber

    Modding Q&A [For Quick Questions and Answers]

    Hello all, a question from amateur modder here...

    I'm trying to make a check if player has horses (any kind of horse will do), then this menu appears. But it doesn't seem to detect it. I took example from food check script (check if there is food, if there's any, consume). Can I ask for help?

    It's in game_menus.py

    Code:
    ("camp_action_do_the_horse",0,
       "Placeholder text: thing of another later",
       "none",
       [],
        [
    	("action_do_the_horse",[
    						(try_for_range, ":cur_horse", horses_begin, horses_end),
    						  (player_has_item, ":cur_horse"),
    						(try_end),
                                 ],"Check horse condition.",
           [
    		  (display_message, "@Test"),
            ]
        ),

    Also is there a way to show a number of horses the player have? E.g. the menu will show as "Check horse condition (you have 10 horses)".
  7. xaliber

    Where to find codes

    This is what I made for deserters recruitment.

    In module_dialogs.py, search for:

    Code:
    [anyone|plyr,"deserter_talk", [], "There's no need to fight. I am ready to pay for free passage.", "deserter_barter",[]],

    Add this below that:

    Code:
      [anyone|plyr,"deserter_talk", [], "What about fighting for our cause? We reward brave men with good cash.", "deserter_recruit",[]],
       
       [anyone,"deserter_recruit", [
    	(troop_get_slot, ":renown", "trp_player", slot_troop_renown),
    	(lt,":renown",300),							# if player renown is lesser than 300
    	
       ],"Living on our knees for some unknown {man/woman}? We'd make loads of profits by selling you off to slavers instead!","close_window",[encounter_attack]],
             
       [anyone,"deserter_recruit",[],"Fighting for the sake of unknown {man/woman}? Who the hell do you think you are?","deserter_recruit_2a",[]],
       [anyone|plyr,"deserter_recruit_2a",[],"I am {playername}. Have you never heard of my deeds in this land?","deserter_recruit_2b",[]],
       
       [anyone,"deserter_recruit_2b",[
    		  
    		  (store_party_size_wo_prisoners, ":size", "$g_encountered_party"),		# count deserter party size
    		  (store_mul,":bribe",":size", 50),
    		  (store_random_in_range,":rand",2,5),		  
    		  (val_mul,":bribe", ":rand"),
    		  (val_div,":bribe", 2),
    		  (assign, reg2, ":bribe"),
    		  
       ],"Huh, you're {playername}? We've heard of you... quite a party you can amass there. Fine, here's the deal. {reg2} denars, and our sword is yours.","deserter_recruit_2c",[]],
       
       [anyone|plyr,"deserter_recruit_2c",[
    		  (store_troop_gold,":gold","trp_player"),								# store player's gold in :gold
    		  (ge, ":gold", reg2),
    		  (party_can_join),
       ],"Fair enough. Here's your {reg2} denars. Let's move.","close_window",
    		   [(troop_remove_gold, "trp_player", reg2),
    			(call_script, "script_change_player_honor", -5),			# Dishonorable act to recruit traitor
    			(store_party_size_wo_prisoners, ":size", "$g_encountered_party"),
    			(store_mul, ":morale_change", -2, ":size"),
    			(call_script, "script_change_player_party_morale", ":morale_change"),
    			(party_join),
    			(assign, "$g_leave_encounter", 1)
    		   ]
       ],
    
       [anyone|plyr,"deserter_recruit_2c",[],"That's a bit too pricey, don't you think?","deserter_barter_3b",[]],
       [anyone|plyr,"deserter_recruit_2c", [], "On a second thought, I guess I'll just pay the toll.", "deserter_barter",[]],

    I think the option to give troops to lords should be in Diplomacy. And battle minimap is in rubik's Custom Commander. :???:
  8. xaliber

    Modding Q&A [For Quick Questions and Answers]

    The_dragon said:
    Put ":victim_troop_id" instead of ":victim_agent" like this:
    (agent_get_troop_id,":victim_troop_id",":victim_agent"), ## Xaliber's edit
    (store_skill_level,":riding","skl_riding",":victim_troop_id"), ## Xaliber's edit

    Thanks again, The_dragon! It works nicely, except when I dismount from my horse... my attack does no damage to the AIs. The AIs still can kill each other though (and they can kill me), but I can't deal any damage to them if unmounted. :???:

    Tried adding this:
      (store_random_in_range,":chance",0,60), ### Decrease this number (60) for higher chances of knocking riders off (and vice-versa).
      (agent_get_troop_id,":victim_troop_id",":victim_agent"),
      (troop_is_mounted,"victim_troop_id"),
      (store_skill_level,":riding","skl_riding",":victim_troop_id"),
      (val_mul,":riding",6),
      (val_add,":chance",":riding"),
      (ge,":eek:rig_damage", ":chance"), ### If damage dealt is over or equal to the ":chance" number, knock-off occurs.

    But it gives me another error so I think it's not the way to go... mind if I ask for direction once again?
  9. xaliber

    Modding Q&A [For Quick Questions and Answers]

    The_dragon said:
    @xaliber yes, the knock rider off horse code interferes with the native code.
    I think that if you add '(agent_is_human, ":agent_no"),' before '(assign, ":initial_courage_score", 5000),', it should fix the issue.
    Native code spawns only troop agents (not horses; actually it does spawn horses, but the trigger ti_on_agent_spawn won't fire for them because they spawn with their rider), and the devs forgot to put additional checks (because 'hey... it works, so let it this way').
    The code that you added spawns a horse each time it's rider needs to be thrown off. The horse spawning triggers native code that wasn't designed to support horses agents, so that's why you get those errors.
    Interesting (and I don't understand why this happens) is the fact that you should get an error on 'store_character_level' operation, because the horse's troop id is -1, which is an invalid troop id, but as I can see, you got no error regarding the troop id.

    Much, much appreciated! After a few testing, it works excellently without errors. Thanks, The_dragon. :smile: Learning the Warband's code is curious...

    Would you mind if I ask additional question? Would it be possible to count the rider's Riding skill in addition to random chance to check whether they are knockable or not?

    I tried using this

    Code:
    	  (store_random_in_range,":chance",0,60), ### Decrease this number (60) for higher chances of knocking riders off (and vice-versa).
    	  (agent_get_troop_id,":victim_agent",":victim_agent"),				## Xaliber's edit
    	  (store_skill_level,":riding","skl_riding",":victim_agent"),				## Xaliber's edit
    	  (val_mul,":riding",6),										## Xaliber's edit
    	  (val_add,":chance",":riding"),									## Xaliber's edit
    	  (ge,":chance", ":orig_damage"), ### If damage dealt is over or equal to the ":chance" number, knock-off occurs.

    But it always produce these... horrendous errors

    gZETZJN.jpg

    Reus said:
    xaliber said:
    (whew, is there a documentation somewhere I can find what the errors supposed to mean?
    http://forums.taleworlds.com/index.php?topic=6575.msg96347#msg96347

    Winter posted a couple.

    Thanks, Reus! It's bookmarked now.
  10. xaliber

    Modding Q&A [For Quick Questions and Answers]

    The_dragon said:
    @xaliber that warning is not caused by knock rider off horse code.
    Opcode 1671 means party_get_morale. Open module mission templates, then go to mission lead_charge. Then look at the first trigger, line no 10 (first line is line no 0). There is the error.
    Thanks, I appreciate it! Especially for translating the error (whew, is there a documentation somewhere I can find what the errors supposed to mean?)...

    Line #10 in the first trigger is something from Native though. Something to indicate party morale, I suppose (it checks party courage). Just in case I'm not being clear, here's the trigger
    Code:
    (ti_on_agent_spawn, 0, 0, [],
           [
             (store_trigger_param_1, ":agent_no"),
             (call_script, "script_agent_reassign_team", ":agent_no"),
    
             (assign, ":initial_courage_score", 5000),
                      
             (agent_get_troop_id, ":troop_id", ":agent_no"),
             (store_character_level, ":troop_level", ":troop_id"),
             (val_mul, ":troop_level", 35),
             (val_add, ":initial_courage_score", ":troop_level"), #average : 20 * 35 = 700
             
             (store_random_in_range, ":randomized_addition_courage", 0, 3000), #average : 1500
             (val_add, ":initial_courage_score", ":randomized_addition_courage"), 
                       
             (agent_get_party_id, ":agent_party", ":agent_no"),         
             (party_get_morale, ":cur_morale", ":agent_party"),
             
             (store_sub, ":morale_effect_on_courage", ":cur_morale", 70),
             (val_mul, ":morale_effect_on_courage", 30), #this can effect morale with -2100..900
             (val_add, ":initial_courage_score", ":morale_effect_on_courage"), 
             
             #average = 5000 + 700 + 1500 = 7200; min : 5700, max : 8700
             #morale effect = min : -2100(party morale is 0), average : 0(party morale is 70), max : 900(party morale is 100)
             #min starting : 3600, max starting  : 9600, average starting : 7200
             (agent_set_slot, ":agent_no", slot_agent_courage_score, ":initial_courage_score"), 
             ]),

    Line #10 is
    Code:
    (party_get_morale, ":cur_morale", ":agent_party"),

    The other non-native codes I've been playing around with this is Diplomacy 4.2 and Somebody's Camel Kit, which I modified. I call  the knock rider off horse (common_horse_fall) inside Diplo's trigger and when I commented common_horse_fall everything went fine. :???: Could it be interfering with something?
  11. xaliber

    OSP Kit Combat Camel Kit! - Makes horses react to camels

    So, after a few playing around this has finally worked nicely. It might be an easy stuff but for an amateur modder like me it takes a while to understand it haha.

    I owe Somebody my gratitude! Thanks a lot for the help!

    For anyone who want a simple copy-paste, this should work. Horses react only to the opposing team's camels (they should get along with friendly camels)

    Code:
    horses_spook = (
    	6, 0, 0, [],#Every six seconds
    	[
    	(try_for_agents,":cur_horse"),
    		(agent_is_alive,":cur_horse"),
    		(agent_get_item_id,":horse_type",":cur_horse"),
    		(is_between,":horse_type",camels_begin,camels_end),
    		(agent_get_position,pos2,":cur_horse"),	
    		(agent_get_rider,":cur_rider",":cur_horse"),		# Store rider info from camel
    			(gt, ":cur_rider", -1),						# Camel has rider (greater thn -1)
    			(agent_get_team,":agent_team",":cur_rider"),	# Store camel rider info, what team is he?
    			(try_for_agents,":enemy_horse"),				# Then  check enemy horse
    				(agent_is_alive,":enemy_horse"),#Make sure he's not dead
    				(neg|agent_is_human, ":enemy_horse"),
    				(agent_get_item_id,":enemy_horse_type",":enemy_horse"),
    				(neg|is_between, ":enemy_horse_type", camels_begin,camels_end),
    				(agent_get_position, pos1,":enemy_horse"),
    				(get_distance_between_positions,":dist",pos1,pos2),#In CM
    				(le,":dist",3500),#Within 35m
    				(store_random_in_range,":chance",1,11),
    				
    				(try_begin),		# Check if opposing team, apply horse spook. If not, don't
    					(agent_get_rider,":enemy_rider",":enemy_horse"),
    					(gt, ":enemy_rider", -1),
    					(agent_get_team,":enemy_team",":enemy_rider"),
    					(try_begin),
    						(teams_are_enemies,":agent_team",":enemy_team"),
    						(agent_get_troop_id,":enemy_rider",":enemy_rider"),
    						(store_skill_level,":riding","skl_riding",":enemy_rider"),
    					(else_try),
    						(assign,":riding", 99),
    					(try_end),
    					(val_add,":chance",":riding"),
    				(try_end),
    
    				(lt, ":chance", 10),
    				(agent_play_sound, ":enemy_horse", "snd_horse_low_whinny"),		# gives sound
    				(agent_set_animation,":enemy_horse","anim_horse_rear"),
    			(try_end),	# try_for_agents enemy_horse
    	(try_end),
    	]
    )
  12. xaliber

    Modding Q&A [For Quick Questions and Answers]

    @HyperCharge:
    There is also this code too, in case you still need it: http://forums.taleworlds.com/index.php/topic,87851.msg2320543.html#msg2320543

    -----

    A question if I may, I've been playing with Davee's knock rider off horse code (can be found here)... which works excellently, except this error log which appears every a few seconds (not sure if it appears only when agent got hit or repeatedly)

    tTxRu7s.jpg

    It's the

    Code:
    SCRIPT ERROR ON OPCODE 1671: Invalid Party ID: -1; LINE NO: 10
    At Mission Template mst_lead_charge trigger no:0 consequences

    Tried Googling around to see what's the issue... found no clue though. Could I ask for help to direct me how to resolve this error? I'd really appreciate the help.
  13. xaliber

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    Ah okay. I'm curious to what kind of personality you've given to the companions. :smile: The last version I played still has plenty of same dialogues.
  14. xaliber

    Modding Q&A [For Quick Questions and Answers]

    Hello folks. Would like to ask a few questions here...

    1. Is there any command/"if check" to check if party in the opposing team has a certain troop in the middle of a battle? For example in a battle I would like to check if the opposing party has a Swadian Knight; if they do, then X happens. Maybe something like (opposing_party_has_troop, troop_id)?

    2. Is there a function that set which troops that would appear in tavern? If there is, where I could find it and what is its name?

    Please pardon my broken English. I appreciate the help.  :smile:
  15. xaliber

    SP Native [WB][OSP] Tama's Enchanced Native Mod (attackable townsfolk and stuff)

    Hello Tama, are you still working on this? :smile:

    I've played around for a bit with this and encountered a few bugs (I make bullet points for easier reading):

    • If you riot in tavern, sometimes mounted troops would come into tavern complete with their horses. I notice this happens often in Khergit towns (horse archers frequently do this)
    • Moving from one scene to another reset the behavior of people in the city. For example, if you riot in tavern and go directly to city centers, people would behave normally as if nothing happened. Vice-versa: if you riot in city centers and go to tavern, people would behave normally.
    • There are plenty of script errors when we riot in player-owned town. And the garrison does not show up. :???:

    And one suggestion: shouldn't the faction whose town we're rioting take a relationship damage too?
  16. xaliber

    OSP Kit Combat Camel Kit! - Makes horses react to camels

    By outer loop I assume it means the parent loop of (try_for_agents,":enemy_horse"), right? Just below (agent_get_position,pos2,":cur_horse")?

    I'm trying it again... would this code be proper?

    Code:
    	(try_for_agents,":cur_horse"),
    		(agent_is_alive,":cur_horse"),
    		(agent_get_item_id,":horse_type",":cur_horse"),
    		(is_between,":horse_type",camels_begin,camels_end),
    		(agent_get_position,pos2,":cur_horse"),	
    		(agent_get_rider,":cur_rider",":cur_horse"),		
    		(try_begin),									# check if camel has rider
    			(gt, ":cur_rider", -1),							# if it has, go process
    			(agent_get_team,":agent_team",":cur_rider"),		# get rider's team
    			(try_for_agents,":enemy_horse"),				# then check enemy's horse
    				(agent_is_alive,":enemy_horse"),#Make sure he's not dead
    				(neg|agent_is_human, ":enemy_horse"),
    				(agent_get_item_id,":enemy_horse_type",":enemy_horse"),
    				(neg|is_between, ":enemy_horse_type", camels_begin,camels_end),
    				(agent_get_position, pos1,":enemy_horse"),
    				(get_distance_between_positions,":dist",pos1,pos2),#In CM
    				(le,":dist",3500),#Within 35m
    				(store_random_in_range,":chance",1,11),
    				
    				(try_begin),
    					(agent_get_rider,":enemy_rider",":enemy_horse"),
    					(gt, ":enemy_rider", -1),
    					(agent_get_team,":enemy_team",":enemy_rider"),
    					(try_begin),
    						(teams_are_enemies,":agent_team",":enemy_team"),
    						(agent_get_troop_id,":enemy_rider",":enemy_rider"),
    						(store_skill_level,":riding","skl_riding",":enemy_rider"),
    					(else_try),
    						(assign,":riding", 99),
    					(try_end),
    					(val_add,":chance",":riding"),
    				(try_end),
    
    				(lt, ":chance", 10),
    				(agent_set_animation,":enemy_horse","anim_horse_rear"),
    			(try_end),									# == end of enemy horse check condition
    		(else_try),										# if camel has no rider, then...
    			# nothing happens?
    		(try_end),
    	(try_end),
    [code]
  17. xaliber

    SP Native Malik Faris's Companions and Native Enhancement [1.166]

    Malik, do you happen to have uploaded the latest source of the Steam Workshop version?
  18. xaliber

    OSP Kit Combat Camel Kit! - Makes horses react to camels

    Thanks! I'm not really sure, but would this code work?

    Code:
    			(store_random_in_range,":chance",1,11),
    			
    			(try_begin),
    				(agent_get_rider,":enemy_rider",":enemy_horse"),
    				(gt, ":enemy_rider", -1),
    				(agent_get_team,":enemy_team",":enemy_rider"),
    				(agent_get_rider,":cur_rider",":cur_horse"),
    				(agent_get_team,":agent_team",":cur_rider"),
    				(try_begin),
    					(teams_are_enemies,":agent_team",":enemy_team"),
    					(agent_get_troop_id,":enemy_rider",":enemy_rider"),
    					(store_skill_level,":riding","skl_riding",":enemy_rider"),
    				(else_try),
    					(assign,":riding", 99),
    				(try_end),
    				(val_add,":chance",":riding"),
    			(try_end),
    
    			(lt, ":chance", 10),
    			(agent_set_animation,":enemy_horse","anim_horse_rear"),

    I'm wondering what's the use of (gt, ":enemy_rider", -1)  :???: Why check if :enemy_rider is greater than -1?
  19. xaliber

    OSP Kit Combat Camel Kit! - Makes horses react to camels

    Ah, again, I'm sorry... I guess I phrased my question wrongly (pardon me, poor English capability)...  :oops: I should have asked this:

    "Is there a way to check that only horses in the opposing team are affected by camel fear?"

    So if the enemy use camel, our horses will be spooked but their horses will be okay; if we use camel, enemy horses will be spooked but our horses will be okay.

    agent_is_ally only checks if agent is the part of our team right? Is there some kind of agent_is_in_opposing_team command? I found this command list page but it doesn't give enough info... should I use agent_get_party_id?
  20. xaliber

    OSP Kit Combat Camel Kit! - Makes horses react to camels

    Somebody said:
    Yes, check inside the agent loop and set the chance to 0 if :enemy_rider is friendly instead.

    I'm sorry, how to check if :enemy_rider is friendly? I'm not sure - would this code work?

    Code:
    			(store_random_in_range,":chance",1,11),
    			(try_begin),
    				(agent_get_rider,":enemy_rider",":enemy_horse"),
    				(gt, ":enemy_rider", -1),
    				(agent_get_troop_id,":enemy_rider",":enemy_rider"),
    				(store_skill_level,":riding","skl_riding",":enemy_rider"),
    				(val_add,":chance",":riding"),
    			(else_try),
    				(assign,":chance",0),
    			(try_end),
    			(lt, ":chance", 10),
    			(agent_set_animation,":enemy_horse","anim_horse_rear"),

    Please pardon the silly question/coding, fairly new to modding and reading WB's code...
Back
Top Bottom