SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=219)
-   -   [REL] first/third-person-view cameras mod v1.0 (https://www.subsim.com/radioroom/showthread.php?t=120160)

DirtyHarry3033 08-12-07 08:33 PM

Quote:

Originally Posted by lba
<...>I hope I got that right. And remember I'm shooting blind so if anyone sees a problem with the keys I chose say the word. :up:

lba, if you're learning (and looks like you are!) then that's great! But keep in mind, with the keys I mapped you can still scroll the map. Like I said I never tried that, since I always clicked-dragged to move the map, but after reading your last post I tried it and yep, the cursor keys didn't move the map at all.

But the keypad keys did, as follows:

KP4 = Left
KP6 = Right
KP9 = Up
KP3 = Down

It's a matter of preference I guess, what keys you want to push to get something to happen. But that's neither "here nor there", you've learned how to start hacking SH4 files! Hopefully you'll keep it up and will be releasing a kick-*ss mod in a few month :up:

Can't speak for whether the keys you've chosen are already in use or not, I use near-100% voice recog to control SH4 so I pretty much don't have a clue about the keys. But I will tell you this, if the "SH4 Keyboard Configurator" you mentioned is the SH3 SetKeys program, and you directly edited your Commands.cfg with it, don't be suprised if your Gramophone and Radio buttons don't work anymore. SH3 SetKeys breaks a few things in SH4, and those two I know about for sure...

DH

lba 08-12-07 08:40 PM

[QUOTE=DirtyHarry3033]
Quote:

Originally Posted by lba
If you really want to use the plotting map with the keyboard, you can do so using the KP4, KP6, KP9 and KP3.

Ah yes, but you see I don’t really have a numeric/key pad. I prefer a minimal keyboard so I use a cordless desktop for notebooks, and the numeric/key pad is separate, turned off and packed away.

DirtyHarry3033 08-12-07 09:01 PM

Understood!!!

That's more of my stupidness, I don't have a laptop or use one, or even want one so I guess it's hard for me to picture anyone else using one (especially for gaming) But if you're playing on a laptop then I guess making another map is the only way to go here. Keypad is obviously out of the question!

DH

lba 08-12-07 09:18 PM

First:
Quote:

Originally Posted by DirtyHarry3033
But I will tell you this, if the "SH4 Keyboard Configurator" you mentioned is the SH3 SetKeys program, and you directly edited your Commands.cfg with it, don't be suprised if your Gramophone and Radio buttons don't work anymore. SH3 SetKeys breaks a few things in SH4, and those two I know about for sure...

The program created a new commands.cfg in an output folder. I had already realized those values wouldn't be correct, bad methods on my end, but at least it gave me the format and correct key addresses. I then copy/pasted each value to my real commands.cfg in my mod_fix jsgme_folder and then corrected the wrong values. Both my on screen radio and pull down pacific map(gramophone) buttons work. And in case I did break something, well I don't even know if it is possible to turn them on using the keyboard so at least it's not a feature I'm going to miss. I also looked at the quick reference card that came with the game and the keys r-f-g-h were dark gray so hopefully this will continue to work smoothly.

Quote:

Originally Posted by DirtyHarry3033
lba, if you're learning (and looks like you are!) then that's great! But keep in mind, with the keys I mapped you can still scroll the map. Like I said I never tried that, since I always clicked-dragged to move the map, but after reading your last post I tried it and yep, the cursor keys didn't move the map at all.
But the keypad keys did, as follows:

<..>

I've walked this plank as a land lubber many times before, so while learning how to balance my sea legs I intend to break my game and reinstall it many times. Whether there will be a treasure I don't know yet. I like that there are so many active modders here. I find myself adding and/or updating a few mods every time I'm in port. As I head out for my mission I'm jumping of joy to experience the new mods, then as I head home again I'm jumping of joy to get back here and check out the new mods, and in the meantime I get to blow stuff up. This is living. :|\\

Quote:

Originally Posted by DirtyHarry3033
Can't speak for whether the keys you've chosen are already in use or not, I use near-100% voice recog to control SH4 so I pretty much don't have a clue about the keys.

I really should. I want to, but I don't have a microphone and I'm too busy playing and not getting fired at work to go buy me one. :damn:

Torpex752 08-12-07 10:21 PM

Excellent Mod! I love this! :up:

Reaves 08-12-07 10:26 PM

Works nicely, I really like the new external view panning. A lot more freedom in it.

:up:

sergbuto 08-14-07 08:16 AM

Quote:

Originally Posted by DirtyHarry3033
Like a couple other guys, I've had problems with very jerky views when using mouse to look around in the F5 view, and also with the camera acting like you're doing a "loop" in a plane when moving forward/backward with the arrow keys.

Well I've found "fixes" for both of these issues. They work for me anyway, YMMV.

The "looping" effect is apparently caused because the default F5 view used the arrow keys to rotate left/right and look up/down. In the modded F5 view, they are now used to move around, i.e. forward/back/left/right.

But for some reason (on my system anyway) they are still rotating the view as well. Not sure why, looks like Sergbuto took out the x-y axis rotation in Cameras.dat for the F5 camera. :hmm: At any rate, in addition to doing the new function of changing the camera position, they are also still rotating the camera as was originally done.

Anyway, I fixed this by editing Commands.cfg. The following commands rotate the camera up/down/left/right, and are bound to the arrow keys:

[Cmd80] Name=To_left
[Cmd81] Name=To_left_fast
[Cmd82] Name=To_left_slow
[Cmd83] Name=To_right
[Cmd84] Name=To_right_fast
[Cmd85] Name=To_right_slow
[Cmd86] Name=To_up
[Cmd87] Name=To_up_fast
[Cmd88] Name=To_up_slow
[Cmd89] Name=To_down
[Cmd90] Name=To_down_fast
[Cmd91] Name=To_down_slow

I originally tried just commenting out the keymapping, but that also kills ability to rotate with mouse. So I rebound them to KP4 and KP6 for left-right, and KP3 and KP9 for up-down.

For each command, comment out the Key0= line which is the one bound to arrow keys and replace it with the appropriate KP binding. I'm listing them below, with a comment after each as to whether it's normal, fast or slow speed. Copy to the appropriate command, i.e. copy Key0=0x64,Rsn,"" to the command To_left_fast.

Left:

Key0=0x64,Rn,"" (Normal)
Key0=0x64,Rsn,"" (Fast)
Key0=0x64,Rcn,"" (Slow)

Right:

Key0=0x66,Rn,"" (Normal)
Key0=0x66,Rsn,"" (Fast)
Key0=0x66,Rcn,"" (Slow)

Up:

Key0=0x69,Rn,"" (Normal)
Key0=0x69,Rsn,"" (Fast)
Key0=0x69,Rcn,"" (Slow)

Down:

Key0=0x63,Rn,"" (Normal)
Key0=0x63,Rsn,"" (Fast)
Key0=0x63,Rcn,"" (Slow)

Goes without saying, make a backup of Commands.cfg before you do this!

This completely fixed the problem of the camera rotating when moving, on my system. I can now move forward/back/left/right and the camera doesn't rotate at all.


OK, the problem of the "jerky" mouse views I fixed by editing Cameras.dat. I used skwasjer's awesome Silent 3ditor for this. Maybe you could also use SH3 MiniTweaker, I didn't try so I can't say...

Naturally, back up your Cameras.dat before you start!

Run Silent 3ditor and load C:\Program Files\Ubisoft\Silent Hunter Wolves of the Pacific\Data\Library\Cameras.dat.

Open the node "_Dummy_Cam_ConningDeck", then open "FreeMove" under that node. Click "Properties". In the right-hand pane, expand the "FreeMove" branch if it's not already expanded.

You want to change 3 values. The original values are:

RotationSpeed=120
RotationInertia=0.05
RotationRun=2

Change all 3 of these values to 0:

RotationSpeed=0
RotationInertia=0
RotationRun=0

and save the file. This totally eliminated the "jerky" mouse movements on my system :up: I can look around with the mouse and it's as smooth as it was before the mod!

Hope this info is useful to someone! :yep:

DH

Glad, you worked it out.

Vlad34 09-01-07 12:25 PM

Quote:

Originally Posted by DirtyHarry3033
Like a couple other guys, I've had problems with very jerky views when using mouse to look around in the F5 view, and also with the camera acting like you're doing a "loop" in a plane when moving forward/backward with the arrow keys.

Well I've found "fixes" for both of these issues. They work for me anyway, YMMV.

The "looping" effect is apparently caused because the default F5 view used the arrow keys to rotate left/right and look up/down. In the modded F5 view, they are now used to move around, i.e. forward/back/left/right.

But for some reason (on my system anyway) they are still rotating the view as well. Not sure why, looks like Sergbuto took out the x-y axis rotation in Cameras.dat for the F5 camera. :hmm: At any rate, in addition to doing the new function of changing the camera position, they are also still rotating the camera as was originally done.

Anyway, I fixed this by editing Commands.cfg. The following commands rotate the camera up/down/left/right, and are bound to the arrow keys:

[Cmd80] Name=To_left
[Cmd81] Name=To_left_fast
[Cmd82] Name=To_left_slow
[Cmd83] Name=To_right
[Cmd84] Name=To_right_fast
[Cmd85] Name=To_right_slow
[Cmd86] Name=To_up
[Cmd87] Name=To_up_fast
[Cmd88] Name=To_up_slow
[Cmd89] Name=To_down
[Cmd90] Name=To_down_fast
[Cmd91] Name=To_down_slow

I originally tried just commenting out the keymapping, but that also kills ability to rotate with mouse. So I rebound them to KP4 and KP6 for left-right, and KP3 and KP9 for up-down.

For each command, comment out the Key0= line which is the one bound to arrow keys and replace it with the appropriate KP binding. I'm listing them below, with a comment after each as to whether it's normal, fast or slow speed. Copy to the appropriate command, i.e. copy Key0=0x64,Rsn,"" to the command To_left_fast.

Left:

Key0=0x64,Rn,"" (Normal)
Key0=0x64,Rsn,"" (Fast)
Key0=0x64,Rcn,"" (Slow)

Right:

Key0=0x66,Rn,"" (Normal)
Key0=0x66,Rsn,"" (Fast)
Key0=0x66,Rcn,"" (Slow)

Up:

Key0=0x69,Rn,"" (Normal)
Key0=0x69,Rsn,"" (Fast)
Key0=0x69,Rcn,"" (Slow)

Down:

Key0=0x63,Rn,"" (Normal)
Key0=0x63,Rsn,"" (Fast)
Key0=0x63,Rcn,"" (Slow)

Goes without saying, make a backup of Commands.cfg before you do this!

This completely fixed the problem of the camera rotating when moving, on my system. I can now move forward/back/left/right and the camera doesn't rotate at all.


OK, the problem of the "jerky" mouse views I fixed by editing Cameras.dat. I used skwasjer's awesome Silent 3ditor for this. Maybe you could also use SH3 MiniTweaker, I didn't try so I can't say...

Naturally, back up your Cameras.dat before you start!

Run Silent 3ditor and load C:\Program Files\Ubisoft\Silent Hunter Wolves of the Pacific\Data\Library\Cameras.dat.

Open the node "_Dummy_Cam_ConningDeck", then open "FreeMove" under that node. Click "Properties". In the right-hand pane, expand the "FreeMove" branch if it's not already expanded.

You want to change 3 values. The original values are:

RotationSpeed=120
RotationInertia=0.05
RotationRun=2

Change all 3 of these values to 0:

RotationSpeed=0
RotationInertia=0
RotationRun=0

and save the file. This totally eliminated the "jerky" mouse movements on my system :up: I can look around with the mouse and it's as smooth as it was before the mod!

Hope this info is useful to someone! :yep:

DH


Thank you! This completely fixed it, I appreciate your time in getting this ironed out because this is really an incredible mod and really didn't want to pass on it. So, to you sir....I owe you a round!:up:

DirtyHarry3033 09-01-07 01:23 PM

Vlad34, turns out there are some problems with the Commands.cfg changes I made. Like LBA mentioned, arrow keys no longer scroll the map. Also turns out that arrow keys will no longer control deck gun elevation.

I've been looking at this after reading this thread yesterday:

http://www.subsim.com/radioroom/showthread.php?t=121412

and finally found out this morning what was causing the problem to begin with.

Turns out that I had a "Copy of Cameras.dat" in my Data\Library folder that was made before I put Sergbuto's mod on. It was either put there by MiniTweaker, or I made a backup copy before looking at Cameras.dat.

Either way, it was conflicting with the modded Cameras.dat. Seems SH4 will load any and all files it finds with "Cameras.dat" anywhere in the name. So it loaded Sergbuto's file with the cool freemove stuff, then loaded the old copy which still had the axis rotation stuff for the arrow keys from the un-modded conning deck camera. Basically it combined the new function of moving around the deck with arrow keys, with the old function of looking up/down/left/right with the arrow keys so that both happen when you press an arrow key - at least if I understand what's going on here ;)

