Modding Help Adding more portraits to a portrait file?

Discussion in 'Mods' started by Dragonspainter, Dec 12, 2019.

  1. Dragonspainter

    Dragonspainter Void-Bound Voyager

    So I tried asking this on the discord, but my question quickly got swept away so I decided to try it here. This is a edited copy paste from my two posts in the discord so it kinda repeats itself. Sorry.

    I am playing around with a mod idea, and for it I am changing character portraits/dialogue. Some characters have more portraits then others (for example, Alex has like 11 + a blank spot vs Sebastian's 10.) I know in the dialogue file it uses $ followed by a number or letter to tell it what part of the portrait's .png to use for that line (for example, $0 is first and its neutral.) My question is, if I make the .png file longer and add more portraits then it originally had, will I be able to simply add plus one to the $-number and it will automatically know where to find the new portrait simply by location in the png? If not, what would I have to edit to add more portraits? Is this a stupid question?

    For some clarification, here is a picture showing the differences in files https://gyazo.com/0418a9b2a25c1ee7191249c9ecfb63c7

    On the left is the modified portrats I did to reskin Sebastian. On the right is the modified one for Alex. Alex's .png is 128 by 384 pixels, while Sebastian's is only 128 by 320. The portraits are 64 by 64 pixels I believe. My question is, if I make Sebastian's .png the size of Alex's will the game be able to find the new portrait locations on the file simply by increasing the $ number accordingly in the dialogue file? Is it hard coded into somewhere else in the game? This is my first time modding stardew so I know basically noting lol

    I am a artist more then a coder x.x
     
    • minervamaga

      minervamaga Pangalactic Porcupine

      Yes, the game will be able to identify new portraits by the index, no extra code necessary.
       
      • Dragonspainter

        Dragonspainter Void-Bound Voyager

        Thank you!
         

        Share This Page