Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 9:05 am
All times are UTC + 0
Resource Hacker
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [47 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 10:23 am    Post subject:  Resource Hacker Reply with quote  Mark this post and the followings unread

Im trying to modify one of the dialogs in gamemd.exe with resource hacker but the i didn't change nothing.
why?

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 11:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Which dialog ID did you edit (and which control) and how did you edit it?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 11:34 am    Post subject: Reply with quote  Mark this post and the followings unread

i edited dialog 148 and i edited this controls :

CONTROL "Slider3", 1295, "msctls_trackbar32", TBS_HORZ | TBS_BOTH | TBS_NOTICKS | WS_CHILD | WS_VISIBLE, 135, 327, 140, 14
CONTROL "GUI:Difficulty", 1822, STATIC, SS_LEFT | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE, 139, 315, 75, 12
CONTROL "GUI:Harder", 1648, STATIC, SS_RIGHT | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE, 200, 315, 75, 12
CONTROL "", 1770, STATIC, SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 125, 34, 174, 87 , 0x00000020
CONTROL "", 1772, STATIC, SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 125, 126, 173, 86 , 0x00000020

i changed their positions.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 11:38 am    Post subject: Reply with quote  Mark this post and the followings unread

The campaign menu is rearranged by the game while running. This should be true for at least 1770 (Allied image) and 1772 (Soviet image). Are all of them in the original place or does it work for some?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 11:42 am    Post subject: Reply with quote  Mark this post and the followings unread

all of them are in the original place.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 11:53 am    Post subject: Reply with quote  Mark this post and the followings unread

Can you add
| WS_VISIBLE
to 1109 and start the game?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 12:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

it's already in it.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 12:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you rename 1772 to 1773 and remove WS_VISIBLE, does it disappear?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 12:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

what disappear?

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 12:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

The soviet campaign image.

_________________

Last edited by AlexB on Tue Jun 29, 2010 12:26 pm; edited 1 time in total

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 12:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

no

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 12:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Most likely you are not running the modified exe file. The game will not re-create a control it can't find and it doen't know id 1773.

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 12:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

but the modified exe's name is gamemd.exe and it's located in the game folder.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 12:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

I reproduced this. The soviet image is gone for me.
I see no other issue that could cause the problem you describe. Do you have multiple installation folders?

_________________

Back to top
View user's profile Send private message
hotrods20
Commander


Joined: 27 Jul 2009

PostPosted: Tue Jun 29, 2010 12:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

hmmm... Maybe your coding has a error? You could have missed a spot in the code and forgot about it.

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 12:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

AlexB wrote:
Do you have multiple installation folders?

yes but i checked and the file is in the folder i launched the game from.
hotrods20 wrote:
hmmm... Maybe your coding has a error? You could have missed a spot in the code and forgot about it.

i tried and checked this many times, so i don't think i missed a spot.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 12:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

How did you edit the dialog? Changed it in ResHacker directly (ResHacker warns about compilation errors)? Or extracted and readded it? Can you check that there only is one resource 148, having 1033 as the language id?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 1:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

i changed it in ResHacker directly.
and there is only one resource 148

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 1:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Can you post the entire resource script?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 1:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

148 DIALOGEX 0, 0, 533, 369
STYLE WS_CHILD
CAPTION ""
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Sans Serif"
{
CONTROL "", 1109, LISTBOX, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE, 421, 151, 107, 98
CONTROL "GUI:Load", 1038, BUTTON, BS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 425, 122, 108, 23
CONTROL "Slider3", 1295, "msctls_trackbar32", TBS_HORZ | TBS_BOTH | TBS_NOTICKS | WS_CHILD | WS_VISIBLE, 135, 327, 140, 14
CONTROL "GUI:Difficulty", 1822, STATIC, SS_LEFT | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE, 139, 315, 75, 12
CONTROL "GUI:Harder", 1648, STATIC, SS_RIGHT | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE, 200, 315, 75, 12
CONTROL "GUI:Back", 1670, BUTTON, BS_OWNERDRAW | WS_CHILD | WS_VISIBLE, 425, 253, 108, 23
CONTROL "GUI:CampaignMenu", 1684, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE | WS_GROUP, 425, 1, 108, 10
CONTROL "", 1770, STATIC, SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 125, 34, 174, 87 , 0x00000020
CONTROL "", 1773, STATIC, SS_BLACKFRAME | WS_CHILD, 125, 126, 173, 86 , 0x00000020
CONTROL "GUI:Blank", 1685, STATIC, SS_LEFT | SS_CENTERIMAGE | WS_CHILD | WS_VISIBLE, 8, 354, 303, 12
CONTROL "", 1820, STATIC, SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 449, 29, 61, 33 , 0x00000020
CONTROL "", 1959, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE, 4, 123, 415, 13
CONTROL "", 1960, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE, 3, 304, 420, 13
}

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 1:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

For me this works. (At least the Soviet image part). The other controls are moved by code. Can't reproduce the problem.

Just to be sure, can you rename gamemd.exe in the other installation folders to something different?

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 1:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

i moved the gamemd.exe that i modified to another folder and then i launch the game and it didn't launch him.

Back to top
View user's profile Send private message
hotrods20
Commander


Joined: 27 Jul 2009

PostPosted: Tue Jun 29, 2010 1:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

The modified one goes in the RA2 Directory original goes somewhere else. So according to AlexB the code is fine and the all that and you keep running into problems.

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 1:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

so what is my problem?
and AlexB, can you upload a picture of the campaign menu with my dialog code?

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 1:42 pm    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 1:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

im not using npatch/ares.
are you sure the image is from my resource script?
because i don't changes in the image exept the soviet image.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 2:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

No, i captured something entirely different to make a point. Of course it is. As I said, the game moves stuff around and the images and its sublines are definitely among them.

If you want to see my exe, click here (English TFD, removed).

Last edited by AlexB on Tue Jun 29, 2010 2:55 pm; edited 1 time in total

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 2:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

sorry, now i understand what i did wrong!
i pressed compile script, but i didn't press save.
im now checking again what you said.
edit: the soviet image part is working for me, but the position part is not.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 2:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok, then the original problem is solved. Moving stuff via dialog resources is indeed rather limited if the game reverts the changes while running.

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 2:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

how the game reverts the changes while running?

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 2:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

It reads the dialog resource, creates the dialog and then moves controls around, hides or shows them, sets texts, fills list boxes. So before the dialog is shown the game fiddles around with its contents. Whatever you change, the game has the last word.

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Tue Jun 29, 2010 3:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

and how can i change the game's last word?

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jun 29, 2010 3:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Currently there is no project that can do that. Later Ares versions will add support for editing some controls and customizing the campaign selection screen but not on a scale like that. And NPatch, well, yes...

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Fri Jul 02, 2010 7:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

how can i do it with npatch?

Back to top
View user's profile Send private message
wardeathfun
Commander


Joined: 01 Feb 2007
Location: Las Vegas, Nevada, USA

PostPosted: Fri Jul 02, 2010 9:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

just install npatch and modify the new exe it comes with. I do not know what all npatch comes with, but a new exe is one of them. If you wait til after its installed, you can then edit the new gamemd.exe just like you used to. Though I personally use Microsofts Visual basic.

Back to top
View user's profile Send private message Send e-mail Visit poster's website
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Sat Jul 03, 2010 1:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

but npatch comes with modifed dialog 148, and the changes with the positions reverted from it too.
and how can i modify the exe with visual basic?

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Sat Jul 03, 2010 7:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

You can't. VB is not able to do anything like that. This is only solvable by hacking the executable (NPatch doesn't do it and it seems it never won't, Ares is not that far).

Is all you want to move the controls to get a different appearance of the dialog or are both the campaign icons related to each other / blend with the background, or is there more to it?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Sat Jul 03, 2010 8:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

i want to change the change the appearance of the dialog and i want to add a new control

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Sat Jul 03, 2010 8:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

What new control? What should it do?

_________________

Back to top
View user's profile Send private message
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Sat Jul 03, 2010 8:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

start a new campaign
and how can i determine his action/s?

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Sat Jul 03, 2010 9:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

That would be by exe hacking and it isn't as simple as setting a tag in some ini file. Essentially, the game does not know about the new controls and will ignore them. Recoding the game is quite a hard task.

NPatch supports another campaign button, but no customisation like moving controls around. Ares 0.2 will feature some more customisations, but there's no way to move the campaign images. I'd wait for Ares 0.2 and use one of it's predefined layouts.

_________________

Back to top
View user's profile Send private message
Ghost of Christmas Past
Grenadier


Joined: 02 Jun 2010

PostPosted: Sun Jul 04, 2010 11:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Wait, isn't this the guy with the pirate version that doesn't accept the 1.001 patch and so can't use Ares?

_________________
Albrecht never dies, he just goes to the nearest bar to regroup.

Back to top
View user's profile Send private message
Biohazard
Commander


Joined: 17 Jan 2008
Location: MD,USA

PostPosted: Sun Jul 04, 2010 12:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

You bet it is.

_________________

Retired YR Player
Steam Account : MAS93
Xfire: msbiohazard

Back to top
View user's profile Send private message Send e-mail Yahoo Messenger Account AIM Address
MiniGunner
Soldier


Joined: 07 Nov 2009

PostPosted: Sun Jul 04, 2010 3:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

AlexB wrote:
That would be by exe hacking and it isn't as simple as setting a tag in some ini file. Essentially, the game does not know about the new controls and will ignore them. Recoding the game is quite a hard task.

NPatch supports another campaign button, but no customisation like moving controls around. Ares 0.2 will feature some more customisations, but there's no way to move the campaign images. I'd wait for Ares 0.2 and use one of it's predefined layouts.

so how the game know their original positions?
Ghost of Christmas Past wrote:
Wait, isn't this the guy with the pirate version that doesn't accept the 1.001 patch and so can't use Ares?

i already solved the problem with the version.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Sun Jul 04, 2010 3:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

The game does not use the original positions. They are hardcoded to some values in the exe. You can see for yourself: In the resource editor, the buttons are 174 pixels wide. In the game the buttons are much wider. You can even move the mouse cursor next to them and they will light up.

_________________

Back to top
View user's profile Send private message
Stealth Killer
Cyborg Soldier


Joined: 06 Nov 2009
Location: Planet Earth

PostPosted: Thu Jul 08, 2010 3:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
The game does not use the original positions. They are hardcoded to some values in the exe. You can see for yourself: In the resource editor, the buttons are 174 pixels wide. In the game the buttons are much wider. You can even move the mouse cursor next to them and they will light up.

Thats true i have tried this same thing many time and I used PEExplorer that is more advance tool than ResHacker but result was same.
I think its a headache to modify the dialogs of game. Plus you will not get the desired result.

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Thu Jul 08, 2010 3:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'll see what I can do when I find time. It shouldn't be that hard, just time-consuming.

_________________

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [47 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1949s ][ Queries: 11 (0.0097s) ][ Debug on ]