It is currently 16 Apr 2024, 18:00
   
Text Size

I'm going to help!

Post MTG Forge Related Programming Questions Here

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

I'm going to help!

Postby Seravy » 25 Jun 2017, 21:02

Well, let's just say I'm an impatient person and I don't feel like waiting forever for whatever features I think the game needs to be enjoyable - especially as the main focus still seems to be on adding new cards which is endless.
So I went ahead, read about Java syntax, installed everything needed according to the wiki and...started working.

So far I achieved one of my goals : added a filter that can filter cards based on being foil or not - particularly, one button for new style foils, one for old and one for nonfoils.

...and at this point, I need to learn how to include my work in the project.
The wiki tells how to request forum group membership (I did just a minute ago), but says nothing about how to commit the changes, assuming I receive the permission to do so.
I'm a beginner in Java (but not a beginner in coding in general - if you heard about the Caster of Magic mod for Master of Magic, that's done by me, but hex-editing machine code is way different from this.) ...so I don't know how much else I'll be able to do but right now these are my goals :
-Checking and fixing the chances of foil cards in packs...unless, KrazyTheFox have you found anything out about that? (I just opened a 36 pack box with some 5 or 6 foil rares in it, there is definitely something wrong with it)
-Adding a quest mode filter that allows players to mark cards as unwanted/favorite/something to help buying/selling unwanted stuff
-Adding a quest mode option to allow opponents of a lower difficulty to show up (get 3 of the current difficulty, and 1 of each of the lower ones.) - it's not fun to always change the #wins if I want a different difficulty opponent (not all my decks are of the same power level)
-Do something about having 42 total colored packs (7 of each color) appear for 7 total set packs, and colored packs containing multiple rares if one is a land.
-Allow challenges to have players start with local enchantments in play enchanting other cards.
Attachments
FoilFilter.png
Seravy
 
Posts: 363
Joined: 26 Oct 2016, 21:23
Has thanked: 5 times
Been thanked: 27 times

Re: I'm going to help!

Postby KrazyTheFox » 25 Jun 2017, 21:40

For committing, generally we ask that you put together a patch file or two with your changes so we can test them out before we grant SVN access. Also, most (all?) of the active devs are on the Discord server. If you jump on there, you'll get faster feedback than on the forums.

As for the foil rarity in boosters, I sort of know where the problem is, but haven't had a chance to really look at it yet.

Seravy wrote:Do something about having 42 total colored packs (7 of each color) appear for 7 total set packs
This should be fixed in the release tomorrow.

Looking forward to seeing your contributions!
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: I'm going to help!

Postby Seravy » 25 Jun 2017, 21:43

All right, patches it is then. For the things I want to do, that should be good enough.
Is there a simple way to export the changes into a patch file or do I need to manually pick the files?

Edit : I'm considering to not play the game and stick to contributing (or making AI decks) until the foil rare issue is fixed...and might hack my existing foil cards back into nonfoils as they were earned in an unfair way.
So...please let me know if it's going to take longer than until next release, whenever that is....oh, wait, tomorrow, I guess it will take longer then?
Either way, please let me have the patch when it's done if it happens after release!
Seravy
 
Posts: 363
Joined: 26 Oct 2016, 21:23
Has thanked: 5 times
Been thanked: 27 times

Re: I'm going to help!

Postby Seravy » 25 Jun 2017, 23:11

