Transport menu

Discuss coding questions, pull requests, and implementation details.
User avatar
Interkarma
Posts: 2879
Joined: Sun Mar 22, 2015 1:51 am

Re: Transport menu

Post by Interkarma » Sat Aug 26, 2017 11:59 pm

Hazelnut wrote: Okay will do that. Can it debug code run in Unity like Mono can?
Yep, all that and a bag of potato chips. Unity installer can even install Visual Studio Community and Tools for Unity at the same time. If you have the full version of VS, might just need to grab Tools for Unity manually.

Hazelnut wrote: The menu has to disable the different options depending on whether the player has a horse / cart or not. As far as I know DF implements this using an inventory item. Same for cart, and I assume same for ship but I don't have a test save with one of those yet. I know that the cart is working fine in the inventory, don't worry I'm not messing with the inventory. I just added a method so the inventory could be checked to see if it contains an item of a certain type, since the horse / cart could have any ID. Did I miss something obviously easier? I can redo it if needed, but it's working quite nicely.
Sorry that was my misunderstanding. I realised that as I was drinking my morning coffee and waking up properly. :)

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

Re: Transport menu

Post by Interkarma » Sun Aug 27, 2017 12:41 am

Jay_H wrote:
Interkarma wrote:I believe all horses are identical in speed in height, just the sounds and graphics are different between horse and horse with cart. I'm happy to be corrected here if someone has more information.
Give me some time to test this, because I've convinced myself that a horse is faster than a cart. I'll try to bring back an answer ASAP.
Thanks Jay, appreciate your eyes on this. I always thought normal horse was faster as well (and it really should be) but whenever I try to compare in game they feel about the same. Definitely worth a more rigorous approach. :)

User avatar
Jay_H
Posts: 1290
Joined: Tue Aug 25, 2015 1:54 am

Re: Transport menu

Post by Jay_H » Sun Aug 27, 2017 1:36 am

I used the long pool in front of Daggerfall Castle as my testing track. One full length of the pool took:

Cart: 6 seconds
Horse: 4.3 seconds
Foot at 100 speed: 5 seconds

Cart is actually slower than a person at max speed :|

Height values are identical for horse and cart.

Cart and horse merely rely on fixed values, independent of running state or PC speed.

A missing mechanic is stamina loss while riding. In classic, stamina loss on foot is derived from the Running skill.
**INDEFINITE HIATUS** Check out the Daggerfall Unity mod page on ModDB.

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

Re: Transport menu

Post by Interkarma » Sun Aug 27, 2017 2:18 am

Thanks for testing Jay! Stored for later reference. :)

User avatar
Jay_H
Posts: 1290
Joined: Tue Aug 25, 2015 1:54 am

Re: Transport menu

Post by Jay_H » Sun Aug 27, 2017 2:43 am

No problem. And Hazelnut, if you want help testing or researching Daggerfall's mechanics, feel free to post about it. Someone else or I might have some time to do it for you.
**INDEFINITE HIATUS** Check out the Daggerfall Unity mod page on ModDB.

User avatar
Hazelnut
Posts: 562
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut » Sun Aug 27, 2017 9:54 am

Thanks Jay, will do.

EDIT: Stupid crap removed...
Last edited by Hazelnut on Sun Aug 27, 2017 10:46 am, edited 1 time in total.

User avatar
NikitaTheTanner
Posts: 266
Joined: Sun Oct 18, 2015 7:57 pm

Re: Transport menu

Post by NikitaTheTanner » Sun Aug 27, 2017 10:25 am

Can I check if your post above is correct? You say "Cart is slower than a person at full speed" but you list cart as faster than horse. Did you mix them up? So should be Horse 6s, Cart 4.3s?
Not my topic, of course, though I do check it out, but I think that bigger time means lower speed, so that Jay_H said makes total sense :)

User avatar
Hazelnut
Posts: 562
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut » Sun Aug 27, 2017 10:45 am

D'oh - of course. It was early & I just woke up - my Interkarma excuse. :D

User avatar
Hazelnut
Posts: 562
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Transport menu

Post by Hazelnut » Sun Aug 27, 2017 12:41 pm

Okay, I have a problem due to my lack on Unity knowledge.

I've added my new TransportManager script to the PlayerAdvanced prefab, basically following the same template as the WeaponManager so the transport mode can be serialised as part of the player data when the game is saved. When I look at the diff in git, the line adding the component is there, but many other lines are modified as well and I don't know why. I do know that I don't want to commit any unintentional changes. An example:

Code: Select all

-  walkSpeed: 3.5
-  runSpeed: 7
+  walkSpeedOverride: 6
+  useWalkSpeedOverride: 0
+  runSpeedOverride: 11
+  useRunSpeedOverride: 0
+  classicToUnitySpeedUnitRatio: 39.5
It looks to do with changes made in scripts that haven't propagated to the prefab definition committed to master. But I could be completely off base. Would like some guidance. I can manually edit the file to add my component without commiting any other changes, but thought I'd check before doing that blindly.

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

Re: Transport menu

Post by Interkarma » Sun Aug 27, 2017 1:05 pm

Definitely looks like recent changes that haven't propagated to prefab. I'm heading to bed, will fix in morning.

Thanks for letting me know.


Edit: I've updated that prefab in master. I also recreated the receiving branch on my side to call it "transportation" as well. The branch names don't need to be the same for you to send me a PR, but it was a better name anyway. :)

Post Reply