It is currently 22 Oct 2017, 18:59
   
Text Size

How to get started?

Post MTG Forge Related Programming Questions Here

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

Re: How to get started?

Postby friarsol » 25 Oct 2016, 01:39

ShivaFang wrote:cardforge.googlecode.com not found. Has the SVC moved?
Hasn't been there for years and years. http://www.slightlymagic.net/wiki/Forge ... he_project
friarsol
Global Moderator
 
Posts: 7114
Joined: 15 May 2010, 04:20
Has thanked: 230 times
Been thanked: 846 times

Re: How to get started?

Postby ShivaFang » 25 Oct 2016, 03:20

Thanks - I was going off the information in this thread since it was the only resource I found on the matter. So, yes, I recognize it's old - but I didn't know where the new information was.
ShivaFang
 
Posts: 72
Joined: 25 Jun 2016, 01:15
Has thanked: 17 times
Been thanked: 2 times

Re: How to get started?

Postby friarsol » 25 Oct 2016, 03:35

ShivaFang wrote:Thanks - I was going off the information in this thread since it was the only resource I found on the matter. So, yes, I recognize it's old - but I didn't know where the new information was.
We tried moving all of this type of info to the wiki since it's a better place to find info about things. Some of it is probably a bit dated at this point, but it should be a decent starting point.
friarsol
Global Moderator
 
Posts: 7114
Joined: 15 May 2010, 04:20
Has thanked: 230 times
Been thanked: 846 times

Re: How to get started?

Postby ShivaFang » 25 Oct 2016, 15:59

Yeah - I didn't even know there was a Wiki. This pinned thread is literally the first thing I found on the matter.

When I get to step 4 it says to 'select the svn connector' I don't see that option anywhere. The drop down box next to SCM URL is empty with no options.

I even tried clicking 'find more SCM connectors in the m2e Marketplace'

EDIT: Hold on - found the m2e-subversive on the marketplace. We'll see if that works.

EDIT2: "Cannot Complete the install because of a conflicting dependency" =Z

EDIT3: My ISP hiccoughed right when I tried to do that. m2e-subversive is now installed and the svn option appears in the drop down. It now says it is checking out Maven project. Will create a new post if I have further issues.
Last edited by ShivaFang on 25 Oct 2016, 16:12, edited 1 time in total.
ShivaFang
 
Posts: 72
Joined: 25 Jun 2016, 01:15
Has thanked: 17 times
Been thanked: 2 times

Re: How to get started?

Postby friarsol » 25 Oct 2016, 16:12

I haven't used Eclipse in forever, so I can't really help there. As mentioned just a few posts down IntelliJ setup is super easy.
friarsol
Global Moderator
 
Posts: 7114
Joined: 15 May 2010, 04:20
Has thanked: 230 times
Been thanked: 846 times

Re: How to get started?

Postby ShivaFang » 25 Oct 2016, 16:13

Thanks, I figured it out (I edited my post above)

The IntelliJ section requires the svn to already be downloaded.
ShivaFang
 
Posts: 72
Joined: 25 Jun 2016, 01:15
Has thanked: 17 times
Been thanked: 2 times

Re: How to get started?

Postby ShivaFang » 25 Oct 2016, 20:11

My experience with Java has been limited to making .jar plugins for minecraft and xmage - I've never had to compile a whole program in Java before (I have used Unity to make games though, so I understand the concept)

In eclipse, even after doing maven -> update project I was still left with 16 errors I don't know what to do about.

So I tried the IntelliJ instructions and managed to get it to import successfully. I cannot get it to run. Selecting Run -> run brings up a dialogue says something like;

Run
0. Edit Configurations
Hold Shift to debug

I click Edit Configurations and it brings me to the config screen, which I have already set up as instructed. (Holding shift just changes 'Run' to 'Debug') When I click run from the config screen nothing happens.

When I select Build -> Make it compiles with no errors.. but I have no idea where it saves the executable. I've tried looking in the workspace directory to no avail.
ShivaFang
 
Posts: 72
Joined: 25 Jun 2016, 01:15
Has thanked: 17 times
Been thanked: 2 times

Re: How to get started?

Postby friarsol » 25 Oct 2016, 20:35

ShivaFang wrote:So I tried the IntelliJ instructions and managed to get it to import successfully. I cannot get it to run. Selecting Run -> run brings up a dialogue says something like;

Run
0. Edit Configurations
Hold Shift to debug

I click Edit Configurations and it brings me to the config screen, which I have already set up as instructed. (Holding shift just changes 'Run' to 'Debug') When I click run from the config screen nothing happens.

When I select Build -> Make it compiles with no errors.. but I have no idea where it saves the executable. I've tried looking in the workspace directory to no avail.
Can you take a screenshot with your Edit Configuration screen open? Once you saved that you should be able to just run or debug the configuration from within IntelliJ
friarsol
Global Moderator
 
Posts: 7114
Joined: 15 May 2010, 04:20
Has thanked: 230 times
Been thanked: 846 times

Re: How to get started?

Postby ShivaFang » 25 Oct 2016, 22:51