I think there was also a "conflict" in the 2 different Cameras.dat's that was causing the "shakiness" when panning with the mouse.

I fixed it like this: 1st I took out all the changes I made to Commands.cfg mentioned in my earlier post. 2nd I put back the original Cameras.dat from Sergbuto's mod. 3rd I deleted the "Copy of Cameras.dat" from Data\Library folder.

After doing that, the camera no longer rotates at all when using arrow keys, and the "shakiness" is gone when panning with mouse. Though the pan speed seems a little too fast to me.

Vlad, check your Data\Library folder, if there are any copies of Cameras.dat in there, delete it/them, undo changes to Commands.cfg and reinstall Sergbuto's original mod. Should work perfect then, and you won't lose any functions of the arrow keys!

DH

sergbuto 09-04-07 08:30 AM

The interference problem of two copies of the file is known from SH3 times. The brief installation intsructions in post #39 of this thread point out to the necessity of removal of existing Camera.dat from the Library folder before installing the mod. But maybe these instruction are not clear enough in emphasizing the problem.

kriller2 09-04-07 09:15 AM

Hi Sergbuto,

I have a comment from one of the users, we are testing this mod together with me and LeoVampires upcoming "Visual upgrade mod" http://www.subsim.com/radioroom/showthread.php?t=121226, I don't know if anything can be done about it though, but my skills lacks to fix this problem:
"With the bridge camera, if I move to the left or right quickly, then stop, the camera 'jerks' back in the opposite direction. (Like when a bus comes to a stop, and people standing feel like they're falling backward)."

