Pull this out of the other thread so hopefully it can get some eyes; its one of the last burrs I have in my template and its driving me batty. Is there a good card numbering snippet that automatically updates, and updates the count for the (sub)set?
My existing numbering script is aped from the MtG set, it provided a cleaner example for subset filtering than my hacky if-then-function route. The trouble I am continuing to have is the field is not updating as things change; it defaults to 0 or 1 and generally stays there. If I click the field and do something to "edit" it, it updates accurately and we're all good, but if I leave it alone and add a new card or rename an existing card (and change the order in the process) it remains at the old value. As the field is set not to save the value, each time I reload a file all of the (sub)set counts are back to that 0 or 1. Card numbers are all right, but the (sub)set counts are wrong.
Any input? Any snippets?
Minor aside: the LAST burr is UTF-8 encoding; I want to use the "copyright" icon in some default text but MSE doesn't like it no matter what encoding or escape characters I try to apply.
Last Edit: Aug 20, 2020 16:36:02 GMT by damooseneo: Resolved the issues; see final post.
An update: I added some elements to my fields for the card number and set number; "identifying" and "sort script" tied to my sorting script. This SEEMS to have done the trick, though the system still numbers strangely when: - Reloading the data - Adding a new card (IE I end up with 11/10, for instance, momentarily)
The "combined editor" seems to be doing the trick; the card numbering script updates as new cards are added/renamed/styles change, which updates the combined field, which updates the set field.
FINAL CATCH: it appears an existing bug is one that aligns the text of combined fields to the top, evident when there are varied text sizes within the combined field. The game template I'm building has the card number a larger font than the set number, but no amount of effort to add an "middle" or "bottom" alignment seems to change the behavior. I was able to achieve the different sizes adding a pair of "size" tags to the output of the set number generating script, and its honored by the combined editor, but ALWAYS aligns to the top of the display, not middle or bottom regardless of what the alignment of the combined filed is.
Most of my fixes come from beating on the code, but dare I hope someone has some insight?
Resolution: - The Combined Editor has a "bug" or unaddressed formatting policy that aligns smaller-fonts to the top of the field. Unavoidable. - I was able to achieve useful updates to the card number and set numbers by applying an "identifiable" tag to each of the two fields in the "game" as well as a "sort script"; this forces the value to reevaluate when a new card is added and loads appropriately when the file is opened. - I was able to find a (C) copyright character in UTF-8 encoding in the YuGiOh files; I simply copied and pasted that one to the relevant space in my files. I'd recommend that, as other efforts to find compatible UTF-8 characters failed.