UBOAT
[DEPRECATED] Attack Disc
KvaNTy 1 Sep, 2024 @ 9:33am
Disk Wobbling
Hi. First of all thanks for great mod! I wish we had more such things from past SH games, like Nomograph for example.

Anyway, I've noticed one weird issue with your implementation of Attack Disk. If you spin any disk on any side, you can notice them wobbling from side to side. Which implies they are slightly off-center. Doesn't this bring even more inaccuracy into already imprecise calculations? Plus it is visually kinda distracting.

And if you accept suggestions here are a couple of things that would be appreciated:
  • Disk resizing is a cool feature but now we need a way to reset its size back to default value. Maybe double-clinking or right-click on scaling corner will do the trick?

  • Another thing I've been thinking about for a long time is remembering disk position. I tend to keep it on the left side of the screen where it does not obstruct other controls(between time warp controls and map tools). And basically have to do this every single time I launch the game.

    I understand that for such feature to work you would need somewhere to store current position value when game is closed. Mods like "CourseLine+" and "TimestampedMarkers" do this by creating their respective .txt files in "UBOAT_Game_Folder/ModConfig/". So it appears to be at least possible.

    Though opening disk in its last position, instead of default, atm may bring problems. Currently it is possible to drag disk completely beyond the boundaries of game screen, if you have second monitor. Therefore you won''t be able to bring it back once you can't see dragging-pin any more. The solution might be not letting center of that pin ever cross edges of the screen.
Last edited by KvaNTy; 1 Sep, 2024 @ 9:33am
< >
Showing 1-13 of 13 comments
MrKartoffel  [developer] 1 Sep, 2024 @ 10:16am 
I noticed the woobling to. The only fix for this is to redraw a complete new pair of discs, that are a 100% in center and a 100% round. I don't have any other accurate images of the discs.

If someone could provide me a new set of discs, I'll replace them.

I'll add the scaling reset and the out of screen thing to my todo, those are good changes. I'll have to review the store location functionality.
KvaNTy 1 Sep, 2024 @ 12:56pm 
There is a Solution Solver[www.subsim.com] tool on Subsim that includes Attack/Speed disks. They are quite high-res[i.postimg.cc], at least inner and middle disks. They also have a bit of wobbling, but it is borderline unnoticeable.

Sadly link to sources[www.subsim.com] of that tool is long gone. But since it is based on .Net too, I was able to extract relevant images from executable(with ILSpy[github.com] and ResourceNET[fishcodelib.com]).

So here they are, named same way they were in resources: AD1[i.postimg.cc], AD2[i.postimg.cc], AD3[i.postimg.cc], AD4[i.postimg.cc], AD5[i.postimg.cc], CL1[i.postimg.cc], CL2[i.postimg.cc], CL3[i.postimg.cc], CL4[i.postimg.cc].

I've tried to run outer disks AD1 and CL1 though 1x upscaler, to make them a bit less blurry, but results were too doubtful. At least on ai tools I have access to.

As far as I understand gutted, author of Solver, could not find who made original graphics for the attack disc. But included "Attack Disc Artwork: Hitman?" in the credits. He made some modifications to it, like flipping digits on outer speed disk so they are not upside down. Now to think of it, digits on upper half of bearing disk may use the same treatment, since in this mod those disks are not rotatable anyway.

Well, that's all I could find. Hope it is something one can work with.
Last edited by KvaNTy; 1 Sep, 2024 @ 1:03pm
MrKartoffel  [developer] 9 Sep, 2024 @ 9:00am 
I reviewed disc AD3 or AD2, can't remember. It looks like those aren't a 100% round either in Unity and Photoshop. Maybe I'm doing something wrong.

Can you confirm for me, if those discs are a 100% round?
KvaNTy 10 Sep, 2024 @ 1:07am 
It is hard to eyeball exact edges of disks due to shadow, but I think it is more important to determine its' supposed canter of rotation, so if disk is not perfect at lest numbers end up where they should be. I checked them in Photoshop and considered only pixels that are definitely part of the disk.

I'm not familiar with how rotation is done in Unity. Does it require whole integer pixel image would revolve around, or can it handle odd coordinates? I mean when image have even dimensions, its' center lands not on a single pixel but somewhere in between 4 pixels in the middle. Can it handle that? For now I assume not, that's why when canter would land between two pixels I added 0.5 to the coordinates to denote this.

So here they are:
ID: dimensions of circular part of disk(exact), offsets from image edges(exact), coordinates of center of rotation(calculated).