When will you japanese subs mod be released ? :cool:

/Kriller2

sergbuto 09-04-07 10:05 AM

Quote:

Originally Posted by kriller2
Hi Sergbuto,

I have a comment from one of the users, we are testing this mod together with me and LeoVampires upcoming "Visual upgrade mod" http://www.subsim.com/radioroom/showthread.php?t=121226, I don't know if anything can be done about it though, but my skills lacks to fix this problem:
"With the bridge camera, if I move to the left or right quickly, then stop, the camera 'jerks' back in the opposite direction. (Like when a bus comes to a stop, and people standing feel like they're falling backward)."

I'll take a look since I work (when time permits) on the second version with free-walk interior-cameras and some other fixes.

Quote:

Originally Posted by kriller2
When will you japanese subs mod be released ? :cool:

The progress is slow due to RL time-constrains.

leovampire 09-04-07 05:10 PM

My only question is
 
Can celestial objects like the sun and moon be made to show up the same size in the Bridge to fallow ship or sub view to free cam view? Each of the outside of sub views shows the sun and moon at differn't sizes. Without zooming in on anything or with anything.

WilhelmTell 09-04-07 05:23 PM

Quote:

Originally Posted by leovampire
Can celestial objects like the sun and moon be made to show up the same size in the Bridge to fallow ship or sub view to free cam view? Each of the outside of sub views shows the sun and moon at differn't sizes. Without zooming in on anything or with anything.

