Closed Lodish closed 4 years ago
there's a 'more information needed' label, what information is needed?
What is the expected behavior after a reset code?
the expected behaviour is to remove formatting, it should be the same as having no format codes after the §r, for books this means the text is black either way, and that this black text becomes light gray text on notes. (as it did on devoted, realms and classics before the update)
Reset returns the string to the default colour and formatting, but that default can apparently differ between bodies of text. We've taken for granted that the default for chat and item descriptions are white and unformatted, but for books the default is different. I think we should generally move away from using the reset code as much as possible in the future since it's the only code that isn't consistent.
For reference, colour codes cancel out formatting codes, thus:
<red><bold>Hello <white>World!
That "World!" will only be white, since it cancels out the red AND the bold.
I still don't quite understand this issue, if you do you, could fix it?
Yeah, it's an odd one as the issue itself is simple, that people are using §r
when writing in books because of how it functions in books. But when they use a printing press to create a note, the book's text is quite literally copy and pasted in item lore, and the reset for items makes the text white. What's confusing me is how this is a new issue.. here's a commit from 2016 with the same code.
We can fix this fairly easily for new copies of a paper note by essentially copying this line and changing the replaceable from black to reset. I'm not sure what we ought to do for existing paper notes though.
It's likely some underlying behavior changing, remember Diet already fixed some other stuff regarding color that changed behavior. Idk though :man_shrugging:
@Lodish Would you be content with a fix for new prints?
I would be content with a fix for new prints but I think this isn't the recipe that's broken, your links show the 'create note' recipe, it is the plate creation recipe that's broken @Protonull
old pre-update plates already work fine,the issue isn't making a note, old plates make correct notes it's the new plates that are wrong. for instance earlier the plates that made purple italic text of anything without formatting still did that after diet fixed it, you had to make new plates to do new notes,
changing the replaceable from black to reset
don't you need both? the point of the change to gray is black isn't allowed on notes as it's unreadable
Ok it seems I was wrong, new notes from a plate made before the update aren't stacking with old notes even though no difference can be seen between the notes
That's to be expected as there was a fix not too long ago that added to fix formatting issues.
But shouldn't those produce the same meta if they are visually the same?
Nope, format and colour codes are just as much part of the string as the text
So right now a new plate made right now and an old plate made pre-update make notes that stack together, its just old notes from the old plate that can't stack
I'm just surprised fixing the issues didn't lead to the same formatting/colour data that the old notes had. I guess all my CivTCG cards from now on will just be 2nd edition
The cards all look how they're supposed to though so thank you
Please report back whether this is fixed after the next restart @Lodish
This is the card from pre update
this is from the old design copy pasted into a new book, making a new plate and then printing new notes:
They unfortunately don't stack together but that was expected.
Seems to be fixed to me, thanks
New cards from old plate Old cards from old plate New cards from new plate
these all produce identical looking cards, none of which stack. this isn't really a problem just thought it was worth noting.
Ok, closing this then
When writing a book all text is in black, when this writing is converted onto a note via the printing press this text become light gray, this still works if there are no formatting codes, but if the reset code is ever used (§r) the text now become white. Within a book §r and no formatting are both black but once a note is printed the text after §r is white.
Because I used a §r code to remove the bold on 'Death:' the following text is white, I also used §r after the white ● to reset the colour to light gray.
old plates made before the 1.14 update create correct notes.
I have no idea how github works, let me know how I messed up.