Preferred ways to contribute code/card scripts
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Preferred ways to contribute code/card scripts
by pcastellazzi » 04 Jun 2012, 21:20
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?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).
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.
— Ben Kuchera, Mordern Warfare 3 review.
-
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
by 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.
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.
-
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
by 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?
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.
— Ben Kuchera, Mordern Warfare 3 review.
-
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
by melvin » 07 Jun 2012, 12:27
If you mean the first post in that thread, then no, it is outdated. I just updated it, thanks for the reminder.pcastellazzi wrote:The thread about requestiong new cards speaks of a policy, is it the one in the thread updated?
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.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?
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.
-
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
by ubeefx » 09 Jun 2012, 13:09
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.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.
It would also require additional UI support.
Re: Preferred ways to contribute code/card scripts
by 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
by melvin » 22 Aug 2012, 09:43
Is the card you are creating Sangrite Surge? It requires card code, have you written the Java code for it?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!
If you have written the Sangrit_Surge.txt card script, you can post it to this thead, viewtopic.php?f=82&t=5894
-
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
by 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.
Re: Preferred ways to contribute code/card scripts
by 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.
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.
-
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
by 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
by melvin » 27 Jul 2014, 05:14
Use http://www.firemind.ch/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.
1) Sign in @ http://www.firemind.ch/users/sign_in
2) Click on "Submit a card script"
3) Fill in the submission form
-
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
by ShawnieBoy » 27 Jul 2014, 14:32
However Firemind hasn't been updated from Magarena since April (1.48). It doesn't support cards from Theros onwards (I think).melvin wrote:Use http://www.firemind.ch/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.
1) Sign in @ http://www.firemind.ch/users/sign_in
2) Click on "Submit a card script"
3) Fill in the submission form
-
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
by mike » 05 Aug 2014, 16:34
Just updated firemind.ch with Magarena version 1.52 and all cards up until M15
13 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests