Jump to content

How could I hash .mis files?


Recommended Posts

So currently I'm trying to have .mis files hashed so they can't be edited (people cheating) in-game, but the question is whenever I change .mis to .cs and it writes to .cs.dso, the program is able to read and load the stage with the extension ".cs" just fine, but not with ".cs.dso" -- does anyone have any suggestions on how it can read .cs.dso or is this impossible?

Link to post
Share on other sites

In case your game is multiplayer, the .mis files cannot be edited by clients.

In case your game is singleplayer, you need to remove the tools, before you release, obviously, this will make it a little harder, but those who want can still do it.

What exactly are you trying to do here? Did you make a release build with compiled scripts already? If so, what is still left that you want do prevent from being edited?

Link to post
Share on other sites

Is this for a multiplayer game? If so, players shouldn't be able to cheat by editing their copy of the .mis file if Torque's client-server model is intact. The way mission loading works by default is the server sends the mission file data to every client when they connect - players don't actually load mission files at all. Any changes a player makes to their copy of the .mis file won't have an effect unless they host a server.


If this is a singleplayer game and you just want to protect the mission files from editing, you might be able to put them in a password protected zip. It's been a decade since I used TGE but if I recall it could read data from zip archives.

Link to post
Share on other sites

@Duion,


The program is "singleplayer" with all files compiled already. The only problem is -- someone could edit the .mis file(s) to change the skybox...or level number...etcetera. I'm trying to prevent .mis files from being edited.


@Happenstance,


Unfortunately, the first worked, but the latter did not. =(

Link to post
Share on other sites

Thinking about this some more, there's actually no reason missions couldn't be compiled to .dso. I'm assuming it's failing somewhere in the loading stage because certain parts of the code look for a file with a .mis extension and expect those to be readable text files (see loadMission() and buildLoadInfo()). Those parts could easily be rewritten to just exec the mission file like a normal script and proceed from there.


Another potential option which might work:

1). Compile your mission to dso as you were doing before.

2). Create a blank file, name it .mis and inside this file simply add:

exec(<your_compiled_mission>.cs);

3). Now when you load a level, have it load the blank .mis file.


I can't test this right now so it's entirely possible it'll fail as well but might be another avenue to explore.


Oh, and here's an oldie but goodie on adding encrypted zip support:

http://www.garagegames.com/community/resource/view/9896/2

Link to post
Share on other sites
  • 3 weeks later...

What effect of doing a no TORQUE_TOOLS in the engine vs just deleting the tools directory?

I have an issue where I need to use file open write pathcopy etc but that fails using no TORQUE_TOOLS for release. Can I hoist the functions out of fileSystemFunctions.cpp without causing issues or having no tools directory in the scripts cause issues..

Link to post
Share on other sites

limitations of encrypted zip files as well as potential problems in file comparison between client and server are the only unknowns here as far as I can tell, the .mis files are probably checked more adamantly than others, might be worth chasing that through the circular client/server relationship since to the best of my knowledge they are the only shared files between client and server tho i'm sure others know better than i do.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...