It is currently 16 Apr 2024, 08:08
   
Text Size

Preferred ways to contribute code/card scripts

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Preferred ways to contribute code/card scripts

Postby pcastellazzi » 04 Jun 2012, 21:20

melvin wrote:You're right, none of these can be scripted. Most can be implemented with a bit of Java code, except for Sage Owl (no support for looking at cards).
I been working on coding some cards my self. What's the best way to make the code reach you? Should i use google code facilities, send you the files, post them here?
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: Preferred ways to contribute code/card scripts

Postby melvin » 06 Jun 2012, 11:50

Thank for asking this question! I've split it into a separate topic of discussion so we can keep the previous thread on card wish lists.

In order of preference, most preferred method first.

1. create a server side clone of the project from https://code.google.com/p/magarena/source/clones, then commit your changes, push to your clone, and let us know about it either on the mailing list magarena@googlegroup.com or here.

2. create a local clone of the project, commit your additions to it, and email your changeset as an attachment to magarena@googlegroups.com or post it here. You can export your changeset using "hg export", see "import/export" at http://mercurial.selenic.com/wiki/CommunicatingChanges for details.

3. If your change only involves adding new files, just post the files to the mailing list or here.

Thanks! Looking forward to your contributions. Every bit helps.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Preferred ways to contribute code/card scripts

Postby pcastellazzi » 06 Jun 2012, 18:00

The thread about requestiong new cards speaks of a policy, is it the one in the thread updated?

If it is why cant we add cards that use the library? i.e. Demonic Tutor. I dont see much difference with something like Eternal Witness (except of course the selection pool is different).

Can the same algorithm used with both cards? It looks like i am missing something here, can you please give me some more details of why it should be avoided?
The lights then came up and the crowd erupted in applause, because that's what the crowd does after it watches destruction on a large screen.
— Ben Kuchera, Mordern Warfare 3 review.
User avatar
pcastellazzi
 
Posts: 184
Joined: 25 Apr 2012, 00:40
Location: Montevideo, Uruguay
Has thanked: 11 times
Been thanked: 30 times

Re: Preferred ways to contribute code/card scripts

Postby melvin » 07 Jun 2012, 12:27

pcastellazzi wrote:The thread about requestiong new cards speaks of a policy, is it the one in the thread updated?
If you mean the first post in that thread, then no, it is outdated. I just updated it, thanks for the reminder.

pcastellazzi wrote:If it is why cant we add cards that use the library? i.e. Demonic Tutor. I dont see much difference with something like Eternal Witness (except of course the selection pool is different).

Can the same algorithm used with both cards? It looks like i am missing something here, can you please give me some more details of why it should be avoided?
Your right that tutoring is similar to graveyard recursion. Right now we don't support it but we can certainly modify our current select from graveyard mechanism to provide it. I was thinking about supporting limited forms of tutoring, such as tutoring lands, as a start.

The reason why it was avoided is probably due to the large number of potential choices that AI would have to deal with. The graveyard is typically much smaller than the library at the start of the game. If the AI starts doing badly at the start it may be hard to recover.

I'm not sure if this has been tested in practice and found to be bad for the AI or just based on the above reasoning. Therefore I would welcome any patches to implement cards that can tutor so we can see what is the actual effect on the AI.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Preferred ways to contribute code/card scripts

Postby ubeefx » 09 Jun 2012, 13:09

I'm not sure if this has been tested in practice and found to be bad for the AI or just based on the above reasoning.
Tutoring was not tested. It should be possible for AI, certainly if there is some kind of logic that picks good tutoring candidates instead of evaluating all of the cards.
It would also require additional UI support.
User avatar
ubeefx
DEVELOPER
 
Posts: 748
Joined: 23 Nov 2010, 19:16
Has thanked: 34 times
Been thanked: 249 times

Re: Preferred ways to contribute code/card scripts

Postby b4mb4m » 03 Aug 2012, 14:36

