It is currently 28 Apr 2024, 19:12
   
Text Size

The "2000 limit no more" CSV

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Re: The "2000 limit no more" CSV

Postby Mok » 11 Jan 2012, 14:56

Gargaroz wrote:
Mok wrote: Just keep in mind that csv file is no longer directly accessed by the game so it might not be available for any scanning.
You mean "not the entire CSV file" is accessible from the game, right ?
No, I only meant that Manalink.csv that was previously used by C code directly is no longer needed after you switched to checking coded cards via in-game data (unless you reintroduced the dependency for some reason). AFAIK you can delete Manalink.csv from main magic directory and it should work just fine. All .csv data is accessible if you need it via cards.dat (all except new expansions rarity columns and deck builder columns), rarity.dat and in case of deck builder via dbinfo.dat.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: The "2000 limit no more" CSV

Postby Gargaroz » 11 Jan 2012, 14:58

Ah, yes, you're right, I forgotten about the .dat files.
----
- 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: The "2000 limit no more" CSV

Postby Aswan jaguar » 11 Jan 2012, 19:50

I was trying to see how some cards (some creatures with haste I tried to test) can make better use of the flags that didn't exist in the cardeditor we had before in the ct_all csv and ct_all excel file but couldn't make it happen.I changed the values updated the files and copied them to main directory but AI continued to use the card like before.Am I doing smt wrong?
Flags like "play after combat","play before combat" are they implemented yet?

Do they mean "cast after combat","cast before combat" as I understand or "use ability after combat","use ability before combat"?
Which flags are active and changing them makes a difference to the engine and which are obsolete need (recoding,fixing,implementation....)
Are some values going to be ready in next update and I am being haste?
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: The "2000 limit no more" CSV

Postby Mok » 11 Jan 2012, 22:43

Aswan jaguar wrote:I was trying to see how some cards (some creatures with haste I tried to test) can make better use of the flags that didn't exist in the cardeditor we had before in the ct_all csv and ct_all excel file but couldn't make it happen.I changed the values updated the files and copied them to main directory but AI continued to use the card like before.Am I doing smt wrong?
Flags like "play after combat","play before combat" are they implemented yet?

Do they mean "cast after combat","cast before combat" as I understand or "use ability after combat","use ability before combat"?
Which flags are active and changing them makes a difference to the engine and which are obsolete need (recoding,fixing,implementation....)
Are some values going to be ready in next update and I am being haste?
These are hints for the AI when it should/shouldn't cast/activate a card. Cast before combat means "use in main phase 1", cast after combat means "use in Main phase 2". I'm not sure if AI will follow it always or not, but I remember it worked somehow years ago. Just be aware that setting to cast things too often might actually work worse... like AI will spend mana before combat and end up empty when it needs it. I remember there was an event in card code that was telling AI to reserve some mana as it might be needed for regen or p/t inflating but I never really analyzed the AI properly. Also some of the column names in that XLS are wrong... I did not analyze a lot of the settings properly in the past and just put there something that it seemed to do, that might not be true at all. TBH most of the flags in that file should be simply tested by looking at the original cards that had it set and/or by trial and error. I somehow doubt anyone will bother with exe analysis.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: The "2000 limit no more" CSV

Postby foolosopher » 11 Jan 2012, 23:34

Well guys
I am concerned about scaning all the cards (~4200, which is certain to increase) every time one wants to play draft, sealed or uses a filter in deckbuilder with ifs or ORs to gather the cards of a set. Is there any chance to use static tables to create the expansion dats with card IDs and rarities. I mean (we?) could create lists with names from card_id.h and with a script extract ID and rarity and put them into a dat. The dat would have all cards from each set followed by rarity in the form of 2 bytes for ID plus one for rarity, then the next set etc. Anyway 3 bytes per card and no need to scan with ifs and such.
expansions (57) plus 12 core = 69
The other way is
card occupies (number of expansions*3+7)/8 =(69*3+7)/8 = 26bytes per card and scan one full column/set.
Give it a thought.
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: The "2000 limit no more" CSV

Postby Mok » 12 Jan 2012, 00:18

