• 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!

Fixed Armour Stops Showing on Player Model

ANSEL

Corsair
Storm Modder
Hearts of Oak Donator
Standard storyline: I loose the yellow cuirass every time passing a gate or door.
Some times it comes and goes as it like it self.
 
Standard storyline: I loose the yellow cuirass every time passing a gate or door.
Some times it comes and goes as it like it self.
loose as in it's not equiped anymore, or loose as in it's gone from your inventory?
 
Yes! Here it comes.
 

Attachments

  • -=Player=- Jamaica. Port Royale. Center. July 19th, 1750 1.zip
    832.8 KB · Views: 104
I noticed this happening with the basic curiass, the one you get start BBF as well.
 
I suspect it will go for all armor item types.

If anyone has a clue when this started happening, I'd be quite happy to hear your suggestions. :doff
 
This problem was NOT in the Build 14 Beta 3.5 WIP (Saturday 25 July 2015) but IS in the recent Beta 4 version.
That is very odd indeed as the last time I remember anyone intentionally doing anything with the armour code was me just after the Beta 3.4 release.
But clearly that isn't the culprit.

That makes me wonder if it could be related to all the recent huge changes to initialization characters and all the stuff happening on a location reload.
@Levis, do you know of any code that is executed on a reload that may be changing around character models?
 
I am not quit sure, but I think I notice the same with blades and guns, not every time as
with the curiass, but random. I will have my eyes on it.
 
I just remembered in Leveling.c in FinishCharInit I placed this line:
ExecuteCharacterEquip(chr);

this was because I was bussy trying to optimize stuff. This one might be the cause?
 
Yes if a character isn't initialized at least.... Disabled it in the version I posted.
 
This is affecting the player character? Why would the player not remain initialized?
Should only happen once per character, no?
 
Shouldnt affect it indeed....
So then.... what function DO we have that effects either item equipping or character model that is executed on each location reload also for already initialized characters?
 
I just remembered in Leveling.c in FinishCharInit I placed this line:
ExecuteCharacterEquip(chr);
I just confirmed that is NOT it, though removing that line does cause issues elsewhere.

Added a Trace statement here:
Code:
void FinishCharInit(ref chr)
{
   if(DEBUG_EXPERIENCE>1) trace("XP LOG: Finish character init");
   //Try to select another perk to compensate for the lack of try during init
   SelectPerksForCharacter(chr, 2);
   //Set the skills right
   ResetEffectiveSkillAll(chr);
   //Set the HP right
   ResetMaxHP(chr);
   //Equip things if not done yet
   trace("FinishCharInit: Equipping character " + GetMySimpleName(chr) + " with weapons");
   ExecuteCharacterEquip(chr);
Upon loading @ANSEL's savegame, only the following two characters got initialized:
Code:
FinishCharInit: Equipping character Andrew Quarrell with weapons
FinishCharInit: Equipping character Flann Merriman with weapons
Notably NOT the player, though it DID go wrong with the armour not showing anymore.
Worth noting is that it DOES remain equipped; it just stops showing on the player model.
 
I think I've got it!
If I remove this line from the CreateCharacter function in PROGRAM\Characters\characters.c, then I create this bug:
Code:
ExecuteCharacterEquip(character);
So I'm putting that right back again.

It should be noted that despite what its function name may suggest, this is executed for EVERY character on EVERY reload.

That might have been the reason for other characters without weapons throughout the game as well.
Who knows? In any case, I reckon it will be better with it returned! :whipa
 
Back
Top