How do I make re-skin mods compatible with each other?

Discussion about Mods for Prison Architect

Moderator: NBJeff

Chibs
level1
level1
Posts: 31
Joined: Thu Oct 02, 2014 4:43 pm

How do I make re-skin mods compatible with each other?

Postby Chibs » Thu Oct 08, 2015 8:58 pm

Is there a way to make re-skin mods compatible with one another?
If yes, what would be the easiest way to make them compatible?


Say I got one mod that makes chairs look like ducks, and then I got a mod that makes guard dogs look like cats; how would I make them compatible with one another? (Without turning the two of them into one mod)
Both mods work fine separately, but when both of them are applied at the same time, one mod's 'people sheet' will overwrite the other and only one of the mods will work.
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: How do I make re-skin mods compatible with each other?

Postby Trixi » Thu Oct 08, 2015 9:47 pm

for single object define extra sprites in the sprites.png
Chibs
level1
level1
Posts: 31
Joined: Thu Oct 02, 2014 4:43 pm

Re: How do I make re-skin mods compatible with each other?

Postby Chibs » Thu Oct 08, 2015 10:05 pm

Maybe it was stupid of me to use chairs as part of my example. Say I got a mod that changes the way workers look, and a mod that changes the way guards look. Both of those mods have their own 'people.png' sheet that doesn't work together as the workers in the guard re-skin mod will look like the original workers and the guards in the worker re-skin mod will look like the original guards.
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: How do I make re-skin mods compatible with each other?

Postby Trixi » Thu Oct 08, 2015 11:22 pm

i repeat. dont use the people.png for changing. instead create a file named sprites.png.

in this you can place your edited sprites for this mod and it doesnt effect people.png.


maybe have a look at my Planning/Roomsymbol mod:

http://steamcommunity.com/sharedfiles/f ... =512194341



i've done myself a mod that edit the workman:



BEGIN Object
Name Workman
Toughness 5.0000
Price -500
RenderDepth 2
ViewRange 3
BlockedBy Wall
BlockedBy StaticObject
BlockedBy UtilityStation
BEGIN Sprite
x 0
y 0
w 2
h 2
RotateType 1
END
BEGIN Sprite
x 0
y 2
w 2
h 2
RotateType 1
END
BEGIN Sprite
x 0
y 4
w 2
h 2
RotateType 1
END
BEGIN Sprite
x 0
y 6
w 2
h 2
RotateType 1
END
SpriteVariants 4
Properties Entity
Properties Staff
END

Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: How do I make re-skin mods compatible with each other?

Postby Trixi » Thu Oct 08, 2015 11:23 pm

Trixi wrote:i repeat. dont use the people.png for changing. instead create a file named sprites.png.

in this you can place your edited sprites for this mod and it doesnt effect people.png.


after you've created the symbol, you have to edit the materials.txt and set the correct sprites for the touched objects

maybe have a look at my Planning/Roomsymbol mod:

http://steamcommunity.com/sharedfiles/f ... =512194341



i've done myself a mod that edit the workman:



BEGIN Object
Name Workman
Toughness 5.0000
Price -500
RenderDepth 2
ViewRange 3
BlockedBy Wall
BlockedBy StaticObject
BlockedBy UtilityStation
BEGIN Sprite
x 0
y 0
w 2
h 2
RotateType 1
END
BEGIN Sprite
x 0
y 2
w 2
h 2
RotateType 1
END
BEGIN Sprite
x 0
y 4
w 2
h 2
RotateType 1
END
BEGIN Sprite
x 0
y 6
w 2
h 2
RotateType 1
END
SpriteVariants 4
Properties Entity
Properties Staff
END

User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: How do I make re-skin mods compatible with each other?

Postby Brento666 » Thu Oct 08, 2015 11:36 pm

:D Hope Trixi's point came across! :roll:
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: How do I make re-skin mods compatible with each other?

Postby Trixi » Fri Oct 09, 2015 8:49 am

Brento666 wrote::D Hope Trixi's point came across! :roll:


i hope too :)

sorry its damn if you want to explain sth in foreign language. i could try it with german, but i dont know if he will understand me better :roll:
Chibs
level1
level1
Posts: 31
Joined: Thu Oct 02, 2014 4:43 pm

Re: How do I make re-skin mods compatible with each other?

Postby Chibs » Fri Oct 09, 2015 12:36 pm

I understand what you mean now with the whole sprite.png stuff. I downloaded your mod and took a look at the file within and at the code you posted earlier regarding the workman.

The only thing I don't understand is how the 'x 0 y 0 w 2 h 2' stuff works
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: How do I make re-skin mods compatible with each other?

Postby Trixi » Fri Oct 09, 2015 4:15 pm

well the sprites.png works with a grid of 32 pixel.

so X*32 is the starting pixel horizontal, while Y*32 is the starting pixel vertical
W and H is with and height of your item, again multiplied with 32 pixel.

So X 0 Y 0 W 2 H 2 means: starting point the very first pixel left, the very first pixel top, and a width and height of 64 pixels

Rotatetype 1 says, that it has 4 different sprites for all different directions it can be shown.


X 2 Y 4 W 4 H 3 would means start at pixel 64 horizontally, 128 pixel vertical, 128 pixel with and 96 pixel height

floating values arent allowed at this point

The RotateType shows how the item is displayed when rotated

But therefore look best at the tutorial (its nicely explained there)

viewtopic.php?f=88&t=50923
Chibs
level1
level1
Posts: 31
Joined: Thu Oct 02, 2014 4:43 pm

Re: How do I make re-skin mods compatible with each other?

Postby Chibs » Fri Oct 09, 2015 7:04 pm

Cheers mate, it all makes sense now!

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 4 guests