Decoding objects.spritebank...

Discussion about Mods for Prison Architect

Moderator: NBJeff

User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Decoding objects.spritebank...

Postby aubergine18 » Mon Oct 19, 2015 1:28 am

Myself and Trixi have been decyphering the objects.spritebank... Most modders will already be able to get the general idea of what it's doing but there were a few notable confusing aspects to this particular config file...

First, objects.spritebank covers both objects.png and people.png files. Here's an image depicting how the images are arranged and their x,y co-ordinates:

Image

Why they couldn't just create a people.spritebank like for the other .png sprite files I have no idea.

The next confusing thing was how a marker in the file relates to a sprite? Trixi did some excellent investigative work:

Each sprite covers an area in the file. If the marker co-ordinate (which is offset from top-left of objects.png, even if the sprite/marker are in people.png) falls within the area of a sprite, then that marker is associated with the sprite.

So, hope that helps anyone that's been struggling with objects.spritebank :) And huge kudos to Trixi for working out how it all fit together.
Last edited by aubergine18 on Tue Oct 20, 2015 5:04 am, edited 1 time in total.
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Decoding objects.spritebank...

Postby Brento666 » Mon Oct 19, 2015 3:10 am

Interesting stuff for those modding the base files!

I'm glad markers in materials.txt referring to a sprites.png work differently; offsetting from the sprites own origin rather then the png's origin. (or even another png's origin!?)
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: Decoding objects.spritebank...

Postby Trixi » Tue Oct 20, 2015 1:11 am

Thx aubergine :)

Well that was the onliest thing i could explain those large numbers in the sprites and the markers .....

Just needed some testing

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 5 guests