Just an idea: Have you tried to set the AngularAngle for both, the FreeCamera and the ConningDeck, to the same value in the cameras.dat ?

leovampire 09-04-07 05:33 PM

I will be honest with you WilhelmTell
 
I havn't the foggiest on how to do anything with that camera work. I tryed once to make a few changes and screwed it up and had to just apply other people's camera mod.

I have no basic knowledge of camera stuff so would have to learn it all and at the moment with the work I am doing for mod's just not ready to try and learn yet.

So I am asking the comunity for help with it because it actualy makes a difference on how the reflection effect's Mod I am makeing works. With no consistancy with the differn't outside views it is hard to get everything set and working properly.

DirtyHarry3033 09-04-07 10:10 PM

Quote:

Originally Posted by sergbuto
The interference problem of two copies of the file is known from SH3 times. The brief installation intsructions in post #39 of this thread point out to the necessity of removal of existing Camera.dat from the Library folder before installing the mod. But maybe these instruction are not clear enough in emphasizing the problem.

Actually, there's no need at all to delete "Cameras.dat" before installing. Whether using JSGME or simply copying the modded Cameras.dat in with Windows Explorer, the old one will be totally blown away and replaced with the modded one. No probs or conflicts at all there :yep:

Where the problem comes in is if you do something stupid like I did, and run MiniTweaker, and end up with "Copy of Cameras.dat" in the folder, and forget about it, and don't delete it :oops: And then a month later you install a modded Cameras.dat and have all kinds of problems since there are 2 different versions of the same file, with different names...

