• 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 Eliz Shaw Sidequest: After being shot by Davy, HP set to 1/1

SirDuke

Landlubber
Hello Everybody!
I´ve just finished the Elizabeth Shaw quest.
A few minutes later, I suddenly realized that my char is running aroung with only 1 HP?
After going back two or three savegames I found my problem.
It happens during the scene change into the Tavernroom.
I checked my compile log, but nothing strange was found.
Error logs were not created.
I have no idea why this happend to me, or if it could hit someone else...
But I found a way around it.
I stroke out these lines in the quest code:


case "davyhurtme":
bSuppressResurrection = true;
LAi_SetStayType(CharacterFromID("Davy Jones"));
===> //Lai_KillCharacter(pchar);
LAi_QuestDelay("preroomcayman", 3.0);
LAi_QuestDelay("goroomcayman", 6.0);
break;

case "preroomcayman":
ChangeCharacterAddress(characterFromID("Davy Jones"), "none", "");
break;

case "goroomcayman":
DoQuestReloadToLocation("Grand_Cayman_Tavern_upstairs", "goto", "goto4", "_");
locations[FindLocation("Grand_Cayman_Tavern_upstairs")].reload.l1.disable = 1;
LAi_SetPlayerType(pchar);
===> //LAi_SetHP(pchar, LAi_GetCharacterHP(pchar), LAi_GetCharacterHP(pchar));
ChangeCharacterAddressGroup(CharacterFromID("Elizabeth Shaw"), "Grand_Cayman_Tavern_upstairs", "goto", "goto7");
Characters[GetCharacterIndex("Elizabeth Shaw")].dialog.CurrentNode = "begin_4";
LAi_SetActorType(characterfromID("Elizabeth Shaw"));
LAi_ActorDialog(characterfromID("Elizabeth Shaw"), PChar, "", 0.5, 10);
bSuppressResurrection = false;
break;

It loses some immersion, but that´s all.

So theres no longer a problem for me,

but if someone more experienced could check these lines?
Maybe it could happen again to someone else.
I have a savegame right before it, too.
But sadly I can´t attach files here (don´t know why)

Thanks and goodbye!
 
I think this is meant to happen :yes

You were shot by Davy Jones - and nearly killed that is why you have only 1 Hp left - you can recover slowly or take a medicine. :read


Save files can only be attached if they are archived/zipped - the forum will only accept them in these formats. :shrug


:cheers
 
Does sleeping in a Tavern room not set your HP back to max?
As long as your maximum HP isn't also set to 1, at least there's nothing badly wrong.
 
Yes, I mean 1/1 HP
The new hardcore mode :woot

Imgur: The most awesome images on the Internet

stroking both lines helped

//Lai_KillCharacter(pchar);
//LAi_SetHP(pchar, LAi_GetCharacterHP(pchar), LAi_GetCharacterHP(pchar));

More interesting is; why can´t I upload a file here?
Forum board ALWAYS answers with "there was a problem" :modding

***EDIT***
Yeah! Can now upload data files to the board!
There is a checkbox in the profile "preferences" called: "Use the Flash-based uploader to upload attachments"
Had to uncheck the box xD
 

Attachments

  • 1HP.jpg
    1HP.jpg
    1.3 MB · Views: 363
Last edited:
Do you have a savegame just prior to you being "killed"?

Indeed 1/1 HP is pretty bad and definitely not meant to happen! :shock
 
@SirDuke: For some reason, that LAi_SetHP function call takes your CURRENT HP and sets both your current AND your maximum value to that.
But since you've just been "killed", you get set to "1/1".

I don't think that is meant to happen at all!
It was probably intended to heal you. Several ways of doing that instead:
Code:
ResetHP(pchar); // PB: was LAi_SetHP(pchar, LAi_GetCharacterHP(pchar), LAi_GetCharacterHP(pchar));
Or:
Code:
LAi_SetHP(pchar, LAi_GetCharacterMaxHP(pchar), LAi_GetCharacterMaxHP(pchar));
Or:
Code:
LAi_SetCurHP(pchar, LAi_GetCharacterMaxHP(pchar));

I think I like that last one, because it doesn't do anything extra other than set your current HP to your maximum value.
 
A savegame?
Here you are.
I saved right AFTER the fight against Davy´s Crewmen.
I just sent them all to hell!
But be warned...
If you reload the save, his cursed crew will be spawend again...
...and if you save and reload; they will be spawned again, and again... :shock
Damn this cursed crewmen! :mad:
 

Attachments

  • -=Sir Duke=- Cayman.rar
    876.7 KB · Views: 304
Thanks. If you can, please try the fix I propose above.
If you can confirm it works, it saves me the trouble of double-checking. :cheeky
 
Yep!
It worked.
Got shot, fell down, faded and woke up with full HP.

You should consider changing the code. for your next update.

***EDIT***
For everyone having the same issue:
Search your game files for "quests_side.c" You can open it with simple notepad.
Search the file for "davyhurtme"
And then replace the old
LAi_SetHP(pchar, LAi_GetCharacterHP(pchar), LAi_GetCharacterHP(pchar));
with the new
LAi_SetCurHP(pchar, LAi_GetCharacterMaxHP(pchar));
 
Last edited:
You should consider changing the code. for your next update.
Already done on my end. Just need to actually make the update.
I was planning on doing that later today as it has been a month and there are a fair few good updates again.
 
Why did I suddenly defense to 1?
I opened the menu by pressing F2 and next to the heart's written 1. If before it was written 114 as never dropped up to 1?
 
ok..
1 no longer it moves.
It is by so much that does not change at least up to 2
 

Attachments

  • screen.jpg
    screen.jpg
    406.3 KB · Views: 313
Hello.

I'm playing Build 14 Beta 4.
I was on ventures of doing this Side Quest, when a problem occured. I got to part, where I take daughter back to governor and I'm asked to deter puny forces of David Jones. All is splendid until the part he shoots me. I wake up in tavern room with 1/1 HP.

This is the part of quest it happens at, taken from quests_side.c (my guess, not a programmer):
Code:
case "goroomcayman":
            DoQuestReloadToLocation("Grand_Cayman_Tavern_upstairs", "goto", "goto4", "_");
            locations[FindLocation("Grand_Cayman_Tavern_upstairs")].reload.l1.disable = 1;
            LAi_SetPlayerType(pchar);
            LAi_SetHP(pchar, LAi_GetCharacterHP(pchar), LAi_GetCharacterHP(pchar));
            ChangeCharacterAddressGroup(CharacterFromID("Elizabeth Shaw"), "Grand_Cayman_Tavern_upstairs", "goto", "goto7");
            Characters[GetCharacterIndex("Elizabeth Shaw")].dialog.CurrentNode = "begin_4";
            LAi_SetActorType(characterfromID("Elizabeth Shaw"));
            LAi_ActorDialog(characterfromID("Elizabeth Shaw"), PChar, "", 0.5, 10);
            bSuppressResurrection = false;
        break;
Another part is from LAi_character.c for setting toon HP, but I'll skip it for the length of the post.
I'm also attaching a save file, where you have to go out of townhall and reach port.
If I'm missing something or you need additional information, please say so.

Cheers.
 

Attachments

  • -=Player=- Cayman.7z
    753.3 KB · Views: 290
Thank you for a quick reply!
I'm just trying to think back why I went through bugtracker posts to check for duplicate problem, when it was actually in archives, instead of using search.
Nevertheless, thank you a lot. And most of all, keep the good work up! I've been lurking and enjoying your fruits of work since Build 13.

Cheers.
 
Back
Top