Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amauryfischer opened this issue May 31, 2021 · 7 comments
Open

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

amauryfischer opened this issue May 31, 2021 · 7 comments

Comments

@amauryfischer
Copy link

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
Copy link
Owner

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

@amauryfischer
Copy link
Author

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

@amauryfischer
Copy link
Author

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
Copy link
Author

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

@pixeltris
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

pixeltris commented Jun 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants