|
Post by healer on Jul 28, 2023 20:53:30 GMT
This feels like a very noob question, but I've been editing pre-existing templates in learning to prep to make my own (using Hero's Path, which has some limitations), and I cannot figure out how to add additional boxes on the card-space to input. Right now I'm just trying to add a second name space, titled name 2, but any way I try to work it I get an error stating "Unexpected key: 'name_2'". I plan to make other text regions for formatting as well, so this feels like a big issue for me. Any help on how to resolve this key error would be appreciated.
|
|
Sensei Le Roof
1/1 Squirrel
I was interested in Banding until they tried to make me play bass
Posts: 83
Formerly Known As: _________________
Favorite Card: Unhinged Forest #3
Favorite Set: TV
Color Alignment: White, Blue, Black, Red, Green, Colorless
|
Post by Sensei Le Roof on Jul 28, 2023 22:00:55 GMT
An example from my own poker-style Magic style:
extra card field: type: color name: divider choice: name: land color: rgb(127,63,0) choice: name: artifact color: rgb(122,122,122) choice: name: multi color: rgb(229,229,0) choice: name: white color: rgb(216,216,216) choice: name: blue color: rgb(0,173,247) choice: name: black color: rgb(45,45,45) choice: name: red color: rgb(249,62,0) choice: name: green color: rgb(0,211,74) default script: if contains(card.type, match:"Land") then land else if contains(card.type, match:"Artifact") then artifact else if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then multi else if contains(card.casting_cost, match:"W") then white else if contains(card.casting_cost, match:"U") then blue else if contains(card.casting_cost, match:"B") then black else if contains(card.casting_cost, match:"R") then red else if contains(card.casting_cost, match:"G") then green else artifact
extra card field: type: text name: poker name editable: true save value: false script: name_filter(forward_editor(field: card.name))
extra card style: divider: top: 443 left: 323 width: 30 height: 6 visible: { card.power != "" }
extra card style: poker name: top: 26 left: 20 width: 336 height: 55 visible: true z index: 1 font: name: Card Characters size: 10 weight: normal style: normal underline: false color: { if contains(card.type, match:"Land") then rgb(127,63,0) else if contains(card.type, match:"Artifact") then rgb(122,122,122) else if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then rgb(229,229,0) else if contains(card.casting_cost, match:"W") then rgb(216,216,216) else if contains(card.casting_cost, match:"U") then rgb(0,173,247) else if contains(card.casting_cost, match:"B") then rgb(45,45,45) else if contains(card.casting_cost, match:"R") then rgb(249,62,0) else if contains(card.casting_cost, match:"G") then rgb(0,211,74) else rgb(122,122,122) }
Each extra field needs the "extra card field" entry to tell MSE what it is, and the "extra card style" entry to tell MSE how it looks and operates.
|
|
GenevensiS
3/3 Beast
Posts: 170
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
|
Post by GenevensiS on Jul 28, 2023 22:31:20 GMT
As Sensei Le Roof said, card fields need to be defined, then you need to specify how they look. For extra card fields, both of these things are done inside the template file. They are defined using an "extra card field" entry, and how they look on the card is specified using an "extra card style" entry.
For normal card fields, those without the "extra", the template file only specifies how they look using a "card style" entry. But they are defined in the game file. Your are using Hero's Path, so your templates are dependent on that game's file. If you open the following file with a text editor: MSE Folder/data/herospath.mse-game/game you will see on line 355 or so, that it defines the "name" card field, but nowhere in the file does it define a "name_2" field. That's why you are getting this error message. To remedy it, add an entry that defines the name_2 card field. (You can probably copy/paste the one for "name".)
If you want I wrote a tutorial on how to make custom templates. It's way too wordy but it covers the basics:
|
|
|
Post by healer on Jul 28, 2023 22:36:53 GMT
Okay! Thank you so much, I was confused on what that bottom extra field was. Thank you again.
|
|