It is currently 23 Oct 2019, 13:36
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, friarsol, Blacksmith, KrazyTheFox, Agetian, CCGHQ Admins

Re: Card Development Questions

Postby Chris H. » 26 Dec 2010, 21:52

Wow, you have had more than your share of bad luck. Hold off on the Python stuff for the while. At some point Sol will return from his holiday and will be able to clue us in on the Python related matters.

On several occasions I have started over with eclipse and/or restarted the SVN. The project is small enough that you can download the entire SVN and set it up again.

You can drag the Project Explorer tab from below and drop it into the left hand column. This will allow you to switch back and forth between the Project Explorer view to the Synchronize view.

From your screenshot it looks like Project Explorer view is aware of the new card files. Trying Slapshot5's idea is worth investigating. Click on the triangle to the right of the Synchronize button and follow Slapshot5's advice.

Good luck. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card Development Questions

Postby SoulStorm » 27 Dec 2010, 12:30

Ok, I'm back

Workspace and scope have been verified to be set appropriately. I can't say with certainty what changes were indicated last time. However, when I placed the edited setInfo and PerSetTracking files into the res folder they were detected as changed. On the other hand, when I placed Silklash Spider into the cardsfolder to commit, it's not detected as a change. And this is after reinstalling everything.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby SoulStorm » 27 Dec 2010, 13:03

Finally, it appears I've fixed the problem. I had to right click the cardsfolder under project explorer and hit refresh. Once I did that the change was detected.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 27 Dec 2010, 13:29

SoulStorm - one thing you can do with text files short of running the python script is manually add basic rarity and pic info. All you need are these two lines:
Code: Select all
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/silklash_spider.jpg
For the rarity, just use the latest rarity info in Gatherer, and the URL for Picture is always* in the same format.

* almost always

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Card Development Questions

Postby SoulStorm » 27 Dec 2010, 13:38

Will do.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby Chris H. » 27 Dec 2010, 13:39

SoulStorm wrote:Finally, it appears I've fixed the problem. I had to right click the cardsfolder under project explorer and hit refresh. Once I did that the change was detected.
`
Ah, it is good to hear that you now have it working correctly.

The new card files can be created inside of Eclipse. From the Package Explorer right click on the "cardsfolder" folder and select:

New -> File

You can also edit an existing card file from within Eclipse.

For some reason, I like to use the simple text editor that comes with my Mac. I use the Eclipse's Refresh command to make the project aware of the new or edited card file.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card Development Questions

Postby SoulStorm » 27 Dec 2010, 14:12

Chris H. wrote:The new card files can be created inside of Eclipse. From the Package Explorer right click on the "cardsfolder" folder and select:

New -> File

You can also edit an existing card file from within Eclipse.
Thanks for the info, I'll try that.

Chris H. wrote:I use the Eclipse's Refresh command to make the project aware of the new or edited card file.
Yeah, I tried that but it didn't work. I had to specifically refresh the cardsfolder. Weird I know. Maybe it's something funky with the 64 bit software I'm using.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 28 Dec 2010, 04:03

. War Dance should be doable text-only.
Whetwheel has been requested several times and should be doable with text.
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Card Development Questions

Postby Jaedayr » 29 Dec 2010, 21:08

I added a few cards today including Phyrexian Debaser, Phyrexian Defiler, Phyrexian Denouncer and they seem to work fine but I do have a question. When should
Code: Select all
SVar:RemAIDeck:True
be used in a card? the card I copied from (Phyrexian Plaguelord) had this so I left it on them but am not sure when it should and should not be used.
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby SoulStorm » 29 Dec 2010, 21:12

Can the AI use the card effectively? If not, then use SVar:RemAIDeck:True.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby Chris H. » 29 Dec 2010, 21:19

Jaedayr wrote:I added a few cards today including Phyrexian Debaser, Phyrexian Defiler, Phyrexian Denouncer and they seem to work fine but I do have a question. When should
Code: Select all
SVar:RemAIDeck:True
be used in a card? the card I copied from (Phyrexian Plaguelord) had this so I left it on them but am not sure when it should and should not be used.
`
SVar:RemAIDeck:True

is added to the card file when you want to prevent the card from appearing in a randomly constructed deck.

We add it to cards that turn out buggy.

And to cards that have no AI code as the computer can not play the card and it takes up a valuable slot in the deck.

We also add it to combo cards that require other cards to work effectively. Airborne Aid is a good example, it is not much use if the controller does not have some birds on the battlefield.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Card Development Questions

Postby SoulStorm » 30 Dec 2010, 03:42

I'm having a problem with my most recent card submission, Summon the School. When I first committed the card, I noticed I had capitalized "the" in Summon the School, so I edited the card name and committed the change. However, when I tested the card after the edit, I received the following error:

java.lang.RuntimeException: CardFactory : getCard() invalid card name - Summon The School

at forge.CardFactory.getCard2(CardFactory.java:267)
at forge.CardFactory.getCard(CardFactory.java:236)
at forge.GameAction.newGame(GameAction.java:2208)
at forge.Gui_NewGame.startButton_actionPerformed(Gui_NewGame.java:587)
at forge.Gui_NewGame$11.actionPerformed(Gui_NewGame.java:421)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at org.jvnet.substance.utils.RolloverButtonListener.mouseReleased(RolloverButtonListener.java:111)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

The card works fine when Summon The School is given as the cardname.

This is the second card this has happened to me with, so solutions would be appreciated.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 30 Dec 2010, 06:11

You have to manually edit deck files with the old cardname. Open yourSVN/res/decks/summon_the_school_deck.dck in a text editor and delete that cardname.

Add the *new* cardname (with lowercase T) from the deck editor. No more error.
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Card Development Questions

Postby SoulStorm » 30 Dec 2010, 07:05

Many thanks! That fixed the error with both cards.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 30 Dec 2010, 07:17

SoulStorm wrote:Many thanks! That fixed the error with both cards.
Yep. That use to bite me all the time when cards.txt was one big file.
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 11 guests


Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 11 guests

Login Form