It is currently 16 Apr 2024, 20:56
   
Text Size

How to get started?

Post MTG Forge Related Programming Questions Here

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

Re: How to get started?

Postby Headrock » 03 Mar 2014, 17:01

Yes. And no matter what URL I type in, I always get the same error (provision exception), with the dialog reporting two errors of being unable to find the content.xml file at the given destination. I must've tried several dozen addresses I've found all over the internet, none of them worked.
Headrock
 
Posts: 32
Joined: 24 Feb 2014, 16:42
Has thanked: 5 times
Been thanked: 0 time

Re: How to get started?

Postby Chris H. » 03 Mar 2014, 17:39

Headrock wrote:Yes. And no matter what URL I type in, I always get the same error (provision exception), with the dialog reporting two errors of being unable to find the content.xml file at the given destination. I must've tried several dozen addresses I've found all over the internet, none of them worked.
 
Near the top of the Install dialog is a text box labeled “Work with:”. At the right side of the text box there is a triangle. Click on this triangle (the drop down control) and a list of sites will become available.

As the wiki states, select “—All Available Sites—“ and this should display (after some time has passed) a list of various plugins.

At this point follow the directions in the wiki. :)
 
Attachments
Screen Shot.jpg
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: How to get started?

Postby Headrock » 03 Mar 2014, 18:13

No, really, I can't read ANY repository (and yes, I just tried "all available sites" again, it gives me an error for each and every repository I've tried up to now, including some of the URLs listed in that screenshot of yours).

I've googled the problem and saw that others were experiencing similar things, but none of their solutions worked for me. In most cases the problem was something with workplace firewalls and proxies, but I am on a home computer via modem and have disabled all firewalls (and have no proxy), plus the built-in eclipse internet browser works just fine. :/
Headrock
 
Posts: 32
Joined: 24 Feb 2014, 16:42
Has thanked: 5 times
Been thanked: 0 time

Re: How to get started?

Postby friarsol » 03 Mar 2014, 20:31

I know the writeup says to use Eclipse, but I'd give IntelliJ IDEA a shot. It's what I'm currently using and from what I remember there wasn't very much configuration at all, since Maven integration is already included and it managed to just auto-configure everything for me. I think the only thing I needed to do was set my project configuration to the right directory so Main knew where to load resources from.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: How to get started?

Postby Headrock » 03 Mar 2014, 21:15

I'm checking out the code again, this time with IntelliJ. Are there any specific things I should select/check/do before trying to run it? Remember, I'm a total noob to Java at this time, so don't assume I know anything.

(EDIT: The code checked out nicely, and IntelliJ doesn't seem to have any problems, but I can't figure out how to run the code.)


It works! Damn awesome. Thank you very much, Friarsol.

And now... to learn Java!! :D
Headrock
 
Posts: 32
Joined: 24 Feb 2014, 16:42
Has thanked: 5 times
Been thanked: 0 time

Re: How to get started?

Postby excessum » 05 Mar 2014, 00:38

I just got a working development environment set up and successfully built and run the source code. I would like to work on the Forge AI so I guess I should start small by getting the AI to work with cards like Bile Blight that are staples in Standard now. Strangely enough, the AI works fine with certain cards marked unplayable like Devour Flesh and Polukranos, World Eater.

Are there any suggestions on how I should go about doing this?

PS. The wiki page http://www.slightlymagic.net/wiki/Forge ... ping_Forge does not actually mention the step about importing an existing Maven project for forge-gui. I only managed to solve the problem about the missing "Run-as -> Java application" option after reading through this entire thread.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: How to get started?

Postby swordshine » 05 Mar 2014, 07:17

excessum wrote:I just got a working development environment set up and successfully built and run the source code. I would like to work on the Forge AI so I guess I should start small by getting the AI to work with cards like Bile Blight that are staples in Standard now. Strangely enough, the AI works fine with certain cards marked unplayable like Devour Flesh and Polukranos, World Eater.

Are there any suggestions on how I should go about doing this?
It would be appreciated for a newcomer if you post a patch. :D
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: How to get started?

Postby excessum » 05 Mar 2014, 09:20

swordshine wrote:
excessum wrote:I just got a working development environment set up and successfully built and run the source code. I would like to work on the Forge AI so I guess I should start small by getting the AI to work with cards like Bile Blight that are staples in Standard now. Strangely enough, the AI works fine with certain cards marked unplayable like Devour Flesh and Polukranos, World Eater.

Are there any suggestions on how I should go about doing this?
It would be appreciated for a newcomer if you post a patch. :D
I have a question regarding the use of the "SVar:RemAIDeck:True" flag. I assume that this is added by the coder to flag the card as AI unplayable. There appears to be some inconsistency regarding its use:
Domri Rade 2nd ability vs Pit Fight
Diabolic Edict vs Devour Flesh
So does the flag mean that the AI cannot play the card at all or really badly (ie. Bile Blight and Nykthos, Shrine to Nyx ), or that the AI just plays them poorly? I suspect that Devour Flesh is due to the latter in that the AI will not sacrifice its own creatures to save itself but then again, the same can be said for cards like Last Breath and Swords to Plowshares.

Echoing Decay and Bile Blight are essentially the same as Last Gasp so I suspect adding "IsCurse$ True" to the former will make the AI use them instead of ignoring the card?

EDIT:
I verified that adding the "IsCurse$ True" will allow the AI to use Bile Blight as expected. Whether this is considered to be "proper" behaviour will go back to my earlier question since Detention Sphere also suffers from the same issue of removing the caster's own creature/permanent.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: How to get started?

Postby Sloth » 05 Mar 2014, 23:52

