Viewing 4 posts - 1 through 4 (of 4 total)
  • SR Modding
    Participant
    Member since: July 2, 2023

    Hey I have a small issue with the farmland screen in game

    So I have 771 farmland on my map so probably brought it on myself but anything over 255 won’t highlight blue when you click on it or buy it

    I couldn’t find anything online so I’m sort of stuck

    Cheers Sam

  • bauerbrown
    Keymaster
    Member since: December 29, 2022

    Sorry for the late reply, I missed this one somehow. A good starting point to help you understand why this is happening would be this video about infoLayers https://youtu.be/wEWTfGGUZrA … that is, if you have not already seen it. If you increased the number of available channels to be capable of that many farmlands, you are likely still being held up by the PNG itself. An 8 bit png is only capable of 256 colors, and therefore this is the max amount of info (farmlands) able to be stored and presented within game. Of course I’m assuming that you are still working with an 8 bit png.

    What steps have to taken to attempt to achieve 771 farmlands? What I mean is, have you increased the num of channels available on the infoLayer to get you over 700? Next, you need a bigger png if you have not already done so. I’m not an expert in this area and I could be wrong, but I believe your next step up with the PNG would be a 24 bit, and that will give you the capability of 16.8 million farmlands ๐Ÿ™‚ I would not be at all surprised if you encountered some kind of issue along the way trying to incorporate so many farmlands (771, not 16.8M). I would like to think that it’s doable, but there could be a performance issue, or the Giant’s Engine just may not like anything over 256. I dunno, I suppose you are about to find out ๐Ÿ™‚ I would venture to guess that an infoLayer created from a 24 bit png and the appropriate number of channels should not be an issue, but that’s just my guess.

    Keep me updated on this one ๐Ÿ™‚

  • SR Modding
    Participant
    Member since: July 2, 2023

    Thanks for the reply much appreciated

    I believe I’ve increased all the info layers but the there’s “Error: Setting state color with invalid state ‘770’. Maximum allowed is 255.”

    And that goes for every farmland above 255

    which I cant seem to find a file that controls the the color stateย  but the number on the fields do change to your farms color but we not getting that nice blue highlight

    I would send some pictures but not have much luck inserting them here

    P.s. this is my first ever map I’ve built

     

  • bauerbrown
    Keymaster
    Member since: December 29, 2022

    The file that would control the color state is the PNG itself. The infoLayer is created from a PNG. If you use an 8 bit PNG to create the infoLayer, you will be limited to 255ย  colors. I would step up to a 16 or 24 (whichever is the next step up) bit PNG and recreate the infoLayer using that. It’s giving you that error for anything over 255 because that’s all the colors it’s capable of at the moment. You can try running the existing infoLayer through the GRLE converter and turn it back into a PNG, then try converting that PNG to 16 bit (I’m not sure how well this will work with existing color data), then convert that PNG back over to a fresh infoLayer.

    A map with this many farmlands is setting the bar pretty high for your first map. This is the reason I preach to start on smaller maps and get all the fundamentals down pat, this way when you step up your game and try something new, you know exactly what to go after when things don’t work out the way that you planned.

    Anyhow, there is no doubt that the infoLayer is your issue, and it’s an issue because it was created from an 8 bit PNG. Get that converted over to a higher bit count and I feel like you will have solved at least part of the problem.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.