debug_print functionality dll

[V] IdolNinja

Volition Staff
This is an updated version of Rick's hook dll that will display debug_print statements from any lua that srtt runs. This is handy in both showing the original Volition debug_print statements and also adding your own to trace the flow of functions and see what is happening.

HOW TO USE:
Download the new version of the dll attached to this OP.

To install, simply move this file to your srtt install folder where the exe is:
..\steam\steamapps\common\saints row the third\

On launch of SRTT, a command prompt window will also open displaying any debug_print statements as they run.

The syntax to add your own is:
debug_print("highlighted_handle: " .. to_string(current_target_handle) .. "\n")

* Anything within quotes will print as it looks
* \n is a line break
* to_string([variable name]) will convert any variable to a string value and print that
* .. is concatenation

Any update to the srtt exe will break this, so remember to remove it when the next patch hits (until I can build a new version.)
 

Attachments

  • xinput1_3.dll_6-23-2012.rar
    108.6 KB · Views: 932
Dll updated to work with latest Trouble with Clones patch.
 
Dll updated in the OP to work with the latest patch from 5/29/12.
 
Dll updated in the OP to work with the latest patch from 5/29/12.
What exactly does the debug information do? I am not sure how this effects the game. I have learned a lot about the files lately working on the beta 2009 mod for srtt, but still looking to learn anything useful. I figured out the string files but what does the debug information do for the game?
 
What exactly does the debug information do? I am not sure how this effects the game. I have learned a lot about the files lately working on the beta 2009 mod for srtt, but still looking to learn anything useful. I figured out the string files but what does the debug information do for the game?

You can track what functions are running in a lua script and when, that way.
 
Ok got it. Makes sense now. I had to edit a few Lua files in my beta 2009 mod. Any way you might find a minute to give me a little guidance on that project? Lost on how to edit certain things and still learning what does what.

Unfortunately I have very little time to work one on one. Your best bet is to post your questions on the forum and perhaps another modder or Knobby (or me if I have time) can assist.
 
I could use some help with this,

I am using the debug console this xinput hook creates to get prints from in game lua

What it was coded to do,


I need to write/log the output of the debug console to a file so I can allow other programs and or scripts to access its debug console data.
First I tried by converting the dll to basic ASM C++ functions from a conversion system but this did not work,
Then I found the github visual c++ project used to create this
https://github.com/gibbed/Gibbed.Volition/tree/master/mods/sr3/debug_print

I was able to compile this project and solution in Visual Studio 2010 with no bugs or errors

But patch 949013 with its built in anti debugger crashes the whole thing. Using both the dll here and the one I compile. Even though the source code supports this patch the anti-debugger causes the debugger console to crash.



Does anyone have the required memory address for patch
985785


The dll provided here works fine for patch
985785


But the github source does not contain valid memory address redirection for this patch version.



So if anyone can help me recode the xinput to work for patch
985785

not sure I can even bypass the anti debug for 949013

So getting the memory addresses from patch 985785 to the source seems like the only option. That way I can easily have the debug console from xinput log its outputs to a file.

Dll updated in the OP to work with the latest patch from 5/29/12.


Can you share the memory address c++ redirect source for this patched version please !
 
Last edited by a moderator:
There's a searcher to find the function signatures in the same repository. I can't imagine this DLL was updated using anything other than that.
 
Back
Top