Closed nickv2002 closed 7 years ago
@nickv2002
In sets_db.json why all the * on both sides of the set_name tags? (Except on Promos: "set_name": "*promo",) Are they supposed to be everywhere? Again, why have them if they're everywhere?
The intent was two fold:
This branch should be mostly functional now. We are missing some translations, but I believe all the other parts are there. Of course it fails all the continuous testing, so changes will need to be made there.
I updated the branch with the following:
__init__.py
to include--expansion_dividers_long_name
option; fixed the set image when combining upgrade sets; fixed a few bugs; and changed the file structure to:card_db/
cards_db.json
sets_db.json
<language>/
cards_<language>.json
sets_<language>.json
sets_db.json
to include "*"
for default "text_icon" and fixed "set_name": "*promo*"
images/base_set.png
since it was being called out for the base set. At least until a better image can be substituted.cards_db.json
to fix json errors.Good work. Thanks.
- Added back
images/base_set.png
since it was being called out for the base set. At least until a better image can be substituted.
But the base cards should literally not have an expansion symbol. See these scans.. They work with everything, they're in every game, it's just the Dominion starter set that gets a copy of them since they don't want you to have to buy 2 boxes to start playing.
@nickv2002
But the base cards should literally not have an expansion symbol.
You are right. Now fixed in the branch. base_set.png
is removed (again!)
I noticed the potion image looks a little weird on the tabs. Not sure what is going on with the image.
Looking at the output, it looks like we are only missing translation entries in cards_en_us.json
for the following groupings:
and in sets_en_us.json
we are missing:
I noticed the potion image looks a little weird on the tabs
It looks like it is being stretched. It may need to be padded width wise. I might suggest that anyway -- make all the icons the same size so that they will be predictable when placing.
missing translation entries
Should some of these be all lowercase?
I don't understand something here:
'landmarks' vs 'empires landmarks'
First, are these (and others) supposed to be all lowercase? (maybe just counter-intuitive or I haven't been paying enough attention to note 'cards', vs 'sets', vs 'groups', vs 'stacks' vs. 'card_tag')
Second, is the intention to have these cards be in both groups, so that if landmarks are added in a future set they can either be printed together -- such as 'landmarks' all together or separately 'empires landmarks' and '* landmarks' etc.?
Finally, I've done a quick commandline python Gist to get the contents of the ones I thought I understood moved into the new cards_en_us.json format. Note the checkout directories I mention in the title of that gist (you need to have both branches checked out or change the paths).
Looks like something similar could be done with Page -> and Peasant -> . Not sure about the other missing ones.
Edit: I missed 'Summon' in 'promo events' so I've tweaked the Gist slightly. Edit: Page.. and Peasant.. illustrated in the Gist (slow day at work :+1: , but I can't render them here to ensure they look right -- some tweaking may be necessary especially since each card has an hr and lots of text)
I missed the graphical issues with the new set icons so I'll try and square them all off to the same size later today.
@mr-ice thanks for you work on the recombination. Please submit a pull request when you get a chance.
It looks like it is being stretched. It may need to be padded width wise. I might suggest that anyway -- make all the icons the same size so that they will be predictable when placing.
Actually, when printed on the tab, it looks compressed horizontally to me. I agree it makes sense to have the images the same size for the same use. Coins/Potion/Debt the same, set images the same.
Should some of these be all lowercase?
I listed them as they appear in the group_tag. Some are in lower case, others in mixed case. Personally, I think it might be better to keep all *_tag entries as lower case. Then it is easier to see if we are talking a tag or a name. But either can work. The code just needs them to be unique.
'landmarks' vs 'empires landmarks'
Yes, thinking ahead. Just like Events. The group_tag will group inside an expansion. And then an option to combine across expansions into a single group. And that group will be placed in an expansion/set called "Extras". I know it really doesn't apply yet to Landmarks, but they are just ripe for additions into promos and other expansions. I would think the extra and description text for each would be the same. Just as it can be the same for each of the Event groups.
Not sure about the other missing ones.
'Page -> Champion' and 'Peasant -> Teacher' are the only ones that don't have translations today. So I would think you can easily pick up the rest.
In other thoughts... Right now, as cards are being combined into a group, the very first card found is used as the holder for that group. What that means the group uses that card's cost, debtcost, potcost. Now for Events and Landmarks, since they have their own card type, the code can check and zero out those values. But for the others, we want to have the cost of the first/primary card. So order is important in the cards_db.json file. One way to bullet proof it would be to have a separate groups_db.json file that contained the cost information for the group. Not sure it is worth it or not.
merged https://github.com/sumpfork/dominiontabs/pull/91 to make all set images 300x300 for consistency. Should fix print problems but haven't tested yet
Right now, as cards are being combined into a group, the very first card found is used as the holder for that group. What that means the group uses that card's cost, debtcost, potcost. Now for Events and Landmarks, since they have their own card type, the code can check and zero out those values. But for the others, we want to have the cost of the first/primary card. So order is important in the cards_db.json file. One way to bullet proof it would be to have a separate groups_db.json file that contained the cost information for the group. Not sure it is worth it or not.
Grouped cards should be sorted by cost generally, because (at least so far) all piles and such put the cheaper stuff on top (makes sense for the game because you can't afford expensive stuff early). I would rather not maintain a separate groups_db.json
file if we can avoid it.
@nickv2002 The new images look good. Potion (as a cost) is much better now.
Grouped cards should be sorted by cost generally
I did not realize that. Updated the code to always update to the lowest card cost. Cards that have a cost that includes a "*" will treat that cost as a large number (so should never be the lowest card cost).
I also fixed up some group_tag errors in cards_db.json
, and added all the missing text entries in cards_en_us.json
and sets_en_us.json
.
'Page -> Champion'
and'Peasant -> Teacher'
still need real text to be added. But it just got too late tonight.
From my standpoint, the branch is pretty functional right now. I think the remaining TODO's are:
'Page -> Champion'
and'Peasant -> Teacher'
I added text for 'Page -> Champion'
and'Peasant -> Teacher'
I corrected the Travis continuous integration failures.
@nickv2002 I think we are down to the final steps:
@sumpfork I think it is close enough for you to start testing and reviewing. A lot of it can be done without the other language files.
Nice work @wvoigt 👍
Busy this weekend but I can poke at the translations this week. We should not hold up the english update for the translations however, as it will take more than my work to get them up-to-date.
@nickv2002 I'm not sure what is going on now. I did a clean start off a download of the current branch. Now I'm seeing problems with the following images:
Any idea on what could be causing that? The others seem to be OK.
@wvoigt no idea, haven't changed anything since I changed all the set icons to be 300x300 pixels but that didn't change the colored potion.
Perhaps related: should it be dominion1StEdition_set.png
or dominion1stEdition_set.png
? looks like the file is dominion1StEdition_set.png
but I think it should probably be dominion1stEdition_set.png
. I'll put a patch in for that... Done.
@nickv2002 In order to help speed up the creation of the language translations from the existing cards.json for each language, I've created a cross reference spreadsheet. It would not let me attach it here (even if I made it .zip). So I added it for now in \tools\CrossReference.ods
(we can delete it later). Names that I found in the cards.json
files are highlighted in blue. Many are missing. I found a list of cards across various languages that I used to fill out the spreadsheet. I tweaked a few to match the name used in the cards.json
file.
I would suggest we keep the same order of cards in each language file the same as in cards_en_us.json
.
If the language's cards.json has the card listed, then provide all the information that is not empty (name, description, extra). I noticed some translations just put empty strings for the description or extra. I think we should skip those so that the English version shows. That will hopefully prompt others to help translate.
If an name does not exist, then provide the name if we have it in the spreadsheet.
"Fountain": {
"name": "Brunnen"
},
And if we don't have that, then a blank/holder record for that card:
"Fountain": {
},
That should make it easier for future translations. Then in the future, we add any new cards to the bottom of the file. And for each card that is not complete, the information can be added as it is provided.
What do you think?
Now back to looking at the images again...
@wvoigt Your proposal sounds fine but wouldn't it be more useful to put then English info in if the translated info wasn't available so it could be translated without referring to a second file?
Busy with other stuff so haven't got to work on this much but I have written some scripts that can combine all the names in the spreadsheet you uploaded into a cards_<language>.json
file.
@nickv2002 I'm of two minds on having the English in the other language files:
In other work, I just made updates that hopefully will make the comparison easier. The files had two different encodings. Parts used \uxxxx (unicode) and parts just had the ISO8859 characters. And the two don't compare very easily. Even the English file had a few backslash characters that could be removed. I is hard to read in the files without getting double encoding (\uxxxx, and \/). So I just standardized on one encoding. When the files are read in, just make sure they are encoded from ISO8859-15 (really ISO8859-1 works too except for one French character.) I also uploaded a csv file to make it easier to directly read from python.
Also, I noticed that except for the card names, the French file was just in English. And it did not have as many cards. So I would suggest just using the names from the spreadsheet.
And as a consequence of going through all the cards, I noticed that we have lumped all the Ruins together. While the German version had them separated out. So given some time, it might be good to add the 5 individual Ruins cards and then place them all in the Ruins group. Then there is flexibility. Not critical for now, but just wanted to mention it here before I forget.
@wvoigt Thanks. I tweaked a few more things including removing some unneeded unicode in the card DB for: https://github.com/sumpfork/dominiontabs/pull/99
For card translation DBs how about option 3: Put in English wording for now, as part of the large transition, but not in the future. I can also add an untranslated
tag to each card that needs it when my script merges everything together.
As for Ruins I think it's correct not to break them out separately. They are always 1 pile that should be in a random order. There is no aspect to the game that refers to them separately. They're really 1 card that has a few different effects.
@nickv2002
For card translation DBs how about option 3: Put in English wording for now, as part of the large transition, but not in the future. I can also add an untranslated tag to each card that needs it when my script merges everything together.
I like this option. Especially if the field can include the names of the fields that are not translated. This allows the option in the future to have a maintenance script that can automatically update if needed. The maintenance script could also add any missing cards, make sure all entries are ordered the same, etc.
As for Ruins I think it's correct not to break them out separately. They are always 1 pile that should be in a random order. There is no aspect to the game that refers to them separately. They're really 1 card that has a few different effects.
While I see where you are coming from for this, I fail to see how it is any different than many of the other "groups" that we have - Events, Landmarks, Sauna - Avanto, etc. While some are random and others are not, the point is they all have different card names but their use are tightly related. Some may like them combined for storage, others may not. Now personally, I would store them together.
My 2nd argument for adding the 5 cards (and then grouping) would be that the 5 cards are currently in the German translation - so the German dividers currently print these 5 cards. I was hoping to keep this update so that no one lost anything. And by using the group, really folks can do it whichever way they want.
@nickv2002 On the image issues, I'm not sure if this is it, but see the following changes:
alchemy_set.png
new version has bit depth is 32, working set images are 8. But old ones are 32 as well. I suspect some change in the transparency. But I'm not an image expert.dominion1stEdition_set.png
same as abovepotion.png
It is the same size as before, but older version had 32 bit depth, current one only 8.
Note: I mistakenly called out the wrong image on this before. Upon re-examination, it is not so much compressed, it is just that the background is not clear.At this point I'm stuck.
@wvoigt hmm, don't have time to test now but my first thought is to just put the old images back in place of the new ones (renaming as needed). Will let you know if I figure out anything else.
Sorry closed accidentally below... not sure why that's so easy to hit without a confirm...
@wvoigt I have the same issues with images in my version but haven't had much time to test anything. Hope to soon but work has been busy and might still be...
@wvoigt images should be fixed from https://github.com/sumpfork/dominiontabs/commit/478296f8b5b7719f9574eca29e4e5151cd9d3527 and https://github.com/sumpfork/dominiontabs/commit/db76fffdff84d7019c152249d6ba0d11387adc11
Give that a try and see if it works for you too.
Hey guys, I know nothing about programming, but I love your dominion tabs! Seriously, thank you all so much! Any guesses about when the V2 cards will be up on http://domtabs.sandflea.org/?
When @nickv2002 and @wvoigt believe the code V2 is ready they'll make a pull request against master and I'll review the changes - despite being busy I promise to try to be quick on this, as I know there are people waiting. Once that process is done I'll put them up at the online generator, but there'll be a bit of work involved in that as some of the options are changing.
Awesome,
You guys are the best!
I think it's basically ready in English. Not ready for other languages. Will leave final say up to @wvoigt because he's more familiar with the detailed bits of the codebase than me, but my test output looks correct in a few checks.
I believe the code base is done. I have one small change I want to make, but it is not critical.
Right now, more eyes looking at the output would help the most, just to make us feel more confident we have not missed something along the way.
I'm busy for the next two days, but I can work on it this weekend to finish everything up.
@sumpfork , I'll also post a summary of all option changes here.
@nickv2002 I'm almost finished with the translations [de, it, fr]. Before I post the changes, I thought I would state what I have done, just in case I went a little too far.
untranslated
field to help keep track of what elements have been translated for a card. Basically, it is a string with the field names "name", "description", "extra" to indicate the elements that have not been translated. As elements are translated, the name of the element should be removed from the list.translation.txt
file that will reside in each language directory with instructions on how to update the files.xx
that has a starting point for any new translation. This differs from the en_us file since each card will have the untranslated
field set. The en_us files, by definition have been translated and do not need the untranslated
field.I've wrote a maintenance tool called update_language.py
for the tools directory that will:
cards_db.json
by cardset_tags
and then card_tag
. Before the main sort, the items in cardset_tags
are first sorted (with 'base' going in front if it exists in the tags).cards_XX.json
is put in the same order as the newly sorted cards_db.json
file. This should make finding cards easier. Any entries no longer found in cards_db.json
are kept at the end, just in case they are needed in the future.untranslated
entries are removed since the card is fully translated.sets_db.json
by the cardset_tags
. Again, each sets_XX.json is put in the same order. Any new set information is added to the file.card_db
directory under the tools. So the results must be copied by hand. That way the files are not accidentally harmed. And the results can be checked before updating.The intent was a utility that could be run any time a card/set is added or updated that would propagate the update to all the languages. At that point, translations in each language can start.
If there are no objections, I'll post the changes tomorrow.
@wvoigt awesome work, much more comprehensive than originally planned. Sorry I haven't had time to work on more but other stuff got in the way. Post what you've got for sure.
@sumpfork I believe everything is ready to go. We could use some more folks testing. Here is a summary of the option changes:
New Options:
--edition
Select specific editions of sets. This can be combined with other options to refine the expansions to be include in the output. --expansions
can still be used to limit the selections even more. Possible values are:
'1' is for only 1st Editions
'2' is for only 2nd Editions
'latest' is for the latest edition for each expansion
'all' is for all editions of expansions (default)--upgrade_with_expansion
Include any new edition upgrade cards with the upgraded expansion. For example, each of the recent update packs would be included with the 1st edition. Dividers from cards in the update packs will still print out the symbol for the 2nd edition on the tab to help differentiate the card.--expansion_dividers_long_name
Use the long name with edition information on the expansion divider tab. Without this, just the expansion name is used on the expansion divider tab. For example, "Dominion 2nd Edition" instead of the short name "Dominion"Changes to existing options:
--special_card_groups
For the most part this is the same. The exceptions are that "Tournament and Prizes" is now a group, and Events and Landmarks are each a group inside their expansion.--exclude_events
Has a similar meaning as before, and differs from the Event groupings in --special_card_groups
by grouping all Events across all expansions/promos into a single divider that is placed in a special "Extras" set.--exclude_landmarks
Similar behavior as --exclude_events
but for Landmarks. Now currently, all Landmarks are in one set. But this was left in place in anticipation of more landmarks being added in future sets or promos.--exclude_prizes
Currently has no meaning. The prizes are now grouped with Tournament in --special_card_groups
Hey guys. Again, fantastic work. I just generated some tabs (you can see the setting I selected in the attached image) and noticed a few thing to consider:
Other Ideas:
Here is a link to the tabs I generated: file:///C:/Users/Sam%20and%20Megan/Downloads/sumpfork_dominion_tabs.pdf. Thanks for all of your hard work. I'll generate some more tabs in the future and give you more feedback if you'd like?
Sam Oudekerk
@soudek01 This is exactly what we need right now. More eyes checking everything.
I gather the cards you reviewed were at the website or the master branch on GitHub. If you are able, the code here on GitHub is ahead of what you were able to run. So some of these items have already been fixed and working their way to the website and other items have not.
1 Possession now has an erratum that the possessor gains all tolkens as well.
This needs looked at. Thank you for the link. Ironically, we have been so focused on code changes, I don't think we have fixed the text yet. UPDATE: Now in queue.
2 Ruins card card count say 10.
This has been fixed and is in queue.
3 Moneylender, Throne Room, and Mine should say "you may." (I know this is a V2 thing that you're probably working on.)
This needs looked at. I don't think we have fixed the text yet. UPDATE: Now in queue.
4 For the card count on split piles you could so something like 5/5.
I will add this as a feature enhancement. UPDATE: Added Issue #107
5 Settler/Bustling Village card count says 20.
This has been fixed and is in queue.
6 The Adventures' Events has no card count. Empires' Events card count says 34.
This has been fixed and is in queue.
7 Mill is different from all the other cards. It says "worth 1 VP" instead of a "1" and then a victory point symbol. Also, the dividing line on Mill didn't generate correctly.
Good catch! We need to correct that. UPDATE: Now in queue.
- V1 and V2 cards generated with the same expansion symbol.
This has been fixed and is in queue.
9 Sauna/Avanto card count says 30.
This has been fixed and is in queue.
Other Ideas: You could consider including the card type(s) on the bottom of the "card" tabs.
I will add this as a feature enhancement. UPDATE: Added Issue #108 Instead of the bottom, how about the first line at the body top? The same line as the card counts (and coins and sets icons if selected for body top)
Again, thank you for reviewing the cards and yes, we want the feedback.
We seem to have lost Possession 2/2 somewhere along the way. On second thought, I think it is better it is gone. It would be better to keep the description for Possession short enough to fit on one divider.
Ok ya'll, here are some more noticings:
On Tue, Nov 15, 2016 at 8:34 AM, Wendel Voigt notifications@github.com wrote:
We seem to have lost Possession 2/2 somewhere along the way.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sumpfork/dominiontabs/issues/73#issuecomment-260656895, or mute the thread https://github.com/notifications/unsubscribe-auth/AWRK-HDSzzSmyr0fhcv-2453ASix1F38ks5q-cMFgaJpZM4KEJ5F .
"Adventures has Traveller cards. These cards have an arrow over the text box to remind players of their ability to upgrade into another card. When a player discards a Traveller from play, he may exchange it for the card indicated; he returns the card being exchanged to its pile, takes the card he is exchanging it for, and puts that card into his discard pile. For example when exchanging Peasant for Soldier, he puts Peasant back into its pile and takes a Soldier and puts it into his discard pile. Exchanging is not trashing or gaining, and so does not trigger abilities like Travelling Fair's. It is 5 Adventures_Puerto rule us 2/6/15 3:03 PM Page 6 6 optional. It only happens when the card is discarded from play; discarding it from hand, such as due to not playing it, will not trigger it. It only happens if the card being exchanged for has any copies available; if there are no Soldiers in the pile, Peasant cannot be exchanged at that time. If multiple cards do something when discarded from play, the player picks the order; for example, with no Soldiers left in the pile, a player with Peasant and Soldier in play could first exchange Soldier for Fugitive, then exchange Peasant for that Soldier. Page and Peasant are Kingdom cards that are Travellers. Page is exchanged for Treasure Hunter, which is exchanged for Warrior, which is exchanged for Hero, which is exchanged for Champion; Peasant is exchanged for Soldier, which is exchanged for Fugitive, which is exchanged for Disciple, which is exchanged for Teacher. Champion and Teacher are not Travellers; they cannot be exchanged for anything. Page and Peasant can be bought or otherwise gained when being used in a game, but the other cards cannot, they are not in the Supply. When a non-Supply pile is empty, that does not count as an empty pile for the game ending condition or for City (from Prosperity)."
On Tue, Nov 15, 2016 at 10:54 PM, Sam Oudekerk oudekerk.sam@gmail.com wrote:
Ok ya'll, here are some more noticings:
- Distant Lands says "4 VP" and "0 VP" instead of 4 {victory symbol} and 0 {victory symbol}.
- I am not sure about this, but it seems wierd to me that Page ->Champion and Peasant -> Teacher just say what Page and Peasant do. Maybe instead do the description from the Adventures rulebook:
On Tue, Nov 15, 2016 at 8:34 AM, Wendel Voigt notifications@github.com wrote:
We seem to have lost Possession 2/2 somewhere along the way.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sumpfork/dominiontabs/issues/73#issuecomment-260656895, or mute the thread https://github.com/notifications/unsubscribe-auth/AWRK-HDSzzSmyr0fhcv-2453ASix1F38ks5q-cMFgaJpZM4KEJ5F .
Sam Oudekerk
@soudek01 Thanks again for all the reviews. Keep them coming. To help me track things, I'm answering here...
1 Distant Lands says "4 VP" and "0 VP" instead of 4 {victory symbol} and 0 {victory symbol}.
This is now in the latest branch at View #105
2 I am not sure about this, but it seems wierd to me that Page ->Champion and Peasant -> Teacher just say what Page and Peasant do.
I don't think you are looking at the latest branch at View #105 The card text is very similar to what you suggest.
3 Transmute and Vineyard only cost potion, not potion and $0.
Still need to work this. It is not quite as easy as you would think. Edit: This is now in the latest branch at View #105
4 Again, this isn't important, but I'd say "Possession cont."
I just removed it since we no longer have a 2nd Possession card
6 Consider treating the Hermit/Madman and Urchin/Mercenary tabs like the Split piles.
Yes, that is the plan. This will be tracked in Issue #107
7 Many of the V2 cards have modified wordings.
This is now in the latest branch at View #105 For now we only have one card for the two versions. So I put the new words in brackets [ ] to denote that it is new. I'm open to other ways of doing this.
8 The new formatting changes require vanilla bonuses within the text to be bolded. 9 Vanilla bonuses aren't represented in a consistent way. 10 To make the cards uniform, all the vanilla bonuses could be bolded (including vanilla bonuses within the text) and placed above the card text.
I have opened Issue #113 to track
11 Peddler says +$2.
I do not see this in the latest branch at View #105
12 Island says "2 VP" instead of 2 victory symbol.
This is now in the latest branch at View #105
14 Sauna/Avanto doesn't have an expansion symbol on the tab.
I do not see this in the latest branch at View #105
15 Tabs with multiple cards generate inuniformly ... (some have: "Card Name: Card Text" others have: 16 Also consider underlining card names (Settlers:)
Part of the style guidelines needed. Tracked in Issue #113
I updated the code to split out the card types into a json file now. This completes the refactoring. All the primary "data" is now in json files. All the files needed for a full translation are now in the individual language directories. Along the way, you can now use --types
to display the card type(s) centered at the top of the body of the divider above the text.
I'm cross posting this in issue #113 Here are sample files from the current Card db refactoring pull #105 Each language (de, en_us, it, nl_du) has 3 files:
Test-xx-all.pdf
has a copy of all the dividersTest-xx-groups.pdf
has a copy of the dividers with --special_card_groups
Test-xx-extras.pdf
has copy of the dividers with --expansions adventures --expansions empires --expansions promo --expansions base --special_card_groups --exclude_events --exclude_landmarks
Between the 3 files, I believe every card text option is used for that language.
Please review for any errors you see. If you see English in a non-English file, it means that there are items that need translation.
Test-de-all.pdf Test-de-extras.pdf Test-de-groups.pdf Test-en_us-all.pdf Test-en_us-extras.pdf Test-en_us-groups.pdf Test-it-all.pdf Test-it-extras.pdf Test-it-groups.pdf Test-nl_du-all.pdf Test-nl_du-extras.pdf Test-nl_du-groups.pdf
Deployed.
How do you want to deal with the second edition which are already shipping to stores?
Some Options I thought of: