YGOPRO Forum

Welcome Guest! To enable all features please try to register or login.
Options
Go to last post Go to first unread
PiFace  
#1 Posted : Tuesday, February 04, 2020 4:10:23 PM(UTC)
PiFace

Rank: Member

Joined: 5/18/2015(UTC)
Posts: 57

Thanks: 20 times
Was thanked: 20 time(s) in 14 post(s)
YGOFabrica logo


Hey guys! I've come here to show one of the projects I've been working on: YGOFabrica. This is a command line program to help automating the creation and management of custom card packs!

You can access the public development repository, follow the installation instructions, and enjoy. I'll show here some of the features:

Features:

- Creation of YGOPro extension pack folder structure
With the command `ygofab new`, a new folder is created with all the folders needed: pics, script, expansions, and artwork. This last folder is used for another cool command.

- Global and local configurations, e.g. game folders
Inside the folder created by `ygofab new`, there is a file called `config.toml`. You can edit this file to create local configurations for your pack. And there is a file with that same name where the program is installed, this is where you edit global configurations, that apply to all of your projects. You can use these files to specify where your YGOPro game is located, for example.

- Synchronization of pack to game folders:
With the command `ygofab sync`, all files needed for your pack to be usable in the game are copied to your game folder(s). In case you have more than one game folder - for example, a game folder with Link monsters, but no AI mode, and another older game version that doesn't have Link mosnters but have AI mode -, you can specify a folder (previously configured) by using `ygofab sync -g links` or `ygofab sync -g test`, respectively.

- Export pack to .zip, ready for sharing
With the command `ygofab export`, a .zip file is created with all the necessary files for you to upload and publish your pack.

And now the two best features:

- Generation of card pics from .cdb and raw artwork
This is where the artwork folder is used. If you place the artwork of your card (just the art, not the entire card pic) in that folder, named after its ID (e.g. 98301564 for Guiding Ariadne), with the command `ygofab compose`, YGOFabrica will retrieve card data from the card database of your pack and automatically generate the complete card pic! You can even specify (in the config.toml file) how you want it to be generated: using proxy style or anime style, using a different size, etc. By the way, the proxy card pics are HD (or kinda, it's 694x1012), so if you want to print them, it's already done.

ygopic


This command can be used with or without a proper pack. If you use `ygopic` insteadof `ygofab compose`, you can specify directly a folder with images and a .cdb file to generate arbitrary card pics, not only those in a pack. This is useful if you are renewing card pics of already existing cards.

Aaaaand, even though no cards like that exist (yet), you can use this to generate Ritual Pendulum monsters and even Link Pendulum monsters. YES.

- Making .cdb files out of descriptive .toml files
Inserting rows in a database manually and trying to figure out which combination of numbers gives you the correct type for a card is quite troublesome, right? This is no longer needed! You can describe your cards like this, in a .toml file:

Code:

[card.ariadne]
id = 98301564
name = "Guiding Ariadne"
type = "monster effect pendulum"
atk = 1700
def = 800
level = 4
race = "fairy"
attribute = "light"
category = "search"
pendulum-scales = [3, 3]
pendulum-effect = '''
Apply these effects.
● You do not pay LP to activate Counter Trap Cards.
● You do not discard to activate Counter Trap Cards.'''
effect = '''
If this card is destroyed by battle or card effect: You can reveal 3 Counter Trap Cards from your Deck, your opponent chooses 1 for you to add to your hand, and you shuffle the rest back into your Deck.'''


And with the command `ygofab make`, this file is translated into a card database! You can describe multiple cards in a same file, or split them, it's totally up to you. You can even start describing a card and later complete it. For example, if you plan to provide translations for your pack, you can describe the type, atk, def, level, etc. of the card only once, and, in a different file, describe its text. If you guys want, I can show this and two other features (sets and macros) in details.

Note: .toml files are just text files meant to be written in the TOML language. It's very simple to use and human readable. Check that link for more details.

Edited by user Wednesday, February 12, 2020 5:02:54 PM(UTC)  | Reason: Release was published

thanks 1 user thanked PiFace for this useful post.
PiFace  
#2 Posted : Wednesday, February 12, 2020 4:30:32 PM(UTC)
PiFace

Rank: Member

Joined: 5/18/2015(UTC)
Posts: 57

Thanks: 20 times
Was thanked: 20 time(s) in 14 post(s)
YGOFabrica has been released! You can follow the installation instructions to download and use it here.
Utso  
#3 Posted : Sunday, March 01, 2020 10:33:37 PM(UTC)
Utso

Rank: Member

Joined: 6/1/2014(UTC)
Posts: 87

Thanks: 6 times
Was thanked: 28 time(s) in 26 post(s)
Finally got around to trying this out. I already had some horrible tools hacked together for many of these features and was procrastinating hard on replacing them with something decent, but it seems you just did that for me. Thanks! Also, the compose command is some neat wizardry.

Anyway, I do have a question and some suggestions:
  • It looks like `sync` copies the pics and scripts directly into the corresponding folders of the main directory, instead of just zipping them up and placing them into the expansions directory. Any particular reason for that? The latter seems like a much more organized method to me.
  • It would be convenient if there was a way to make `compose` generate images for cards even when they have no artwork yet, so projects don't get held up by having to look for art first.
  • I ran into some trouble because my YGOPro installation path has a ' in it, which obviously messed with the string delimiters in config.toml. Ended up fixing it by using the multi-line ''' delimiter instead, but you might want to use that by default so this particular dumb edge case can be avoided entirely.
thanks 1 user thanked Utso for this useful post.
PiFace  
#4 Posted : Monday, March 02, 2020 11:41:27 AM(UTC)
PiFace

Rank: Member

Joined: 5/18/2015(UTC)
Posts: 57

Thanks: 20 times
Was thanked: 20 time(s) in 14 post(s)
Thanks for the feedback! So, replying your questions:

1) Actually, if I'm not mistaken, only scripts in the expansions folder get into the game, not the pics, i.e., even if you place the card pics inside the expansions folder, they won't show up. So I decided to put both directly into their respective folders, since most of the times there's no need to do anything inside them.

2) Oh, yeah, that could be useful. In a future release, this could be added.

3) Hmm, nice tip, that really avoids some edge cases. I forgot that apostrophes are a lot more common in English, so paths could include them haha. I'll change that.

By the way, talking about future releases, some bugs have already been reported too, so very soon there will be a a v1.0.1 fixing bugs, and later if nothing goes wrong, v1.1.0 will come to add feature(s).
Utso  
#5 Posted : Monday, March 02, 2020 7:30:52 PM(UTC)
Utso

Rank: Member

Joined: 6/1/2014(UTC)
Posts: 87

Thanks: 6 times
Was thanked: 28 time(s) in 26 post(s)
Originally Posted by: PiFace Go to Quoted Post
1) Actually, if I'm not mistaken, only scripts in the expansions folder get into the game, not the pics, i.e., even if you place the card pics inside the expansions folder, they won't show up. So I decided to put both directly into their respective folders, since most of the times there's no need to do anything inside them.

Shouldn't be the case from my experience at least. Just a while ago I copied a few expansions (zips and cdbs only) from the old YGOPro version to the newer one, and everything showed up perfectly fine without ever needing to touch the main folders. The only thing I know it doesn't fetch from inside the zips is strings.conf, the most that works there is a general expansions/strings.conf.
I think it would make sense to leave this up to configuration as well, so users can decide for themselves whether they'd rather have neat separation at the cost of some finer details possibly not working, or guaranteed full functionality at the cost of getting everything mixed together.
PiFace  
#6 Posted : Monday, March 02, 2020 10:43:46 PM(UTC)
PiFace

Rank: Member

Joined: 5/18/2015(UTC)
Posts: 57

Thanks: 20 times
Was thanked: 20 time(s) in 14 post(s)
Oh, now I see what you mean. I thought you were talking about placing pics in a folder `expansions/pics` and scripts in `expansions/script`. But it's literally a zip file with pics and scripts inside the `expansions` folder. I was not aware that the game could work with that too. That's why `sync` works the way it does now. But using zips for each expansion is way more organized. And about strings.conf, well, they can still be copied like they are now.
JustheGamer  
#7 Posted : Monday, April 13, 2020 3:09:04 PM(UTC)
JustheGamer

Rank: Newbie

Joined: 4/13/2020(UTC)
Posts: 1

what program should i use to open the toml files? i'm new to card making and toml overall
PiFace  
#8 Posted : Monday, April 13, 2020 4:10:08 PM(UTC)
PiFace

Rank: Member

Joined: 5/18/2015(UTC)
Posts: 57

Thanks: 20 times
Was thanked: 20 time(s) in 14 post(s)
Originally Posted by: JustheGamer Go to Quoted Post
what program should i use to open the toml files? i'm new to card making and toml overall


Any text editor program should do the job. TOML is just a specific format/language for text (just like a programming language, e.g. Lua). :)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error