excessum wrote:I have a question regarding the use of the "SVar:RemAIDeck:True" flag. I assume that this is added by the coder to flag the card as AI unplayable. There appears to be some inconsistency regarding its use:
Domri Rade 2nd ability vs Pit Fight
Diabolic Edict vs Devour Flesh
So does the flag mean that the AI cannot play the card at all or really badly (ie. Bile Blight and Nykthos, Shrine to Nyx ), or that the AI just plays them poorly? I suspect that Devour Flesh is due to the latter in that the AI will not sacrifice its own creatures to save itself but then again, the same can be said for cards like Last Breath and Swords to Plowshares.

Echoing Decay and Bile Blight are essentially the same as Last Gasp so I suspect adding "IsCurse$ True" to the former will make the AI use them instead of ignoring the card?

EDIT:
I verified that adding the "IsCurse$ True" will allow the AI to use Bile Blight as expected. Whether this is considered to be "proper" behaviour will go back to my earlier question since Detention Sphere also suffers from the same issue of removing the caster's own creature/permanent.
We had and have different scripters and sometimes not enough time to test the cards for the AI, so yes the use of the "SVar:RemAIDeck:True" flag is sometimes inconsistent.
Some cards the AI will not use at all, refuse to abide to their rules (mostly by not targeting a mandatory target) or always play poorly with it. Some cards are actually ok for the AI when used in a deck that is build with the AI in mind.

That said, i think Devour Flesh and Bile Blight with "IsCurse$ True" should be ok and don't need the flag.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: How to get started?

Postby excessum » 06 Mar 2014, 02:20

Sloth wrote:We had and have different scripters and sometimes not enough time to test the cards for the AI, so yes the use of the "SVar:RemAIDeck:True" flag is sometimes inconsistent.
Some cards the AI will not use at all, refuse to abide to their rules (mostly by not targeting a mandatory target) or always play poorly with it. Some cards are actually ok for the AI when used in a deck that is build with the AI in mind.

That said, i think Devour Flesh and Bile Blight with "IsCurse$ True" should be ok and don't need the flag.
Here is an incomplete list of common Standard cards that are flagged AI-unplayable:
Devour Flesh: working as is
Bile Blight: can be fixed by adding "IsCurse$ True"
Polukranos, World Eater: working but AI cannot judge cost/benefit of targets (ie. suiciding against high P low T)
Nykthos, Shrine to Nyx and Xenagos, the Reveler: AI fails to judge cost/benefit of paying mana to get variable mana. Fixing the bug with AI activating Nykthos for no reason (similar to activating Mutavault and then tapping it for mana) will probably require new scripts or code changes.
Rapid Hybridization and Judge's Familiar: AI cannot judge cost/benefit of targets

So other than Devour Flesh, Bile Blight and maybe Polukranos, the unplayable cards are still unplayable without digging further into the AI. Can the issues with paying mana for more mana (Cabal Coffers, Cascade Bluffs) be solved by scripts that check for net mana gain and/or mana-fixing? I am looking for a starting point that does not require deciphering the entire AI system at once so I suppose a script for that is the most appropriate for starters.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: How to get started?

Postby swordshine » 06 Mar 2014, 02:55

Nykthos, Shrine to Nyx:AI cannot handle ChooseColor ability. Similarly, AI cannot play Protection from the chosen color effect. If you are interested, Mother of Runes is much more challenging (It seems very unfair during the combat). :D
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: How to get started?

Postby excessum » 06 Mar 2014, 03:30

swordshine wrote:Nykthos, Shrine to Nyx:AI cannot handle ChooseColor ability. Similarly, AI cannot play Protection from the chosen color effect. If you are interested, Mother of Runes is much more challenging (It seems very unfair during the combat). :D
Looks like I forgot about the protection from effects like Brave the Elements and Gods Willing that makes the Mono W decks viable... I thought that Nykthos falls under the extra mana land issue like Cabal Coffers since I have seen the AI choosing the correct colour when it first plays Nykthos during First Main, only that it will stupidly activate it erroneously in subsequent turns at the upkeep phase.

I would think that protection from effects are much harder to fix since it requires many more decisions like comparing the dominant colour in the opponent's battlefield for alpha strikes and the colour of spells aimed at the AI to avoid Anger of the Gods or Doom Blade.

As stated originally, I am mainly interested in improving the AI so either the extra mana or protection from issues are fine with me. I was asking for your opinions on which is more reasonable for a noob to the codebase to fix :D .
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: How to get started?

Postby Xitax » 08 Mar 2014, 18:04

Obligatory whining warning:

Do I really need to install the whole project manager just to work on card scripts? Just the idea of going through that has kept me from getting it done in order to work on tokens.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: How to get started?

Postby Sloth » 08 Mar 2014, 22:27

Xitax wrote:Do I really need to install the whole project manager just to work on card scripts? Just the idea of going through that has kept me from getting it done in order to work on tokens.
You only need software to update from and commit to the svn (you can test your scripts with the snapshot versions). I recommend using TortoiseSVN.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: How to get started?

Postby excessum » 10 Mar 2014, 13:42

I need some basic help with understanding the codebase. I am completely unfamiliar with Java programming so bear with me if all this is really trivial.

Is there a way to insert breakpoints within forge-ai to study the call-stack? I was inserting the breakpoints in Eclipse and doing the "run as Java application" on forge-gui and fail to trigger any of the breakpoints. Specifically, I was studying "CurseAI" and inserting breakpoints in "pumpTgtAI" in PumpAI.java.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 38 guests


Who is online

In total there are 38 users online :: 0 registered, 0 hidden and 38 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 38 guests

Login Form