I've decided that for whatever reason, SH4 (SH3 also?) will read any file it finds ending in ".dat" (possibly any other valid extension also?) no matter what the name, and load whatever data it finds there. If it's already loaded a node, it won't load it a 2nd time, but if it finds a node not in the 1st file it loaded, it will add it to what it already has loaded. In effect, merging the contents of 2 different .dat files.

Don't think the name has anything to do with this, I think I could have renamed "Cameras.dat" to "Arsewipe.dat" before installing your mod and "Arsewipe" still would have loaded - except in that case I'm thinking the mod wouldn't have worked at all as "Arsewipe" would have been loaded 1st, and since it already contained all the nodes in your modded Cameras.dat, none of your mods would have been loaded.

As it is, your modded .dat file was missing the AxisRotation data, and since "Copy of Cameras.dat" was loaded after your modded Cameras.dat, and did contain AxisRotation data, that data was loaded and added to the changes you made. Hence the problem I had of not only "walking the deck" but also having the camera rotate up/down/left/right...

Well I learned something at least. Not sure I understand the reasoning behind it, I've been writing code for 25 years and if I'm looking for data that should be found in a file named "Cameras.dat" I sure as hell won't be trying to read it from a file named "Tiddlywinks.dat" (or even one called "Camera.dat" for that matter)

Forgive my "rant" :doh: Just not sure what the devs were thinking when they decided to read any "valid-appearing" data from any file no matter what the name. Maybe I'm just behind the times :hmm:

DH

[edit] Actually, assuming I'd renamed "Cameras.dat" to "Arsewipe.dat" before installing your mod, the results would have turned out the same. SH4 would have loaded the original data for Conning Deck cam from "Arsewipe", then read the modded "Cameras.dat" and loaded the FreeMove data you added. Again, combining 2 functions on cursor keys, both movement and camera rotation.

leovampire 09-05-07 05:19 PM

thank you very much for your help sergbuto
 
Thanks to your advice I was able to get all the sun and moon views set to appear the same size between free cam's follow cam's and Bridge cam's and the list goes on.

Without this knowledge I never would have gotten everything to look right so you really did me a big favor!

And for the guys using the sexton mod from Mav87 I set all the camera working's to match the Bridge cam view so there would be no confilcts with that mod.

With all angularangle views set to 75 degree's in the camera parameters/property settings it fixed it all. Of course you leave the zoom's alone but the normal TBD and Binoc's and Basic Scope views all set to this angle it works out perfect.

Thought I would post the results and settings for anyone doing camera mod's

I used the S3D editor for this BTW

Only for camera view's dealing with looking outside of the sub have no clue about inside view's.

Free cam Fallow cam Bridge cam

