pixeltris/Lotd

[๐Ÿ›  Feature ๐Ÿ› ] Deck/Extra Deck limit

amauryfischer opened this issue ยท 7 comments

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 ?

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.

[MarshalAs(UnmanagedType.ByValArray, SizeConst = 120)]
public DuelCardInfo[] Hand;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 120)]
public DuelCardInfo[] Deck;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 150)]
public DuelCardInfo[] ExtraDeck;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 150)]
public DuelCardInfo[] Graveyard;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 225)]// size likely incorrect
public DuelCardInfo[] Banished;

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

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

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 ^-^

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

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

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

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

private const int maxMainDeckCards = 60;
private const int maxSideDeckCards = 15;
private const int maxExtraDeckCards = 15;

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

short numMainDeckCards = reader.ReadInt16();
short numSideDeckCards = reader.ReadInt16();
short numExtraDeckCards = reader.ReadInt16();

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.