sonitek
0/0 Germ
*Currently quite wondering how that scripting is supposed to work*
Posts: 11
Color Alignment: Blue, Black
|
Post by sonitek on Jul 6, 2018 18:06:24 GMT
So, I've been trying to make heads or tails out of this, and I won't lie, on sourceforge, there's a lot of info, but none of which is actually easy to read into. And yes, I know, the simple stuff is pretty self-explanatory, but the moment you delve into anything that's more than the simple surface, it gets a little more complicated than it should be.
For instance, I'll take the "Data type: field" page, where the different types of fields for a card are explained. That's nice, and that's simple, but that might be... too simple.
What if instead of having that info there, with barely even any amount of concrete example on each type of field, you had a page directly linked to that type, with a firm example of everything that could be on that field, linked to the relevant style for it.
I'm just saying that for a new scripter such as myself, it's kind of really hard to navigate, use, and understand.
I would gladly give a hand in understanding what's less clear and simple, and what isn't, but here's a short list of what I have a low understanding of:
- What is the use of package choice, and how to use it properly. - An actual introduction to actual scripting would be nice, instead of what strongly felt like an outdated tutorial. It might not be outdated, but it's a lot less complete than I feel it should be. - Most of style is a headache, really. - Why scripting sometimes returns "cannot convert from function to string", when the function evaluates to a string to begin with?
Now, I'll admit that I have no idea if this is the right location to write this post, but as someone who tries to make his own game, this is a huge headache at times, and as it turns out, it's not always easy to make cards that look decent without a specifically supporting software.
|
|
|
Post by cajun on Jul 6, 2018 23:22:55 GMT
I am in the process of writing up some better tutorial and help stuff in the downtime before Ravnica drops thirty new frames on us. Data type: field has everything you need. Its basically a box to hold information with a bunch of options tacked on. It wants the type and name of the field, but everything else is optional with defaults set. Most common place to see these in action are the card_field and set_field files. Package choice is for things like mana fonts, where you have consistently named images that might want different symbols, like the normal mana vs the Future Sight version. Can't convert from function to string means somewhere you have "some_variable" where you need "some_variable()"
|
|
sonitek
0/0 Germ
*Currently quite wondering how that scripting is supposed to work*
Posts: 11
Color Alignment: Blue, Black
|
Post by sonitek on Jul 7, 2018 5:41:58 GMT
To be fair, I have some light issues about how I have to use the style page to apply values to the fields in code. Like, I get that "field" is the definition of the field, and style is pretty much everything else...
EDIT: Scratch that. I'm starting to think that most fields are easier to script for if they have two different values, like one that's edited by the user, and one that's displayed with a "default" never moving. Dunno if there's an easier one, but that's the one that makes the most sense to me with what I know of MSE.
|
|
|
Post by cajun on Jul 7, 2018 18:45:37 GMT
...what are you even trying to do right now?
|
|
sonitek
0/0 Germ
*Currently quite wondering how that scripting is supposed to work*
Posts: 11
Color Alignment: Blue, Black
|
Post by sonitek on Jul 8, 2018 12:21:24 GMT
I'm working on my own TCG's, and I have a yu-gi-oh!-style Attribute/Element thing, but it can be two-elements, so I had to make a compound image with linear_blend using both elements' images. My major issue is that it should be also stated as text, and as an image, and as another text, and I don't want to have to create all *counts quickly* 22 possible icons on the side, when the icon is basically Japanese Text, English Text and two colors. That's my current headache, so I turned to having four different fields, three are display-only (images, English text, Japanese text), and one being a multiple choice (this is supposed to be used by me only, so I don't think there'll be much of a problem with remembering not to choose more than two elements.
If you're going to tell me that I can do all of that dynamically without having to create every single icon manually, or with just one, maybe two fields instead, I'll gladly listen and learn, because I'm used to programming, and I was thinking that MSE was going to be a snap to learn to script for. I discovered it wasn't.
|
|
|
Post by cajun on Jul 8, 2018 16:38:33 GMT
k, this is why I asked, this is more sensible than I was reading from the other post. You should be able to cut down a field by combining the image and the choice (this is how Magic makes its color frames). Do you have the text scripted so it changes when you change your element already?
|
|
sonitek
0/0 Germ
*Currently quite wondering how that scripting is supposed to work*
Posts: 11
Color Alignment: Blue, Black
|
Post by sonitek on Jul 8, 2018 19:26:24 GMT
Fighting with that one still. I have tried to remove duplicates while sorting it alphabetically, but I end up with "FIRE/FIRE" cards being displayed, if I had changed from "Fire/Dark" to "Fire/Void" (To be fair, "Void" isn't an element that can be used in compound with another one, it's basically the lack of elements. I might simply remove that choice entirely, and have it just display "Void" if there is no selection. Speaking of, I'm also having a whole bunch of trouble with using the different choices, and I keep having to re-write about every bit of code twice or thrice because I have problems with multiple choices' choices... Gosh that sounds awkward in my mind. Here's what I'm currently using, and it's either not working as great as I was thinking it would, or I just suck at this.
element_list := { #Create List elements := card.elements #Sort and Trim List elements := sort_list(elements) #Remove Superfluous Void if number_of_items(in: elements) == 2 then ( if elements[0] == "void" then elements := [elements[1]] else if elements[1] == "void" then elements := [elements[0]] ) #Return the List elements } EDIT: As it turns out, I was using the result from this the wrong way. It works as intended, now.
|
|
sonitek
0/0 Germ
*Currently quite wondering how that scripting is supposed to work*
Posts: 11
Color Alignment: Blue, Black
|
Post by sonitek on Jul 8, 2018 19:53:51 GMT
So, I managed to simplify the thing itself when I realized that a multiple choice actually yields a string with all of the selections into it...
|
|