[FIXED] Processor problems

Discussion about Mods for Prison Architect

Moderator: NBJeff

ShadowPulse
level0
Posts: 5
Joined: Wed Dec 25, 2013 1:18 pm

[FIXED] Processor problems

Postby ShadowPulse » Tue Apr 19, 2016 10:57 am

Hey guys,

I've been trying to fix my Recycling Mod, but my prisoners don't want to use my recycling desks at all, and when work time comes around they just wander around the room getting paid for nothing.

From materials.txt:

Code: Select all

BEGIN Object
   Name            RecyclingDesk
          Research         Recycling
   RenderDepth         1
   AttachToWall         false
   ConstructionTime      3.00000
   MoveSpeedFactor         0.250000
   Toughness         10.0000
   Price            -500
   NumSlots         3
   MadeOf            Wood
   Properties         Processor
   Properties         PrisonersCanWork
   WorkGroup         Recycling
   Worker            Prisoner
   SpriteVariants         1
   Width            3
   Height            1
   BEGIN Workers
      Worker          Prisoner
      Worker         Workman
          END
   BEGIN Sprite
      x         0
      y         5
      w         3
      h         1
      RotateType      1
      BEGIN Marker
         x         0.67
         y         0.53
         orientation.x      0
         orientation.y      -1
         Index         0
      END
      BEGIN Marker
         x         1.57
         y         0
         orientation.x      0
         orientation.y      -1
         Index         1
      END
      BEGIN Marker
         x         2.17
         y         0.53
         orientation.x      0
         orientation.y      -1
         Index         2
      END   
   END

END


And production.txt:

Code: Select all

BEGIN Processor
    Processor            RecyclingDesk
    Room                 Recycling
    Input                OtherGarbage
    Output               Recycling
    OperatingTime        15.0
    Properties           ShowDuringOperation
    Worker               Prisoner
    Qualification        Recycling
    WorkGroup            Recycling
END

BEGIN ProductionRule
    Rule                Storage
    Material            OtherGarbage
    Room              Recycling
    Worker              Prisoner
    Container           RecyclingDesk
    Distribution        Nearest
    WorkGroup           Recycling
END


I'm probably missing something really basic, but I need help finding what I've done wrong :(
Last edited by ShadowPulse on Wed Apr 27, 2016 7:11 am, edited 1 time in total.
murgh
level2
level2
Posts: 232
Joined: Sat Jan 30, 2016 11:52 am

Re: Processor problems

Postby murgh » Wed Apr 20, 2016 10:01 am

The Workers part shouldn't be in the object definitions, so I guess the RecyclingDesk outputs an error in debug.txt
Try this instead:

Code: Select all

BEGIN Object
       Name                   RecyclingDesk
       Research              Recycling
       RenderDepth         1
       AttachToWall         false
       ConstructionTime   3.00000
       MoveSpeedFactor  0.250000
       Toughness            10.0000
       Price                    -500
       NumSlots             3
       Properties            StaticObject
       Properties            Processor
       MadeOf               Wood
       BlockedBy          Wall
       BlockedBy          StaticObject
       BlockedBy          UtilityStation
       WorkGroup          Recycling
       Width                  3
       Height                 1
       BEGIN Sprite       x 0 y 5 w 3 h 1 RotateType 1
         BEGIN Marker   x 0.67 y 0.53 orientation.x 0 orientation.y -1 Index 0 END
         BEGIN Marker   x 1.57 y 0 orientation.x 0 orientation.y -1 Index 1 END
         BEGIN Marker   x 2.17 y 0.53 orientation.x 0 orientation.y -1 Index 2 END   
       END
    END


I'm also not sure if using the same name 'Recycling' for the room name, workgroup name, qualification and output is a good idea.
ShadowPulse
level0
Posts: 5
Joined: Wed Dec 25, 2013 1:18 pm

Re: Processor problems

Postby ShadowPulse » Thu Apr 21, 2016 5:38 am

I replaced my code with yours, still no dice.

You do have a point about using "Recycling" for everything. I changed some of the names to clear this up, but the prisoners still won't do anything.
murgh
level2
level2
Posts: 232
Joined: Sat Jan 30, 2016 11:52 am

Re: Processor problems

Postby murgh » Mon Apr 25, 2016 12:56 pm

I took a deeper look into your mod. It's a mess... What's missing are stacksprites for the garbage, without stacksprites the processor won't work. There is no need for a jobs.txt in order to have a processor do it's stuff. But there are several more things that were implemented wrong. The list with bugs was too long to remember it all, but the idea of recycling is a nice one.

So I started from scratch, completely rewrote the whole mod and added the proper sprites to make it work.

Edit: created a new topic for this mod and moved this post over there.
Last edited by murgh on Tue Apr 26, 2016 5:07 pm, edited 2 times in total.
ShadowPulse
level0
Posts: 5
Joined: Wed Dec 25, 2013 1:18 pm

Re: Processor problems

Postby ShadowPulse » Mon Apr 25, 2016 11:06 pm

Wow, okay, I didn't realise I was doing so badly.

Thanks so much for rewriting all that, I'm still pretty new to modding so I don't think I fully understood what I needed to do to create a mod like this one. I might have to take a look at what you did and try to emulate that in further mods.
murgh
level2
level2
Posts: 232
Joined: Sat Jan 30, 2016 11:52 am

Re: Processor problems

Postby murgh » Tue Apr 26, 2016 12:35 am

Hehehe, well it's all pretty straightforward, you were just thinking too difficult I guess. :wink:
Wyxe
level1
level1
Posts: 22
Joined: Fri Jun 17, 2016 9:54 pm
Contact:

Re: [FIXED] Processor problems

Postby Wyxe » Sun Jul 16, 2017 8:58 am

I'm new to some parts of PA modding, and this is the only part that is still yet to be done for me. Please excuse my lack of knowledge for a few moments while I ask a question.

I downloaded your mod and looked at it, the one with both recycling and gardening, and attempted to use that as a basis to modify my existing infrastructure and make it work. As far as I can tell, everything seems to be in line, from the .txt standpoints, except debug.txt tells me that jobs.txt fails to load - and I don't know what to do about that. I also can't tell if it means my jobs.txt file or the game's file. All debug.txt says is Data\jobs.txt so I'm going to assume it's the game's mess up and not mine.

My question is this: I've noticed that you have several lua scripts in your mod that correlate to processing objects, like for example, the garden pot. The item I'm trying to use is kind of similar in a way. It's an object that a prisoner should walk up to, wait 6 seconds, and pull something out of over and over again. The item that they pull out will then be brought to an Exports zone where it will hopefully be exported and sold. Do I actually need a .lua script anywhere in this mod to get a job like this done by prisoners or workman or whatever, or am I just doing something wrong with the txt files? If it's the latter, I'll post some snippets here so you can further investigate. If it's the former, well, there's a bit of a problem. I am a real noob when it comes to Lua scripting. The most I've ever done with it besides this mod I'm working on was looking and not understanding some Lua scripts from Garry's Mod. As I understand it, it's an easy language to learn and Introversion didn't include a whole lot of functions so it should make it slightly easier - unless I'm getting one of those details wrong.

Thanks

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 7 guests