mapview stretch/ZOOM - imswear - 26.12.2021 09:49
I'm here again
I'm trying to modify hard coded data to stretch MapView,
To make it fit my screen better
As shown in the figure:
Change the scale, not the size.
I Know HD mod can change the resolution.
But I just want to zoom MapView.
I've tried some modifications, but they didn't work.
Can someone tell me the method or code area?
This may not be the direction everyone likes
But I think you have a way
Thank you.
Я пытаюсь модифицировать данные Харда - кодида, чтобы растянуть мапвио,
чтобы сделать его более похожим на мой экран
как и планировалось
Изменить масштаб, а не изменить размер.
Я знаю, что HD MOD может изменить разрешение.
Но я просто хочу сделать масштабирование для мапвио.
Я попытался кое - что изменить, но это не сработало.
Кто - нибудь может сказать мне путь или код области?
Это может не то направление, которое всем нравится
Но я думаю, что у вас есть выход
Большое спасибо
RE: mapview stretch/ZOOM - Berserker - 26.12.2021 15:04
I see no easy way to do it, sorry.
RE: mapview stretch/ZOOM - imswear - 26.12.2021 15:51
The news is heartbreaking
Theoretically, it obtains different stretching scale parameters with different HD resolution.
I want MapView to use the stretch scale of lower resolution (such as 1180x664) at high resolution (such as 2126x1196).
This is very important to me.
Sad. thank
RE: mapview stretch/ZOOM - imswear - 26.12.2021 15:58
Another question,
can you tell me the calling code of the battlefield background picture,
or the coordinates address in the EXE code?
I want to change its coordinates.
thx
RE: mapview stretch/ZOOM - daemon_n - 26.12.2021 16:05
imswear, 004635D0 Battle_PrepareBattlefield
004642B0 char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this)
RE: mapview stretch/ZOOM - imswear - 26.12.2021 17:32
(26.12.2021 16:05)daemon_n Wrote: imswear, 004635D0 Battle_PrepareBattlefield
004642B0 char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this)
Thank you,daemon_n。
It's a little different from what I thought.
How to modify the coordinates and dimensions.
I've changed most of the other UI. Only the position / size of the battlefield background map seems to be nailed.
PHP Code:
char *__thiscall sub_4635D0( int this, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, char a12) { _DWORD *v13; // ebx int i; // edi int v15; // ecx int v16; // edi char v17; // al char v18; // al char v19; // al char *result; // eax
dword_66D840 = a11; sub_50C7B0(110291 * a9 + 167801 * a10 + 81569); *(_DWORD *)(this + 81904) = a2; *(_DWORD *)(this + 21436) = sub_412B30(a2); *(_BYTE *)(this + 81967) = 1; v13 = (_DWORD *)(this + 21672); if ( a3 ) *v13 = *(char *)(a3 + 34); else *v13 = -1; *(_DWORD *)(this + 21452) = a3; *(_DWORD *)(this + 21676) = a5; *(_DWORD *)(this + 21700) = a4; *(_DWORD *)(this + 21456) = a7; *(_DWORD *)(this + 21704) = a8; for ( i = 0; i < 2; ++i ) { if ( (int)*v13 < 0 ) { *(_BYTE *)(i + this + 21668) = 0; *(_BYTE *)(i + this + 21670) = 0; *(_BYTE *)(i + this + 21682) = 0; } else { *(_BYTE *)(i + this + 21668) = sub_4CE600(*v13); *(_BYTE *)(i + this + 21670) = sub_4CE630(*v13); *(_BYTE *)(i + this + 21682) = sub_4BA970(129); } *(_BYTE *)(this + i + 21680) = 1; v13[3] = 0; v13[14206] = 30000; ++v13; } if ( !a6 ) { *(_DWORD *)(this + 78580) = 0; *(_BYTE *)(this + 21417) = 0; *(_BYTE *)(this + 21416) = 0; *(_DWORD *)(this + 21448) = 0; goto LABEL_28; } v15 = *(_DWORD *)(a6 + 336); v16 = *(_DWORD *)(a6 + 340); if ( (qword_66CDD0 & *(_QWORD *)(a6 + 336)) != 0 ) { *(_DWORD *)(this + 78580) = 1; LABEL_25: *(_BYTE *)(this + 21417) = 0; *(_BYTE *)(this + 21416) = 0; goto LABEL_26; } if ( !(dword_66CDDC & v16 | dword_66CDD8 & v15) ) { if ( !(dword_66CDE4 & v16 | dword_66CDE0 & v15) ) { *(_DWORD *)(this + 78580) = 0; goto LABEL_25; } *(_DWORD *)(this + 78580) = 3; v19 = *(_BYTE *)(a6 + 4); if ( v19 != 2 && (v19 != 6 || *(int *)(dword_699538 + 128664) >= 2) ) { v18 = 1; goto LABEL_18; } goto LABEL_17; } *(_DWORD *)(this + 78580) = 2; v17 = *(_BYTE *)(a6 + 4); if ( v17 == 2 || v17 == 6 && *(int *)(dword_699538 + 128664) < 2 ) { LABEL_17: v18 = 0; goto LABEL_18; } v18 = 1; LABEL_18: *(_BYTE *)(this + 21416) = v18; *(_BYTE *)(this + 21417) = *(_BYTE *)(a6 + 4) == 7; LABEL_26: *(_DWORD *)(this + 21412) = 3; *(_DWORD *)(this + 21448) = a6; LABEL_28: sub_463F90(this); *(_BYTE *)(this + 21445) = a12; result = sub_4642B0(this); *(_DWORD *)(this + 78948) = result; return result; }
PHP Code:
char *__thiscall sub_4642B0(int this) { char *result; // eax int v3; // ecx int v4; // eax int v5; // eax
if ( *(int *)(this + 78580) <= 0 ) { v3 = *(_DWORD *)(this + 21440); if ( v3 == -1 || !v3 ) { v4 = *(_DWORD *)(this + 21452); if ( v4 && (*(_DWORD *)(v4 + 261) & 0x40000) != 0 && (v5 = *(_DWORD *)(this + 21456)) != 0 && (*(_DWORD *)(v5 + 261) & 0x40000) != 0 ) { result = aCmbkboatPcx; } else if ( *(_BYTE *)(this + 21446) ) { result = aCmbkdeckPcx; } else if ( v3 ) { result = (&(&off_63D2F0[2 * *(_DWORD *)(this + 21396)])[sub_41AD10(*(_DWORD *)(this + 81904))])[*(_DWORD *)(this + 21396)]; } else { result = aCmbkbchPcx; } } else { result = (char *)dword_63D2C8[v3]; } } else { result = off_63D2A0[*(char *)(*(_DWORD *)(this + 21448) + 4)]; } *(_DWORD *)(this + 21404) = 1; *(_DWORD *)(this + 21400) = -1; return result; }
RE: mapview stretch/ZOOM - daemon_n - 26.12.2021 18:34
sorry, my asm level is 0, and the same is about reverse
RE: mapview stretch/ZOOM - imswear - 26.12.2021 20:05
(26.12.2021 18:34)daemon_n Wrote: sorry, my asm level is 0, and the same is about reverse
Still thank you.
Hello, Berserker
I have some questions about WOG:
I use the [Object TXT file editor] to modify the object file
1. Why split into three files: zaobjts txt、zeobjts. txt、zobjcts. txt。 What role do the three play?
2. zaobjts.txt and zobjcts.txt contains a lot of duplicate content. Can they be combined into one file? It seems to double my workload.
3. As shown in the figure, when I modify the floor area of the castle, it seems that it can't be too large, otherwise some bugs will be generated when I enter the game. Is there a solution?
RE: mapview stretch/ZOOM - XEPOMAHT - 26.12.2021 20:31
(26.12.2021 20:05)imswear Wrote: 1. Why split into three files: zaobjts txt、zeobjts. txt、zobjcts. txt。 What role do the three play?
В оригинале должно быть 2 штуки - для рандома и установки объектов на карту. В WoG для редактора карт добавили третий текстовик, неизвестно зачем (та же непонятная история как с добавлением msg только для редактора карт).
(26.12.2021 20:05)imswear Wrote: 2. zaobjts.txt and zobjcts.txt contains a lot of duplicate content. Can they be combined into one file? It seems to double my workload.
Можно, но некоторые объекты не должны генерироваться на карте, поэтому было разделение на 2 тестовика (на самом деле их больше, просто в ВоГ они не изменяются).
(26.12.2021 20:05)imswear Wrote: 3. As shown in the figure, when I modify the floor area of the castle, it seems that it can't be too large, otherwise some bugs will be generated when I enter the game. Is there a solution?
Скриптёры никогда не проверяют объекты на количество входов. Естественно, никто не ожидает, что у города их будет 2. Да сам ERM рассчитан на объекты с 1 входом. Поэтому ERM-скрипты всегда будут глючить на подобных нестандартных объектах.
RE: mapview stretch/ZOOM - daemon_n - 26.12.2021 20:41
imswear, 2 - map editor/ random map generator/ game manager (order is mexed up)
3. any complex object with 2 entrance is bad for erm, game.
Castle in structure has exact coordinates, so you try to cheat the logic. Don't do that)
RE: mapview stretch/ZOOM - imswear - 26.12.2021 20:43
got it. The problem is two entrances. So two town icons appear (actually the same city).
That's good, thank you.
RE: mapview stretch/ZOOM - Raistlin - 26.12.2021 22:01
(26.12.2021 17:32)imswear Wrote: (26.12.2021 16:05)daemon_n Wrote: imswear, 004635D0 Battle_PrepareBattlefield
004642B0 char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this)
Thank you,daemon_n。
It's a little different from what I thought.
How to modify the coordinates and dimensions.
I've changed most of the other UI. Only the position / size of the battlefield background map seems to be nailed.
PHP Code:
char *__thiscall sub_4635D0( int this, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, char a12) { _DWORD *v13; // ebx int i; // edi int v15; // ecx int v16; // edi char v17; // al char v18; // al char v19; // al char *result; // eax
dword_66D840 = a11; sub_50C7B0(110291 * a9 + 167801 * a10 + 81569); *(_DWORD *)(this + 81904) = a2; *(_DWORD *)(this + 21436) = sub_412B30(a2); *(_BYTE *)(this + 81967) = 1; v13 = (_DWORD *)(this + 21672); if ( a3 ) *v13 = *(char *)(a3 + 34); else *v13 = -1; *(_DWORD *)(this + 21452) = a3; *(_DWORD *)(this + 21676) = a5; *(_DWORD *)(this + 21700) = a4; *(_DWORD *)(this + 21456) = a7; *(_DWORD *)(this + 21704) = a8; for ( i = 0; i < 2; ++i ) { if ( (int)*v13 < 0 ) { *(_BYTE *)(i + this + 21668) = 0; *(_BYTE *)(i + this + 21670) = 0; *(_BYTE *)(i + this + 21682) = 0; } else { *(_BYTE *)(i + this + 21668) = sub_4CE600(*v13); *(_BYTE *)(i + this + 21670) = sub_4CE630(*v13); *(_BYTE *)(i + this + 21682) = sub_4BA970(129); } *(_BYTE *)(this + i + 21680) = 1; v13[3] = 0; v13[14206] = 30000; ++v13; } if ( !a6 ) { *(_DWORD *)(this + 78580) = 0; *(_BYTE *)(this + 21417) = 0; *(_BYTE *)(this + 21416) = 0; *(_DWORD *)(this + 21448) = 0; goto LABEL_28; } v15 = *(_DWORD *)(a6 + 336); v16 = *(_DWORD *)(a6 + 340); if ( (qword_66CDD0 & *(_QWORD *)(a6 + 336)) != 0 ) { *(_DWORD *)(this + 78580) = 1; LABEL_25: *(_BYTE *)(this + 21417) = 0; *(_BYTE *)(this + 21416) = 0; goto LABEL_26; } if ( !(dword_66CDDC & v16 | dword_66CDD8 & v15) ) { if ( !(dword_66CDE4 & v16 | dword_66CDE0 & v15) ) { *(_DWORD *)(this + 78580) = 0; goto LABEL_25; } *(_DWORD *)(this + 78580) = 3; v19 = *(_BYTE *)(a6 + 4); if ( v19 != 2 && (v19 != 6 || *(int *)(dword_699538 + 128664) >= 2) ) { v18 = 1; goto LABEL_18; } goto LABEL_17; } *(_DWORD *)(this + 78580) = 2; v17 = *(_BYTE *)(a6 + 4); if ( v17 == 2 || v17 == 6 && *(int *)(dword_699538 + 128664) < 2 ) { LABEL_17: v18 = 0; goto LABEL_18; } v18 = 1; LABEL_18: *(_BYTE *)(this + 21416) = v18; *(_BYTE *)(this + 21417) = *(_BYTE *)(a6 + 4) == 7; LABEL_26: *(_DWORD *)(this + 21412) = 3; *(_DWORD *)(this + 21448) = a6; LABEL_28: sub_463F90(this); *(_BYTE *)(this + 21445) = a12; result = sub_4642B0(this); *(_DWORD *)(this + 78948) = result; return result; }
PHP Code:
char *__thiscall sub_4642B0(int this) { char *result; // eax int v3; // ecx int v4; // eax int v5; // eax
if ( *(int *)(this + 78580) <= 0 ) { v3 = *(_DWORD *)(this + 21440); if ( v3 == -1 || !v3 ) { v4 = *(_DWORD *)(this + 21452); if ( v4 && (*(_DWORD *)(v4 + 261) & 0x40000) != 0 && (v5 = *(_DWORD *)(this + 21456)) != 0 && (*(_DWORD *)(v5 + 261) & 0x40000) != 0 ) { result = aCmbkboatPcx; } else if ( *(_BYTE *)(this + 21446) ) { result = aCmbkdeckPcx; } else if ( v3 ) { result = (&(&off_63D2F0[2 * *(_DWORD *)(this + 21396)])[sub_41AD10(*(_DWORD *)(this + 81904))])[*(_DWORD *)(this + 21396)]; } else { result = aCmbkbchPcx; } } else { result = (char *)dword_63D2C8[v3]; } } else { result = off_63D2A0[*(char *)(*(_DWORD *)(this + 21448) + 4)]; } *(_DWORD *)(this + 21404) = 1; *(_DWORD *)(this + 21400) = -1; return result; }
PHP Code:
char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this) { _BattleMgr_ *BattleMgr; // esi char *result; // eax int SpecialGround; // ecx _Hero_ *HeroA; // eax _Hero_ *HeroD; // eax __int64 v6; // [esp-4h] [ebp-Ch]
BattleMgr = this; if ( this->HasShootTowers <= 0 ) { SpecialGround = this->Special_Ground; if ( SpecialGround != -1 && SpecialGround ) { result = SpecialGroundNames[SpecialGround]; } else { HeroA = BattleMgr->Hero[0]; if ( HeroA && HeroA->TempMod & 0x40000 && (HeroD = BattleMgr->Hero[1]) != 0 && HeroD->TempMod & 0x40000 ) { result = aCmbkboat_pcx; } else if ( *(&BattleMgr->isBank + 1) ) { result = aCmbkdeck_pcx; } else if ( SpecialGround ) { LODWORD(v6) = *&BattleMgr->gap13F64[140]; result = off_0063D2F0[Select_Terr_Battlefield(o_AdvMgr, v6) + 2 * BattleMgr->LandType + BattleMgr->LandType]; } else { result = aCmbkbch_pcx; } } } else { result = TownSiegeBackground[this->Town->type]; } *&BattleMgr->gap5398[4] = 1; *BattleMgr->gap5398 = -1; return result; }
RE: mapview stretch/ZOOM - imswear - 27.12.2021 10:33
(26.12.2021 22:01)Raistlin Wrote: PHP Code:
char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this) { _BattleMgr_ *BattleMgr; // esi char *result; // eax int SpecialGround; // ecx _Hero_ *HeroA; // eax _Hero_ *HeroD; // eax __int64 v6; // [esp-4h] [ebp-Ch]
BattleMgr = this; if ( this->HasShootTowers <= 0 ) { SpecialGround = this->Special_Ground; if ( SpecialGround != -1 && SpecialGround ) { result = SpecialGroundNames[SpecialGround]; } else { HeroA = BattleMgr->Hero[0]; if ( HeroA && HeroA->TempMod & 0x40000 && (HeroD = BattleMgr->Hero[1]) != 0 && HeroD->TempMod & 0x40000 ) { result = aCmbkboat_pcx; } else if ( *(&BattleMgr->isBank + 1) ) { result = aCmbkdeck_pcx; } else if ( SpecialGround ) { LODWORD(v6) = *&BattleMgr->gap13F64[140]; result = off_0063D2F0[Select_Terr_Battlefield(o_AdvMgr, v6) + 2 * BattleMgr->LandType + BattleMgr->LandType]; } else { result = aCmbkbch_pcx; } } } else { result = TownSiegeBackground[this->Town->type]; } *&BattleMgr->gap5398[4] = 1; *BattleMgr->gap5398 = -1; return result; }
Raistlin,thank you. You saved me。
RE: mapview stretch/ZOOM - igrik - 27.12.2021 11:56
PHP Code:
char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this) { battleMgr = this; if ( this->ShootTowers <= 0 ) { SpecialGround = this->Special_Ground; if ( SpecialGround != -1 && SpecialGround ) { result = SpecialGroundNames[SpecialGround]; } else { HeroA = battleMgr->Hero[LEFT]; if ( HeroA && LODWORD(HeroA->vizitedFlags) & HF_IN_BOAT && (HeroD = battleMgr->Hero[RIGHT]) != 0 && LODWORD(HeroD->vizitedFlags) & HF_IN_BOAT ) { result = aCmbkboat_pcx; } else if ( battleMgr->isWaterBank ) { result = aCmbkdeck_pcx; } else if ( SpecialGround ) { result = BattlePcxNames[AdvMgr_GetBattlefieldTerrian(o_AdvMgr, battleMgr->mapPoint) + 2 * battleMgr->combatTerrain + battleMgr->combatTerrain]; } else { result = aCmbkbch_pcx; } } } else { result = TownSiegeBackground[this->Town->type]; } battleMgr->iCombatCycleType = 1; battleMgr->combatFringe = -1; return result; }
RE: [help] UI modification - imswear - 28.12.2021 16:31
sorry
I have another problem
ERM works only after entering the game map
I now need to remove the shadow from the game start interface
So I changed the assembly code directly
But it didn't work.
What's the problem?
RE: mapview stretch/ZOOM - imswear - 28.12.2021 16:34
(27.12.2021 11:56)igrik Wrote: PHP Code:
char *__thiscall Battle_GetBackgroundPcxName(_BattleMgr_ *this) { battleMgr = this; if ( this->ShootTowers <= 0 ) { SpecialGround = this->Special_Ground; if ( SpecialGround != -1 && SpecialGround ) { result = SpecialGroundNames[SpecialGround]; } else { HeroA = battleMgr->Hero[LEFT]; if ( HeroA && LODWORD(HeroA->vizitedFlags) & HF_IN_BOAT && (HeroD = battleMgr->Hero[RIGHT]) != 0 && LODWORD(HeroD->vizitedFlags) & HF_IN_BOAT ) { result = aCmbkboat_pcx; } else if ( battleMgr->isWaterBank ) { result = aCmbkdeck_pcx; } else if ( SpecialGround ) { result = BattlePcxNames[AdvMgr_GetBattlefieldTerrian(o_AdvMgr, battleMgr->mapPoint) + 2 * battleMgr->combatTerrain + battleMgr->combatTerrain]; } else { result = aCmbkbch_pcx; } } } else { result = TownSiegeBackground[this->Town->type]; } battleMgr->iCombatCycleType = 1; battleMgr->combatFringe = -1; return result; }
thank you.
Now, I have modified most UI boxes
But the coordinates of the battlefield background picture are still not found
RE: [help] UI modification - daemon_n - 28.12.2021 16:44
imswear, use bin patch https://tools.hmm35.ru/unc-to-bin/index.html
RE: [help] UI modification - imswear - 28.12.2021 17:17
(28.12.2021 16:44)daemon_n Wrote: imswear, use bin patch https://tools.hmm35.ru/unc-to-bin/index.html
good
It worked
Get a new tool. A new world.
thank!
--------------------------------------
Looks like I made a mistake
My test is wrong
After entering the game map and returning to the main menu, it works.
This is still the effect of ERM.
When you first open the game, it is invalid.
I have only recently modified the game and have 10000 questions.
There may always be some stupid questions. Thank you for your patience.
--------------------------------------
Update again: done!
The previous mistake is that I put The bin file is in the wrong folder.
Thank you, daemon_ n
RE: mapview stretch/ZOOM - igrik - 28.12.2021 19:16
(28.12.2021 16:34)imswear Wrote: But the coordinates of the battlefield background picture are still not found
0x55D133
RE: mapview stretch/ZOOM - imswear - 29.12.2021 11:23
(28.12.2021 19:16)igrik Wrote: (28.12.2021 16:34)imswear Wrote: But the coordinates of the battlefield background picture are still not found
0x55D133
Although I haven't finished it all. But it does work. thank you
RE: mapview stretch/ZOOM - imswear - 29.12.2021 13:03
Such as this post
Battlefield image
(21.05.2020 00:32)XEPOMAHT Wrote: Если кто-то сможет перерисовать абсолютно все спрайты в игре, увеличив их размер в 1,5 раза по сравнению с текущими, тогда и окно боевого режима игры можно увеличить в 1,5 раза (по коду с этим проблем никаких нет, проблема - это отсутствие самой графики).
I just found out that I was doing something similar: trying to zoom in on the battlefield
But at present, it may be a huge project. Obviously, it is far beyond my ability
I wonder if there are any similar mod achievements or tutorials?
Is there anyone interested in it?
RE: mapview stretch/ZOOM - Raistlin - 29.12.2021 22:05
igrik, спасибо! Я из открытой базы этот код копировал, в закрытой у меня эта функция тоже есть.
|