Draft Development in ML 3.0
Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!
PLEASE DO NOT REPORT BUGS HERE!
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
Re: Draft Development in ML 3.0
by foolosopher » 17 Nov 2013, 01:21
Hi guys,
Finally found some more time and progressed a bit more. It seems that radio buttons are more appropriate to use, since we need to choose one set for each booster. Anyway here's a look, but has anybody found how to compile the "draftgui.c" along with the rest of the manalink code?
I need it to pass the selected values to draft.c
Finally found some more time and progressed a bit more. It seems that radio buttons are more appropriate to use, since we need to choose one set for each booster. Anyway here's a look, but has anybody found how to compile the "draftgui.c" along with the rest of the manalink code?
I need it to pass the selected values to draft.c
- Attachments
-
draftgui-v1.rar
- (10.45 KiB) Downloaded 582 times
I long for the time where one man could make a difference...
- foolosopher
- Posts: 189
- Joined: 19 May 2010, 20:53
- Location: Greece
- Has thanked: 13 times
- Been thanked: 17 times
Re: Draft Development in ML 3.0
by foolosopher » 01 Dec 2013, 23:47
Hi guys,
Below you can find the latest version. It also handles the external
"int sets[3];" variable where the selected sets are stored and has most of the available expansion sets, however there's another issue. The GUI needs to be initialised from the main loop of manalink, anybody know where that is, looked but couldn't find it. There probably is a workaround but it contains threads.
The stricter rules in our makefile are being resolved little by little, but are there any news on how to add it in a separate file in the makefile?
Below you can find the latest version. It also handles the external
"int sets[3];" variable where the selected sets are stored and has most of the available expansion sets, however there's another issue. The GUI needs to be initialised from the main loop of manalink, anybody know where that is, looked but couldn't find it. There probably is a workaround but it contains threads.
The stricter rules in our makefile are being resolved little by little, but are there any news on how to add it in a separate file in the makefile?
- Attachments
-
draftgui.rar
- (15.86 KiB) Downloaded 628 times
I long for the time where one man could make a difference...
- foolosopher
- Posts: 189
- Joined: 19 May 2010, 20:53
- Location: Greece
- Has thanked: 13 times
- Been thanked: 17 times
Re: Draft Development in ML 3.0
by gmzombie » 29 May 2014, 23:53
Has this been addressed?
can I maze of ith your snowstorm?
http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
- gmzombie
- Posts: 857
- Joined: 26 Feb 2009, 01:05
- Location: Wyoming, Mi
- Has thanked: 200 times
- Been thanked: 51 times
Re: Draft Development in ML 3.0
by Gargaroz » 15 Jun 2014, 15:23
Well, It's ages since I don't look at the draft code, and we'll surely have to check it to implement all the atrocious exceptions included in Conspiracy (pretty fun to draft in paper magic, but a nightmare to code for draft).
But we'll have to wait for Korath, which is currently swamped in real life issues, so the next patch will probably contain all from Cospiracy except for the "impossible to code" stuff and the draft-related stuff.
But we'll have to wait for Korath, which is currently swamped in real life issues, so the next patch will probably contain all from Cospiracy except for the "impossible to code" stuff and the draft-related stuff.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Gargaroz
- Programmer
- Posts: 7097
- Joined: 06 Nov 2009, 11:11
- Has thanked: 82 times
- Been thanked: 595 times
Re: Draft Development in ML 3.0
by gmzombie » 15 Jun 2014, 19:41
that is fine. We all understand real life issues. Yea drafting conspiracy is fun in paper magic. Im curious if we could look into doing something with sealed as well. i know currently sonic has changed it so we could at least sealed the latest block + core 2014 and modern masters which is cool but im wondering really if we could maybe see if it could be recoded to accept all the sets. we talked a little bit about it in the dev thread sealed deck fix. i dont know if you guys have found that code when your fixing things and whatnot. And its not like its a top priority or anything just something if you have some time to look when you have time to look. no biggie 

