如何创建一个新卡片
Last updated
Last updated
Creating cards is very easy if you're familiar with images editing softwares, you have to know how to edit images or have a friend who can use Photoshop, GIMP or Paint.net.
To create a card you have to execute the command/scratchit config create NAME
.
In this example I will call my card: example, so I execute the command /scratchit config create example
A new folder with some files will then be created automatically by the plugin, you can find it here:
Now let's edit the card! You will notice some files in the new folder, they allow you to customize the minigame based on your needs. Open the file example.yml to edit the configurations of the card.
Customizing the main properties of the card:
Most of the properties are self explanatory, there are some special properties tho:
scratch_card
: this is the type of the card (more will be added in the future)
glow
: allows you to me the item glow without enchant
needed_to_win
: how many "right" symbols are needed to be discovered by the player to win
needed_scratch_percentage
: it's the minimum scratched percentage to make the plugin show if they lose or win
win_chance
: it's the chance of the player to find the needed_to_win
symbols and win
cursor
:
speed
: speed of the cursor
pressed_sound
: sound that the cursor will make while being pressed
interval_ticks
: it's the interval between each sound play
allow_left_click
: allows the player to press the cursor using also left click
Customizing the win/lose actions: this plugin allows you to create some actions on win or lose, not only giving items but also a lot of other stuff.
For example:
Editing the graphics: you can edit the graphics as you wish! For example I will use GIMP to edit the files.
background.png
This is the shape of the card, the background.
This is the part we are going to erase using the cursor, which will reveal the background.
These are the icons shown behind the overlay.png file
This is a special file, it's basically the part of the cursor which can delete the overlay.png, this is useful if you want the cursor to erase only on the top left part and don't allow the user to remove the overlay.png using the whole cursor icon.
It's the cursor icon shown when the player moves the mouse.
It's the cursor icon shown when the player holds down right mouse button.
These are the backgrounds shown when the user wins or loses.
lose_anim
and win_anim
foldersThese are special folders and they contain the frames of the win/lose animations
Execute the reload command and then get the item