Modding Help Character creation UI modding

Discussion in 'Starbound Modding' started by jLnMart, Jan 3, 2014.

  1. jLnMart

    jLnMart Void-Bound Voyager

    First, i'am french, my english is not so good, sorry.
    I just start to try modding starbound. so i hae decide to begin with some UI, and make this : char.png

    the problem : in charcreation.config we are force du use the "species" radioGroup for race portrait
    so i have use a dirty trick
    Code:
    {
      "__merge" : [ ],
      "paneLayout" : {
        "__merge" : [ ["overwrite","species"] ],  
        [...]
        "species" : {
          "type" : "radioGroup",
          "position" : [0,0],
          "buttons" : [
            {"id":0,"image":""},
            {"id":1,"image":""},
            {"id":2,"image":""},
            [...]
          ]
        },
        "speciesScrollArea" : {
          "type" : "scrollArea",
          "rect" : [25, 108, 117, 198],
          "children" : {
            "species" : {
              "type" : "radioGroup",
              "rect" : [0,0,92,132],
              "baseImage" : "/interface/title/button.png",
              "hoverImage" : "/interface/title/buttonover.png",
              "baseImageChecked" : "/interface/title/selected.png",
              "hoverImageChecked" : "/interface/title/selectedover.png",
              "buttons" : [
                {"id":0,"image":"","position":[0,104]},
                {"id":1,"image":"","position":[27,104]},
                [...]
    
    this hide "species" radiogroup
    and add a new one in a scrollArea
    it's can trigger selection but portrait update do not happen ( seems logic for me )

    Question :
    Any one know a solution to force the scroll's radiogroup to update ? with some lua script maybe ? Whait for more modding capability ?
    Or have some idee for a accetable concessions ( i want to keep the scrollArea ) .
     
    Last edited: Jan 8, 2014
    Kawa and debugman18 like this.
  2. debugman18

    debugman18 Scruffy Nerf-Herder

    As far as I can tell, we have to wait for better documentation. Right now, the actual character selection mechanics are tied to the executable, which we can't see. :/
     
  3. The | Suit

    The | Suit Agent S. Forum Moderator

  4. Kawa

    Kawa Tiy's Beard

    Okay here's what Mr. Know-it-all got.

    Shit doesn't work because the C++ side is hooking into the radioGroup that you hid. It's looking for charcreation.config:paneLayout:species, and can find it, thus react to your clicks, but you need it to look for paneLayout:speciesScrollArea:species. If you remove instead of hide it, it can't find it and the program catches fire. That's about as far as I got when I tried this myself a few days ago.

    Now, that part is mostly personal theory. But there is in fact a reference to "/interface/windowconfig/charcreation.config:paneLayout" in the program. It's preceded by all the control names -- saveChar, cancel, shirtColor... and species. If it were a single "/interface/windowconfig/charcreation.config:paneLayout:species" string and EXE files weren't a bit finicky in these regards, one might've been able to extend the string to include speciesScrollArea... and have to do that whole song and dance again every time the game is updated.

    Which is why I'll state once again that this should be a default feature.
     

Share This Page