can I maze of ith your snowstorm?
http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
- gmzombie
- Posts: 857
- Joined: 26 Feb 2009, 01:05
- Location: Wyoming, Mi
- Has thanked: 200 times
- Been thanked: 51 times
Re: Draft Development in ML 3.0
by Sonic » 15 Jun 2014, 20:42
Nope - I've changed nothing. Those files in 'Sealed - possible fix' are simply test files.
The current set of reference manalink files remain untouched - apart from my usual Legacy Card text corrections.
The current set of reference manalink files remain untouched - apart from my usual Legacy Card text corrections.
Working On: Life, the Universe, and Everything.
Re: Draft Development in ML 3.0
by foolosopher » 15 Jun 2014, 23:26
Hello guys,
Sorry for delaying this but apart from real life taking my time, I thought there was no real interest about this. Here's the "fixed" version of the gui, which keeps only one radio button active from each column. Code can probably use a few optimizations, but should work fine as it is.
Haven't checked what's going on right now, but Korath had made some changes, consolidation and cleanup to the draft code a couple updates ago, when I last checked.
Anyway, the most difficult thing may be initializing the gui from main and then calling it at draft, or wherever we want to use it, if we are to use this.
Loading selection data is fairly easy, now straight from the code, but loading from menus.txt should also be doable.
Sorry for delaying this but apart from real life taking my time, I thought there was no real interest about this. Here's the "fixed" version of the gui, which keeps only one radio button active from each column. Code can probably use a few optimizations, but should work fine as it is.
Haven't checked what's going on right now, but Korath had made some changes, consolidation and cleanup to the draft code a couple updates ago, when I last checked.
Anyway, the most difficult thing may be initializing the gui from main and then calling it at draft, or wherever we want to use it, if we are to use this.
Loading selection data is fairly easy, now straight from the code, but loading from menus.txt should also be doable.
- Attachments
-
draftgui.rar
- (16.08 KiB) Downloaded 556 times
I long for the time where one man could make a difference...
- foolosopher
- Posts: 189
- Joined: 19 May 2010, 20:53
- Location: Greece
- Has thanked: 13 times
- Been thanked: 17 times
Re: Draft Development in ML 3.0
by gmzombie » 17 Jun 2014, 00:36
Er yea I know they are just test files..but I like to give props whenever I can. You did make the sealed work better sonic even if it is with additional filesSonic wrote:Nope - I've changed nothing. Those files in 'Sealed - possible fix' are simply test files.
The current set of reference manalink files remain untouched - apart from my usual Legacy Card text corrections.

