Code Monkey home page Code Monkey logo

metronome's Introduction

Metronome
Scc Count Badge Actions Status

A set of tools for randomizing and modifying Pokémon games.

Build

External dependencies:

After getting the dependencies just clone the repo and its submodules and run:

zig build

All build artifacts will end up in zig-out/bin. See zig build --help for build options.

Resources

Links to external resources documenting the layout of Pokemom games.

Roms

Gen 1

Gen 2

Gen 3

Gen 4

Gen 5

All Gens

metronome's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar hejsil 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  avatar  avatar  avatar

Watchers

 avatar

metronome's Issues

Have CI build the entire project and not just the cli tools

Simply running zig build from the github actions gives:

lld: error: unable to find library -lX11
lld: error: unable to find library -lXft

But they are already installed...

Run sudo apt-get install libx11-dev libxft-dev
Reading package lists...
Building dependency tree...
Reading state information...
libxft-dev is already the newest version (2.3.2-1).
libx11-dev is already the newest version (2:1.6.4-3ubuntu0.3).
libx11-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

Don't randomize field item tms/hms

  • The fields items that are tm/hms should not be randomized.
  • Don't choose tm/hms when choosing a random item.
  • Have an option to override this behavior (--include-tms-hms)

[suggestion] few random ideas

  1. trainers have random number of pokemon 1-6
  2. random music - battle music
  3. exempt gym leaders in random trainer names

Add new command that allows specifying Pokémon + item + ability + moves for trainer parties

Name pending, but basically you should be able to do:

Alakazam, Magic Guard, Focus Sash, Psychic,     Grass Knot,    Focus Blast, Shadow Ball
Arcanine, Intimidate,  Life Orb,   Flare Blitz, Extreme Speed, Wild Charge, Close Combat
...

And then this command will, if a trainer has the Pokémon, give the Pokémon that item + ability + moves. Details:

  • If the trainer has a Pokémon that is not in the list nothing will happen to that party member
  • Only valid abilities for that Pokémon can be specified. It is not possible to have a trainer have a Pokémon with an ability it does not have.
  • Any moves and items are allowed, as that is possible in the games.
  • If multiple sets exists for the same mon, then they are added to a circular buffer. For each trainer mon, we pick the first in the buffer and then shift to the next item in the buffer for the next trainer to pick.
  • Don't exit the program if any error is in the format. Just print to stderr and try the next line. Some games might not have the moves we request, but the list should still work for those games, just missing some entries.

Other features that might make sense, but make this more complicated to implement:

  • Add a level range for the Pokémon
    1-30, Alakazam, Magic Guard, None,       Confusion,   Grass Knot,    Shock Wave,  Toxic
    31-,  Alakazam, Magic Guard, Focus Sash, Psychic,     Grass Knot,    Focus Blast, Shadow Ball
    
    • Would allow one to make a more even difficulty curve of the trainers. Lower level trainers have worse sets.

Rework ui for a more streamline experience where the main focus is using premade settings

So the main page of the ui would be something like this:

+-------------------------------+
|                               |
| +-------------+ +-----------+ |
| | - Stones    | | Randomize | |
| |   Hard mode | +-----------+ |
| |   Standard  | +-----------+ |
| |             | | It does   | |
| |             | | stuff     | |
| +-------------+ +-----------+ |
|                               |
+-------------------------------+

So basically, the main page only show preset settings, a description of the selected and the randomize button nothing else. There would then be some way to get back to "advance mode" where you could make your own presets or whatever.

Randomize story text

Have a randomizer that randomizer story text. This command doesn't need to generate sentences that makes senses logically, as long as it can generate sentences that you can derive some meaning from.

My idea currently is to generate a directed graph for all words appearing in the game, with the neighbors being words that come after that word in the game:

--- Sentences ---
I like shorts.
Do you like Pokemon?

--- Graph ---
     I ---> like ---> shorts ---> . ---> <end of string>
            ^  \
           /    v
Do ---> you     Pokemon ---> ? ---> <end of string>

From this graph, you could pick any starting word, and just pick a random neighbor until you hit <end of string>. This would hopefully generate sentences that can be read and understood, but they probably wouldn't make much sense (which is fine).

Random level on battles

would it be possible to add randomizing on levels of wild pokemon/trainers/gyms etc with its own check box?

Allow adding and removing Pokémons from trainer parties

Extracted from #3.

Commands should be able to modify how many Pokémons a trainer have. This could allow for Pokémon runs where all trainers have 6 Pokémons or just a run where the amount of Pokémons are randomized.

Challenges:
For games on the nds, this shouldn't be too difficult, as we can resize files in the file system of the game pretty easily.

For gba and gb games, these have fixed places where things are stored in the rom. Changing the sizes of things could break the rom if it isn't done proberly. I've seen tools that expand the space of gen3 games, so I'll have to look into how they accomplish that.

Seed stability

Code should be refactored into a form that allows for changes without breaking seed stability. A thing that can be done is to have N rngs instead of one for a program. Each rng will randomize a certain "field". This way, changing the order in which we randomize. More thought needs to go into this. I'm nowhere near happy enough with the code to declare it as "seed stable"

cannot compile: I probably don't have the right libraries (clap)

Hello, I'm very new at compiling zig code, and I don't understand how to compile your application.

When I try what you put in the README:

zig build

I get that:

./src/core/tm35-apply.zig:1:14: error: unable to find 'clap.zig'
const clap = @import("clap");
             ^
./src/core/tm35-apply.zig:71:20: note: referenced here
    var arg_iter = clap.args.OsIterator.init(&arena.allocator) catch
[...]

I suppose I don't have the clap library, but how to get it? Maybe the README could be more specific.

I don't think this is relevant, but I have the latest zig compiler from master.

Thanks!

Expose trainer names

Extracted from #3.

We should be able to load and store trainer names. This would allow commands to change and randomize them.

Challenges:
Text in most games are stored in a custom encoding that depends on the localization of the rom. We need to be able to decode the strings to UTF8 and encode UTF8 back to this encoding.

Randomizing pokeballs allows player to optain item ???

So far, I've found these items in Black/white 2 but I'm sure they can also be found in other games. This is not a bug per say. tm35-rand-pokeballs works as intended. The problem here is that item 0 tends to be an invalid item. tm35-rand-pokeballs needs a way to detect that an item is invalid for this problem to be fixed.

Newlines in UI should only be generated when there is a blank line in the help message

For a help message like this:

Usage: tm35-generate-site [-hv] [-o <FILE>]
Generates a html web site for games. This is very useful for getting
an overview of what is in the game after heavy randomization has been
apply.

Options:
        -h, --help              Display this help text and exit.
        -v, --version           Output version information and exit.
        -o, --output <FILE>     The file to output the file to. (default: site.html)

This UI is generated:
image

What we really want is to only have line breaks when there is a blank space in the help message.

Auto generate wiki for randomized game

Randomizing games is fun and all, but sometimes you still want to know how to get certain items or other information.

To to this, a command could be created that takes the tm35 format and generates a single html file which can then be opened in a browser. This command will not be completely generic. It will special have special logic for some fields in the data passed in, so that it can present data in a more sensible way. For example, the command should special case all fields it knows are species id's, and generate hypelinks to the pokémons section of the html.

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.