PlayersCouncil / LotR-TCG_card_generator

nanDECK script for generating Lord of the Rings TCG cards from CSV.
6 stars 0 forks source link

Problems with automatic replacements. #20

Closed morvael closed 4 years ago

morvael commented 4 years ago

I think it should be possible to disable automatic replacements. Or they have to be reimplemented in some other way, if possible. When cards mention loaded keywords without actually giving them to target card, those keywords are not bolded.

Example: https://lotrtcgwiki.com/wiki/lotr10001

By automatic replacement of every damage +X (and other keywords) it's impossible to honor this convention.

ketura commented 4 years ago

Hmm. Well the method I have used to address this in the past it to simply remove it from the autoformatter; as I think about it, I suppose there's no situation where damage + X would be bolded, would it. That's a good candidate for removal and just making people manually bold it if they so desire.

What are the other specific keywords you've noticed?

I'm not sure if there's a different mechanism we can use besides the one I've already got, so the best that can be done is to reduce everything to the lowest common denominator, e.g. only the things that are 100% always formatted.

morvael commented 4 years ago

Sadly as simple keyword as fierce can be bolded or not too. All unloaded keywords too.

morvael commented 4 years ago

https://lotrtcgwiki.com/wiki/lotr07016

morvael commented 4 years ago

It's contextual, so no replace rules will handle this. Since my database knows which one to bold and which not, I just need a tag to disable auto-bolding.

morvael commented 4 years ago

Or settings option.

morvael commented 4 years ago

For now I went with deleting lowercase replacements for keywords.

morvael commented 4 years ago

My solution seems to work fine (for me at least). Majority of replacements is retained, only lowercase keywords are removed.

ketura commented 4 years ago

Lowercase versions of non-numeric loaded keywords have been removed from the autoformatter. Numeric keywords with X (damage +X, etc) have all been removed as well.

Easterling and Southron have been altered to only bold if they are literally the first word of the game text, else it is ignored.