• 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 Characters Double Last Name

Grey Roger

Sea Dog
Staff member
Administrator
Storm Modder
Last time I fought the Flying Dutchman, it got one decent salvo off against me. The next time it fired, only one gun was seen to shoot. It should have had more because when I fired at it again, there were several messages about guns being knocked out. These were definitely on the side facing me.

Following the battle and subsequent events at Grand Cayman, I came face to face with Jones Jones:


Edit by @Pieter Boelen: Player character named "Hawk Hawk" also occurred in a savegame by @Red Back Dude.
But WHEN and WHY does this happen!?!
 
Last edited by a moderator:
Thread renamed to be a bit more obvious for future reference.

Last time I fought the Flying Dutchman, it got one decent salvo off against me. The next time it fired, only one gun was seen to shoot. It should have had more because when I fired at it again, there were several messages about guns being knocked out. These were definitely on the side facing me.
I think the "one cannon" thing is very likely because of the "only 3 crew" and therefore is not a bug.
 
Somewhere along the line my character was renamed to "Nelson Nelson", but I've no idea when it happened and as it's my own character it was easily corrected. I don't think it was after a promotion because I got my final promotion to First Lord of the Admiralty a while ago but only noticed the name change recently.

Jones Jones appeared during the finale on Cayman. I'm not sure now whether he had the correct name when he showed up on deck at Antigua.
 
So a third instance.

I'd appreciate if everyone could keep an eye on at least their player character name.
At the moment I have no clue where to look for this issue so any thoughts on what might trigger this would be quite useful.
 
This happened to me also in the Bartolomeu Storyline.
Somewhere it changed the character's name to (you're gonna love this) o Portugues o Portugues. I don't know how long i've been playing it like that. But i have something more serious, i should post another thread.
 
Next bug:
Gauthier Thomassin has led the crew to mutiny and one night he knocks you senseless. So senseless that you forget your name and when you wake up you're "o Portugues o Portugues". Yes, it's the old "name changes to double last name" bug again. On this occasion it is consistent, always happening after you've been knocked out and woken up, which the game handles by killing you and resurrecting you (the message about whether an angel will save you from the netherworld appears on screen, even though I've set survival in advanced options to maximum so I never normally get resurrected and can go straight to loading a savegame). Perhaps that's what triggers the bug elsewhere - does it happen in "Tales of a Sea Hawk" when Danielle attacks you in Rheims' house, for example?

I can't provide a savegame immediately before or log files immediately after the knockout because there are a lot of scenes around that time. The best I can do is a savegame where I'm at Hopital port ready to go to sea, from which you can "Sail To" La Tortue and start the whole sequence.
 

Attachments

  • -=Player=- Hispaniola. Hôpital port. March 12th, 1663.zip
    1.1 MB · Views: 101
Next bug:
Gauthier Thomassin has led the crew to mutiny and one night he knocks you senseless. So senseless that you forget your name and when you wake up you're "o Portugues o Portugues". Yes, it's the old "name changes to double last name" bug again. On this occasion it is consistent, always happening after you've been knocked out and woken up, which the game handles by killing you and resurrecting you (the message about whether an angel will save you from the netherworld appears on screen, even though I've set survival in advanced options to maximum so I never normally get resurrected and can go straight to loading a savegame). Perhaps that's what triggers the bug elsewhere - does it happen in "Tales of a Sea Hawk" when Danielle attacks you in Rheims' house, for example?

Good to know there is at least one place we know it is consistently generated. However I'v just loaded a save at Rheims house on Bonaire (build 14 3.4) got myself clobbered by Danielle but no doubled name. I did happen to me in "Tales of a Seahawk" but pretty early on I think and as it was my first run through didn't think that much just changed the name back when I noticed.
 
In fact I find I do have a saved game but only once it has happened ( the previous save is too far before). Again build 14 3.4
 

Attachments

  • -=Player=- QuickSave.7z
    580.2 KB · Views: 109
Actually not what i said above!! -although seven days earlier that was because I spent them recovering from Blacklock's attentions in Bridgetwon prison - so confirmed it is the revival process that doubles your name in my experience in Tales of a Seahawk too . You don't see that in Danielle's attack anyway.
 
I'll definitely believe it is the resurrecting that does it; that has indeed been the cause in the past.
Normally characters that die and can be resurrected get a new random name.
For the player some exceptions are in place to prevent that, but probably that doesn't quite work right just yet.

I have a vague memory that the "questch" attribute (or something like that) was used as a flag to prevent random name-changing.
 
Testing the latest build 14 3.5 WIP (as at 11th june) I have now tried Jones in free play because I wondered if he would land. I was in Antigua where in the store I stood and got killed for pretending to have a LoM. Guess what saved by an angel (that doesn't seem right for Jones) and became Jones Jones. An easy test case?
 
Uncommented this line in charcterutilite

if (IsMainCharacter(rCharacter)) return; // TIH random name on death fix 7-7-06 // KK

and for six deaths/revivals in a row various lead characters ( Jones, De la croix, McAllister ) all kept their correct names instead of doubling their last. That won't fix that one instance of a non lead character (Jones Jones) being revived (or is he actually a "main" character?) but that may be rare enough not to worry about? That said I don't know why it was commented out (ie what else it might introduce). Nor can I quite see what in the code that is being avoided is producing doubles.

I'll try it on that @Grey Roger example of Bartolomeu (and my Nathanial Hawk in 14 3.4 too) EDIT These two saves keep the correct name now after removing comment on the above line
 
Last edited:
The player should be the only character to ever be resurrected like that.
Probably that same function has a check for quest characters though.
If not, it should be added just in case storylines use deaths as fake ones where the character does return afterwards.
But I don't remember that being an actual problem anymore.
 
Also, the opening post indeed refers to a NOT main character being affected by this.
 
The function is in MAXIMUS unctions and is set true for LAI_TYPE_PLAYER or main character.

So if there are instances where a LAI_TYPE_PLAYER needs a random name via the random name call in Characterutilite the skip will cause problems.

At least we (or is that you? - I'm off for a fortnight) know which bit of code to study and see why /how it can produce doubles.
 
Do you think perhaps this could be the REAL culprit?
Code:
if (CheckAttribute(rCharacter, "old.lastname")) rCharacter.name = rCharacter.old.lastname;
Looks like it should probably be:
Code:
if (CheckAttribute(rCharacter, "old.lastname")) rCharacter.lastname = rCharacter.old.lastname;
I just tested this by letting myself be killed as Davy Jones and I changed to "Jones Jones" before this change but remained "Davy Jones" after this change.
 
Do you think perhaps this could be the REAL culprit?
Code:
if (CheckAttribute(rCharacter, "old.lastname")) rCharacter.name = rCharacter.old.lastname;
Looks like it should probably be:
Code:
if (CheckAttribute(rCharacter, "old.lastname")) rCharacter.lastname = rCharacter.old.lastname;
I just tested this by letting myself be killed as Davy Jones and I changed to "Jones Jones" before this change but remained "Davy Jones" after this change.
Definitely - good spot, :thumbs1 those proof reading skills sure come in handy. I'll have a quick trawl through Bug tracker to see if anything else could take my fancy to look over while I am away.
 
Definitely - good spot, :thumbs1 those proof reading skills sure come in handy. I'll have a quick trawl through Bug tracker to see if anything else could take my fancy to look over while I am away.
I do believe some worshipping is in order there:
:bow :bow :bow
:rofl :razz :rofl

But in all seriousness, thanks a lot for your help! :onya
 
Back
Top