Issues with card scripting
by nantuko84
Moderators: nantuko84, CCGHQ Admins
Issues with card scripting
by Mizar » 09 Sep 2010, 13:03
I tried to script the simple card Boros Recruit. So I've read your Wiki about card scripting at Google Code (http://code.google.com/p/magicwars/wiki/DevelopmentManual) and I came up with this cardfile:
../cards/groovy/B/o/r/Boros Recruit.card
But when I start the programm the card isn't shown in the deck editor. It's simply not there .
Did I miss something?
EDIT: Added a second backslash to the manacost.
- Code: Select all
name = "Boros Recruit"
manacost = "R\\W"
types = [ "Creature", "Goblin", "Soldier" ]
power = 1
toughness = 1
text = ["First strike"]
prints = [
["RAV", "C", 88992, 243]
]
../cards/groovy/B/o/r/Boros Recruit.card
But when I start the programm the card isn't shown in the deck editor. It's simply not there .
Did I miss something?
EDIT: Added a second backslash to the manacost.
Last edited by Mizar on 10 Sep 2010, 14:14, edited 2 times in total.
- Mizar
- Posts: 20
- Joined: 05 Sep 2010, 14:05
- Location: Germany
- Has thanked: 0 time
- Been thanked: 0 time
Re: Issues with card scripting
by nantuko84 » 10 Sep 2010, 03:28
Hi,
The problem is that your card is on server now, but not is on your client. Client uses its own card database and you need to update it:
1. Start the game
2. Press "Update card base for Deck Editor" in menu
3. If you opened deck editor before, press "New Constructed (All cards)"
I believe you need to test your card, and putting the card into your deck and then waiting for until it appears takes time, so here is the link that may help you:
http://code.google.com/p/magicwars/wiki/TestYourCard
hope this helped.
feel free to ask any questions.
The problem is that your card is on server now, but not is on your client. Client uses its own card database and you need to update it:
1. Start the game
2. Press "Update card base for Deck Editor" in menu
3. If you opened deck editor before, press "New Constructed (All cards)"
I believe you need to test your card, and putting the card into your deck and then waiting for until it appears takes time, so here is the link that may help you:
http://code.google.com/p/magicwars/wiki/TestYourCard
hope this helped.
feel free to ask any questions.
Mage\MagicWars blog: http://mwars.blogspot.com/
Re: Issues with card scripting
by Mizar » 10 Sep 2010, 14:13
Thank you very much for your help. It really works now. I was so happy that I made a screenshot that shows two of my added cards (Boros Recruit and Courier Hawk) in play :
I also followed your link, but there was one thing that is not working. Its the "odds.txt" file. I created a simple "odds.txt" file that contains only the following card:
After clicking OK I have this error message in the console window (I could not copy the message, so heres another screenshot):
I also tried to add the player id to the filename ("odds8.txt"), but I get the same error. Anyway the debug mode and the "hand.txt" file are working very well.
I am really impressed how easy it is to add some cards to your programm. I will try to add some more cards to become more familiar with card scripting. Thank you again for your help
I also followed your link, but there was one thing that is not working. Its the "odds.txt" file. I created a simple "odds.txt" file that contains only the following card:
- Code: Select all
Mountain
4
After clicking OK I have this error message in the console window (I could not copy the message, so heres another screenshot):
I also tried to add the player id to the filename ("odds8.txt"), but I get the same error. Anyway the debug mode and the "hand.txt" file are working very well.
I am really impressed how easy it is to add some cards to your programm. I will try to add some more cards to become more familiar with card scripting. Thank you again for your help
- Mizar
- Posts: 20
- Joined: 05 Sep 2010, 14:05
- Location: Germany
- Has thanked: 0 time
- Been thanked: 0 time
Re: Issues with card scripting
by nantuko84 » 10 Sep 2010, 14:34
Possibly because of "End" missing at the end of odds file. I guess you have it in hands.txt, don't you?
So try this:
So try this:
- Code: Select all
Mountain
4
End
Mage\MagicWars blog: http://mwars.blogspot.com/
Re: Issues with card scripting
by Mizar » 10 Sep 2010, 15:18
Oops, you're right. Everything is working now. Thank you again
- Mizar
- Posts: 20
- Joined: 05 Sep 2010, 14:05
- Location: Germany
- Has thanked: 0 time
- Been thanked: 0 time
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests