Can you override existing reform programs in a mod?

Discussion about Mods for Prison Architect

Moderator: NBJeff

User avatar
Nomaki
level0
Posts: 6
Joined: Tue Sep 30, 2014 12:37 am

Can you override existing reform programs in a mod?

Postby Nomaki » Sat Oct 10, 2015 10:58 pm

Hello!

I'm attempting to override the default Workshop Induction Safety course by changing the "Intake" parameter to "Mandatory" as a mod so I can publish it, but after activating the mod in-game and trying it at the top and bottom of the list, it doesn't seem to have any effect, the same thing in the reform_programs.txt in the main.dat works, but not via a mod.

Is it at all possible to alter the core reform programs via the modding system?

Below is my reform_programs.txt for reference.

Code: Select all

BEGIN Program
    Name            WorkshopInduction
    SessionCost     -100
    Places          10
    SessionLength   120
    NumSessions     2
    Difficulty      10
    Research        PrisonLabour
    Room            Workshop
    Teacher         Foreman
    Equipment       WorkshopSaw
    EquipmentAlt    WorkshopPress
    Intake          Mandatory          # Was Voluntary
    Properties      Practical
END
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Can you override existing reform programs in a mod?

Postby Brento666 » Sun Oct 11, 2015 12:58 am

Hey Nomaki, I think you answered your own question by testing it in the original reform text successfully, and not having the same result in a mod...

Maybe you could create a new type of class and link that to working in the workshop! I'm betting that 'd work...

If your at it; why not add "Properties OutsideOfWork" to your coarse, you are then free to schedule it so it doesn't overlap with all the laboring!

Hope you get it working somehow 8)
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: Can you override existing reform programs in a mod?

Postby Trixi » Sun Oct 11, 2015 8:53 am

its not possible to run multiple reform programs with the same name.

Also its not possible to have multiply qualification for rooms where prisoners can work,

neither its possible to add Production objects to vanilla rooms.
User avatar
Nomaki
level0
Posts: 6
Joined: Tue Sep 30, 2014 12:37 am

Re: Can you override existing reform programs in a mod?

Postby Nomaki » Sun Oct 11, 2015 2:08 pm

Brento666 wrote:Hey Nomaki, I think you answered your own question by testing it in the original reform text successfully, and not having the same result in a mod...
Maybe you could create a new type of class and link that to working in the workshop! I'm betting that 'd work...
If your at it; why not add "Properties OutsideOfWork" to your coarse, you are then free to schedule it so it doesn't overlap with all the laboring!
Hope you get it working somehow 8)

Thanks for the warm reception and help to a question I figured would be silly to ask!
I wasn't sure if I was missing something which the modding guides I've been sifting through might have missed out; I found that you can override default rooms, so long as you have all the associated language text copy-pasted into your mod (e.g. the saw and press object text for a workshop), but alas this doesn't seem to extend to reform programs.

Trixi wrote:Also its not possible to have multiply qualification for rooms where prisoners can work,

I was fiddling seeing if I could get multiples, shame you can't, maybe in the future? Thanks for the help though!

I ended up creating a new reform program and changing the workshop to require that qualification instead, which I published over here:
http://steamcommunity.com/sharedfiles/f ... =533393158
Despite the various limitations of the modding API, it seems pretty simple and fun to use, and the community both here and on Steam discussions have been helpful, so thanks a lot and I look forward to making some more mods!
User avatar
demeggy
level1
level1
Posts: 10
Joined: Wed Oct 14, 2015 8:05 pm
Location: UK

Re: Can you override existing reform programs in a mod?

Postby demeggy » Sat Oct 24, 2015 2:48 pm

Nice thread, you've also just helped me out with a similar problem :) Best of luck
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: Can you override existing reform programs in a mod?

Postby aubergine18 » Sat Oct 24, 2015 5:10 pm

I found that you can override default rooms, so long as you have all the associated language text copy-pasted into your mod


That's not strictly correct; to override a room simply add a "BEGIN Room" definition in materials.txt that has the same "Name" as the room you want to override; your room definition will completely replace the existing room definition and everything in it. So if you just want a tweak, you have to copy all the other definitions from the original room definition from base games' materials.txt. Sadly, this means that only one mod at a time can override a room from the base game (because it will overwrite any changes made by previous mods).

The only time you need to do anything with language strings in base-language.txt is if you want to add new strings (eg. for custom objects that your mod adds to base game) or change existing strings. You should never normally need to copy chunks of base-language.txt from the base game (unless you plan on changing the text in them). Anything in your base-language.txt will overwrite existing stuff of same locale id's. For example, if there was something in the base game's base-language.txt "foo This is a foo" then if you put in your mods base-language.txt "foo This is my foo" you would overwrite the foo from the base game's base-language.txt.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 6 guests