[MOD] Need Help

Discussion about Mods for Prison Architect

Moderator: NBJeff

Infex
level0
Posts: 9
Joined: Sat Jan 17, 2015 7:36 pm

[MOD] Need Help

Postby Infex » Sat Jan 17, 2015 7:52 pm

hi,
im Infex and im new here and start to create my own mod for PA but i have some problems whit my sprite.png i whant to define my Instructor in my materials.txt like this:

Code: Select all

BEGIN Object     
    Name              Instructor
    Price                    -1000 
    RenderDepth         2 
    Toughness            5
    ViewRange           3
    BlockedBy            Wall 
    BlockedBy            StaticObject 
    BlockedBy            UtilityStation 
    Research              IronWorkshopInduction
    Properties             Entity
    Properties             Administrator   
    Properties             Staff
    Equipment            Clipboard
    BEGIN   Sprite
        x 7
        y 1
   w 2
   h 2
   RotateType 0
    END
END

my problem is it dont use my own sprite.png it use the original object.png
maybe some one can tell me why and/or link me a side where i can see why or what i did wrong.

Sorry for my BAD English i always try my best but im rly not good.
i can read all u say and understand what u say but when i have to write by my own yeah ^^ u can see what i mean.
User avatar
knoest26
level5
level5
Posts: 1380
Joined: Thu Jul 11, 2013 6:55 pm
Location: The Netherlands
Contact:

Re: [MOD] Need Help

Postby knoest26 » Sat Jan 17, 2015 8:47 pm

I don't really see what could be wrong about it so I'm guessing it's something in the basics;

-Did you put your custom sprites file in the correct folder
-Are all files named correctly?
-Try putting a few blank line at the bottom, this sometimes causes an issue

If none of this helps, it might be an issue with the game not accepting custom sprites for entities, like it won't accept custom sprites for the tileset either.
User avatar
Chad
level3
level3
Posts: 255
Joined: Wed Sep 26, 2012 8:00 pm

Re: [MOD] Need Help

Postby Chad » Sat Jan 17, 2015 9:31 pm

knoest26 wrote:I don't really see what could be wrong about it so I'm guessing it's something in the basics;

-Did you put your custom sprites file in the correct folder
-Are all files named correctly?
-Try putting a few blank line at the bottom, this sometimes causes an issue

If none of this helps, it might be an issue with the game not accepting custom sprites for entities, like it won't accept custom sprites for the tileset either.


Entities can be defined with custom sprites as they are only objects.
User avatar
Pruvan
level2
level2
Posts: 94
Joined: Mon May 27, 2013 4:11 am

Re: [MOD] Need Help

Postby Pruvan » Sat Jan 17, 2015 9:35 pm

Most likely there's something wrong with your sprites.png file. Post it here for us to see.
Infex
level0
Posts: 9
Joined: Sat Jan 17, 2015 7:36 pm

Re: [MOD] Need Help

Postby Infex » Sat Jan 17, 2015 9:41 pm

i have some txt files i post the names and i need to find where i can post my png i have to load it up to one side dont i?^^

TXT Names:

materials
reform_programs
research

PNG:
Image
Last edited by Infex on Sat Jan 17, 2015 9:45 pm, edited 1 time in total.
User avatar
Pruvan
level2
level2
Posts: 94
Joined: Mon May 27, 2013 4:11 am

Re: [MOD] Need Help

Postby Pruvan » Sat Jan 17, 2015 9:43 pm

Try this site: http://postimage.org/

Very simple to use, 's where I usually post my images.

EDIT: Ninja'd.
Last edited by Pruvan on Sat Jan 17, 2015 9:47 pm, edited 1 time in total.
Infex
level0
Posts: 9
Joined: Sat Jan 17, 2015 7:36 pm

Re: [MOD] Need Help

Postby Infex » Sat Jan 17, 2015 9:46 pm

