Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't return treasure to Greg in The Man with the Eyepatch quest #420

Closed
DragonSWDev opened this issue Mar 6, 2023 · 15 comments
Closed

Comments

@DragonSWDev
Copy link

I have an issue with The Man with the Eyepatch quest. I have fresh build of OpenGothic (commit b0be111) and Polish version of the Gothic 2 Night of the Raven. After meeting him in front of tavern on the road to Onar farm I went with him to the cave to get first treasure. After killing goblins and digging up treasure I've got moneybag but I'm unable to return it to Greg. He just stands in front of cave and there are no dialog options so I'm unable to progress with this quest any further.

@DragonSWDev
Copy link
Author

DragonSWDev commented Mar 6, 2023

After further investigation I've discovered that I can progress quest by going to sleep. After waking up and going to Greg (he is still waiting in front of cave) I can talk to him and give him back moneybag and progress further with quest. I leave issue as open because this should appear without sleeping.

@Try
Copy link
Owner

Try commented Mar 6, 2023

Hi, @DragonSWDev, thanks for report !

Can you share a *.sav file to help with reproduction?

@DragonSWDev
Copy link
Author

DragonSWDev commented Mar 6, 2023

Sure, I have save that I made after I dug up moneybag. If you require save before that please let me know, I'll do quest again and do save before that.

Aside from that I've found another issue. Still related to Greg so I think I can mention that here as well (if I need to create another issue for that let me know). When I go talk to Dexter after finishing Greg quest, ask him about missing people etc. and kill him Greg should come to help me killing Dexter bandits. But he doesn't. I kill Dexter and bandits don't care and Greg is missing. He is still standing on the way to Onar farm without any dialogue options. Sleeping partially fixes this issue as well. Greg appears in Dexter camp and I can talk with him and progress further but he doesn't attacks bandits and vice versa, they don't care about each other.

Here you have both saves for that. Save for first issue is in the slot 2, save for second issue is in the slot 1.
save_slot.zip

@Try
Copy link
Owner

Try commented Mar 7, 2023

save2
He just stands in front of cave and there are no dialog

In script, there is a check, that player has to be close to cave (Npc_GetDistToWP(self,"NW_BIGFARM_LAKE_CAVE_01") < 1000) and apparently in you play he moved too far after fighting with goblins.
Sleeping fixes this, by practically resetting npc positions.

save1
When I go talk to Dexter after finishing Greg quest, ask him about missing people etc. and kill him Greg should come to help me killing Dexter bandits.

Greg comes, just slooooow:
изображение

Both cases seem to be not an engine bug, but issue with original game scripts.

@DragonSWDev
Copy link
Author

DragonSWDev commented Mar 7, 2023

Ok first issue makes sense I guess. Could be it as I escaped from goblins to get Greg to fight them.

I'm not sure about second issue. In original game Greg was in the place right after dealing with Dexter. Shouldn't he teleport there or something like that? Also what about the fact that he is supposed to fight with bandits but now they don't care about him?

Also I noticed one thing that I should notice earlier - he is missing his hat. It is visible on your screenshot as well.

@Try
Copy link
Owner

Try commented Mar 7, 2023

Shouldn't he teleport there or something like that?

Not quite. Script is program to send Greg to point by walking, instead of teleport+walk.
In original game, however, walking acts like teleport, if npc is unloaded from game-scene. If someone will set view/game-logic distance as large in vanilla - same issue will araise.

@DragonSWDev
Copy link
Author

I see, that explanation makes sense as well. I guess to fix that I would need to reduce draw distance?

So what about the fact that Greg doesn't fight with Dexter bandits?

@Try
Copy link
Owner

Try commented Mar 9, 2023

So what about the fact that Greg doesn't fight with Dexter bandits?

I've tested today, how their script works: 'bandits' in Dexters camp have a neutral altitude by default, so other npc wont attack them.
This changes only if someone will attack those bandits.

I see, that explanation makes sense as well. I guess to fix that I would need to reduce draw distance?

No as simple as that I'm afraid. Engine processes everything by design, and highly optimized at that. Implementing something like "teleport, instead of go-to, when player doesn't see", naturally will cause popping/disheartening and other overall game degradation. So, I'm still sticking to position, that a few NoTR quests are just badly written in first place, can be avoided on player side and not worth to redesign world processing for them

