Page 1 of 1

Failed to load mod - Sprite position [Resolved]

Posted: Wed Aug 16, 2017 6:35 pm
by AlmightyCrumpet
Okay, my first mod and I'm having trouble to get the game to load now with it active.
All I'm trying to do is to add different versions of belts/splitters/underground belts and I'm fairly certain I have the files and code to load them in and it work (Had it load in before but with the wrong animation and no entity descriptions)

Now after trying to sort the animation and description and add in the HR image I get the error in the image attached, which makes no sense to me as that value it states seems within the images size.

I'm using the base game images so that the sizes match and I am also matching the code snippets for the items so that the animation sizes are right.
Does anyone have any ideas?? (I will provide code snippets when asked. I feel it's a little unnecessary to just dump it all here when it might be irrelevant)
Any help is muchly appreciated, thanks.

- Mathew

Re: Failed to load mod - Sprite position

Posted: Wed Aug 16, 2017 7:40 pm
by Klonan
AlmightyCrumpet wrote:Okay, my first mod and I'm having trouble to get the game to load now with it active.
All I'm trying to do is to add different versions of belts/splitters/underground belts and I'm fairly certain I have the files and code to load them in and it work (Had it load in before but with the wrong animation and no entity descriptions)

Now after trying to sort the animation and description and add in the HR image I get the error in the image attached, which makes no sense to me as that value it states seems within the images size.

I'm using the base game images so that the sizes match and I am also matching the code snippets for the items so that the animation sizes are right.
Does anyone have any ideas?? (I will provide code snippets when asked. I feel it's a little unnecessary to just dump it all here when it might be irrelevant)
Any help is muchly appreciated, thanks.

- Mathew
I suppose you did {x = 640} instead of {width = 640}

Providing your code would help a lot

Re: Failed to load mod - Sprite position

Posted: Wed Aug 16, 2017 7:58 pm
by AlmightyCrumpet
Small snippet of the transport-belt-pictures. I'll also attach the file along with the entity file.

Code: Select all

--CODE
MB = {}
MB.modName = "MoreBelts"
MB.baseGraphicsIcons = "__".. MB.modName .."__/graphics/icons/"
MB.baseGraphicsEntity = "__".. MB.modName .."__/graphics/entity/"

---------------------- Brisk Picture Locations
brisk_belt_filename = MB.baseGraphicsEntity .. "brisk-transport/brisk-transport-belt.png"
hr_brisk_belt_filename = MB.baseGraphicsEntity .. "brisk-transport/hr-brisk-transport-belt.png"
---------------------- Speedy Picture Locations
speedy_belt_filename = MB.baseGraphicsEntity .. "speedy-transport/speedy-transport-belt.png"
hr_speedy_belt_filename = MB.baseGraphicsEntity .. "speedy-transport/hr-speedy-transport-belt.png"
---------------------- Rapid Picture Locations
rapid_belt_filename = MB.baseGraphicsEntity .. "rapid-transport/rapid-transport-belt.png"
hr_rapid_belt_filename = MB.baseGraphicsEntity .. "rapid-transport/hr-rapid-transport-belt.png"


---------------------- BRISK BELT PICTURES
brisk_belt_horizontal =
  {
    filename = brisk_belt_filename,
    priority = "extra-high",
    width = 40,
    height = 40,
    frame_count = 32,
    hr_version =
    {
      filename = hr_brisk_belt_filename,
      priority = "extra-high",
      width = 80,
      height = 80,
      frame_count = 32,
      line_length = 16,
      scale = 0.5
    }
  }
brisk_belt_vertical =
  {
    filename = brisk_belt_filename,
    priority = "extra-high",
    width = 40,
    height = 40,
    frame_count = 32,
    y = 40,
    hr_version =
    {
      filename = hr_brisk_belt_filename,
      priority = "extra-high",
      width = 80,
      height = 80,
      frame_count = 32,
      line_length = 16,
      y = 160,
      scale = 0.5
    }
  }

So no, I hadn't used 'x' instead of 'width'. Also the majority of the code is a copy of the base game because I was trying to get it close as to fix it.

Re: Failed to load mod - Sprite position

Posted: Wed Aug 16, 2017 9:03 pm
by Klonan
You're missing 'line_length' for the normal res definitions

Re: Failed to load mod - Sprite position

Posted: Wed Aug 16, 2017 10:11 pm
by AlmightyCrumpet
Unfortunately adding in the line_length does not solve this either (also it errors on the HR image too which has the 'line_length')
This really has me stumped as it worked at least once before

Code: Select all

---------------------- BRISK BELT PICTURES
brisk_belt_horizontal =
  {
    filename = brisk_belt_filename,
    priority = "extra-high",
    width = 40,
    height = 40,
    frame_count = 32,
    line_length = 8,
    hr_version =
    {
      filename = hr_brisk_belt_filename,
      priority = "extra-high",
      width = 80,
      height = 80,
      frame_count = 32,
      line_length = 16,
      scale = 0.5
    }
  }
f-error2.png
f-error2.png (25.39 KiB) Viewed 3974 times

I must have just missed something out entirely.
And thank you for you fast responses.

Re: Failed to load mod - Sprite position

Posted: Thu Aug 17, 2017 7:10 am
by darkfrei
Just make the picture twice bigger.

Re: Failed to load mod - Sprite position

Posted: Thu Aug 17, 2017 6:47 pm
by AlmightyCrumpet
darkfrei wrote:Just make the picture twice bigger.
That did actually get the game to load without the mod crashing so that's a step forward at least.
However now the animations are all screwed :/
f-issue.png
f-issue.png (726.93 KiB) Viewed 3945 times
The first belt line only shows the end of the lines and the other two just flicker in and out of existence XD
As for the splitters they just seem to slide right and reset.

Assuming this is due to the new image sizes.
This still baffles me though as the code I used for what is there so far is all from the base game files

Re: Failed to load mod - Sprite position

Posted: Thu Aug 17, 2017 7:37 pm
by darkfrei
Can you place here complete mod folder?

Re: Failed to load mod - Sprite position

Posted: Thu Aug 17, 2017 8:16 pm
by AlmightyCrumpet
Sure, it's attached.
Also I managed to solve the issue with the belt images at the least.
Turns out the base transport-belt image sizes are different to the fast-transport-belt sizes (which was the code I was using) now just need to fix the splitter.

I get the feeling it's the same thing so if it works, thank you all for the help it's been great :)
If not then the file is attached and feel free to tell me where I've been an idiot :P

Re: Failed to load mod - Sprite position

Posted: Thu Aug 17, 2017 8:19 pm
by AlmightyCrumpet
YUP. It's sorted now (>__>)

Turns out it was just because I was using the base Transport-Belt (yellow) images against the Fast-Transport-Belt (red) code

Thank you all once again for your many helpful messages.
All that's left to do now is colour the belts and give them descriptions :)

Many Thanks
- Mathew