compile and link

29 views
Skip to first unread message

ROTA

unread,
Sep 22, 2011, 8:41:06 AM9/22/11
to TexMod development
Somehow I do not get it work on win XP

I compile the GUI and the dll under win7 and running on win xp the GUI
cant load the the OTM_d3d9.dll

The GUI can't find the dll although it is in the same directory. I
would understand an error, that the dll is not compatible, but it
fails on finding the dll, even if I pass the full path.

Did somebody tried it under win xp or even compiled it under win xp??

ROTA

unread,
Sep 23, 2011, 5:15:40 AM9/23/11
to TexMod development
Dammed it took me again a couple of hours to notice, that it find
OTM_d3d9.dll but not the d3dx9_43.dll needed for loading and saving
texture.
With the d3dx9_43.dll it works fine under Win XP.

Brian

unread,
Oct 14, 2011, 11:48:15 PM10/14/11
to TexMod development
I am running Win XP SP3, and I got a message about MSVCR100.dll was
not found. Since you are compiling with Visual C++ but not including
the distro runtimes needed to operate it. You have to remember this
is for John Q. Public and he won't have those by default.

ROTA

unread,
Oct 16, 2011, 1:43:39 PM10/16/11
to TexMod development
Thank you, I did not notice this on my WinXP test machine.

I compiled wxWidgets with dynamic C-runtime linkage.
I have recompiled it now with static linkage and
the ProcessExplorer does not show the MSVCR100.dll any more.

So I hope this problem is solved now.

Best
ROTA

Brian

unread,
Oct 17, 2011, 8:48:26 AM10/17/11
to TexMod development
Yes, that works now. I notice you are running a custom d3d9.dll to
hijack the API. I assume the final build will result in direct calls
to the direct x and not use the custom dll?

ROTA

unread,
Oct 18, 2011, 6:03:51 AM10/18/11
to TexMod development
Of course I am using a custom dll. Using a custom dll is easiest way
to inject code into other programs. And I need to inject my code. BTW
other methods are hacking the game, while my method uses only windows
calls and a detour function which also can be downloaded officially
from the Microsoft homepage (but due to licences I am not using the
official function). So this project is not hacking the game in any
way, which might be important in respect to the EULA of some games.

There are currently two dll in the project which differ only in the
way they are injected. The OTM_d3d9.dll is injected via a global hook
and this is the preferred method. The d3d9.dll is for copying it into
the game directory and hopefully the game loads the d3d9.dll first
from the working path than from the system path. But you should not
use both methods at the same time for the same game. But for different
games you can make different choices.

Well I am nearly at the end of the release of OTM. The only reason why
it is an alpha is that text file logging of the dll is enabled. On my
PC with my games it seems to be bug free and it has already all the
functionality, what I want for the first release. If I would get some
positive test results I would also directly upload a release version.

Brian

unread,
Oct 22, 2011, 7:35:04 PM10/22/11
to TexMod development
Sorry for the late reply, I have been rather busy with my work. I
haven't worked much with DLL hooking in C++. I never suggested you
were "hacking" the games. Hooking is often referenced as hijacking
the API. And if you are asking about EULA, those all state that you
can't mess with the game in any way, shape, or form especially with
3rd party software. But most software companies turn a "blind eye" to
modding since this increases the shelf life of our games.

But I did test this program, first with GTA San Andreas and it dumped
the textures. However I have yet to be able to alter any game
textures. I am able to find and alter the dds texture inside the
saved folder. Does this feature work?

However if I run the application again, the texture doesn't change
inside the game. In some cases the texture reverted to the original
textures.

I have had success dumping the textures from the following games;

Battlezone II, Prototype, Mass Effect, GTA SA, and I have a long list
to test yet.

Where this program has failed to dump any textures;

Command & Conquer 3 Kane's Wrath, Splinter Cell Conviction, Guild
Wars, and World of Warcraft.

Once I am done testing, I will be happy collect all the OTM logs and
send them to you. I can also send you a more detailed list of the
games available to me. It is quite long and don't want to bore you.

ROTA

unread,
Oct 23, 2011, 6:55:20 AM10/23/11
to TexMod development
> I never suggested you were "hacking" the games.
I understand you correct, I did not thought that you think this about
me or OTM. I wrote this to emphasize, that I need a dll to inject
code, because without a dll I must hack the game to inject code ;)

First of all: Thank you for testing!

Which OTM version do you use?
How do you dump the textures? Single texture or all textures?

How do you add the textures to the modding list? Do you add each dds
file or do pack all dds files as a zip file and add the zip file?
Did you try the update button and the update(reload) button

With the newest version of OTM, I tested Guild Wars and 1) saving
texture works, 2) load the edited texture immediately into GW works,
3) as well as tpf files works.
But I can't remember a bug in the last uploads why saving texture
should not work. (maybe versions before r9??)

> However if I run the application again, the texture doesn't change
> inside the game. In some cases the texture reverted to the original
> textures.
This, I do not understand. No textures were modded at all, but some
texture reverted to the original texture. But if not texture is
modded, how can some textures be reverted to the original textures?

Best
ROTA

Brian Black

unread,
Oct 23, 2011, 5:11:54 PM10/23/11
to tex...@googlegroups.com
I was using r16 but just downloaded r18.  I select all textures but also try the single texture mode as well, especially if all textures does not work.  I also setup a template and use a common texture directory since you were wise to place the application name on the output texture files.  For the dump folder, I use folder "My Documents\OTM images".

