Bigger Mini-Map?

 +_Sm1le


Join Date: 30 January 2022
Posts:246
Posted 30 April 2022 - 7:48 pm
Someone asked me to do, so after a little digging found this can be possible via an overlay like the 1.5 DE Balance patch uses.

The idea is the following:
0 - Create an overlay to place the bigger mini-map on.
1 - Capture the Mini-map rectangle area.
2 - Use the [You must login to view link] function provided by Microsoft(Window GDIP) to copy captured Mini-map rectangle and resize it on the already created overlay rectangle (which should be bigger).

Yes that is it basically.

I managed to do that via [You must login to view link], without changing anything in game, totally independent program that analyzes the game and do what it should do.

Whenever you like, you enable / disable it.

Explaining screenshots:

This is normal Mini-map, look to the spotlight


This is a bigger one:


But Auto-Hotkey is banned.
This method is not 100 % efficient, but it is working just fine

Another thing, since the a part of game made bigger, I'm thinking about the full game playground!, the idea of zooming in / out the game will be just great, like DE ;huh.

The following script is working on a full windowed screen game.
Requires only Auto-Hotkey to be installed.

1 - Once you run the script a pop GUI should appear, don't worry about it
2 - Go open your game, launch a single player game.
3 - Once game started press Windows Logo + R buttons together, then a bigger Mini-map should appear.
4 - To back to normal press Windows Logo + R buttons again.
5 - To exit press Windows Logo + X buttons


Code:
#NoEnv SetBatchLines -1 CoordMode, Mouse, Relative OnExit, GuiClose antialize = 0 ; GUI to show the magnified image Gui, MiniMap: Color, White Gui, MiniMap: Margin, 2, 2 Gui, MiniMap: -Caption +AlwaysOnTop +HwndHMag +E0x20 Gui, MiniMap: Add, Pic, % "HwndHMon vMonPic w550 h273" Gui, Scores: Color, White Gui, Scores: Margin, 2, 2 Gui, Scores: -Caption +AlwaysOnTop +HwndHSco +E0x20 Gui, Scores: Add, Pic, % "HwndScoPic vScoPic w300 h160" Toggle := 0 ; Config GUI ;Gui, +HwndMain Gui, Add, Text, w200 Center, Window Position Info: Gui, Add, Text, w40 Center, X = Gui, Add, Edit, yp xp+40 vXMM w40 Number Gui, Add, Text, yp xp+40 w40 Center, Y = Gui, Add, Edit, yp xp+40 vYMM w40 Number Gui, Add, Text, yp+30 xp-120 w40 Center, W = Gui, Add, Edit, yp xp+40 vWMM w40 Number, 550 Gui, Add, Text, yp xp+40 w40 Center, H = Gui, Add, Edit, yp xp+40 vHMM w40 Number, 273 Gui, Add, Button, yp+30 xp-80 gApply w120, Apply Gui, Show Return Apply: Return #If WinActive("ahk_exe age2_x1.exe") #R:: If (Toggle := !Toggle) { WinGet, HSrc, ID, ahk_exe age2_x1.exe hdc_Src := DllCall("GetDC", UInt, HSrc) hdc_Mini := DllCall("GetDC", UInt, HMon) hdc_Sco := DllCall("GetDC", UInt, ScoPic) Gui, Submit, NoHide SetTimer, Repaint, 0 WinGetPos, WnX, WnY, WnW, WnH, ahk_exe age2_x1.exe MiniMapCoord := [WnW - 350, WnH - 174, 350, 174] ScoresCoord := [WnW - 300, WnH - 338, 300, 160] GuiControl,, XMM, % XMM := WnW - WMM GuiControl,, YMM, % YMM := WnH - HMM Gui, Scores:Show, % "NA x" ScoresCoord[1] - 4 " y" YMM - 168 ;" w" ScoresCoord[3] " h" ScoresCoord[4] WinSet, Transparent, 250, % "ahk_id " HSco Gui, MiniMap:Show, % "NA x" XMM - 4 " y" YMM - 4 ;" w" WMM " h" HMM WinSet, Transparent, 250, % "ahk_id " HMag XJumpRange := [XMM, MiniMapCoord[1], MiniMapCoord[1] - XMM], YJumpRange := [YMM, MiniMapCoord[2], MiniMapCoord[2] - YMM] } Else { SetTimer, Repaint, Off DllCall("gdi32.dll\DeleteDC", UInt,hdc_Mini ) DllCall("gdi32.dll\DeleteDC", UInt,hdc_Src ) DllCall("gdi32.dll\DeleteDC", UInt,hdc_Sco ) Gui, MiniMap:Hide Gui, Scores:Hide } Return #If Repaint: DllCall("gdi32.dll\StretchBlt", UInt,hdc_Mini, Int,0, Int,0, Int,WMM, Int,HMM , UInt,hdc_Src, UInt,MiniMapCoord[1], UInt,MiniMapCoord[2], Int,MiniMapCoord[3], Int,MiniMapCoord[4], UInt,0x00CC0020) ; SRCCOPY DllCall("gdi32.dll\StretchBlt", UInt,hdc_Sco, Int,0, Int,0, Int,300, Int,160 , UInt,hdc_Src, UInt,ScoresCoord[1], UInt,ScoresCoord[2], Int,ScoresCoord[3], Int,ScoresCoord[4], UInt,0x00CC0020) ; SRCCOPY MouseGetPos, X, Y If ((X >= XJumpRange[1] && X <= XJumpRange[1] + 20) && Y >= YJumpRange[1]) { Y -= YMM, Y := Y * (MiniMapCoord[4] / HMM) MouseMove, MiniMapCoord[1], Y + MiniMapCoord[2], 0 } If ((Y >= YJumpRange[1] && Y <= YJumpRange[1] + 20) && X >= XJumpRange[1]) { X -= XMM, X := X * (MiniMapCoord[4] / HMM) MouseMove, X + MiniMapCoord[1], MiniMapCoord[2], 0 } If ((X <= MiniMapCoord[1] && X >= MiniMapCoord[1] - 20) && Y >= MiniMapCoord[2]) { Y -= MiniMapCoord[2], Y := Y * (HMM / MiniMapCoord[4]) MouseMove, XMM - 1, Y + YMM, 0 } If ((Y <= MiniMapCoord[2] && Y >= MiniMapCoord[2] - 20) && X >= MiniMapCoord[1]) { X -= MiniMapCoord[1], X := X * (WMM / MiniMapCoord[3]) MouseMove, X + XMM, YMM - 1, 0 } Return #x:: GuiClose: DllCall("gdi32.dll\DeleteDC", UInt,hdc_frame ) DllCall("gdi32.dll\DeleteDC", UInt,hdd_frame ) ExitApp


