Modding Prison Architect
Moderator: NBJeff
Re: Upcoming feature : Mod support
You can mod the fornames.txt and surnames.txt files, which will modify the names of generated prisoners (that are newly joining a prison. I don't think it will modify those in a saved prison...), but not the Name in the Game tier prisoners (custom prisoners). People paid for their name to be in the game (think of it like a wall of backers in other games).
As xander said, you can replace the file directly, but changing the main.dat means you have to mess around with it each time there is an update. You can't use the A15+ modding system for changing some files. This list of files is very small, and only exists for good reasons (people paying for a certain thing in the game, mod type meta-data, etc.).
As xander said, you can replace the file directly, but changing the main.dat means you have to mess around with it each time there is an update. You can't use the A15+ modding system for changing some files. This list of files is very small, and only exists for good reasons (people paying for a certain thing in the game, mod type meta-data, etc.).
-
- level0
- Posts: 7
- Joined: Wed Apr 03, 2013 3:08 am
Re: Upcoming feature : Mod support
Got it, I'll just modify my local data file for now then. Thanks!
-
- level1
- Posts: 23
- Joined: Sun Dec 29, 2013 12:47 am
Re: Upcoming feature : Mod support
I've tried to add an string for equipment_Iron by creating a translation file with a value for that but it doesn't seem to work as the game continues displaying equipment_Iron, am i doing something wrong or the game is unable to take my string for that equipment?
Re: Upcoming feature : Mod support
You should be able to do that. Have you made the manifest file? And activated the mod in the game? If so, can you paste the language string from the file you made here for us?
-
- level1
- Posts: 23
- Joined: Sun Dec 29, 2013 12:47 am
Re: Upcoming feature : Mod support
Firstly, i modified the contraband from laundry:
Then, i noticed that in the contraband screen the object appeared as "equipment_Iron" so i went to the language file and saw that that string wasn't defined, so i created a translation file on my mod only with a value for that string, but the game continues displaying "equipment_Iron":
Code: Select all
BEGIN Room
Name Laundry
Research PrisonLabour
BEGIN Requirement Type Indoor END
BEGIN Requirement Type Object Id LaundryMachine END
BEGIN Requirement Type Object Id LaundryBasket END
BEGIN Requirement Type Object Id IroningBoard END
BEGIN LikelyObject Id LaundryMachine END
BEGIN LikelyObject Id LaundryBasket END
BEGIN LikelyObject Id IroningBoard END
BEGIN LikelyObject Id Table END
BEGIN Contraband Id Poison END
BEGIN Contraband Id Iron END
END
Then, i noticed that in the contraband screen the object appeared as "equipment_Iron" so i went to the language file and saw that that string wasn't defined, so i created a translation file on my mod only with a value for that string, but the game continues displaying "equipment_Iron":
Code: Select all
equipment_Iron Iron
Re: Upcoming feature : Mod support
Hey, I did a quick test. I made a mod with the following layout:
materials.txt contained everything in the regular materials.txt, with your additions of contraband from the laundry.
base-language.txt is as follows:
I activated the mod in game, and restarted Prison Architect (I think the materials.txt is only loaded at game load at the moment, I will check and fix this if it is the case). Loaded a prison with a laundry, showed the contraband, and Iron is shown for the laundry.
Code: Select all
│ manifest.txt
│
└───data
│ materials.txt
│
└───language
base-language.txt
materials.txt contained everything in the regular materials.txt, with your additions of contraband from the laundry.
base-language.txt is as follows:
Code: Select all
# =====================
# Test string
# =====================
equipment_Iron Iron
I activated the mod in game, and restarted Prison Architect (I think the materials.txt is only loaded at game load at the moment, I will check and fix this if it is the case). Loaded a prison with a laundry, showed the contraband, and Iron is shown for the laundry.
-
- level1
- Posts: 23
- Joined: Sun Dec 29, 2013 12:47 am
Re: Upcoming feature : Mod support
What program did you used to create the lenguage file? I think i'm having some problem about editing it with the notepad, as i'm following your layout and not reaching to get it translated, the game recognizes the mod as including a translation thought.
I will send you my folder by PM in a moment.
I will send you my folder by PM in a moment.
Re: Upcoming feature : Mod support
One possible thought (I haven't experimented with it myself), but how are you using whitespace? I recall the the strings files for Darwinia required a blank line at the end of the file. If the last line was not blank, then it was ignored. Maybe the issue with your mod is as simple as that? Or perhaps there is too much / too little whitespace between the tag and the string? Or the wrong kind of whitespace (spaces vs tabs)? Or the wrong newline char at the end of the line (/n vs /r, for instance)?
xander
xander
-
- level1
- Posts: 23
- Joined: Sun Dec 29, 2013 12:47 am
Re: Upcoming feature : Mod support
xander wrote:One possible thought (I haven't experimented with it myself), but how are you using whitespace? I recall the the strings files for Darwinia required a blank line at the end of the file. If the last line was not blank, then it was ignored. Maybe the issue with your mod is as simple as that? Or perhaps there is too much / too little whitespace between the tag and the string? Or the wrong kind of whitespace (spaces vs tabs)? Or the wrong newline char at the end of the line (/n vs /r, for instance)?
xander
Eldiablo solved it by PM a couple of hours ago, but that was it, translation files require a like break at the end. Ty.
Re: Upcoming feature : Mod support
DoctorPelusa wrote:xander wrote:One possible thought (I haven't experimented with it myself), but how are you using whitespace? I recall the the strings files for Darwinia required a blank line at the end of the file. If the last line was not blank, then it was ignored. Maybe the issue with your mod is as simple as that? Or perhaps there is too much / too little whitespace between the tag and the string? Or the wrong kind of whitespace (spaces vs tabs)? Or the wrong newline char at the end of the line (/n vs /r, for instance)?
xander
Eldiablo solved it by PM a couple of hours ago, but that was it, translation files require a like break at the end. Ty.
Whee! For a total shot in the dark, I did pretty good... ;)
xander
-
- level1
- Posts: 23
- Joined: Sun Dec 29, 2013 12:47 am
Re: Upcoming feature : Mod support
I've been trying to fulfill a commonly requested feature and give transparency to the fences, but, for some reason the transparent part appears as black ingame, i'm confused since tunnels and stones have transparent parts, anyone has an insight on this?
Re: Upcoming feature : Mod support
Is it possible to have a Grant show up repeatedly?
Basically, once a grant is completed, it shows up in the Grant selection list and can be taken again.
I'm trying to mod in three Grants that allow you to bring in some number of Max, Medium, Min security prisoners everytime to take a Grant (perhaps with a negative "award". Basically, you pay to have more prisoner brought into your prison).
I have some suspicion that I could accomplish with Trigger and CreateGrant (have the trigger fire on the previous grant being completed to create the same grant again). But I'm not sure and can't try it out right this moment.
Also, is my suspicion that Game.Delivery("truck",8,"Prisoner") bring in 8 prisoners on the delivery truck correct?
To be more general, is there an API documentation on what LUA functions we have available?
EDIT: Just tried it, seems like having Trigger in grant.lua crashes the game.
I was trying to do this.
Basically, I'm trying to have the completion of the grant triggers delivery of 8 prisoners. Adding Trigger.Create crashes it.
Basically, once a grant is completed, it shows up in the Grant selection list and can be taken again.
I'm trying to mod in three Grants that allow you to bring in some number of Max, Medium, Min security prisoners everytime to take a Grant (perhaps with a negative "award". Basically, you pay to have more prisoner brought into your prison).
I have some suspicion that I could accomplish with Trigger and CreateGrant (have the trigger fire on the previous grant being completed to create the same grant again). But I'm not sure and can't try it out right this moment.
Also, is my suspicion that Game.Delivery("truck",8,"Prisoner") bring in 8 prisoners on the delivery truck correct?
To be more general, is there an API documentation on what LUA functions we have available?
EDIT: Just tried it, seems like having Trigger in grant.lua crashes the game.
I was trying to do this.
Code: Select all
function CreateBringPrisoner()
Objective.CreateGrant ( "Grant_more_prisoners", 0, 0 )
Objective.CreateGrant ( "Grant_have_lawyer", 0, 0 )
Objective.SetParent ( "Grant_more_prisoners" )
Objective.RequireObjects ( "Warden", 1 )
Trigger.Create ( "CreateBringPrisoner_SendMore" )
Trigger.RequireObjective ( "Grant_more_prisoners" )
end
function CreateBringPrisoner_SendMore()
Game.Delivery ( "Prisoner", 8, "Prisoner" )
-- Recreate the grant
-- CreateBringPrisoner()
end
Basically, I'm trying to have the completion of the grant triggers delivery of 8 prisoners. Adding Trigger.Create crashes it.
Re: Upcoming feature : Mod support
elDiablo wrote:Yeah, at the moment you can't override the initial grants. That's how we've designed the system. In the next version, we will make it so that you can, by just naming your grant the same as the initial grants.
As for the tooltip, that is weird, and we'll have a look.
Has this feature been implemented yet?
Re: Upcoming feature : Mod support
Yep, just call any grants you want to override the same as the base ones, and the first mod to load will override it.
Re: Upcoming feature : Mod support
jois13 wrote:totte1015 wrote:fundevin wrote:I find it funny how Chris has already made more mod support than minecraft has...
Anyway, awesome job Chris . Not a modder but seems awesome from a player point of view.
Are you a fucking retard?
Are YOU a fucking retard!! PA does or is very closes to mine crafts mod support AND ITS ONLY ONE YR OLD
Joe
Actually, the games been in development since 2010... and i agree with fundevin, minecraft doesn't have mod support at all natively. all mods are hacked into the game. With your mindset, you could say GTA IV has mod support, when it really doesn't at all.
Who is online
Users browsing this forum: No registered users and 15 guests