GithubHelp home page GithubHelp logo

mgsv_emulator's People

Contributors

alissonmuller avatar unknown321 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mgsv_emulator's Issues

blank settings file

please add a blank settings.py file because its not easy to figure out what properties are missing

Some parameters are impossible to decipher

There are parameters such as construct param which are not hashes, but a set of options (or at least I think so). As example, construct_param contains info about fob position (ie indian ocean), fob camo and something else. But option for camo affects mission timer as well - there are values that set same type of camo, but with completely different mission time.

These options can be discovered in two ways:

  • comparing all lua vars before fob mission and during it, finding differences between them and making conclusions
    • Pros: sounds easy, all you need is to compare two huge sets of values
    • Cons: there is a LOT of values and some of it is userdata, which cannot be dumped in any way
  • building my own lua module by writing it in C
    • Pros: you get access to the stack, memory and everything, a lot of flexibility
    • Cons: it's painfully hard to make a lua module

First solution will fail on some variables, but still viable.
Second solution is the one that we need the most - literally everyone will benefit from it.

What stops us from making our own lua module (aside from having to write it in C): there is no importable symbols in exe.
Since lua engine is embedded into exe, your module will have to call lua C functions (such as lua_tonumber) from the exe itself. In order to call lua functions from the exe, we need addresses of these functions (these are called symbols or whatever). You can get them using depends.exe, but no one leaves symbols in the release build to prevent people like us calling functions. Therefore, the only option left is to reverse engineer the game, find addresses of core lua functions and build our own C module (it's hard but possible).

Examples of lua hooks:
https://blog.lms-dev.com/watch-dogs/watch-dogs-lua-engine-hook/ ( https://github.com/LMSDev/W_D-Hook )
https://github.com/JamesWilko/Payday-2-BLT

How to provide credentials in settings.py?

How can I get the steam_id, magic_hash, and static_key? Can someone give some tips, please?
Also, should I put those credentials on settings.py, or provide them as kwargs on Client().login()?

Params decode

Hey,
Is it possible to make a simple tool/script to decode .param, like a drag & drop?
Thank you for your answer and your work :)

is this for me?

Hello mate

Can i hack some MB coins with server emulator?
All i want is some MB coins to finish online weapons faster.
I am using a cheat engine script reward editor and there is an option for MB coins and says needs server auth. could that be done?

Server responses docs

Hi, unknown321!

I would like very hard to try and make a fake server for archiving purposes.

I'm excited that the main game works in rpcs3, and although the online experience (fobs, leagues and resources, not the online multiplayer game) is quite small compared to the story, I think it would be very nice to have a custom server that enables the player to login, develop resources and so on with minimal changes client-side.

So for example, one could configure a fake enemy fob in this server, and that fob configuration will be send back to the client when opening the fob menu.

Of course, this means most of the commands must be implemented, in particular: All of the login sequence, and more from the fob & resources game. Leagues don't make sense here because there will be no real players (unless this server is made public for people to play freely, but I don't think a many will be interested)

So, TL;DR: is there any site that have the information of the commands formats, apart from mgsv_emulator?

struct.error: argument out of range

When I try to run the sample app (mgsv_nuke_watcher), I get the following error:

Traceback (most recent call last):
  File "app.py", line 126, in <module>
    gather_data()
  File "app.py", line 83, in gather_data
    steam_client.login()
  File "D:\git\mgsv_nuke_watcher\mgsv_emulator\emulator\client.py", line 100, in login
    response = self.send_command(i)
  File "D:\git\mgsv_nuke_watcher\mgsv_emulator\emulator\client.py", line 62, in send_command
    encrypted_request = self.__encoder__.encode(comm)
  File "D:\git\mgsv_nuke_watcher\mgsv_emulator\emulator\encoder.py", line 103, in encode
    text = base64.encodestring(self.__encipher__(self.__static_blowfish__, bytearray(text)))
  File "D:\git\mgsv_nuke_watcher\mgsv_emulator\emulator\encoder.py", line 52, in __encipher__
    x_text = struct.pack(ENCODE_PACK,x)
struct.error: argument out of range

blow.blowfish_encipher(x, y) is returning negative values on x and y, and it seems that ENCODE_PACK doesn't accept negative values (on my case, sys.maxsize > 2**32 evaluates to True)

ENCODE_PACK = '>l'
if sys.maxsize > 2**32:
	ENCODE_PACK = '>L'

What could be going on?
By the way, I'm on Windows 7 64 bit, using Python 3.6.2 64 bit.

Nuke counts from other platforms?

I was wondering, would it be possible to put the nuke counts from the other platforms, on the MGSV Nuke Watcher page?
What would be needed?

It's horrible.

In it's current state, emulator is just a bunch of scripts with almost zero data normalization (which is bad).
There are two solutions:

  • get rid of mysql and save everything in document-based storage such as mongodb
    • Pros: don't have to think about objects and stuff like that
    • Cons: huge queries every time you need some nested data, a lot of space taken on disk
  • normalize everything into objects
    • Pros: you have objects and objects are cool to deal with, less storage space
    • Cons: shitton of code, will probably impact execution time

Since the project is NOT using hip languages such as node.js and others that use json a lot, second option is the best option.

Is this 'useable' yet?

While reading through the previous issues, I noticed that you said "The only downside is that it is under development and unusuable atm, so you'll have to wait for unknown amount of time for me to finish."
Is it currently working now? If it is, how do you use the program? I'm not sure on a lot of things, like how to get magic_hash or how to actually boot the server.

Thanks

Find the client commands & manipulating them

I'm working on a mod/experiment for FOB's and I'm wondering how you found out the client commands. I assume you used some kind of packet sniffing but I don't know the tool for the job. Are you able to intercept a packet from the game, edit it and then see the result in game?

What I am trying to accomplish is getting access to nuclear FOB's that have long been abandoned and that seem to be untouchable. There are FOB's with nukes that haven't been touched in years because of player inactivity, and they're the cause of stagnation in the nuke numbers.

Judging from "CMD_GET_FOB_TARGET_LIST," there doesn't seem to be much flexibility in that request other than setting the type to Nuclear but I do wonder what the num field represents and what changing it would do.

"CMD_GET_FOB_TARGET_LIST": { 'compress': False, 'data': { 'index': 0, 'msgid': 'CMD_GET_FOB_TARGET_LIST', 'num': 30, 'rqid': 0, 'type': 'NUCLEAR' }, 'original_size': 0, 'session_crypto': True, 'session_key': -1 }

Alternatively, I'd like to know if there is a way to search for people with nukes on the "relationships" screen. I don't see the client command for it in this repo, or maybe I'm just not seeing it. We can then support any nuke users we find and then (through modding) invade their base in Visit mode. It might be cheating, but it's literally the only way to get to these abandoned nukes.

If filtering isn't possible, requesting a general player list until it's gone through all of them might be the only other option. On Steam that might be unfeasible, but on PS3 I imagine the number of accounts is much lower (I have a CFW PS3 setup running my own mods on MGSV)

If you have interest and time I'd love to try making this work together. I think it's definitely possible with some clever thinking. Otherwise can you tell me how to go about messing with client commands myself? I've tried WPE Pro but it didn't seem to work, plus I'm not very knowledgeable on it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.