Same can be done for the playground game part.
Link | Reply | Quote
 +[email protected]


Voobly Team

Join Date: 30 November 2018
Posts:1511
Posted 30 April 2022 - 8:07 pm
I'll send word to katsuie. If we can add it to the 1.6 patch, that should take care of the anti cheats.
Link | Reply | Quote
 +_Sm1le


Join Date: 30 January 2022
Posts:246
Edited 30 April 2022 - 8:46 pm by +_Sm1le
Auto-Hotkey is C/C++ based scripting language, so it wont be a problem to implement it with the 1.6 patch.

But it is still under developing, I like to make the mini-map zooming in and out more flexible, like for example when you wheel up mini-map gets bigger and when wheel down gets smaller.

Also the scores, this version does't take very well care of scores, they are hidden under the overlay, so I did another capturing to display them just above the bigger mini-map.

I think it is better to change the scores offset in the game to be little upper, I see it better that way, and just use one capturing.
Link | Reply | Quote
 [Rohirrim]katsuie


Join Date: 19 December 2016
Posts:516
Posted 30 April 2022 - 10:28 pm
hi,
can you do the c++ code that call your script ?
Link | Reply | Quote
 +_Sm1le


Join Date: 30 January 2022
Posts:246
Posted 30 April 2022 - 10:54 pm
I'll see what I can do.
Link | Reply | Quote
 +_Sm1le


Join Date: 30 January 2022
Posts:246
Edited 1 May 2022 - 1:16 pm by +_Sm1le
My knowledge in C/C++ is limited, I will take time to translate it.
But you know it is open source, so you can take a look [You must login to view link], to see how it is working.

It is not necessary though to make the same, you can make your own code that applies the same thing that the script does.
Link | Reply | Quote
 [Rohirrim]katsuie


Join Date: 19 December 2016
Posts:516
Posted 1 May 2022 - 8:04 pm
i will take a look later when i will have time then, actually we put a lot effort to Dynasties of India Development, so much new feature to implement.
Link | Reply | Quote
 +_Sm1le


Join Date: 30 January 2022
Posts:246
Posted 1 May 2022 - 11:24 pm
Thanks for your effort buddy! much appreciated! don't worry about it, it is not so important.
Link | Reply | Quote
 +_Sm1le


Join Date: 30 January 2022
Posts:246
Edited 3 May 2022 - 11:41 pm by +_Sm1le


I just got issue with scores, is there any chance to move their places?
Link | Reply | Quote
 +[email protected]


Voobly Team

Join Date: 30 November 2018
Posts:1511
Posted 3 May 2022 - 11:56 pm
WOW! There's going to be a lot of people hyped for this.
I'm sorry but I can not help on the score issue. The best I can think, from the top of my head, is to write the text in the overlay we use to display the villagers per resource. This way it always stays in the corner.

P.S. I haven't forgotten about the logo you did. When I finish the Hindustanis and actually play again, I'll look at it.
Link | Reply | Quote
 %[XceL]Donnie


Join Date: 9 December 2008
Posts:6114
Posted 4 May 2022 - 1:38 am
+_Sm1le wrote:


I just got issue with scores, is there any chance to move their places?


how far can you zoom out?
Link | Reply | Quote
 +[email protected]


Voobly Team

Join Date: 30 November 2018
Posts:1511
Posted 4 May 2022 - 12:16 pm
%[XceL]Donnie wrote:
how far can you zoom out?
I'd say he can only zoom in, at least from what we see in the video.
Link | Reply | Quote
 [_DE_V]GL_DauT


Join Date: 10 March 2022
Posts:100
Posted 4 May 2022 - 6:24 pm
l am using your logo already
Zoom functionality looks cool :)
Link | Reply | Quote
 +_Sm1le


Join Date: 30 January 2022
Posts:246
Edited 4 May 2022 - 7:48 pm by +_Sm1le
I'd say he can only zoom in, at least from what we see in the video.
Yes that is correct!, I believe there is a way, but I'm not there yet.

Here is another sample



It is aimed to help in 4 K screens specially with the lower game interface, because it became too small, hard for eyes to see.
Quote:
in the overlay we use to display the villagers per resource
Yeah, I need to know how it collects the information from the game then this should be solved.


Link | Reply | Quote
[1]
Displaying 1 - 14 out of 14 posts
Forum Jump:
1 User(s) are reading this topic (in the past 30 minutes)
0 members, 1 guests

Most active threads in past week: