Raised This Month: $ Target: $400
 0% 

Gamedata Checker


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
psychonic

BAFFLED
Join Date: May 2008
Old 07-08-2012 , 12:13   Re: Gamedata Checker
Reply With Quote #1

Quote:
Originally Posted by zeroibis View Post
Something this got me thinking about. Would it be possible to have a Meta Mod plugin that is able to do the same thing and then actually update the game data files or generate test ones for the user to try out automatically. It would be great if there actually was a simple way to allow for servers to auto update changes.
Go for it if you want.

Some reasons that I haven't:
It would only be possible for virtual function offsets, and with the current code, only offsets on linux could be guaranteed to be correct.

That also doesn't take into account writing gamedata back out, which is extra difficult with how it's structured. Multiple files and even multiples of same sections in a file all get combined and flattened internally, without the info needed to write them back out. It would be much extra effort to keep all of the data required to write them back out as they were, rather than a single file per engine or game, with everything that got combined into it.

Another, possibly smarter approach would be to add another gamedata section type to SM, AutoOffset or something that takes a signature or symbol name and just looks up the offset from the vtable on the fly (similar to the checker), but then it still breaks if that signature changes, being more difficult to fix for signatures than the original offset would be, which is one reason why I haven't bothered to add it for Windows yet, and instead use a guess.
psychonic is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 07-09-2012 , 09:36   Re: Gamedata Checker
Reply With Quote #2

Quote:
Originally Posted by psychonic View Post
Go for it if you want.
If only I was a real programmer lol... I can imagine it is hard which is why it has not been done yet and something like this being hard for you guys is like oh throwing that ship was hard for superman but maybe you can do better rofl.

Despite the fact that I am in these forms a lot working on code I am a business major that works in telecommunications. I learned how to program java in HS and that is it. I am sure I could pickup MM in a few years but most of what I know and have learned has been thanks to the help of all the great people at SM over the years

On that note (and possible even more off topic) thanks again everyone for all your help over the years in helping us noobs learn to program! The great community here is what has allowed all of these amazing mods to prosper, thanks again!
__________________
zeroibis is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 07-09-2012 , 10:38   Re: Gamedata Checker
Reply With Quote #3

Quote:
Originally Posted by psychonic View Post
but then it still breaks if that signature changes, being more difficult to fix for signatures than the original offset would be, which is one reason why I haven't bothered to add it for Windows yet, and instead use a guess.
If the signature of a function changes (ie.: a parameter got changed), you would have to change the Call or Hook-Code anyway, wouldn't you ? The only problem I see is windows because it doesn't have symbols in the binaries.
Also some kind of caching would be nice then, something that compares the checksum of a library and loads the memory addresses from the cache instead of doing a pattern search / vtable offset resolving every time.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0

Last edited by berni; 07-09-2012 at 10:40.
berni is offline
psychonic

BAFFLED
Join Date: May 2008
Old 07-09-2012 , 10:41   Re: Gamedata Checker
Reply With Quote #4

Quote:
Originally Posted by berni View Post
If the signature of a function changes (ie.: a parameter got changed), you would have to change the Call or Hook-Code anyway, wouldn't you ? The only problem I see is windows because it doesn't have symbols in the binaries.
If the symbol name in the linux bin changed, yes, there is a good chance that the function call would have to change as well, (although we once ran into a single instance when this wasn't the case. Valve had just renamed a class). The issue is indeed mostly with Windows, and I'm not crazy about supporting a feature like that for a single OS, or with the assumption that symbol names will always be available on linux; (They aren't always on all games). But as I said, anyone else is free to give it a shot.
psychonic is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode