Custom NPC's can't carry out jobs?

Discussion about Mods for Prison Architect

Moderator: NBJeff

Posts: 22
Joined: Fri Jun 17, 2016 9:54 pm

Custom NPC's can't carry out jobs?

Postby Wyxe » Sat Jul 15, 2017 10:24 pm

There's a very great chance that I'm doing something wrong here. I've created some new NPC's in my mod, Prison Architect Plus such as the Cat and Librarian, and I have had a tough time doing anything with them (besides fulfilling a need, in the cat's case).

1. The Librarian was created as an alternative to Prison Labor's feature of obtaining and operating a library. Perhaps if it ever works I can make it so that you don't need Prison Labor unlocked in order to build a library. The librarian is supposed to do the prisoner job of sorting books. In production.txt, I have this:

Code: Select all

BEGIN Processor
    Processor             SortingTable
    Input                 LibraryBookUnsorted
    Output                LibraryBookSorted
    OperatingTime         15.0
    Worker                Librarian
    AlternateOutput       RuinedBook
    AlternateOutputCount  1
    AlternateOutputChance 0.1

It's an exact copy of the same job but with "Librarian" as worker instead of "Prisoner". Here's the librarian in materials.txt so you can see how it was created:

Code: Select all

BEGIN Object     
    Name                 Librarian 
    Price                -300
    Upkeep               -10
    Toughness            5
    RenderDepth          2 
    BlockedBy            Wall 
    BlockedBy            StaticObject 
    BlockedBy            UtilityStation 
    ViewRange            5   
    Properties           Entity
    Properties           Staff
    #Properties           Scripted
    BEGIN Sprite
    x  3
    y  2
    w  2
    h  2
    RotateType  1
    TopAligned          False

I tried to see if the Script was interfering with the Librarian at all, but it wasn't as far as I can tell. That's why it's commented out. I also attempted to create a lua script at one point that would, upon "creation", tell the Librarian to move to the closest Sorting Desk. When it comes to getting the NPC's to move, I'm completely clueless. This was my next point.

2. I can't ever get the NPC's to move, especially the cat. I don't want them to stand there, lifeless, although I truly have no idea how to begin to make them move. I can only assume that all the scripts or whatever Introversion used to make NPC's move is hardcoded into the game and I can't learn from it. Are you even able to get custom NPC's to move? As in, have the devs even included any possible way of making custom NPC's move, job or no job?

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 1 guest