|
Post by khluxaeterna on Jan 8, 2021 0:07:11 GMT
Greetings all! I hope 2021 finds you well. So I've been working on improving a Yu-Gi-Oh template, and I wanted to make a style for Rush Duels, Problem is, the monster Levels are rendered as a single number in the Rush style, as opposed to the stars the regular styles use and I want it to be able to convert properly when switching styles. card field: type: text name: rush_level description: `=] * = no. of level script: to_int(number_of_items(in: level_filter(value) ) ) I attempted to use these functions to try "counting the stars" and matching the resulting value with the symbol font to generate the number image, but it hasn't been working as intended. I should mention I have no actual coding experience, so maybe there's an obvious solution I'm not seeing.
|
|
|
Post by cajun on Jan 8, 2021 3:29:37 GMT
if contains(value, match:"*") then len(value) else value should convert a string of ****s into its number; for a true converting back and forth you'd need a value that tells which type to return though, something like
if render_as_number() then
if contains(value, match:"*") then len(value) else value
else
if contains(value, match:"*") then value else for x from 1 to value do "*" where render_as_number := false in the main script, and := true in the style file of this specific template.
|
|
|
Post by khluxaeterna on Jan 8, 2021 11:46:25 GMT
Hi cajun! Thank you for your quick reply.
Forgot to mention I have the Rush Levels as a separate card field from the regular Levels. Would I need to make them a single field for those codes and where should I place them?
|
|
|
Post by cajun on Jan 10, 2021 10:11:29 GMT
Hi cajun! Thank you for your quick reply.
Forgot to mention I have the Rush Levels as a separate card field from the regular Levels. Would I need to make them a single field for those codes and where should I place them?
if rush_level is a different field then you can script it as
default: len(card.levels) or whatever the field name of the normal levels is. then if you change a card to this, it will convert to that number, and if you have a new card on this, you can type in the number
|
|
|
Post by khluxaeterna on Jan 14, 2021 17:47:55 GMT
I believe I got that done right, but now I keep getting a console error and I'm not quite sure what the problem is:
Variable not set: len
while updating card value 'rush_level'
I've attached my 'script' and 'card_field' files as well as the "style" file for the Rush template.
Your assistance so far is greatly appreciated!
|
|
|
Post by cajun on Jan 14, 2021 22:39:12 GMT
I believe I got that done right, but now I keep getting a console error and I'm not quite sure what the problem is:
Variable not set: len
while updating card value 'rush_level'
I've attached my 'script' and 'card_field' files as well as the "style" file for the Rush template.
Your assistance so far is greatly appreciated! oh my mistake, the function is length for MSE, not len
|
|
|
Post by khluxaeterna on Jan 15, 2021 0:34:50 GMT
An easy mistake. Corrected it, and now it says this
Can't convert from string ("") to collection
in function length
while updating card value 'rush_level'
So far, attempting to convert a single * from the regular style results in a string of *s instead of a number in the Rush style, vice versa doesn't seem to do anything.
Related question: does linking the fields in the style files like this do anything?
level := { card.rush_level }
|
|
|
Post by cajun on Jan 15, 2021 21:14:47 GMT
An easy mistake. Corrected it, and now it says this
Can't convert from string ("") to collection
in function length
while updating card value 'rush_level'
So far, attempting to convert a single * from the regular style results in a string of *s instead of a number in the Rush style, vice versa doesn't seem to do anything.
Related question: does linking the fields in the style files like this do anything?
level := { card.rush_level }
uhhhh weird
for that second thing, that will make "level()" return card.rush_level, it will have no effect on card.level
|
|
|
Post by khluxaeterna on Jan 16, 2021 22:05:10 GMT
Sorry, I was using version 2.0.1. Updated it and there's no console error, but it still does as I described in my last post.
Gonna try making them a single field, and fix the scripts to render the symbol fonts properly for each style.
|
|
|
Post by trosselkingmajesty on Jan 31, 2021 0:39:37 GMT
I'm also here looking to add a new Rush Duel set to my current MSE collection. I have all the pieces (and I've been trying to find ways to create some of the new card types I've collected (namely Composition, Hybrid, Timewarp, Dreamer, Evolute, Unleash, among others) and create Rush Duel-compatible versions), but it seems that the simplified system I made for separating Pendulums and non-Pendulums has created issues with my other variations. I specifically want it as a new Yu-Gi-Oh! set, and not trying to integrate it into my pre-existing prime set (named "Candbank EX+"). While I'm here, I might as well ask how I can rework a few aspects: moving the Level limit to cap out at 13 instead of 12, fixing the ATK/DEF lines to work in 5-digit stats rather than 4 (since we know there's a new power ceiling that's broken 5000; since Number iC1000's 6 figure stats are just about impossible, and no card would ever have a printed stat even close to that high, I think it might be easier to just let the "shrink-overflow" command take over for anything above 99,999), and maybe applying some shrink-overflow thing onto multiple card types--which goes up to 6 in my version--wouldn't hurt either. This is the current link to the Cardbank EX+ set I use for reference: drive.google.com/file/d/17hg2QtdzBwXze5MtkayRmP00UMGDkO8u/view?usp=sharingBut this is mostly about getting a separate Rush Duel set (that won't conflict with my primary Cardbank EX+ set here; I apologize, this was the first I got before getting the upgraded MSE, the 4.0 is in reference to how its been upgraded from the original 2.0.0 Yu-Gi-Oh Standard, which was then upgraded with Pendulum and later Link compliance, and even later than that with...well, everything else to 3.8 until I refined and perfected everything in it to bump that up to what you see now).
|
|