 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Sheppard How do I cheat?
Reputation: 0
Joined: 14 Jun 2012 Posts: 3
|
Posted: Thu Jun 14, 2012 1:35 pm Post subject: Using D3D11hook |
|
|
Hello! How i can use Directx11hook without LUA.
I'm want coding on C++
Plese tell me for example, how i can use DXMessD3D11Handler::DrawString method?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25794 Location: The netherlands
|
Posted: Fri Jun 15, 2012 6:36 am Post subject: |
|
|
I don't think that's possible right now
I didn't export the pascal class to the plugin system so the only external access is through lua
I guess you could write a plugin in c++ that wraps around the lua interface so for the rest you can use C++ classes (like d3dhook_createFont would be d3dhook::createFont which just calls the lua d3dhook_createFont function)
And running it without cheat engine isn't going to be easy. First you need to setup the events, and the shared memory object that contains the configuration. Then inject the dxhook.dll. Then do the runtime hooking. And then fill the shared memory object with the textures and the render commands. Not to mention that you will need to build a fontmap manually when using the textcontainer
In short, it's best to just stick with ce or write your own hook from the beginning
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Sheppard How do I cheat?
Reputation: 0
Joined: 14 Jun 2012 Posts: 3
|
Posted: Fri Jun 15, 2012 7:45 am Post subject: |
|
|
Ok, thanks for help!
Please tell me, how i can draw string with CheatEngine LUA?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25794 Location: The netherlands
|
Posted: Fri Jun 15, 2012 8:26 am Post subject: |
|
|
First you need to create a font object (preferably from a font type that doesn't overlap characters, like italic)
Then create a fontmap object from that font. (a fontmap is an inherited object from the texture class)
Then create a textcontain object to render with (a textcontainer is an inherited object from the renderobject class)
An example of an initialization:
Code: |
d3dhook_initializeHook()
myfont=createFont()
font_setColor(myfont,0xff0000) --blue. this color will be used by the fontmap. every different color needs a new fontmap (for now)
fm=d3dhook_createFontmap(myfont)
tc=d3dhook_createTextContainer(fm, 0,0,'')
|
And to change stuff later on:
Code: |
d3dhook_renderobject_setX(tc, 100) --tc is an object that inherits from renderobject, so renderobject methods can be used on it
d3dhook_renderobject_setY(tc, 100)
d3dhook_textcontainer_setText(tc,'This is a string at 100,100')
|
if you give as position -1 the text will be centered on that axis
if you give as position -2 the text will be centered on the mouse positon on that axis
Don't hesitate to ask questions, it can be tricky. (and if you make use of text centering, get the dxhookfix I posted in this topic: http://forum.cheatengine.org/viewtopic.php?t=553143 (should also give some more ideas on how to use it)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Sheppard How do I cheat?
Reputation: 0
Joined: 14 Jun 2012 Posts: 3
|
Posted: Fri Jun 15, 2012 12:14 pm Post subject: |
|
|
Thank you!
But please tell me, why font_setSize don't working?
Code: | d3dhook_initializeHook()
myfont=createFont()
font_setColor(myfont,0xff0000) --blue. this color will be used by the fontmap. every different color needs a new fontmap (for now)
font_setSize(myfont, 24)
fm=d3dhook_createFontmap(myfont)
d3dhook_renderobject_setX(tc, 350) --tc is an object that inherits from renderobject, so renderobject methods can be used on it
d3dhook_renderobject_setY(tc, 350)
d3dhook_textcontainer_setText(tc,'TEST STRING') |
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25794 Location: The netherlands
|
Posted: Fri Jun 15, 2012 12:47 pm Post subject: |
|
|
You forgot d3dhook_createTextContainer
This should work better:
Code: |
d3dhook_initializeHook()
myfont=createFont()
font_setColor(myfont,0xff0000) --blue. this color will be used by the fontmap. every different color needs a new fontmap (for now)
font_setSize(myfont, 24)
fm=d3dhook_createFontmap(myfont)
tc=d3dhook_createTextContainer(fm, 0,0,'')
d3dhook_renderobject_setX(tc, 350) --tc is an object that inherits from renderobject, so renderobject methods can be used on it
d3dhook_renderobject_setY(tc, 350)
d3dhook_textcontainer_setText(tc,'TEST STRING')
|
Also, in case you need to set a property not exposed explicitly or bugged, you can make use of setProperty. (e.g an alternative would be : setProperty(myfont, "Font", 24)
And if you wished to replace the old text container with a new one with a different font, first call object_destroy(tc), or at least set it to invisible
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|
|
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
|
|