guys I'm creating the java code for the card appears Sangrite actually already written this up but where do I save it? the two. txt the letters are already created the image of the card is already in her briefcase. but lack the requeris_card_code I do not know where I saved! hugs!
b4mb4m
 
Posts: 4
Joined: 25 Jun 2012, 14:35
Has thanked: 0 time
Been thanked: 0 time

Re: Preferred ways to contribute code/card scripts

Postby melvin » 22 Aug 2012, 09:43

b4mb4m wrote:guys I'm creating the java code for the card appears Sangrite actually already written this up but where do I save it? the two. txt the letters are already created the image of the card is already in her briefcase. but lack the requeris_card_code I do not know where I saved! hugs!
Is the card you are creating Sangrite Surge? It requires card code, have you written the Java code for it?

If you have written the Sangrit_Surge.txt card script, you can post it to this thead, viewtopic.php?f=82&t=5894
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Preferred ways to contribute code/card scripts

Postby kdesmond » 23 Sep 2012, 01:53

I tried to submit some files/changes through Google Code, but I'm not sure that it worked. I created a clone, added my changes, and clicked on "commit" - the question is whether it submitted the changes to just the cloned repository or the main one? I didn't see anywhere where I could "push" the changes either. My google account name is mileva.
kdesmond
 
Posts: 3
Joined: 20 Sep 2012, 02:21
Has thanked: 1 time
Been thanked: 0 time

Re: Preferred ways to contribute code/card scripts

Postby melvin » 23 Sep 2012, 06:18

Looks good, I can see your changes from https://code.google.com/r/mileva-magarena/source/list

I just merged your changes with the main repo and simplified the card code slightly. I've been working on reducing the use of Object array to pass information from the creation of the event to the resolution of the event. Do try to avoid using "new Object[]{..}" if possible. Try to get the necessary information about the event using methods like event.getPlayer and event.getSource.

If you have created some decks with the new cards, do add them to release/Magarena/decks as well.

Do join our dev mailing list, http://groups.google.com/group/magarena, you can also drop us a note on the list when you have more changes to add.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Preferred ways to contribute code/card scripts

Postby PalladiaMors » 27 Jul 2014, 04:28

No longer relevant.
Last edited by PalladiaMors on 24 Apr 2015, 21:04, edited 1 time in total.
PalladiaMors
 
Posts: 343
Joined: 12 Jul 2014, 17:40
Has thanked: 36 times
Been thanked: 22 times

Re: Preferred ways to contribute code/card scripts

Postby melvin » 27 Jul 2014, 05:14

PalladiaMors wrote:Guys I'm gonna need a bit more help here since I have no programming background and no clue whatsoever about what "commit your changes" and "push to your clone" mean.
Use http://www.firemind.ch/

1) Sign in @ http://www.firemind.ch/users/sign_in
2) Click on "Submit a card script"
3) Fill in the submission form
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Preferred ways to contribute code/card scripts

Postby ShawnieBoy » 27 Jul 2014, 14:32

melvin wrote:
PalladiaMors wrote:Guys I'm gonna need a bit more help here since I have no programming background and no clue whatsoever about what "commit your changes" and "push to your clone" mean.
Use http://www.firemind.ch/

1) Sign in @ http://www.firemind.ch/users/sign_in
2) Click on "Submit a card script"
3) Fill in the submission form
However Firemind hasn't been updated from Magarena since April (1.48). It doesn't support cards from Theros onwards (I think).
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: Preferred ways to contribute code/card scripts

Postby mike » 05 Aug 2014, 16:34

Just updated firemind.ch with Magarena version 1.52 and all cards up until M15
User avatar
mike
Programmer
 
Posts: 128
Joined: 05 Jul 2013, 17:00
Has thanked: 0 time
Been thanked: 29 times


Return to Magarena

Who is online

Users browsing this forum: No registered users and 21 guests


Who is online

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

Login Form