Nymra Posted April 16, 2021 Posted April 16, 2021 Another 4 hours now and no luck by me either managing to understand what the SkyUI github wants to tell me or my poor attempts to at least copy paste a similar function from another mod (massmatchmaker). I want basically this: - a text field in the MCM that reads "empty" - user can click on the field and write someting. for example a sexlab tag "doggystyle" or a DDe Outfit "Yoke" - this text is then internally called for and inserted into other functions (I think this part I will be able to pull off myself) but problem is: the text needs to be user input and should be stored ofc. external json file is not an option, I want it to be in the MCM (most ppl just dont use or can handle jsons) I will not even attempt to explain what I already tried, it all ended up either not compiling, not beeing anywhere close to what I need etc... some mods also seemed to use their complete own system for it, so in short I did not find any mod or documentation that I could use as template. thx alot.
AndrewLRG Posted April 16, 2021 Posted April 16, 2021 For example: _aaaTest3.psc String SavedText will contain inputted text.
Nymra Posted April 16, 2021 Author Posted April 16, 2021 Just now, AndrewLRG said: For example: _aaaTest3.psc String SavedText will contain inputted text. thx alot. are you some kind of script angel?
AndrewLRG Posted April 16, 2021 Posted April 16, 2021 1 minute ago, Nymra said: thx alot. are you some kind of script angel? I just like to read other modders scripts before bed.
Nymra Posted April 16, 2021 Author Posted April 16, 2021 6 minutes ago, AndrewLRG said: I just like to read other modders scripts before bed. haha, my brain seems to be just incapable of doing that. when I look at others scripts I see a godian knot and I dont have a sword and I dunno if I am looking at the wrong places, but simple script examples like the ones you made are nowhere to be found.
blank_v Posted April 17, 2021 Posted April 17, 2021 I just want to say something about that line... Event OnPageReset(string a_page) if a_page == "First Page" oidTextInput = AddInputOption("Insert Text Here", SavedText) endif EndEvent Don't do it like this... if You ever change Page name or something then ur MCM will not work... do it like this: Event OnPageReset( String PageName ) If( PageName == Pages[0] ) FirstPage() EndIf EndEvent for example if You ever change "First Page" name to something else You don't have to change it in other locations... btw. Static String is making Script bigger... we don't want to waste memory ^_^ in "old" script version we had 2 variables Pages[0] and "First Page" both have same value so they use 200% of the memory they need... if You already have one reference dont make new same reference... especialy static reference... //Edit: 22 hours ago, Nymra said: and I dunno if I am looking at the wrong places, but simple script examples like the ones you made are nowhere to be found. I'm 99% sure that SKY UI wiki have it... and way better explained... i'm too lazy to look for SKY UI but You can simply open Sky UI PSC files... always when You look for something just open PSC files and read funcions ;x... SKY UI Script file line 299: ; @since 4 int function AddInputOption(string a_text, string a_value, int a_flags = 0) {Adds a text input option} Guard() endFunction
Recommended Posts
Archived
This topic is now archived and is closed to further replies.