Failed to load mod - Sprite position [Resolved]
-
- Inserter
- Posts: 23
- Joined: Sun Mar 26, 2017 10:16 am
- Contact:
Failed to load mod - Sprite position [Resolved]
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
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
- Attachments
-
- f-error.png (34.31 KiB) Viewed 4569 times
Last edited by AlmightyCrumpet on Fri Aug 18, 2017 11:40 am, edited 1 time in total.
Re: Failed to load mod - Sprite position
I suppose you did {x = 640} instead of {width = 640}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
Providing your code would help a lot
-
- Inserter
- Posts: 23
- Joined: Sun Mar 26, 2017 10:16 am
- Contact:
Re: Failed to load mod - Sprite position
Small snippet of the transport-belt-pictures. I'll also attach the file along with the entity file.
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.
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.
- Attachments
-
- item-transport.lua
- (2.79 KiB) Downloaded 154 times
-
- entity-transport.lua
- (17.29 KiB) Downloaded 143 times
-
- transport-belt-pictures.lua
- (7.71 KiB) Downloaded 156 times
Re: Failed to load mod - Sprite position
You're missing 'line_length' for the normal res definitions
-
- Inserter
- Posts: 23
- Joined: Sun Mar 26, 2017 10:16 am
- Contact:
Re: Failed to load mod - Sprite position
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
I must have just missed something out entirely.
And thank you for you fast responses.
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
}
}
I must have just missed something out entirely.
And thank you for you fast responses.
Re: Failed to load mod - Sprite position
Just make the picture twice bigger.
-
- Inserter
- Posts: 23
- Joined: Sun Mar 26, 2017 10:16 am
- Contact:
Re: Failed to load mod - Sprite position
That did actually get the game to load without the mod crashing so that's a step forward at least.darkfrei wrote:Just make the picture twice bigger.
However now the animations are all screwed :/
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
Can you place here complete mod folder?
-
- Inserter
- Posts: 23
- Joined: Sun Mar 26, 2017 10:16 am
- Contact:
Re: Failed to load mod - Sprite position
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
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
- Attachments
-
- MoreBelts_0.0.1.zip
- (12.7 MiB) Downloaded 128 times
-
- Inserter
- Posts: 23
- Joined: Sun Mar 26, 2017 10:16 am
- Contact:
Re: Failed to load mod - Sprite position
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
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