pixeltris / Lotd

Yu-Gi-Oh Legacy of the Duelist helper tool
28 stars 8 forks source link

[🛠 Feature 🛠] Deck/Extra Deck limit #17

Open amauryfischer opened 3 years ago

amauryfischer commented 3 years ago

Hi, thanks for your awesome works. I wonder if it is possible to change the deck size and extra deck size limit >60 and >15 ?

pixeltris commented 3 years ago

Possibly, but there are many hard coded limits in the exe so you just have to play around and see. Looking at the duel structure in memory it seems like there's space for up to 120 cards in the deck.

https://github.com/pixeltris/Lotd/blob/36c8a54d4fa58345974957c0bb061b2878ee9353/Lotd/NativeScript/MemTools.Structures.cs#L208-L217

For making custom decks which might be able to break limits see https://github.com/MoonlitDeath/Link-Evolution-Editing-Guide/wiki/Creating-Custom-Decks,-Characters-and-Duels:-The-Full-Guide

amauryfischer commented 3 years ago

Thanks a lot, i'll give a try :)

amauryfischer commented 3 years ago

Just a small question, how do you find your own deck in decks.zib ? maybe i'm missing sth but it seems i can only edit other characters deck ^-^

amauryfischer commented 3 years ago

Sorry it's the first time i try to mod ygo

pixeltris commented 3 years ago

I'd recommend reading that wiki, the Home page gives a good overview of modifying files https://github.com/MoonlitDeath/Link-Evolution-Editing-Guide/wiki

amauryfischer commented 3 years ago

Hi again , i'm sorry to disturb you but after reading the guide several times, espetially this part : "Creating Custom Decks, Characters and Duels: The Full Guide" i really could not find how to edit my own deck. i can edit story deck but i cannot find where are located ydc for my personal decks

pixeltris commented 3 years ago

Personal decks are stored in the save file. The save file has strict limits on what it can load in terms of deck sizes:

https://github.com/pixeltris/Lotd/blob/36c8a54d4fa58345974957c0bb061b2878ee9353/Lotd/SaveData/DeckSaveData.cs#L45-L47

So yea, if you wanted to break limits you definitely couldn't do it with user decks (at least not from the save file). But maybe story decks, which you can then play with by selecting a story deck in game.

EDIT: Never-mind, the save file might be an option. I briefly looked at the code without re-reading it

https://github.com/pixeltris/Lotd/blob/36c8a54d4fa58345974957c0bb061b2878ee9353/Lotd/SaveData/DeckSaveData.cs#L76-L78

You can import ydk decks files using the tool, so that might work to break the limits. Though there might still be in-memory limits which stop this. You'd just have to try it out.