• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

inititems > fist

Kuala

Landlubber
Hi,
I noticed in the [inititems.c] there's a fist attribute [itm.enblrld true;] and the comment says it allows you to reload your gun while this is equipped. While it is true, it still doesn't allow me to reload when I'm armed with the fist. Is it supposed to? There is also the advanced option to enable armed reloading, but that includes all weapons, while I only want it for the fist.

I'm just wondering if the attribute was meant to work, or have I overlooked something? Thanks.
 
It is for all sword weapons, which includes the fists :shrug

I think it would be possible to bypass but I dont know what file would need changing
 
I do know what file needs changing. Have known for a long time.
In fact, that itm.enblrld line is actually my work on trying to make this work.
See this code from PROGRAM\Loc_ai\LAi_fightparams.c:
Code:
	// PB: Can reload when using fists, shotgun or certain special weapons
// PB: I don't think this actually works...
string bladeID = GetCharacterEquipByGroup(chr,BLADE_ITEM_TYPE);
string gunID = GetCharacterEquipByGroup(chr,GUN_ITEM_TYPE);
if(LAi_IsFightMode(chr) && CANNOT_RELOAD_WHILE_FIGHTING && !CheckAttribute(bladeID,"enblrld") && !CheckAttribute(gunID,"throw"))  return 0.0;
return charge_dlt;
Thanks for reminding me to look at this again though, because now I see why it doesn't work.
I'm checking attributes on a STRING, which is never going to work! Replace the code with this:
Code:
	// PB: Can reload when using fists, shotgun or certain special weapons
string bladeID = GetCharacterEquipByGroup(chr,BLADE_ITEM_TYPE);
aref blade;
Items_FindItem(bladeID, &blade);	// defines object for weaponattributes
string gunID = GetCharacterEquipByGroup(chr,GUN_ITEM_TYPE);
aref gun;
Items_FindItem(gunID, &gun);	// defines object for weaponattributes
if(LAi_IsFightMode(chr) && CANNOT_RELOAD_WHILE_FIGHTING && !CheckAttribute(blade,"enblrld") && !CheckAttribute(gun,"enblrld") && !CheckAttribute(gun,"throw"))  return 0.0;
return charge_dlt;
Then it actually works as intended! Additionally, your shotgun will reload as will any throwable weapons.
ANOTHER PROBLEM FIXED! And I think you don't even need to start a new game for this one! :woot
 
Indeed! This topic is solved.

however..

Now that the gun reloading occurring more frequently, I've had the chance to notice (something off-topic) that they reload slightly slower than labeled. Short pistol is said to be "8 sec" reload time, but I counted 10ish. As with the pirate pistol at 14 secs when it says 12 secs. Maybe I'm pushing it here, but I'm going to time it with a stop watch when I get back...just to make sure.


You're welcome. You can confirm it DOES work now then? :woot
 
Ok; thanks for confirming. I'm very happy that long-standing issue is finally solved!

Reload times do depend to some extent to your skills and abilities.
That might account for the difference in reload times that you observe.
But I'm not at all sure about that one.
A bigger issue is that there's no reload status anymore;
the bar is either empty or full, but you can't see anymore how far you are with loading.
I'd like to have that one fixed... eventually. :facepalm
 
Back
Top