can I maze of ith your snowstorm?
http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
- gmzombie
- Posts: 857
- Joined: 26 Feb 2009, 01:05
- Location: Wyoming, Mi
- Has thanked: 200 times
- Been thanked: 51 times
Re: Draft Development in ML 3.0
by foolosopher » 14 Sep 2014, 23:34
I was looking at the forums and came up to the topic "Cube Drafting" from HarlequinCasts,
viewtopic.php?f=56&t=14948&p=156905#p156905
where I realized that we may already have a way of supporting custom sets and as a result cube drafting, through the sets & rarity mechanism that we are using.
Say that one adds a set in Manalink.csv. More specifically, one would need to add (let's assume at the end) a new set in Manalink.csv, and sets the rarity of the cards he wants to use, so as to appear that they belong (also) into the new set. Be careful that one would need to comply with the rules of having a set in draft
to enforce rarity=(11+ Commons, 3+ Uncommons, 1+ Rares at least per set) or for singleton if one drafts the same set for all 3 packs, make sure the set is at least 360 cards (or 240 for 2 packs, 120 for 1 pack).
Next add the new set in Expansions.h, menus.txt and finally into draft.c
In the menus.txt the new set Name needs to be added at the section "@EXPANSIONNAMES" last and also update the number of available sets by one.
Adding to draft.c would be a bit more tricky, because the new set (Name, Number) needs to be added in a few places.
But hey!!! Gargaroz or Korath have updated the code and automated this by reading the menus.txt
(just found out myself
) so no touching draft.c !!!
Next one needs to update the .dat (for sure Rarity, not sure about the others) files through the Magic_Updater ???
And should work. Haven't tested but probably worth a try...
viewtopic.php?f=56&t=14948&p=156905#p156905
where I realized that we may already have a way of supporting custom sets and as a result cube drafting, through the sets & rarity mechanism that we are using.
Say that one adds a set in Manalink.csv. More specifically, one would need to add (let's assume at the end) a new set in Manalink.csv, and sets the rarity of the cards he wants to use, so as to appear that they belong (also) into the new set. Be careful that one would need to comply with the rules of having a set in draft
to enforce rarity=(11+ Commons, 3+ Uncommons, 1+ Rares at least per set) or for singleton if one drafts the same set for all 3 packs, make sure the set is at least 360 cards (or 240 for 2 packs, 120 for 1 pack).
Next add the new set in Expansions.h, menus.txt and finally into draft.c
In the menus.txt the new set Name needs to be added at the section "@EXPANSIONNAMES" last and also update the number of available sets by one.
Adding to draft.c would be a bit more tricky, because the new set (Name, Number) needs to be added in a few places.
But hey!!! Gargaroz or Korath have updated the code and automated this by reading the menus.txt



Next one needs to update the .dat (for sure Rarity, not sure about the others) files through the Magic_Updater ???
And should work. Haven't tested but probably worth a try...
I long for the time where one man could make a difference...
- foolosopher
- Posts: 189
- Joined: 19 May 2010, 20:53
- Location: Greece
- Has thanked: 13 times
- Been thanked: 17 times
Re: Draft Development in ML 3.0
by Aswan jaguar » 12 Nov 2014, 14:57
Foolosopher can you look into this bug that concerns draft.Although it is more than a years old,the bug still exists.
viewtopic.php?f=86&t=11959
viewtopic.php?f=86&t=11959
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: Draft Development in ML 3.0
by foolosopher » 30 Nov 2014, 22:49
Hi guys,
I tried with
Manalink 9/9:Conspiracy for the recoding of M15, and
Manalink update 14 November 2014: Khans of Tarkir
and couldn't replicate this error. Draft was working fine for me...
Anyway, let me know if there are any other bugs for draft. I took a quick look at the bug forums but didn't find anything for draft.
Up to now, I was not looking at the bug forums as I thought that draft errors are reported in this thread.
I tried with
Manalink 9/9:Conspiracy for the recoding of M15, and
Manalink update 14 November 2014: Khans of Tarkir
and couldn't replicate this error. Draft was working fine for me...
Anyway, let me know if there are any other bugs for draft. I took a quick look at the bug forums but didn't find anything for draft.
Up to now, I was not looking at the bug forums as I thought that draft errors are reported in this thread.
I long for the time where one man could make a difference...
- foolosopher
- Posts: 189
- Joined: 19 May 2010, 20:53
- Location: Greece
- Has thanked: 13 times
- Been thanked: 17 times
Re: Draft Development in ML 3.0
by Aswan jaguar » 26 Feb 2015, 14:46
I tried again and the bug is still there: if you select all 3 packs to be Alara Reborn when you select the last card of the last=3nd package it crashes.Only humans deck gets created.
Can you please check again?
Can you please check again?
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: Draft Development in ML 3.0
by foolosopher » 16 May 2015, 21:28
Hi guys, found some time to look at the bug for Alara, problem is that when trying to create the opponents deck, code will try to keep only two colors for each deck and can't add lands properly so game breaks. I would suppose that this bug would affect all sets that have only multicolored cards, but haven't tried or seen it yet.
Anyway, I tried to compile the latest patch Fate Reforged, but it seems that card_id.h is missing from src folder, so could someone post it here please.
Also is there any chance that we try to integrate the gui for set selection in draft, that I made. I need someone to add gtk library to make (unfortunately the makefile that we have is too complicated for me
) and if it would be possible to inject
gtk_init(&argc, &argv);
somewhere at the start of the magic.exe, would be a great help!
Anyway, I tried to compile the latest patch Fate Reforged, but it seems that card_id.h is missing from src folder, so could someone post it here please.
Also is there any chance that we try to integrate the gui for set selection in draft, that I made. I need someone to add gtk library to make (unfortunately the makefile that we have is too complicated for me
](./images/smilies/eusa_wall.gif)
gtk_init(&argc, &argv);
somewhere at the start of the magic.exe, would be a great help!
I long for the time where one man could make a difference...
- foolosopher
- Posts: 189
- Joined: 19 May 2010, 20:53
- Location: Greece
- Has thanked: 13 times
- Been thanked: 17 times
Re: Draft Development in ML 3.0
by Korath » 17 May 2015, 03:27
card_id.h is built in the magic_updater directory by csv2dat.exe from Manalink.csv. My current one is attached.
There currently aren't any calls into C at magic.exe startup; the closest we come runs at the start of each duel. Magic.exe uses the windows startup interface anyway, so we don't have a real argc/argv pair; the command line is passed as one big string.
There currently aren't any calls into C at magic.exe startup; the closest we come runs at the start of each duel. Magic.exe uses the windows startup interface anyway, so we don't have a real argc/argv pair; the command line is passed as one big string.
- Attachments
-
card_id.zip
- (158.53 KiB) Downloaded 545 times
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: Draft Development in ML 3.0
by foolosopher » 17 May 2015, 10:21
Thanks Korath, that did the trick, still I am getting the below warning, which I had to remove -Werror, to overcome it:
-----
functions/functions.c: In function 'reveal_cards_from_hand':
functions/functions.c:10603:9: error: iteration 2147483647u invokes undefined behavior [-Werror=aggressive-loop-optimizations]
count++;
^
functions/functions.c:10597:7: note: containing loop
while( count != -1 ){
^
cc1.exe: all warnings being treated as errors
make: *** [functions/functions.o] Error 1
-------
Regarding gtk_init(&argc, &argv); It just needs to be somewhere before the gui is invoked, so if you could place it where you mention, it could also do the trick.
-----
functions/functions.c: In function 'reveal_cards_from_hand':
functions/functions.c:10603:9: error: iteration 2147483647u invokes undefined behavior [-Werror=aggressive-loop-optimizations]
count++;
^
functions/functions.c:10597:7: note: containing loop
while( count != -1 ){
^
cc1.exe: all warnings being treated as errors
make: *** [functions/functions.o] Error 1
-------
Regarding gtk_init(&argc, &argv); It just needs to be somewhere before the gui is invoked, so if you could place it where you mention, it could also do the trick.
I long for the time where one man could make a difference...
- foolosopher
- Posts: 189
- Joined: 19 May 2010, 20:53
- Location: Greece
- Has thanked: 13 times
- Been thanked: 17 times
Who is online
Users browsing this forum: No registered users and 2 guests