http://static1.filefront.com/images/...l.thumb250.jpghttp://static1.filefront.com/images/...b.thumb250.jpghttp://static1.filefront.com/images/...c.thumb250.jpg

ref 09-05-07 06:14 PM

Quote:

Originally Posted by DirtyHarry3033
Well I learned something at least. Not sure I understand the reasoning behind it, I've been writing code for 25 years and if I'm looking for data that should be found in a file named "Cameras.dat" I sure as hell won't be trying to read it from a file named "Tiddlywinks.dat" (or even one called "Camera.dat" for that matter)

The main reason for that I think is to have more flexibility, when SH3/4 loads it indexes all root nodes in the library directory, thus making possible to reference any object without having to know it's exact location, the drawback is what you mentioned, but it is easelly avoided taking minimal precautions. It would have been nice if the Devs mentioned it... It could have avoided a lot of headackes.

Ref

DirtyHarry3033 09-05-07 06:48 PM

Quote:

Originally Posted by ref
The main reason for that I think is to have more flexibility, when SH3/4 loads it indexes all root nodes in the library directory, thus making possible to reference any object without having to know it's exact location, the drawback is what you mentioned, but it is easelly avoided taking minimal precautions. It would have been nice if the Devs mentioned it... It could have avoided a lot of headackes.

Ref

Hmm, OK I can see that. Say at some point they want to add "Diveplanes.dat" with every conceivable data regarding diveplanes, so they actually work instead of being just eye-candy. All they have to do is write a few hundred lines of code to handle all the data and they can skip the dozen or so lines needed to open the exact filename "Diveplanes.dat", read the contents then close it. Just read every file ending in .dat in the library folder with one block of code, no matter if it contains duplicate or conflicting data, and it becomes a bit simpler to add new nodes.

My prob I guess is I do business programming, the only place I should read info on open orders is for instance, "Orders.dat". Accounts Payable info should be read only from "Payables.dat" and so on.

All hell would break loose if I read payables data from any file that had payables data in it, for instance "Copy of Payables.dat" that I made 6 months ago when testing some changes ;) Guess my mindset just isn't right for working with games :roll:

So it was my bad!!! :rotfl::rotfl::rotfl:I've learned something, and any day you learn something is a good day, right? :up:

DH

ref 09-05-07 09:26 PM

Quote:

Originally Posted by DirtyHarry3033
Quote:

Originally Posted by ref
The main reason for that I think is to have more flexibility, when SH3/4 loads it indexes all root nodes in the library directory, thus making possible to reference any object without having to know it's exact location, the drawback is what you mentioned, but it is easelly avoided taking minimal precautions. It would have been nice if the Devs mentioned it... It could have avoided a lot of headackes.

Ref

Hmm, OK I can see that. Say at some point they want to add "Diveplanes.dat" with every conceivable data regarding diveplanes, so they actually work instead of being just eye-candy. All they have to do is write a few hundred lines of code to handle all the data and they can skip the dozen or so lines needed to open the exact filename "Diveplanes.dat", read the contents then close it. Just read every file ending in .dat in the library folder with one block of code, no matter if it contains duplicate or conflicting data, and it becomes a bit simpler to add new nodes.

My prob I guess is I do business programming, the only place I should read info on open orders is for instance, "Orders.dat". Accounts Payable info should be read only from "Payables.dat" and so on.

All hell would break loose if I read payables data from any file that had payables data in it, for instance "Copy of Payables.dat" that I made 6 months ago when testing some changes ;) Guess my mindset just isn't right for working with games :roll:

So it was my bad!!! :rotfl::rotfl::rotfl:I've learned something, and any day you learn something is a good day, right? :up:

DH

Please understand that I don't disagree completelly with your point of view, but if the devs had made the engine so rigid, then more than half of the mods made for the sim would have been imposible to achieve without changes to the source code.
Ie, if I want to make a new set of diveplanes, then I would have to include them in diveplanes.dat, making very difficult to make compatible mods, instead with their approach I can made my new diveplanes and put them into Ref_diveplanes.dat and distribute this file with my mod making it compatible with any other existing diveplane mods.

Ref


All times are GMT -5. The time now is 02:14 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.