Coder Social home page Coder Social logo

p3's People

Contributors

jabdownsmash avatar spxtr 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p3's Issues

p3 crashes if any address is not within enum boundaries

For global addresses, this will likely not be an issue, but this is an issue for player[i].action_state and will be for any addresses that chase pointers. If a game ends, the pointer isn't guaranteed to be pointing at char data anymore, and p3 ends up trying to parse some random value from the memory into the action_state fields, and the ActionState enum conversion fails.

For action_state specifically, a solution would be to ignore these addresses from Dolphin if menu isn't Game, but implementing a solution like that might not work for all addresses. A more general but less predictable solution would be to set the field to the default value when the enum conversion error is caught.

Crash in tilt_stick

I tried running p3 but it always immediately crashes in tilt_stick. The issue appears to be that state.players[2].cursor_y is NaN. Everything seems to work fine if I change the [2]s to [1]s - p3 (now p2) picks fox at character select and multishines in game.

Import module Error

When I run the code, I get "No module named 'p3.fox'; 'p3' is not a package." Is there any simple way to fix this without modifying the scripts themselves (p3.fox --> fox is the only way I got rid of that error, but then I had to change variable names as well). Thanks!

Create a system for managing addresses

In this branch I've created a possible way to handle addresses, that is, to have a map of addresses to address objects so that parsing can happen like so:

#addr.py

addresses = [
#                      name               address     mask        bitshift
    at.IntegerAddress("playerOnePercent", "804530E0", 0x00FF0000, 16),
    at.IntegerAddress("playerTwoPercent", "80453F70", 0x00FF0000, 16),
    at.IntegerAddress("globalFrameCounter", "804D7420", 0xFFFFFFFF, 0),
]

for address in addresses:
    names[address.address] = address

#usage:
for address, value in mw:
    if(address in addr.names):
        parsedValue = addr.names[address].get_value(value)

There will likely be many addresses to manage in p3 and I believe that this is a sane way, however, that may not make sense depending on the structure of p3. If p3 moves towards being event-driven I feel that this approach is best, since the above implementation would naturally extend to being able to subscribe to events by name. This would also allow for the Melee game state to be managed as a map of names to values.

How to find new memory addresses?

Can you add some documentation on how you discovered the memory addresses? I would like to add player one and player two positions.

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.