[0.11.2] Guards Vanish At Edge Of Town

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
Teralitha
Posts: 327
Joined: Wed Jul 17, 2019 3:44 pm

[0.11.2] Guards Vanish At Edge Of Town

Post by Teralitha »

So, when Ive got guards chasing me in town, if I run to the edge of town they simply vanish into thin air upon reaching the town border. This did not occur in previous versions of unity, nor in classic. Guards used to chase you well into the wilderness. I can only assume this is a bug in recent version.

User avatar
Interkarma
Posts: 6218
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.2] Guards Vanish At Edge Of Town

Post by Interkarma »

This is intentional and does in fact match classic. It was added back in 0.10.27. The only difference is that DFU's town borders are a little tighter for this check and guards might despawn sooner. Other than needing to lead them a bit farther into the wilderness in classic, the despawn behaviour is the same. Any active crime state is also cleared when player leaves town area.

User avatar
Teralitha
Posts: 327
Joined: Wed Jul 17, 2019 3:44 pm

Re: [0.11.2] Guards Vanish At Edge Of Town

Post by Teralitha »

More than "a little" tighter. Here is a little video I made showing the difference between classic and unity, I think you would agree it is a bit silly - https://www.youtube.com/watch?v=gasYqzoVcC8

Why did you change it anyway? To improve performance?

User avatar
Interkarma
Posts: 6218
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.11.2] Guards Vanish At Edge Of Town

Post by Interkarma »

This wasn't "changed" as such - these two games are totally different implementations with different codebases on different engines. Daggerfall Unity is not a source port, it's an entirely new code base created from the ground up, which means sometimes things behave differently and have unique requirements under the hood. In this instance, the way location rects are manged have tighter boundaries in DFU due to its unique implementation.

I'm happy to look into extending the distance guards will follow player outside of town before despawning, but it's possibly not a trivial alteration.

Edit: What I can do trivially is extend the "player in location" rect check in virtual coordinate space by 4096 units (a full RMB width). This will match classic when determining town border for player and not affect anything else critical in world, such as town injection over terrain. I'll roll this into next release. Guards will then pursue player farther into the wilderness before despawning.

User avatar
Teralitha
Posts: 327
Joined: Wed Jul 17, 2019 3:44 pm

Re: [0.11.2] Guards Vanish At Edge Of Town

Post by Teralitha »

Awesome, thank you.

Post Reply