I guess I am not fully understanding the injection part of your process. I thought once I altered the texture, all I need do is press the update button?  But now I see I must make a modding list?  I guess I will sit down when I have some free time and study the readme file more in depth.  I have an erratic work schedule but I should be back with you in a few days.

I know for a fact, the boys at ArenaNet have said users can use TexMod with an "at risk" disclaimer.  I don't know if Blizzard has an "official disclaimer" of their own but personally I don't see your version coming under fire.  I know you will end up making a lot of Guild Wars users very happy in the end. 

ROTA

unread,
Oct 25, 2011, 5:34:02 AM10/25/11
to TexMod development
I hoped OTM is self explaining^^

There are two things, you use can do with OTM:
1) creating a mod
2) using a mod


1) creating a mod:
For that you need the original texture from the game. So you can
choose between save single texture or save all textures. Afterwards
you need to edit these texture with a program of your choice (e.g.
Gimp with dds plug in). Afterwards you simply zip all of your edited
dds files into one zip file. You can also add a Comment.txt in the zip
file, e.g.:
Author: Brian
This mods converts all green trees into red trees


2) using a mod
You add a mod you want to use by clicking "open texture/pack" and
choosing a *.zip, *.tpf, or *.dds file. This file will immediately be
added in the game tab of OTM. The tick is set to true and behind the
name of the file 3 Buttons occur, one for moving this mod upwards, one
for moving it downwards and one for deleting it from the list. (If
only one mod is loaded, moving up and downwards is senseless.)
Mods where the tick is checked are loaded into the game, mods where
the tick is unchecked are unloaded from the game. If you move the
mouse cursor over one mod, the comment of this mod is displayed.

Brian

unread,
Oct 27, 2011, 2:37:04 PM10/27/11
to TexMod development
I'm sorry I don't mean to be the Devil's advocate. ;)

I never seem to never have enough time to go over stuff that really
interests me such as this program utility. :(

I ran it on TRON 2.0 (2003) today with great success and thought maybe
I could create a video tutorial on YouTube (if you would like) for the
non-programming users. No offense, but average users won't even
bother reading the docs. One of my co-workers said we should install
an IgnoreThis.txt instead of a ReadMe.txt. We have even joked about
replacing company EULA with "blah.. blah.. blah.." to see if anyone
notices. But then we might be looking for work...

Some of my initial problems are gone, such as keying the program to
the game launcher by mistake or having a bad folder names. However GW
is still not working yet, so I plan to try copying over the d3d9.dll
to the GW folder later today and try that approach. Dark Reign 2 uses
an older version of DirectX so this might work there too. Do you have
any ideas for games that refuse to ALT+TAB during play? I they are
few in number, the only one that comes to mind is the old Star Trek
Armada II. The company had issues with the game crashing so they
patched it with a block to ALT+TAB.

ROTA

unread,
Oct 28, 2011, 4:05:18 AM10/28/11
to TexMod development
> I'm sorry I don't mean to be the Devil's advocate. ;)
Each criticism is helpful! There is no need to apologize.

> I could create a video tutorial on YouTube (if you would like) for the non-programming users.
That would be great! Of course you can help in any way you like to. I
would be happy to find some co-workers.


> bad folder names
I hopped this should be gone, since I moved everything to UTF-16LE and
this should support also uncommon characters. If you would sent me an
example I could try to fix it.

> However GW is still not working yet, so I plan to try copying over the d3d9.dll to the GW folder later today and try that approach.
This won't work. GW loads the d3d9.dll from the system path. They
fixed this some years ago.
But maybe GW uses somehow DirectX8 on your system and therefore a tab
will open in OTM but you can't modify anything. This problem occurs
also under Linux with Wine.

If no tab opens in OTM, maybe the path is not set correctly in the
UserApp/OpenTexMod/OTM_DX9.txt. The UserApp folder is different for
different windows version, under Win7 it should be something like:
UserName/Appdata/Romaning/
The tab must appear if the game is in this file and the hook is
working (you will get an error message on start up of OTM, if the hook
does not work). Each program executable (which starts while OTM is
running), will be compared with the program list in the UserApp/
OpenTexMod/OTM_DX9.txt. If no tab opens, this comparison failed
somehow.
Note: The tab must open if the path + program executable is listed in
this file, no matter if this program uses Directx9 or not. All other
behaviour is a bug!

ALT+TAB problem:
A future plan is an onscreen display (OSD), where you can mod the game
without minimizing the game. But this will come after DirectX10
support (from my point of view). If there is somebody out there, who
wants to code it, I would be glad.
Till the OSD is implemented, the only way is to create a template for
this game by your self. You can also do a little trick. You run any
other game, which supports alt+tab. You create your template with all
the mods you want to use. Then you save it and set is as default for
this game. Afterwards you open "OTM_SaveFiles.txt" and modify the path
and the binary of the game (you have used to create the template) to
the path and executable of the game, which does not support ALT+TAB.
("OTM_SaveFiles.txt" is a UTF-16LE encode file, some editors might
have problems with that. E.g. notepad++ does support this format and
there is a portable version of notepad++)
I know: an intelligent menu in OTM, where you can create, load and
save templates without a running game, would be better, but atm I try
to implement volume and cube textures and afterwards DirectX10. But if
somebody would like to help me, ... ;)
Reply all
Reply to author
Forward
0 new messages