@Try
Copy link
Owner

Try commented Mar 9, 2023

he is missing his hat.

Noted, working on it

@DragonSWDev
Copy link
Author

So, I'm still sticking to position, that a few NoTR quests are just badly written in first place, can be avoided on player side and not worth to redesign world processing for them

You're right, I don't think it's worth redesigning engine for this as well. It can be easily fixed by sleeping and bed is available in Dexter place so it's not like you need to go half of the map to progress quest.

I've tested today, how their script works: 'bandits' in Dexters camp have a neutral altitude by default, so other npc wont attack them.

Then how it's working in the original game where Greg fights with bandits?

@Try
Copy link
Owner

Try commented Mar 15, 2023

Checking hat for now. Captain's suit is multi-material mesh, wit 3 sub-meshes:

skin	@0x21ff9567990	AnimMesh &
	bbox	@0x21ff9567a00	Bounds
	bonesCount	33	size_t
	ibo	@0x21ff95679b0	Tempest::IndexBuffer<unsigned int>
	ibo8	@0x21ff95679d0	Tempest::StorageBuffer
	sub	<3 элемента>	std::vector<AnimMesh::SubMesh, std::allocator<AnimMesh::SubMesh> >
		[0]	@0x21ff9561e50	AnimMesh::SubMesh
			iboOffset	0	size_t
			iboSize	3456	size_t
			material	@0x21ff9561e50	Material
			texName	"PIRAT3.TGA"	std::string
		[1]	@0x21ff9561ec8	AnimMesh::SubMesh
			iboOffset	3456	size_t
			iboSize	192	size_t
			material	@0x21ff9561ec8	Material
			texName	"HUM_BODY_NAKED_V0_C0.TGA"	std::string
		[2]	@0x21ff9561f40	AnimMesh::SubMesh
			iboOffset	3648	size_t
			iboSize	576	size_t
			material	@0x21ff9561f40	Material
			texName	""	std::string
	vbo	@0x21ff9567990	Tempest::VertexBuffer<Resources::VertexA>

Last element has no texture, replacing it to dummy texture makes hat work(sort of):
изображение

Try added a commit that referenced this issue Mar 15, 2023
@Try
Copy link
Owner

Try commented Mar 15, 2023

Fixed hat(uses color from material info now):
изображение

@DragonSWDev
Copy link
Author

It's nice thing that it was fixed, Greg was looking pretty weird without his hat. Thank you for your work.

@Try
Copy link
Owner

Try commented Apr 7, 2023

So what about the fact that Greg doesn't fight with Dexter bandits?
Then how it's working in the original game where Greg fights with bandits?

Checking bandits(again):

In general bandits do not attack player(and others) to begin with, because AIV_EnemyOverride is set to true. This stays until script will override this aivar.
Relevant cases of overrides:

  1. B_Greg_ComesToDexter script
func void B_Greg_ComesToDexter()
{
  ...
  Dexter.aivar[AIV_EnemyOverride] = FALSE; // override
  B_StartOtherRoutine(Greg_NW,"Dexter"); // teleport
  ...
};

This one called, when relevant line in talking to Dexter is selected or when player attacks Dexter.

  1. No dedicated scripts that touch AIV_EnemyOverride for those bandits been spotted.

  2. When npc receives damage, AIV_EnemyOverride gets reset to false - no surprise here.

  3. B_ASSESSFIGHTSOUND callback also reset AIV_EnemyOverride to false
    Callback designed to notify npc, that some fighting is happening around.

After testing vanilla game:
Apparently this behavior is related to B_ASSESSFIGHTSOUND. Taking control of Dexter and moving him away changes Greg-to-bandits interaction:
изображение

Until Greg 'sees' Dexter, and initiate fight.

Try added a commit that referenced this issue Apr 7, 2023
important for Greg-vs-Dexter fight to work closer to original
#420
@Try
Copy link
Owner

Try commented Apr 7, 2023

Turn out B_ASSESSFIGHTSOUND is actually emitted by B_Attack script already.
Only thing missing was a incorrect check for npc to be in same room as emitter. Now notification will be delivered properly, and bandit will become hostile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants