It is currently 22 Aug 2019, 18:21
   
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. » 25 Dec 2010, 17:31

SoulStorm wrote:Apparently I'm a little dense. I installed Python (3.1), placed the card txt (Whip Silk - which works fine in game) in the cardsfolder, and double clicked the setInfoScript from its installed location, but no set data was added to the card.
`
I too had some difficulty with Python and the first script that Sol released. My memory is not what it used to be.

Double clicking on the script file launches the Python shell and loads the script into Python, but the script does not automatically run as part of this. I just did the above on my Mac and the Python shell window states:

Code: Select all
IDLE 2.6.1     
>>>
`
There is some sort of a run command that will run the script and I think that it is bound to one of the F keys. I just opened the Python preferences and under keys it states:

Code: Select all
run-module - <Key-F5>
`
When I hit F5 I get a notice about tabs and spaces. It tells you how to replace the tabs with spaces and you then save the edited script. At this point the Python shell states:

Code: Select all
This script requires the text version of Arch's mtg-data to be present.You can download it from slightlymagic.net's forum and either place the text version next to this script or edit this script and provide the path to the file at the top.
Press Enter to exit
`
I hope that this is enough to get started. Let us know how it worked out. :D
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 » 25 Dec 2010, 17:49

Thanks Chris, I'll play around with the data you gave me and let you know how things went.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby SoulStorm » 26 Dec 2010, 05:03

Update:

So I feel as though I'm going through some sort of rite of passage.

I figured out how to run the scripts, learned not to put spaces in the names of Eclipse projects :mrgreen: , found mtg-data, fixed the tab error, and then fixed multiple errors (in the setInfoScript and the PerSetTracking scripts) due to changes in syntax in the 3.1 version of python I'm using (involving print and raw_input).

Now I have another error that may not be so easy to fix:

Traceback <most recent call last.:
File "\Users\Soulstorm\workspace\ForgeSVN\res\SetInfoScript.py", line 4, in <module>
from httplib import HTTP
ImportError: No module named httplib

WOW! This experience has been both frustrating and strangely entertaining. Kind of like my experiences with Calculus, Physics, and Mandarin in college. :lol:
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 26 Dec 2010, 06:34

SoulStorm wrote:Update:

So I feel as though I'm going through some sort of rite of passage.

I figured out how to run the scripts, learned not to put spaces in the names of Eclipse projects :mrgreen: , found mtg-data, fixed the tab error, and then fixed multiple errors (in the setInfoScript and the PerSetTracking scripts) due to changes in syntax in the 3.1 version of python I'm using (involving print and raw_input).

Now I have another error that may not be so easy to fix:

Traceback <most recent call last.:
File "\Users\Soulstorm\workspace\ForgeSVN\res\SetInfoScript.py", line 4, in <module>
from httplib import HTTP
ImportError: No module named httplib

WOW! This experience has been both frustrating and strangely entertaining. Kind of like my experiences with Calculus, Physics, and Mandarin in college. :lol:
The easiest thing to do is forget the script. I've never run it myself. Before a beta is released, someone will run the script and take care of all the cards that have been submitted.

-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 » 26 Dec 2010, 06:46

Well then, I think we have a winner. =D>

Before you posted this Slapshot, I found what I believe is the module I need to install in order to fix the error. However, running a python file and installing a python module are two different things, and the latter is still proving difficult to accomplish.

For now I'm going to taking your advice and submit what I have without running the script. Perhaps later someone will be able to tell me precicely how to install these python modules.

Thanks Again!
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby SoulStorm » 26 Dec 2010, 08:24

After I added Bloodfire Kavu and Whip Silk to the SVN, I tried to add Bloodfire Dwarf, but when I synchronized, it wasn't detected as a change. Has this happened to anyone else, if so, how was the problem resolved?
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 26 Dec 2010, 15:43

SoulStorm wrote:After I added Bloodfire Kavu and Whip Silk to the SVN, I tried to add Bloodfire Dwarf, but when I synchronized, it wasn't detected as a change. Has this happened to anyone else, if so, how was the problem resolved?
Does it show up in your Package Explorer in Eclipse?
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 » 26 Dec 2010, 16:28

Yes, as does Silklash Spider which I added recently.

I even deleted the project, shut down my computer to purge the ram, imported the project again under a different name, and added the files again, yet I still have the same problem.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby SoulStorm » 26 Dec 2010, 16:42

Ahh, clever Slapshot, I just noticed that you can commit a revision from package explorer even if synchronize doesn't detect a change. Still it is odd that these changes aren't detected.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 26 Dec 2010, 16:43

SoulStorm wrote:Yes, as does Silklash Spider which I added recently.

I even deleted the project, shut down my computer to purge the ram, imported the project again under a different name, and added the files again, yet I still have the same problem.
Do you have both incoming and outgoing shown in the Synchronize View?
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 » 26 Dec 2010, 16:56

No changes are shown in either view. In fact, I just noticed that neither synchronize nor refresh show any incoming changes either. Somehow things got very messed up. Perhaps I should try changing the workspace or if necessary reinstalling Eclipse?
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 26 Dec 2010, 17:06

something seems wonky. can you post a screenshot?
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 » 26 Dec 2010, 17:24

Image

Uploaded with ImageShack.us
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby slapshot5 » 26 Dec 2010, 17:51

Well, Project Explorer shows there are changes. But maybe your SVN isn't hooked up correctly?

In Synchronize, go to Synchronize... to bring up the Properties. Click Next. On the Synchronize SVN screen, is you Scope set to Workspace and is Available resources checked for ForgeSVN?
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 » 26 Dec 2010, 18:01

Well, I'll check those things after I finish using the hammer technique of software repair. :mrgreen: I uninstalled everything and am starting over.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 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 6 guests

Login Form