[BUGS] Freelancer 1.2-1.4 Bugs. (LOCKED)

Users who are viewing this thread

Status
Not open for further replies.
Guess I found another bug XP

Because of the earlier mentioned bug I still couldn't do anything in that menu (My game was saved in that menu so I  was screwed).
So as my last option I chose to revolt against Sanjar Khan and see the result:
spj9tf.jpg

:twisted: I just love my relationship with the Khergits :p


EDIT:
Ikaguia said:
That way you could kick the king ass and the lords won't even try to punch your face

That being said :eek: I actually love that bug ^^ Sad I got no money, no army and no lordly looking armour
 
I found another bug with the issuing of troop equipment. This one was also encountered when I was promoted to Swadian Milita. I was issued a hunting crossbow but no bolts for it. I took a look at the part of the 1.1 source code that is labeled "#add ammo for any equipped bow" and to the best of my knowledge that code guarantees that the correct ammo will be moved from the inventory to the third weapon slot, but it does not seem to guarantee that that ammo is issued in the first place. You may have changed it in the 1.2 code but you might want to take a look at it anyways.

P.S. @ Swordyke: That was an awesome albeit rather confusing jump in relations with a kingdom that you just deserted if I understand your post correctly. But then again, all of the relation changes after you lost honor are rather confusing so I think you may have actually posted two bugs in one.

P.P.S @ Swordyke: btw, your fps rate is absolutely amazing. Is it close to that in battle as well?

Edit: Before Caba gets confused as to whether my bug is for 1.1 or 1.2(:grin:), I found the bug in 1.2 but only have the 1.1 source code(:cry:) to go through to attempt to locate the problem.
 
