|
Post by Flo00 on Mar 25, 2024 11:49:53 GMT
I wanted to make an overlay that looks like the hero equipments and add it to the options in the M15 mainframe styling options (like vehicle or snow). Here is what I added to the "style" file: is_hero := {chosen(styling.frames, choice:"hero")} [line 144; under init script: after is_map] choice: hero [line 272; under styling field: after choice: snow] extra card field: type: choice name: hero overlay choice: heroic save value: false editable: false [line 1002] hero overlay: left: 0 top: 0 width: 375 height: 523 render style: image image: {"heroverlay.png" } z index: 0 visible: {is_hero()} [at the very end; under extra card style:] The console is telling meand messes up the card image. If I remove line 144, i get. Do I need to establish the is_hero key somewhere else?
|
|
GenevensiS
3/3 Beast
Posts: 153
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
Member is Online
|
Post by GenevensiS on Mar 25, 2024 12:58:38 GMT
What you are describing is correct. Did you indent this line:
is_hero := {chosen(styling.frames, choice:"hero")}
using a single tab character? (Don't use spaces.) If that's not it, in the hero overlay field, try writing:
visible: {chosen(styling.frames, choice:"hero")}
instead of
visible: {is_hero()}
|
|
|
Post by Flo00 on Mar 25, 2024 14:31:48 GMT
Thanks, turns out it was the tab. I set Notepad to always replace by spaces...
|
|
kolya
1/1 Squirrel
Posts: 65
Formerly Known As: fedosu
Color Alignment: Blue, Red, Green
|
Post by kolya on Mar 26, 2024 12:26:39 GMT
If you thought that was annoying, wait until all your code breaks because you accidentally had a space or tab at the end of a line and you can't find the problem because it's literally invisible. This program is pure jank sometimes.
|
|
|
Post by amuzet on Mar 31, 2024 1:24:11 GMT
Wait does your notepad not subtly display white-space?
|
|
kolya
1/1 Squirrel
Posts: 65
Formerly Known As: fedosu
Color Alignment: Blue, Red, Green
|
Post by kolya on Mar 31, 2024 2:08:37 GMT
Wait does your notepad not subtly display white-space? Huh. Apparently that's something I can have notepad++ do. I did not know that, thanks.
|
|