Modding tips

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

User avatar
knoest26
level5
level5
Posts: 1380
Joined: Thu Jul 11, 2013 6:55 pm
Location: The Netherlands
Contact:

Modding tips

Postby knoest26 » Sun Apr 06, 2014 11:57 am

As part of a recent project I've been taught the method of Gracious Professionalism, which essentially means that we all help each other to become better at what we do. I think this slogan, originally from FIRST, applies to Prison Architect as well and that we should all share our tips and tricks to make each others work better.

I would first like to start out by an issue with both modders and IV;
Files such as the 'Materials.txt', 'base-language.txt' and the 'grants.lua' are being loaded additively. I noticed that a lot of people didn't use this methode and I that dissappointed me because this is how we can make mods both compatible with other mods as with other Alpha's. For example:
If I wanted to make the beds cost $600 instead of the $200 I see a lot of modders copying the entire 'materials.txt'. This however means that the game will load your 'materials.txt' fully and I were to then create another mod that made the toilets cheaper I could only use one of them since that will then overwrite the other 'materials.txt'. If you make a 'materials.txt' which just contains the following the game can load multiple mods at the same time. This allows users to use a variety of mods as they choose.

Code: Select all

BEGIN Object     
    Name                 Bed 
    Height               2 
    ConstructionTime     3.00000 
    MoveSpeedFactor      0.500000 
    Toughness            30.0000 
    Price                -600 
    NumSlots             2 
    AttachToWall         true 
    Group                StaticObject 
    BlockedBy            Wall 
    BlockedBy            StaticObject 
    BlockedBy            UtilityStation 
    Sprite               Bed 
    MadeOf               Wood
    ToolbarSprite        BedToolbar
    Properties           StaticObject
END

The same works for the 'base-language.txt' and the 'grants.lua' although I see it being used in the 'grants.lua' often but I think a lot of modders didn't know about the possibility of this with the 'base-language.txt' and the 'materials.txt'

Now the problem with this method is that IV hasn't fully coded it yet. The 'base-language.txt' and the 'grants.lua' are loaded correctly on startup but the 'materials.txt is loaded primarily, causing the entire map to look like a concrete wall. This bug has been reported on the mantis bugtracker and I hope that this will be addressed by IV as soon as possible to make mods more compatible.

Please feel free to add to this list with tips and tricks to make Prison Architect an even more enjoyable game to the entire community!
User avatar
111none
level4
level4
Posts: 970
Joined: Fri Oct 19, 2012 3:32 am
Location: Wangjing, Beijing, Peoples Republic of China

Re: Modding tips

Postby 111none » Mon Apr 07, 2014 8:09 am

+1, this needs to be sticky. :D
reeceaclarke
level1
level1
Posts: 39
Joined: Thu Aug 01, 2013 12:02 am
Contact:

Re: Modding tips

Postby reeceaclarke » Mon Apr 07, 2014 12:58 pm

Yes I see this being quite a problem when trying to run two mods together although I suppose if one is built without using everything in the file you could run them in them so it runs first and the other does not affect the file but yeah I see what you are saying with this.
jaxonhmmnd
level1
level1
Posts: 31
Joined: Fri Feb 08, 2013 12:07 pm

Re: Modding tips

Postby jaxonhmmnd » Tue Apr 08, 2014 2:58 pm

Bump for bumps sake.

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 0 guests