oh yes i found one ty
Infex
level0
Posts: 9
Joined: Sat Jan 17, 2015 7:36 pm

Re: [MOD] Need Help

Postby Infex » Sat Jan 17, 2015 9:53 pm

Chad wrote:
knoest26 wrote:I don't really see what could be wrong about it so I'm guessing it's something in the basics;

-Did you put your custom sprites file in the correct folder
-Are all files named correctly?
-Try putting a few blank line at the bottom, this sometimes causes an issue

If none of this helps, it might be an issue with the game not accepting custom sprites for entities, like it won't accept custom sprites for the tileset either.


Entities can be defined with custom sprites as they are only objects.


so what do u thing i shoud do delete/change the Entities?

my png file is in \AppData\Local\Introversion\Prison Architect\mods\my mod\data
User avatar
Pruvan
level2
level2
Posts: 94
Joined: Mon May 27, 2013 4:11 am

Re: [MOD] Need Help

Postby Pruvan » Sat Jan 17, 2015 10:03 pm

Checked your files, there's nothing wrong with your sprites, but your file name is indeed wrong, as Knoest pointed out. It should be called sprites.png NOT sprite.png (you forgot the 's'). This is why your mod wasn't loading it.

Your materials.txt file was a little off as well, the sprite coordinates and rotatetype were incorrect. Here's the corrected version:

Code: Select all

BEGIN Object
   Name         Instructor
   Price         -1000
   RenderDepth      2
   Toughness      5
   ViewRange      3
   BlockedBy      Wall
   BlockedBy      StaticObject
   BlockedBy      UtilityStation
   Research      IronWorkshopInduction
   Properties      Entity
   Properties      Administrator
   Properties      Staff
   Equipment      Clipboard
   BEGIN Sprite
      x 6
      y 0
      w 2
      h 2
      RotateType 1
   END
END


Other than that, make sure all your files are in the right place. Your mod folder structure should look something like this:

(modname)\data\sprites.png
(modname)\data\materials.txt
(modname)\data\research.txt
(modname)\data\reform_programs.txt


Make sure your files have the correct names and are in the right place, update your materials.txt with the code above and everything should work properly.
Infex
level0
Posts: 9
Joined: Sat Jan 17, 2015 7:36 pm

Re: [MOD] Need Help

Postby Infex » Sat Jan 17, 2015 10:12 pm

oh wow ty :) its working now so was the problem the missing s on sprite"s".png and the rotation type and ofc the mist placed x coordinats its 6 not 7
User avatar
Pruvan
level2
level2
Posts: 94
Joined: Mon May 27, 2013 4:11 am

Re: [MOD] Need Help

Postby Pruvan » Sat Jan 17, 2015 10:18 pm

The game using objects.png instead of your sprites.png was caused by the missing 's', yes. After fixing that I noticed it wasn't drawing correctly, which was caused by the wrong coordinates (x 7 → 6, y 1 → 0). For staff you should also use rotatetype 1 instead of 0.

For more information on rotatetypes, I wrote up some documentation you can read here:
[Tutorial] RotateTypes Explained

It's a bit lengthy, but it explains how each of the rotatetype's functions in great detail.
Infex
level0
Posts: 9
Joined: Sat Jan 17, 2015 7:36 pm

Re: [MOD] Need Help

Postby Infex » Sat Jan 17, 2015 10:25 pm

i already read this post its rly good i thing i understand what u was trying to say but i rly what to find the problem whit my sprite"s".png firsti what to see my sprite ^^ then i whantet do do the other things but yeah ^^

do u find out what rotation 5 is for?
User avatar
Pruvan
level2
level2
Posts: 94
Joined: Mon May 27, 2013 4:11 am

Re: [MOD] Need Help

Postby Pruvan » Sat Jan 17, 2015 10:29 pm

Nope, haven't really tried it out. It's not really used by anyone I reckon, given how clunky it is.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 7 guests