Thanks Louis for these continued reports. I was certain I had debugged the code thoroughly, and I've play tested it a number of times...but looking at the guarantees for both ammo and melee there were small errors there that I've no clue how I missed. My play tests must have all simply been lucky. In any case, I re-wrote the way both were double checked and guaranteed (the problem wasn't quite what you mentioned but there was a small error in the logic).

If you are mussing in the source, equip and unequip scripts now look like the following:
Code:
    ("freelancer_equip_troop",
   [
    (store_script_param_1, ":source_troop"),
    
    (str_clear, s2),
    (set_show_messages, 0),
    
    (assign, ":recording_slot", slot_freelancer_equip_start),    
    (troop_get_inventory_capacity, ":troop_cap", ":source_troop"),
    (assign, ":melee_given", 0),
    (assign, ":needs_ammo", 0),
    (assign, ":open_weapon_slot", 0),
    (try_for_range, ":type", itp_type_horse, itp_type_pistol),
        (neq, ":type", itp_type_goods),
        (neq, ":type", itp_type_arrows),
        (neq, ":type", itp_type_bolts),
        
        #Assign Prob. of Getting Type
        (assign, ":continue", 0),
        (try_begin),
            (troop_is_guarantee_horse, ":source_troop"),
            (eq, ":type", itp_type_horse),
            (assign, ":continue", 1),
        (else_try),
            (troop_is_guarantee_ranged, ":source_troop"),
            (this_or_next|eq, ":type", itp_type_bow),
            (this_or_next|eq, ":type", itp_type_crossbow),
            (eq, ":type", itp_type_thrown),
            (assign, ":continue", 1),
        (else_try),
            (this_or_next|eq, ":type", itp_type_shield), #Shields and all armor pieces are guaranteed
            (ge, ":type", itp_type_head_armor),
            (assign, ":continue", 1),
        (else_try),
            (neq, ":type", itp_type_horse),
            (lt, ":open_weapon_slot", 4),
            (store_random_in_range, ":continue", 0, 3), # 1 chance in three of being 1
        (try_end),
        (eq, ":continue", 1),        
        
        #Clear Temp Array
        (try_for_range, ":inv_slot", 0, 20),
            (troop_set_slot, "trp_temp_array_a", ":inv_slot", 0),
        (try_end),    
        
        #Collect Items from Source Troop
        (assign, ":type_count", 0),
        (try_for_range, ":inv_slot", 0, ":troop_cap"),
            (troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
            (gt, ":item", 0),
            (item_get_type, ":item_type", ":item"),
            (eq, ":item_type", ":type"),
            (call_script, "script_dplmc_troop_can_use_item", "trp_player", ":item", 0),
            (eq, reg0, 1),        
            (troop_set_slot, "trp_temp_array_a", ":type_count", ":item"),
            (val_add, ":type_count", 1),
        (try_end),
        (gt, ":type_count", 0),
        
        #Pick Random Item of Type from Troop
        (try_begin),
            (eq, ":type_count", 1),
            (assign, ":index", 0),
        (else_try),
            (store_random_in_range, ":index", 0, ":type_count"),
        (try_end),
        (troop_get_slot, ":item", "trp_temp_array_a", ":index"),
        (gt, ":item", 0),        
        (str_store_item_name, s3, ":item"),
        (str_store_string, s2, "@{s3}, {s2}"),
        
        #Select correct EK slot to force equip
        (try_begin),
            (eq, ":type", itp_type_horse),
            (assign, ":ek_slot", ek_horse),
        (else_try),
            (is_between, ":type", itp_type_head_armor, itp_type_pistol),
            (store_sub, ":shift", ":type", itp_type_head_armor),
            (store_add, ":ek_slot", ek_head, ":shift"),
        (else_try),
            (store_add, ":ek_slot", ek_item_0, ":open_weapon_slot"),
        (try_end),
        
        #Check for item already there, move it if present
        (try_begin),
            (troop_get_inventory_slot, ":old_item", "trp_player", ":ek_slot"),
            (gt, ":old_item", 0),
            (troop_get_inventory_slot_modifier, ":old_item_imod", "trp_player", ":ek_slot"),
            (troop_add_item, "trp_player", ":old_item", ":old_item_imod"),
        (try_end),
        
        #Add Item
        (troop_set_inventory_slot, "trp_player", ":ek_slot", ":item"),
        (party_set_slot, "p_player_party_backup", ":recording_slot", ":item"),
        (val_add, ":recording_slot", 1),
        (try_begin),
            (is_between, ":type", itp_type_one_handed_wpn, itp_type_head_armor), #Uses one of the 4 weapon slots
            (val_add, ":open_weapon_slot", 1),
            (try_begin),
                (is_between, ":type", itp_type_one_handed_wpn, itp_type_arrows),
                (assign, ":melee_given", 1),
            (else_try),
                (eq, ":type", itp_type_bow),
                (assign, ":needs_ammo", itp_type_arrows),
            (else_try),
                (eq, ":type", itp_type_crossbow),
                (assign, ":needs_ammo", itp_type_bolts),
            (try_end),
        (try_end),
    (try_end), #Item Types Loop
     
    #add ammo for any equipped bow
    (try_begin),
        (neq, ":needs_ammo", 0),        
        #Check for item already in the last slot, move it if present
        (try_begin), 
            (troop_get_inventory_slot, ":old_item", "trp_player", ek_item_3),
            (gt, ":old_item", 0),
            (troop_get_inventory_slot_modifier, ":old_item_imod", "trp_player", ek_item_3),
            (troop_add_item, "trp_player", ":old_item", ":old_item_imod"), 
        (try_end),
        
        (assign, ":end", ":troop_cap"),
        (try_for_range, ":inv_slot", 0, ":end"),
            (troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
            (gt, ":item", 0),
            (item_get_type, ":type", ":item"),
            (eq, ":type", ":needs_ammo"),
            (troop_set_inventory_slot, "trp_player", ek_item_3, ":item"),
            (party_set_slot, "p_player_party_backup", ":recording_slot", ":item"),
            (val_add, ":recording_slot", 1),
            (assign, ":open_weapon_slot", 4),
            (str_store_item_name, s3, ":item"),
            (str_store_string, s2, "@{s3}, {s2}"),
            (assign, ":end", 0),
        (try_end),
    (try_end), 
    
    #double check melee was given
    (try_begin),
        (eq, ":melee_given", 0),
        (assign, ":end", ":troop_cap"),
        (try_for_range, ":inv_slot", 0, ":end"),
            (troop_get_inventory_slot, ":item", ":source_troop", ":inv_slot"),
            (gt, ":item", 0),
            (item_get_type, ":type", ":item"),
            (is_between, ":type", itp_type_one_handed_wpn, itp_type_arrows),
            (call_script, "script_dplmc_troop_can_use_item", "trp_player", ":item", 0),
            (eq, reg0, 1),    
            (try_begin),
                (gt, ":open_weapon_slot", 3),
                (assign, ":open_weapon_slot", 2),
            (try_end),
            
            #Check for item already there
            (try_begin),
                (troop_get_inventory_slot, ":old_item", "trp_player", ":open_weapon_slot"),
                (gt, ":old_item", 0),
                (troop_get_inventory_slot_modifier, ":old_item_imod", "trp_player", ":open_weapon_slot"),
                (troop_add_item, "trp_player", ":old_item", ":old_item_imod"),
            (try_end),
            
            (troop_set_inventory_slot, "trp_player", ":open_weapon_slot", ":item"),        
            (party_set_slot, "p_player_party_backup", ":recording_slot", ":item"),
            (val_add, ":recording_slot", 1),
            (str_store_item_name, s3, ":item"),
            (str_store_string, s2, "@{s3}, {s2}"),
            (assign, ":end", 0),
        (try_end),
    (try_end), 
    
    (set_show_messages, 1),
    (try_begin),
        (neg|str_is_empty, s2),
        (val_sub, ":recording_slot", slot_freelancer_equip_start),
        (party_set_slot, "p_player_party_backup", slot_freelancer_equip_start - 1, ":recording_slot"),    #Record Number of Items Added
        
        (str_store_troop_name, s1, ":source_troop"),
        (display_message, "@The equipment of a {s1}: {s2}is assigned to you."),    
    (try_end),
   ]),
    
  ("freelancer_unequip_troop",
   [
    (store_script_param_1, ":source_troop"),

    (str_clear, s2),    
    (set_show_messages, 0),
    
    (party_get_slot, ":num_items", "p_player_party_backup", slot_freelancer_equip_start - 1), #Num of items previously given
    
    (troop_get_inventory_capacity, ":cap", "trp_player"),        
    (try_for_range, ":i", 0, ":num_items"),
        (store_add, ":slot", slot_freelancer_equip_start, ":i"),
        (party_get_slot, ":given_item", "p_player_party_backup", ":slot"),
        (gt, ":given_item", 0),
        
        (assign, ":end", ":cap"),
        (try_for_range, ":inv_slot", 0, ":end"),
            (troop_get_inventory_slot, ":item", "trp_player", ":inv_slot"),
            (eq, ":item", ":given_item"),            
            (troop_get_inventory_slot_modifier, ":imod", "trp_player", ":inv_slot"),
            (eq, ":imod", 0), #Native troop items never have modifiers
            
            (troop_set_inventory_slot, "trp_player", ":inv_slot", -1),
            (str_store_item_name, s3, ":item"),
            (str_store_string, s2, "@{s3}, {s2}"),
            
            (assign, ":end", 0), #Break
        (try_end), #Player Inventory Loop
    (try_end), #Item Given Slot Loop

    (set_show_messages, 1),
    (try_begin),
        (neg|str_is_empty, s2),
        (party_set_slot, "p_player_party_backup", slot_freelancer_equip_start - 1, 0),    #Reset Number of Items Added
        (str_store_troop_name, s1, ":source_troop"),
        (display_message, "@The equipment of a {s1}: {s2}is taken from you."),
    (try_end),    
    (troop_equip_items, "trp_player"),
   ]),

Will consult with gothy when he appears and hopefully there will be yet another bug-fix coming out.
 
i cannot enter tavern or join a tournament. the game crashes and sends me to desktop
i just downloaded the mod
and im not using the mod with any other mod
 
gamergod96 said:
i cannot enter tavern or join a tournament. the game crashes and sends me to desktop
i just downloaded the mod
and im not using the mod with any other mod
Are you playing with 1.143? My guess is yes, so this is a Warband version bug.
Caba`drin said:
Two things you can try, one, tick "Enable Cheats" from the "Configure" option in the Launcher (possible fix for Steam-users only); two, open up module.ini and set disable_moveable_flag_optimization to 1 (for all 1.143 players experiencing in-town-scene crashes).
 
Sunhawken said:

Sunny did you compile from the dropbox? there's no ships_pic anywhere  :???: (that's floris stuff) :wink:...and for everyone else I'll throw up a update ..sorry for the mess up people.
 
I'm releasing 1.3 shortly to cover all these bugs the testers didn't find :razz:
 
taragoth said:
I'm releasing 1.3 shortly to cover all these bugs the testers didn't find :razz:

I don't know it was a random crash. Guess, it was a accident... nice bug hunting.

 
I don't know if this is normal behaviour, but after the first fights enlisted under King Harlaus, I got a looting screen with a small amount of loot. After a couple of fights (I'm not sure how much) the screen didn't pop up anymore.

H.
 
cheers howie, I havnt seen that myself, but it's no big issue thank god :grin:
 
Have played 1.1, 1.2 and 1.3 and I still get attacked by both the attackers and the defenders in battles at the last stage of sieges (inside the hall). Someone must have reported this before me.  :roll:
 
Lord Kinlar said:
Have played 1.1, 1.2 and 1.3 and I still get attacked by both the attackers and the defenders in battles at the last stage of sieges (inside the hall). Someone must have reported this before me.  :roll:
Well, in 1.1 it was also a problem in the streets.  :???:
I've no idea why the fix is not present in the hall part too. There's no reason it shouldn't be. Sigh. Updated the source (again).

.txt fix:
1. Find mst_besiege_inner_battle_castle
2.  A few lines below that, replace
Code:
-19.000000 0.000000 0.000000  0  1 1 1 936748722493063508
with
Code:
-19.000000 0.000000 0.000000  0  3 1796 3 0 2 1 1796 3 1 3 1 1 1 936748722493063508
3. Save, Play.
 
Status
Not open for further replies.
Back
Top Bottom