foolosopher wrote:Well guys
I am concerned about scaning all the cards (~4200, which is certain to increase) every time one wants to play draft, sealed or uses a filter in deckbuilder with ifs or ORs to gather the cards of a set. Is there any chance to use static tables to create the expansion dats with card IDs and rarities. I mean (we?) could create lists with names from card_id.h and with a script extract ID and rarity and put them into a dat. The dat would have all cards from each set followed by rarity in the form of 2 bytes for ID plus one for rarity, then the next set etc. Anyway 3 bytes per card and no need to scan with ifs and such.
expansions (57) plus 12 core = 69
The other way is
card occupies (number of expansions*3+7)/8 =(69*3+7)/8 = 26bytes per card and scan one full column/set.
Give it a thought.
Uhm... scanning 39 bytes per card takes no time at all for a normal system. Checking if a card is part of an expansion is definitely quicker than the old "get_card_id_by_name" used sometimes hundreds of times in a speed critical AI code... I use rarity.dat in my local copy of deckbuilder to check if a card is a part of filtered expansion and it takes no time at all. Checking rarity of a card in an expansion takes what... 1 read of 2 bytes and a shift plus an "and" instruction per card? I simply see no advantages of what you propose. What ifs and ORs? You'd end up in simply longer files on disk and that's all. Look at length of old code that retrieved coded card status from csv and a new version proposed by Snacko (I think, sorry don't remember who proposed the change atm) that uses original 1 bit per card array inside the exe file.
BUT, as I said to Gargaroz already, I'm not going to force anyone to do it the way I propose, as I'm not the one who will be using it. I'm outta here in a couple of days hopefully when the beta gets into "playable" state. I'll upload sources for the conversion tools like csv2dat and a currently "cleaned" a bit resourced sources of cardartlib.dll, drawcardlib.dll and deckdll.dll so any changes will be easy to add (for an asm coder or you can simply recode the exporting tools as these are very very crude code from years ago that could definitely be done better).
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: The "2000 limit no more" CSV

Postby 0rion79 » 12 Jan 2012, 07:13

A couple of things worthy of being mentioned after testing the latest available files:
1 - now the deck editor crashes when filters for creature types are activated (the ones obtained by right-clicking on creatures button)
2 - creature type list is no longer in alphabetical order but starts with Viashino (and then Rebel, Mercenary, Carrier, Unused, Unused ecc.)
User avatar
0rion79
 
Posts: 1520
Joined: 24 Feb 2009, 18:33
Location: Italy
Has thanked: 94 times
Been thanked: 61 times

Re: The "2000 limit no more" CSV

Postby Aswan jaguar » 12 Jan 2012, 07:40

Mok wrote:
Also some of the column names in that XLS are wrong... I did not analyze a lot of the settings properly in the past and just put there something that it seemed to do, that might not be true at all. TBH most of the flags in that file should be simply tested by looking at the original cards that had it set and/or by trial and error. I somehow doubt anyone will bother with exe analysis.
Thanks for the answer Mok,I believe that little by little and by trial and error and looking at the original cards and comparing what already is "known" we will get a better understanding.
By any chance do you know if some fields were implemented for future use(there is code for them but)no cards use them?
Do you have a scv (or else) with original card values by the way?
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: The "2000 limit no more" CSV

Postby Gargaroz » 12 Jan 2012, 14:03

A question about the new expansion, Dark Ascension : could we simply add a new column in the "Expansion" part of the CSV or something needs to be updated before ?
----
- 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: The "2000 limit no more" CSV

Postby Mok » 12 Jan 2012, 18:43

Aswan jaguar wrote:By any chance do you know if some fields were implemented for future use(there is code for them but)no cards use them?
Do you have a scv (or else) with original card values by the way?
I don't remember :) It was 8 years ago where I was analyzing it. Original cards are mostly these in range 0-1000 (in the main csv).
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: The "2000 limit no more" CSV

Postby Mok » 12 Jan 2012, 18:45

Gargaroz wrote:A question about the new expansion, Dark Ascension : could we simply add a new column in the "Expansion" part of the CSV or something needs to be updated before ?
There's already a column for it, empty for now. Just put the rarity value for cards that appear in the expansion and that's it. And in the "old" expansion column, as usual, whatever you used for all the other cards.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: The "2000 limit no more" CSV

Postby Dave » 13 Jan 2012, 12:49

Would somebody please explain where (and how) the info is (gonna be) stored in what expansions a card occurs ?
pe.: Birds of Paradise is in 4th edition,8th, 10th,11th and so on. There are now 93 expansions.
Otherwise i don't understand how you can set any filters?
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: The "2000 limit no more" CSV

Postby Gargaroz » 13 Jan 2012, 14:41

Dave, check the first post on latest update thread, it's all explained there.
----
- 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: The "2000 limit no more" CSV

Postby Dave » 13 Jan 2012, 16:03

Thanks, Gargaroz. I guess i should have found that myself.. :oops:
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: The "2000 limit no more" CSV

Postby foolosopher » 15 Jan 2012, 00:40

0rion79 wrote:A couple of things worthy of being mentioned after testing the latest available files:
1 - now the deck editor crashes when filters for creature types are activated (the ones obtained by right-clicking on creatures button)
2 - creature type list is no longer in alphabetical order but starts with Viashino (and then Rebel, Mercenary, Carrier, Unused, Unused ecc.)
Same here...
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

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 36 guests


Who is online

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

Login Form