SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Current crop of subsims & naval games > COLD WATERS > Mods Workshop for Cold Waters
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-09-24, 04:35 PM   #1
Laines
Bilge Rat
 
Join Date: Jun 2022
Posts: 1
Downloads: 7
Uploads: 0
Default Circle Range Marks Alignment in DotMod + Help with HUD needed

If someone (like me) is being constantly irritated and confused with misaligned range marks in DotMod, then I hope they will find this post helpful.

Marks are drawn in gui code and therefore one has to edit assembly to change their relative positions. For this you will need the latest version of dnSpy and some basic coding knowledge. I myself am not a proficient coder, so unfortunately I can't create a simple patch of sorts.

Method that redraws (best guess at what it does) the marks is located at:
Assembly-CSharp.dll/GUI_Additions/RecalculateCircleZoomReadouts()

There you can find lots of branches that choose offsets based on resolution index. The one I found that works for my resolution (2560x1440) is right after switch-case. The first argument of Vector3 is what you want to change to align marks to your liking. Positive values move mark to the right and negative to the left.

Here's a snippet of what my values look like
Code:
...
	if (num != 6)
	{
		switch(num)
		...
		GUI_Additions.circlesZoomRight1_Object.transform.localPosition = new Vector3(130f / hudsize, -30f, 0f);
		GUI_Additions.circlesZoomRight2_Object.transform.localPosition = new Vector3(285f / hudsize, -30f, 0f);
		GUI_Additions.circlesZoomRight3_Object.transform.localPosition = new Vector3(440f / hudsize, -30f, 0f);
		GUI_Additions.circlesZoomRight4_Object.transform.localPosition = new Vector3(595f / hudsize, -30f, 0f);
		GUI_Additions.circlesZoomLeft1_Object.transform.localPosition = new Vector3(-175f / hudsize, -30f, 0f);
		GUI_Additions.circlesZoomLeft2_Object.transform.localPosition = new Vector3(-330f / hudsize, -30f, 0f);
		GUI_Additions.circlesZoomLeft3_Object.transform.localPosition = new Vector3(-485f / hudsize, -30f, 0f);
		GUI_Additions.circlesZoomLeft4_Object.transform.localPosition = new Vector3(-640f / hudsize, -30f, 0f);
	}
	return;
...
And how it looks in the game
https://photos.app.goo.gl/8ZTUNWmg7db4Fhpg8

I am also trying to change the order of WPN DATA values and will greatly appreciate info on where to find a method that draws them. Currently I found a way to reorder titles in LanguageManager.BuildCombatHUD(), but that's about it.

Last edited by Laines; 01-10-24 at 03:12 PM.
Laines is offline   Reply With Quote
Old 01-10-24, 03:44 PM   #2
Aktungbby
Gefallen Engel U-666
 
Aktungbby's Avatar
 
Join Date: Jul 2013
Location: On a tilted, overheated, overpopulated spinning mudball on Collision course with Andromeda Galaxy
Posts: 27,822
Downloads: 22
Uploads: 0


Default Welcome aboard!

Laines!...nice "snippets of yer values"!
__________________

"Only two things are infinite; The Universe and human squirrelyness; and I'm not too sure about the Universe"
Aktungbby is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:38 AM.


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