|
Post by damooseneo on Aug 6, 2020 2:19:38 GMT
Per the title; HOW do you reference the stylesheet in use/the stylesheet a card is using? My template in development uses a stylesheet for each major card type in the game; each one has unique frames, image masks, etc. and its own stylesheet makes the most sense. I have one base file that handles all of the common elements, so its easy enough to update, but as a part of the numbering script I need to ID what card type is what (and so checking the stylesheet used "seemed" the easiest route).
|
|
|
Post by damooseneo on Aug 8, 2020 4:13:56 GMT
Quick update; I borrowed a tactic from Magic and "card shapes" including a variable at the top of each stylesheet specific to how I needed that sheet to be counted.
|
|
|
Post by cajun on Aug 8, 2020 8:39:21 GMT
something like the shape is the best way, on MSE 2.1.1 you can use card.stylesheet.long_name or card.stylesheet.short_name to grab those as well (it looks like they crash earlier versions however)
|
|
|
Post by damooseneo on Aug 20, 2020 16:42:34 GMT
Resolved; Borrowed a concept from the MtG templates and "card shape"; In the initial game file, I have
assign_card_type := { "none" } At the top. For my field, I have
card field: name: card_type type: choice choice: type 1 choice: type 2 choice: type 3 script: stylesheet assign_card_type()
And in the "init script" portion of my stylesheets, I have:
assign_card_type := { "type 1" } Where "type 1" is the relevant name/type I want associated. Works like a charm. ALSO: that note, "stylesheet" is AMAZINGLY handy for forcing various changes as stylesheets change. If your template has different options available based on the template used, use that tag to trigger the script on changing. If anything depends on the value, like "card_type" here, place those AFTER the field in the game and stylesheet files.
|
|