I found a "compare with - base revision" menu item which at least told me the names of files I changed, yay!
I found no way to automatically export them, meaning...
Here you go, the 4 changed files in a zip to add the foil filter (rename to zip from txt, paths are simplified because I couldn't directly export and recreating the whole directory structure would be a pain)

Please do tell me if there is a better way to create patch files. (or if anything is missing from the patch)
Attachments
ForgePatch.txt
rename to zip
(8.82 KiB) Downloaded 219 times
Seravy
 
Posts: 363
Joined: 26 Oct 2016, 21:23
Has thanked: 5 times
Been thanked: 27 times

Re: I'm going to help!

Postby Seravy » 26 Jun 2017, 21:05

I found a "Create Patch" menu item in one of the submenus, yay!
I bet you meant to use that. I knew there had to be something like that but couldn't find it yesterday.

Here you go :
FoilFilter.txt
(5.93 KiB) Downloaded 207 times


Do let me know if there is any problem.
Seravy
 
Posts: 363
Joined: 26 Oct 2016, 21:23
Has thanked: 5 times
Been thanked: 27 times

Re: I'm going to help!

Postby Seravy » 28 Jun 2017, 19:49

Now that I understand Java syntax better, I can tell what the problem is with foil chances.
The problem is, each slot type in the pack has an equal chance instead of actual chances being implemented.
I'll try and see if I can do something about it.
Seravy
 
Posts: 363
Joined: 26 Oct 2016, 21:23
Has thanked: 5 times
Been thanked: 27 times

Re: I'm going to help!

Postby daitokujibiko » 29 Jun 2017, 10:54

I'll be waiting for that option to choose the lower difficulties again. The hard opponents in Main World always seem to be rocking power 9, affinity, Show and Tell -> Emrakul, and other extremely fair decks which are pretty annoying if you're not running the same all the time.
daitokujibiko
 
Posts: 23
Joined: 22 Jun 2017, 21:52
Has thanked: 11 times
Been thanked: 1 time

Re: I'm going to help!

Postby Seravy » 29 Jun 2017, 12:37

It's already done, here : viewtopic.php?f=52&t=20780
Seravy
 
Posts: 363
Joined: 26 Oct 2016, 21:23
Has thanked: 5 times
Been thanked: 27 times

Re: I'm going to help!

Postby Agetian » 29 Jun 2017, 13:12

Hi, Seravy! Thank you very much for your desire to help out with Forge, it's much appreciated!
I have tested your patch in action and it seems to do its job well, I'm going to integrate it upstream.

It would be really awesome if you could help out fix the chances for various foil rares, too. I also believe that your contributions would definitely qualify you to become a contributor with commit rights to the Forge SVN. :)

A couple pointers that you'd need to consider before committing to trunk:
- You'd need to tweak your IDE settings in the following way: 1. Use Spaces instead of Tabs (commonly called "Expand Tabs" or "Expand Tabs into Spaces"); 2. The size of a tab should be 4 spaces. This will help you maintain the same file formatting as was historically used when coding Forge, which will, in turn, make the files appear consistent to the other team members.
- Please try to following the Forge coding style as you see it in the files. For example, nested "if" clauses should each get a closing brace on a separate line:
Code: Select all
if (...) {
    if (...) {
...
    }
}
- Please join us on Discord, we have a separate #dev channel for developing Forge, and you are welcome to discuss the features and changes you're about to make with the other team members.
- Just a little tip: your SVN patch actually worked perfectly for me, but just in case you need to know another handy way of making it, I found the following two shell commands very useful:
svn diff - (from the Forge trunk folder) creates a diff output for the entire project at once, very quickly. Can be redirected to a file, e.g. svn diff > my_patch_for_forge.patch
svn patch - (specifying a patch file to apply, from the Forge trunk folder) merges all the differences from a patch file created with "svn diff" (also compatible with the Eclipse patch file you provided, too).

Good luck and thank you again for your decision to join in! Forge always needs new members to take care of the various goals we have!

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: I'm going to help!

Postby Seravy » 29 Jun 2017, 13:40

Hi, and thanks!

-I've set the spaces/tab options.
-I'll try to follow the coding style but can't guarantee it. At this level I'm still fighting with basic syntax, and the overall frustration level is kinda high - this feels harder to do than coding in a hex editor which is not something I've expected o_O
-Discord...ok, that might be a good idea. I generally prefer forums but real time communication can be a nice option to have. (I don't have a mic though, so it's text only)
-I've already posted the patch for the foil rares (albeit it's "partial", see the thread where it is.) and quite a few others.

Edit : Can't seem to find address of the discord server on the forums, maybe I'm blind. I believe I saw such a topic but now that I need it...it's nowhere to be seen lol
....found it!
Last edited by Seravy on 29 Jun 2017, 14:10, edited 2 times in total.
Seravy
 
Posts: 363
Joined: 26 Oct 2016, 21:23
Has thanked: 5 times
Been thanked: 27 times

Re: I'm going to help!

Postby Agetian » 29 Jun 2017, 13:45

Seravy wrote:Hi, and thanks!

-I've set the spaces/tab options.
-I'll try to follow the coding style but can't guarantee it. At this level I'm still fighting with basic syntax, and the overall frustration level is kinda high - this feels harder to do than coding in a hex editor which is not something I've expected o_O
-Discord...ok, that might be a good idea. I generally prefer forums but real time communication can be a nice option to have. (I don't have a mic though, so it's text only)
-I've already posted the patch for the foil rares (albeit it's "partial", see the thread where it is.) and quite a few others.
Ok, will take a look! :) And yes, our Discord chat is text-only.

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 37 guests


Who is online

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

Login Form