Giter Site home page Giter Site logo

tfrandomizer's Introduction

Yu-Gi-Oh! Tag Force Randomizer

This is a command-line based tool which randomizes:

  • deck recipes

  • shop boxes

More ideas on what to randomize are welcome! If you have any ideas, open an issue.

Compatibility

This tool should be game agnostic as long as you provide the correct parameters.

Currently this was only tested with Tag Force 3 EU and Tag Force 5 US. More games (and their parameters) are to come!

Usage

This is a command-line based version of the tool. Currently it is a very involved process to get results.

A GUI wrapper is available here, but if you wish to use this manually, this is how you do it:

Data preparation

  1. Extract EBOOT.BIN, the shop script and the card database (cardinfo) out of the ISO (EBOOT is in SYSDIR, shop is in USRDIR/gmodule, card database is in USRDIR/duelsys)

  2. Extract embedded EHPs out of the EBOOT using a tool like EHPScanner

  3. Find the EHP containing recipes (should have a lot of files with RCPxxx.ydc)

  4. Extract both the recipe EHP and cardinfo EHP (by using a tool like ehppack)

  5. Get the card ID list with TFCardEdit TFCardEdit -l cardinfo_eng MinCardID MaxCardID cardlist.ini (where min/max card IDs match the ones for your game)

Once that's done, you can move on to using the randomizer.

Using TFRandomizer - deck recipe shuffling/randomization

Basic usage to shuffle:

TFRandomizer -rs RecipeFolder OutFolder IncludePlayerRecipe [RandomizerSeed]

Basic usage to randomize:

TFRandomizer -rr RecipeFolder OutFolder IncludePlayerRecipe [RandomizerSeed]

Both do very similar things. The difference is that shuffler will not duplicate decks, whereas randomizer may do it.

  • RecipeFolder: the folder of the recipe EHP extracted by the ehppack tool

  • OutFolder: the output folder where the shuffled recipes will be placed

  • IncludePlayerRecipe: a boolean, 0 or 1 value. If enabled, the player's starting deck will also be affected (RCP000.ydc)

  • RandomizerSeed: optional value, for setting the seed. If omitted, the seed will be derived from the time of execution.

Using TFRandomizer - shop randomizer

Basic usage:

TFRandomizer -s CardIDList InShopPrx BoxInfoOffset SegmentOffset BoxCount MinPackPrice MaxPackPrice MinPackSize MaxPackSize OutShopPrx [RandomizerSeed]

This command requires a lot of information to function properly.

  • CardIDList: the cardlist ini file that was generated with TFCardEdit before

  • InShopPrx: the shop prx file you got out of the ISO

  • BoxInfoOffset: offset of box info in the file (Tag Force 3 (ULES01183) example: 0x2031C)

  • SegmentOffset: offset of the memory segment from the file start (Tag Force 3 (ULES01183) example: 0x54)

  • BoxCount: number of boxes in the shop

  • Min/MaxPackPrice: range of min/max prices of packs

  • Min/MaxPackSize: range of min/max size of box (TODO: correct the name to reflect the real state)

  • OutShopPrx: output file where the modified shop prx will be stored

  • RandomizerSeed: same as before, for setting the seed, optional value

Shop script offsets

You can find the shop data manually by searching it in a tool like IDA.

Here are the currently known ones:

Game BoxInfoOffset (file) BoxInfoOffset (mem) SegmentOffset BoxCount
Tag Force 3 ULES-01183 0x2031C 0x202C8 0x54 48
Tag Force 5 ULUS-10555 0x23090 0x2303C 0x54 60

Using randomized recipes

Currently there is no easy way to utilize these other than by hex editing the data in.

A modification to the EBOOT is required in order to redirect the embedded files to files on disc. This is necessary in case the EHP file is bigger than what it fits to the EBOOT.

As of now I've only written the modifications for Tag Force 3 EU and Tag Force 5 US.

The modified EBOOTs can be found here:

The current plan is to write a PRX plugin which will do these modifications during runtime and hopefully simplfy the process!

tfrandomizer's People

Contributors

xan1242 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

tfrandomizer's Issues

[Feature Request] Plandomizer

The Ocarina of Time Randomizer has a feature called Plandomizer. The idea is that people can plan the randomization of the content by providing a file that specifies which content is found at which location. I was wondering if something like this can be done here, too.

I would also like to contribute to your project, but I don't know how you came up with code for your randomizer to begin with. Were you able to decompile some of the original tag force games? Did you get your hands on any leaked source code? Please let me know.

[Idea] Difficulty Mod

I played around with some of the stuff you wrote here - compiled a map of string/ydcs.

But I have a goal/idea that would be interesting - a difficulty mod. Basically force npcs to use their most difficult deck without banned cards right from the start. This game is way too easy and this would be a step in the right direction.

I don't think we can edit the game logic for this, but we could edit the decklists 01 and 02 for each duelist to their 03 decklist.

Prob logic would be to map ygc to deck string and then create a config/json file to what declist ids to be replaced by what. Read the config file and then patch decklist in eboot.bin with proper change so it wont crash.

I could almost do this, but I dont know how to patch the ygc back into eboot bin/modify it so it points to the modified ygc file outside. In the workflow you provided where ygc files are unpacked.

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.