This first one is the way it looks when I'm on the application tab
Forge1.png


And this is what it brings me to when I select Run->Run. You'll see the Run button is active but clicking on it closes the configuration window but does nothing else. If I change tabs at this point the Run button greys out.
Untitled-2.png
ShivaFang
 
Posts: 72
Joined: 25 Jun 2016, 01:15
Has thanked: 17 times
Been thanked: 2 times

Re: How to get started?

Postby friarsol » 25 Oct 2016, 23:23

Have you actually created a new configuration instead of trying to use a default configuration? So basically, click the '+' button, which will give you a new configuration. Then add in the same info you already have, and lastly your classpath should be "forge-gui-desktop" to match the working directory above.
friarsol
Global Moderator
 
Posts: 7114
Joined: 15 May 2010, 04:20
Has thanked: 230 times
Been thanked: 846 times

Re: How to get started?

Postby ShivaFang » 25 Oct 2016, 23:42

That seems to have worked. That application launched! Now I can start my experiments. Thanks!

I did try setting the working directory to forge-gui-desktop and that didn't help - but creating a 'new' configuration did. I didn't notice that option.
ShivaFang
 
Posts: 72
Joined: 25 Jun 2016, 01:15
Has thanked: 17 times
Been thanked: 2 times

Re: How to get started?

Postby Seravy » 25 Jun 2017, 14:15

Decided I'll give this a try because a lot of features I really need would be easy to implement, and while I don't know Java syntax, it seems easy enough to learn.
Following the wiki I got as far as running the game from Eclipse. Couldn't do the "run as" thing as described, instead I had to do "run configurations" and type in the data mentioned above.
Where I'm stuck is, I was expecting it to build a jar file or something, but I don't see any anywhere. So I don't know where to put the card image files and whatever else if I want them to show up in the game. (and without a jar file I don't know where the forge.profile.properties goes either)
Fortunately it doesn't seem to pick up the configuration of my "normal" installation which is good. (I'd hate to overwrite my real quest files with testing purpose stuff)

...so yeah, where does the complied .jar go? Where do I put my forge.profile.properties for this?

Edit : Trial and error FTW! It goes into forge-gui.
I don't see a .jar file created though...could it be that "Run" runs it directly from the sources? Weird.
Either way, it works and I'm halfway done adding a filter for foil cards which is way more progress than what I'm expected in half a day.
Seravy
 
Posts: 340
Joined: 26 Oct 2016, 21:23
Has thanked: 4 times
Been thanked: 26 times

Re: How to get started?

Postby KrazyTheFox » 25 Jun 2017, 21:35

Seravy wrote:Decided I'll give this a try because a lot of features I really need would be easy to implement, and while I don't know Java syntax, it seems easy enough to learn.
Following the wiki I got as far as running the game from Eclipse. Couldn't do the "run as" thing as described, instead I had to do "run configurations" and type in the data mentioned above.
Where I'm stuck is, I was expecting it to build a jar file or something, but I don't see any anywhere. So I don't know where to put the card image files and whatever else if I want them to show up in the game. (and without a jar file I don't know where the forge.profile.properties goes either)
Fortunately it doesn't seem to pick up the configuration of my "normal" installation which is good. (I'd hate to overwrite my real quest files with testing purpose stuff)

...so yeah, where does the complied .jar go? Where do I put my forge.profile.properties for this?

Edit : Trial and error FTW! It goes into forge-gui.
I don't see a .jar file created though...could it be that "Run" runs it directly from the sources? Weird.
Either way, it works and I'm halfway done adding a filter for foil cards which is way more progress than what I'm expected in half a day.
I think most of the (sane) devs use IntelliJ now instead of Eclipse. You'll find it's as easy as importing the project and pointing the run configuration at the main class to get it running. Run in eclipse should run from the sources, just as IntelliJ does. It just so happens that IntelliJ is less of a headache to get running.
User avatar
KrazyTheFox
Programmer
 
Posts: 716
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 212 times

Re: How to get started?

Postby Seravy » 25 Jun 2017, 21:46

Well, it's already running now and I have a reputation for being insane anyway so, I guess I'll stay with this for now, then :D

...it's not like I actually need the .jar file for anything...oh wait, I do if I want to play with my changes before they get included in the main release.
There has to be a "build .jar" option somewhere, time to look for it...

edit : found it, right click, export, "runnable JAR file"...except, the file generated doesn't seem to run. It expects the "res" folder in a subfolder "forge-gui-desktop" but the "real" game does not have such a folder, "/res" is in the game's main folder.
I don't know how to fix that.
Seravy
 
Posts: 340
Joined: 26 Oct 2016, 21:23
Has thanked: 4 times
Been thanked: 26 times

Re: How to get started?

Postby KrazyTheFox » 25 Jun 2017, 22:34

If you want the runnable file, you'll need to use Maven with the goals: "mvn install -P windows-linux". If you're not going through Maven, you're not going to produce any usable artifacts.
User avatar
KrazyTheFox
Programmer
 
Posts: 716
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 212 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 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 6 guests

Login Form