AD1: dimensions 1006x1006, offsets 9px everywhere, center at 512.5x512.5
AD2: dimensions 775x775, offsets ←125 →124 ↑125 ↓124, center at 513x513
AD3: dimensions 514x515, offsets ←255 →255 ↑254 ↓255, center at 512.5x512
AD4: dimensions 75x75, offsets ←475 →474 ↑474 ↓475, center at 513x512
AD5: dimensions 65x66, offsets ←479 →480 ↑478 ↓480, center at 512x511.5
CL1: dimensions 1006x1006, offsets 9px everywhere, center at 512.5x512.5
CL2: dimensions 813x813, offsets ←105 →106 ↑105 ↓106, center at 512x512
CL3: dimensions 562x562, offsets ←231 →231 ↑231 ↓231, center at 512.5x512.5
CL4: dimensions 134x135, offsets ←446 →444 ↑445 ↓444, center at 513.5x513
Last edited by KvaNTy; 10 Sep, 2024 @ 1:11am
MrKartoffel  [developer] 16 Sep, 2024 @ 12:16pm 
I've set the pivot of the sprites to a normalized value. The X and Y values are now very close to 0.5. For example my course disc:

Width: 873px
Height: 875px
Pivot X: 0.4976973 // 434.4898px
Pivot Y: 0.4998648 // 437.3817

There is a small X in the middle of the discs. I set the pivot to the exact centre of the X. Looks like it's not precise enough.

I'll take a look at your calculations/information. Maybe with your information I can get it in a perfect position.
oobayly 18 Nov, 2024 @ 3:27am 
I decided to have a go at redoing the images for this. So far I've only done the Angriffsscheibbe side and not the rear circular slide rule (I was going to wait for feedback before writing the code to generate the logarithm scales properly). Both sides are done now.

  • It's all vector, apart from the patina texture
  • I've used photos of an original Angriffsscheibbe as well as the images provided by @KvaNTy
  • Everything is centered and all the angle markers have been rotated exactly. For example current AD4 angles aren't accurate. They are now!
  • I've extended the size of the AD3 and AD4 pointers, as per the photos
  • All the pointers for the various plexglass pointers correctly overlay their related scales
  • I've added some basic texturing, but due to the additional detail, they could be slightly harder to read than the current version

I've uploaded them to dropbox here:
Angriffsscheibbe Folder[www.dropbox.com]

The key files are:
  • Angriffsscheibbe.svg - The redrawn SVG
  • Output folder - The 5 AD images, 4 CL images, plus a demo HTML page that simulates the device

Let me know what people think.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3371959221
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3371959527
Last edited by oobayly; 27 Nov, 2024 @ 7:42am
DARKNESS 26 Nov, 2024 @ 12:04pm 
@oobayly - Looks really good, however your dropbox link is not working.

Edit: Figured it out, must be a steam formatting issue..the link is converting the & sign into &amp; Manually editing the link in my web browser fixed it.
Last edited by DARKNESS; 26 Nov, 2024 @ 12:08pm
oobayly 28 Nov, 2024 @ 6:11am 
@DARKNESS - I've fixed the link. The forums was encoding the ampersand no matter what...
DARKNESS 1 Dec, 2024 @ 5:36pm 
@oobayly - The textures look really superb...they are very crisp and very precise. Nice work.:upvoted:

The mod author hasn't been around, would you consider releasing a new/updated mod with your work? Would be a shame to not see it put to good use.
oobayly 3 Dec, 2024 @ 8:22am 
@DARKNESS - I'll have a look into it. I'm a C# coder, but I've never created Unity mod before.
DARKNESS 15 Dec, 2024 @ 9:24pm 
@oobayly - Good news, I know how to make mods. :nerdattack: In the process of rebuilding mod, just about finished with front side. Its looking very nice. Will message back when completed.
DARKNESS 24 Dec, 2024 @ 2:00pm 
Attack Disc is finally completed.

Once again, I have to commend you on your excellent work creating the vector images. I've modified your work by reworking all of the textures since I originally started working on this mod for personal use.

I made sure to preserve the accuracy of the vector images by scaling them correctly when rasterizing them to the game's canvas size. I've placed the pivot points in Unity exactly on center. This disc is extremely precise in game.

Other changes:

-New textures for the disc icon, course lock toggle switch and disc flip toggle textures.

-Edited script to allow for the new CL4 Pointer on the back side of disc.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3391176252

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3391210079


Edit: MrKartoffel gave me permission to continue with his mod and upload a new version to the workshop. Should be up in a day or two.
Last edited by DARKNESS; 27 Dec, 2024 @ 10:56am
oobayly 2 Jan @ 3:58am 
@DARKNESS - That looks superb, well done.
< >
Showing 1-13 of 13 comments
Per page: 1530 50