Customizing Mad Wizard
An original game by ubeefx
Moderators: ubeefx, CCGHQ Admins
Customizing Mad Wizard
by ubeefx » 02 Oct 2022, 18:57
Without programming it is possible to do some customizations to Mad Wizard.
The first thing to do is unzipping the release, for instance MadWizard-3.7.jar, to a new folder.
With the following command the game can then be run in the folder.
Some examples :
For instance Diving Griffin. To do this, in sets add the card to one of the files, for instance p22.txt.
It is best to look at the existing deck themes to see by example how they are defined.
The full set of supported cards is copied to the clipboard after startup of the game.
This can be executed with this command or double clicked to execute if Java is installed.
The first thing to do is unzipping the release, for instance MadWizard-3.7.jar, to a new folder.
With the following command the game can then be run in the folder.
- Code: Select all
java com.magic.main.MagicMain
Some examples :
- in screens replace screen1.jpg with https://wallpaper.dog/large/142678.jpg
- in avatars replace 001.jpg with https://artbreeder.b-cdn.net/imgs/ddbf2ec442b1dca3f2e2f512.jpeg
- in neon replace neon1.jpg with https://www.shareicon.net/download/256x256/2015/08/17/86676_cat_256x256.png
For instance Diving Griffin. To do this, in sets add the card to one of the files, for instance p22.txt.
- Code: Select all
name=Diving Griffin
cost={1}{W}{W}
type=Creature
stats=2/2
rule=Flying, vigilance
url=https://scryfall.com/card/8ed/17/diving-griffin
It is best to look at the existing deck themes to see by example how they are defined.
The full set of supported cards is copied to the clipboard after startup of the game.
- Code: Select all
!w,Griffin
!Diving Griffin custom deck
# 36 creatures
36,36 {
Diving Griffin
}
# 24 lands
24,24 {
Plains
}
This can be executed with this command or double clicked to execute if Java is installed.
- Code: Select all
java -jar Wizard.jar
Re: Customizing Mad Wizard
by ubeefx » 19 Oct 2022, 18:37
I have some more modding tips for today.
In Magarena 2.0 and Mad Wizard Blue 3.9 the cards are all in cards.txt in the data folder.
This makes it even easier to modify the cards in the game by adding or removing cards.
It is possible to remove deck themes, just delete the ones you do not want in the decks folder.
In this example I removed all but 5 deck themes. The campaign now only has 5 opponents.
Also I replaced in the themes folder the wood and marble textures.
It is also quite easy to modify the save files in the Mad Wizard saves folder.They can be opened with any text editor.
In this example I replaced 10 cards of the player deck with Raging Goblin and put the number of opponents to 11.
In Magarena 2.0 and Mad Wizard Blue 3.9 the cards are all in cards.txt in the data folder.
This makes it even easier to modify the cards in the game by adding or removing cards.
It is possible to remove deck themes, just delete the ones you do not want in the decks folder.
In this example I removed all but 5 deck themes. The campaign now only has 5 opponents.
Also I replaced in the themes folder the wood and marble textures.
It is also quite easy to modify the save files in the Mad Wizard saves folder.They can be opened with any text editor.
In this example I replaced 10 cards of the player deck with Raging Goblin and put the number of opponents to 11.
- Code: Select all
opponents=11
p1.card10=Raging Goblin
p1.card11=Raging Goblin
p1.card12=Raging Goblin
p1.card13=Raging Goblin
p1.card14=Raging Goblin
p1.card15=Raging Goblin
p1.card16=Raging Goblin
p1.card17=Raging Goblin
p1.card18=Raging Goblin
p1.card19=Raging Goblin
Re: Customizing Mad Wizard
by ubeefx » 20 Oct 2022, 19:55
Now it is time to add some custom cards.
This will only work for cards with rule text that is supported by Mad Wizard.
Take for instance these 4 Angel themed cards from https://mtgcardsmith.com.
Then in the scans folder of the MadWizard data folder, replace the Plains images with the proper images, for instance 7ed-341-plains.jpg by the image for Elemiah, Warding Angel.
I also created a quick theme deck for these cards by replacing w_random.dec in decks with this.
Notice that also the wood texture in themes is replaced this time with an angel themed texture.
Finally lets play a quick game against the Green deck.
All of this is possible without a single line of code. Enjoy!
This will only work for cards with rule text that is supported by Mad Wizard.
Take for instance these 4 Angel themed cards from https://mtgcardsmith.com.
- https://mtgcardsmith.com/view/elemiah-warding-angel
- https://mtgcardsmith.com/view/deathless-angel-1
- https://mtgcardsmith.com/view/angels-blessing-11
- https://mtgcardsmith.com/view/avacyn-angel-of-hope-55
- Code: Select all
name=Elemiah, Warding Angel
cost={1}{W}{W}
type=Legendary
type=Creature
subtype=Angel
subtype=Cleric
stats=2/2
rule=Flying, lifelink
rule=Other Angel creatures you control have hexproof.
url=https://scryfall.com/card/7ed/341/plains
name=Deathless Angel
cost={4}{W}{W}
type=Creature
subtype=Angel
stats=5/7
rule=Flying
rule={W}{W}: Target creature gains indestructible until end of turn.
url=https://scryfall.com/card/7ed/342/plains
name=Angel's Blessing
cost={3}{W}
type=Legendary
type=Enchantment
subtype=Aura
rule=Enchant creature
rule=Enchanted creature has +3/+3 and has flying, haste and vigilance.
url=https://scryfall.com/card/7ed/343/plains
name=Avacyn, Angel of Hope
cost={5}{W}{W}{W}
type=Legendary
type=Creature
subtype=Angel
stats=8/8
rule=Flying, vigilance, indestructible
rule=Other permanents you control have indestructible.
url=https://scryfall.com/card/7ed/344/plains
Then in the scans folder of the MadWizard data folder, replace the Plains images with the proper images, for instance 7ed-341-plains.jpg by the image for Elemiah, Warding Angel.
I also created a quick theme deck for these cards by replacing w_random.dec in decks with this.
- Code: Select all
!w,Angel
!Custom angels
24,4 {
Segovian Angel
Inspiring Overseer
Elemiah, Warding Angel
Deathless Angel
Angel's Blessing
Avacyn, Angel of Hope
}
# 16 lands
16,16 {
Plains
}
Notice that also the wood texture in themes is replaced this time with an angel themed texture.
Finally lets play a quick game against the Green deck.
All of this is possible without a single line of code. Enjoy!
Re: Customizing Mad Wizard
by ubeefx » 07 Nov 2022, 20:23
All these customisation examples are now much easier to do in Mad Wizard 4.
Re: Customizing Mad Wizard
by Cyril » 08 Nov 2022, 20:05
Cool! The increasing customisation of Mad Wizard brings it close to Wagic which is a game I admired (actually, admire - as it still exists and is being developed) for how easy it is to personalise.
You say that
You say that
Is there documentation somewhere about the rules/mechanics Mad Wizard does not support?This will only work for cards with rule text that is supported by Mad Wizard.
Re: Customizing Mad Wizard
by ubeefx » 08 Nov 2022, 20:45
Hi Cyril, there is a lot of rule text that Mad Wizard does not support.
Internally the engine works with translation of rule text using regular expressions into actual code.
Depending on the rule text there is some flexibility like the amount or the card name that can vary.
As an example both these are supported, so likely gaining 4 life would also work.
Cards that have similar rule text could work. So making custom cards is possible to some degree.
Internally the engine works with translation of rule text using regular expressions into actual code.
Depending on the rule text there is some flexibility like the amount or the card name that can vary.
As an example both these are supported, so likely gaining 4 life would also work.
- Code: Select all
Destroy target enchantment. You gain 2 life.
Destroy target enchantment. You gain 3 life.
Cards that have similar rule text could work. So making custom cards is possible to some degree.
- Attachments
-
- rules.txt
- (241.43 KiB) Downloaded 673 times
Re: Customizing Mad Wizard
by Cyril » 09 Nov 2022, 17:53
Thanks - that's comprehensive! Interesting that the engine works with natural language expressions - I didn't expect that!
Re: Customizing Mad Wizard
by ubeefx » 31 Jan 2023, 20:26
This is the updated list of all rule text for cards supported by Mad Wizard 4.6.
There is no source code provided for the Mad Wizard engine jar, but it is actually very easy to obtain.
With jdec.app the MadWizard4.jar can be uploaded and it provides easy browsing of the decompiled Java source code.
Another one that works is decompiler.
- rules46.txt
- Mad Wizard 4.6 supported rule text
- (249.45 KiB) Downloaded 638 times
There is no source code provided for the Mad Wizard engine jar, but it is actually very easy to obtain.
With jdec.app the MadWizard4.jar can be uploaded and it provides easy browsing of the decompiled Java source code.
Another one that works is decompiler.
Re: Customizing Mad Wizard
by ubeefx » 01 May 2023, 07:33
The supported rules text file is now part of the project.
Re: Customizing Mad Wizard
by memorablereceive » 28 Nov 2023, 06:46
there are a lot of rule texts that Mad Wizard doesn't support. how can i do it?
- memorablereceive
- Posts: 2
- Joined: 28 Nov 2023, 04:58
- Has thanked: 0 time
- Been thanked: 0 time
Re: Customizing Mad Wizard
by ubeefx » 28 Nov 2023, 18:21
I updated the supported rules text. It is true a lot of rules are not supported.
Of the total card pool of 50565 cards, 14395 or 28 % of the cards are supported.
The main idea is if someone wants to have custom cards, it could be possible by mixing and modding the existing rule texts and checking if the engine can handle them.
Usually supporting new rules will require all kinds of changes to the engine code, ranging from minor to very large.
What specific new rules would be interesting to add and which new deck themes would they enable?
Of the total card pool of 50565 cards, 14395 or 28 % of the cards are supported.
The main idea is if someone wants to have custom cards, it could be possible by mixing and modding the existing rule texts and checking if the engine can handle them.
Usually supporting new rules will require all kinds of changes to the engine code, ranging from minor to very large.
What specific new rules would be interesting to add and which new deck themes would they enable?
Re: Customizing Mad Wizard
by Cyril » 08 Dec 2023, 18:51
Hi ubeefx. I think the questioner is probably a bot... But in terms of new deck themes, landfall would be quite an interesting archetype to play. I'm tempted to say land destruction too, but lots of people hate that so maybe not!
It's noticable that search library effects are not possible in Mad Wizard. But I suspect that this would be very, very difficult for the AI to use properly - and the excellent AI is a real strength of the game so compromising that would be a shame.
It's noticable that search library effects are not possible in Mad Wizard. But I suspect that this would be very, very difficult for the AI to use properly - and the excellent AI is a real strength of the game so compromising that would be a shame.
Re: Customizing Mad Wizard
by ubeefx » 10 Dec 2023, 09:52
Hi Cyril, landfall is a nice suggestion and should be already feasible.
Land destruction can indeed be annoying to play against.
Searching the library is technically possible, would require work for both UI and AI.
As you state, it might be a challenge to let the AI pick the best card, it would require some custom decision logic to make it work well.
Land destruction can indeed be annoying to play against.
Searching the library is technically possible, would require work for both UI and AI.
As you state, it might be a challenge to let the AI pick the best card, it would require some custom decision logic to make it work well.
Re: Customizing Mad Wizard
by AbrahamAnthony » 21 Aug 2024, 14:49
Hi Cyril, landfall is a great suggestion and should already be feasible. While land destruction can be frustrating to play against, it's an interesting mechanic to consider. Searching the library is technically possible but would require significant work on both the UI and AI. If you're up for a challenge, it might be worth exploring, just as you might explore new strategies at our . The AI would need custom decision logic to ensure it picks the best card effectively.
- AbrahamAnthony
- Posts: 1
- Joined: 21 Aug 2024, 14:44
- Has thanked: 0 time
- Been thanked: 0 time
Re: Customizing Mad Wizard
by ubeefx » 22 Aug 2024, 08:01
A follow up on the request for new deck themes from Cyril.
A mono red deck theme combining land destruction and artifacts is now available in 5.x latest release.
It uses already available cards, so this could have been made as custom content by any user.
As shown in the screenshot, if it plays out well, your opponent will suffer.
Fast decks still have a fighting chance.
A mono red deck theme combining land destruction and artifacts is now available in 5.x latest release.
It uses already available cards, so this could have been made as custom content by any user.
As shown in the screenshot, if it plays out well, your opponent will suffer.
Fast decks still have a fighting chance.
15 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest