Skyrim

File information

Last updated

Original upload

Created by

djarb

Uploaded by

djarb

Virus scan

Safe to use

17 comments

  1. Meisenbach
    Meisenbach
    • supporter
    • 11 kudos
    What mods use this?
  2. monsto
    monsto
    • premium
    • 32 kudos
    In response to post #17348459. #17349409, #17349839, #17349984, #17350264, #17350814, #17367504 are all replies on the same post.
     
    Yeah, that presented a difficulty. I spent way too much effort trying to build the swf with Flex before discovering the ScaleForm UI documentation and realizing it *has* to be Flash. Working out how to use the SKSE UI calls was more or less trial-and-error. I posted in the SkyUI forum asking for advice, but nobody replied.

    I did include the full source code in the mod. If you or anyone else can make substantive improvements, I'll be happy to incorporate them.

    Edit: Since I've got your attention now, you mentioned earlier that the Skyrim engine used ASCII internally, or something to that effect. According to the UESP wiki, it's UTF-8. Is the wiki wrong?

    I can't recall how many times I've actually said out loud "ok I'm going to delve into papyrus and work on that one mod idea i have... and this time i mean it" only to be 100% annoyed and discouraged thanks to the absolute lack of docs let alone effective examples.

    I am always amazed (and annoyed with myself) when great stuff like this is released. I mean people are clearly Getting Things Done, so I should be able to as well... but it's like I'm still a boy in the tribe and until I go on my first hunt, I won't find my spirit animal that will give me the ancestral documentation to skyrim programming. I dug around etc for 3 years and didn't know until about 2 months ago that there were actually tools to compile papyrus outside of the CK.

    Where the hell is the BatCave on these things? Have I been spoiled by PHP/CSS/Python online resources? Or does this stuff just have really really piss poor support?
    </rant>

    Great tool, btw... cant wait to see what ppl do with it.
    1. djarb
      djarb
      • supporter
      • 32 kudos
      There's not much, really. The Creation Kit wiki. Google to dig up posts on various forums.

      Basically, you're right. The docs suck. The tools themselves suck. It's a jungle, and you pretty much have to wade in an learn its ways.
  3. schlangster
    schlangster
    • supporter
    • 1,908 kudos
    Note that there's skse.AllowTextInput(bool), which allows you to handle input on the Flash side. I would strongly recommend using that instead of doing everything in Papyrus. PM me if you want me to point you to some examples.
    1. djarb
      djarb
      • supporter
      • 32 kudos
      To what end? I'd end up with a less functional tool.
    2. schlangster
      schlangster
      • supporter
      • 1,908 kudos
      It's the same kind of input the game offers when renaming an item or during character creation.

      So it's generally more responsive, you won't have to store keycodes in json, you won't have to register/unregister all keys which takes a while, you don't have to do hacks to keep the casing correct during input, you get a proper cursor that can also highlight (not sure if that's supported by your implementation already).

      What features are there that native input wouldn't support, i.e. why would it be a less functional tool?
    3. djarb
      djarb
      • supporter
      • 32 kudos
      The keymap wouldn't be customizable, internationalizable, or selectable at runtime.

      You're right that the cursor doesn't support selecting a range of letters, but the rest of the downsides you describe are negligible in practice.

      Edit: Also, I haven't explored it in depth, but it appears that AllowTextInput leaves other keybindings active. That's annoying at best.
    4. schlangster
      schlangster
      • supporter
      • 1,908 kudos
      The UI uses your native keymap and supports unicode by default. Papyrus, however, does not anyway.

      @Edit: Nothing stops you from keep on doing
      Game.DisablePlayerControls(true, true, true, true, true, true, true, true)
    5. djarb
      djarb
      • supporter
      • 32 kudos
      As indeed I do anyway. So that's a wash.

      In fact, it seems like the only substantive differences are that doing it my way allows for custom keymaps at the cost of possibly using a wrong default, and doing it your way allows for selecting a block of text. So basically the whole argument amounts to nothing.

      I did it this way. It works. In fact, it works very well. I don't claim it's the only possible way, but I'm happy with the basic design.
    6. schlangster
      schlangster
      • supporter
      • 1,908 kudos
      Sure, it was just a recommendation, because I assumed you were not aware that there exists a better method. The stuff in skse.as is not really well-known/documented.
    7. djarb
      djarb
      • supporter
      • 32 kudos
      Yeah, that presented a difficulty. I spent way too much effort trying to build the swf with Flex before discovering the ScaleForm UI documentation and realizing it *has* to be Flash. Working out how to use the SKSE UI calls was more or less trial-and-error. I posted in the SkyUI forum asking for advice, but nobody replied.

      I did include the full source code in the mod. If you or anyone else can make substantive improvements, I'll be happy to incorporate them.

      Edit: Since I've got your attention now, you mentioned earlier that the Skyrim engine used ASCII internally, or something to that effect. According to the UESP wiki, it's UTF-8. Is the wiki wrong?
    8. schlangster
      schlangster
      • supporter
      • 1,908 kudos
      The engine uses multiple string types. The UI and anything that needs to be localized support UTF-8, but I recall that PLB had problems with wide characters in Papyrus strings. See http://forums.bethsoft.com/topic/1480485-text-replacement-does-not-update-while-in-a-menu/?p=23181786
      But I have not actually tested it myself.
    9. monsto
      monsto
      • premium
      • 32 kudos
      (nm)

  4. jaxonz
    jaxonz
    • supporter
    • 926 kudos
    I was very eager to dig into this on returning from vacation, especially as I was following similar efforts by Schlangster, Hypno88, and others to solve the same challenge of allowing user text input. I can see from the posts below that Schlangster has been generously offering suggestions; which is a great reflection on how supportive the Skyrim modding community is.

    djarb has an innovative approach that does indeed work. However, the other team just recently released a beta library, SkyUILib, that provides text input, selection lists, and notification dialogs. (https://github.com/schlangster/skyui-lib/wiki)

    I've tried both KeyInput and SkyUILib. Both work, but for my needs I found that SkyUILib was a better fit. It maintains the same look and feel of SkyUI, but does not require SkyUI (which some users still seem to resist). Moreover, SkyUILib does not require JContainers (which I haven't yet used... user comments make me question ease of installation and stability).

    Great work, djarb! The combination of Flash and Papyrus skills needed for this solution put it beyond most of us. I think you're just a victim of poor timing here and I'm sure we will see even more great things from you in the future.
    1. djarb
      djarb
      • supporter
      • 32 kudos
      *shrug* They're different, so this will be better for some people, that for others. It's all good.
  5. Mattiewagg
    Mattiewagg
    • supporter
    • 160 kudos
    This is a great resource. Thank you.
    1. djarb
      djarb
      • supporter
      • 32 kudos
      The default is US qwerty, and it can be changed by using Interface/KeyInput-qwerty.json as a template, and specifying the name of your new map when you call GetInput (as the third parameter)