PA Mod Markers?

Discussion about Mods for Prison Architect

Moderator: NBJeff

User avatar
Landuros
level1
level1
Posts: 10
Joined: Sat Dec 12, 2015 10:38 am

PA Mod Markers?

Postby Landuros » Sat Dec 12, 2015 11:04 am

Hi, I'm new to this forum and I need some help.

In a new 'test' mod I'm doing, I've created a processor with this coding:

materials.txt

Code: Select all

BEGIN Object
   Name             Printer
   Research          Prayer
   Width             3
   ConstructionTime    25.00000
   MoveSpeedFactor       0.500000
   Toughness          10.0000
   Price             -2000
   NumSlots          3
   Group             StaticObject
   WorkGroup          PrintingPress
   BlockedBy          Wall
   BlockedBy          StaticObject
   BlockedBy          UtilityStation
   BEGIN   Sprite
      x 0
      y 6
      w 6
      h 4
      RotateType 4
   END
   SpriteScale          1.1
   AutoOrder            Paper
    AutoOrderQuantity    120
   MadeOf             Composite
   Properties          StaticObject
   Properties          Electrical
   Properties          RoomSpecific
   Properties          Processor
   Properties          ExplodeWhenWet
   Research          Prayer
   BEGIN Workers
      Worker          Prisoner
   END
   BEGIN Marker
           x             1.5
           y             1.0
           orientation.x 0.0
           orientation.y 0.0
           Index         0
        END
        BEGIN Marker
           x             3.1
           y             1.0
           Index         1
        END
        BEGIN Marker
           x             4.7
           y             1.0
           Index         2
        END
END


production.txt

Code: Select all

BEGIN Processor
   Processor           Printer
   Object            Printer
    Input               Paper
   InputCount         10
    Output              Bible
    OperatingTime       45.0
    Properties          ShowDuringOperation
    Worker              Prisoner
    Qualification       SpiritualGuidance
END


I don't know why, but when ever I place a printer down, Prison Architect returns me the error: Working position cannot be reached. The processor is 3 blocks across, and has a Workshop Press sprite. It is not adjacent to any walls. I have a great feeling that this has to do with markers, because markers are the only part of making objects I don't understand.

Thanks in advance for your help.
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: PA Mod Markers?

Postby Brento666 » Sat Dec 12, 2015 4:53 pm

Heya Landuros!

Getting markers to work correctly is sometimes a hassle; I've updated your definition below... You need the marker-defs to be in your sprite-block..

Code: Select all

BEGIN Object
   Name             Printer
   Research          Prayer
   Width             3
   ConstructionTime    25.00000
   MoveSpeedFactor       0.500000
   Toughness          10.0000
   Price             -2000
   NumSlots          3
   Group             StaticObject
   WorkGroup          PrintingPress
   BlockedBy          Wall
   BlockedBy          StaticObject
   BlockedBy          UtilityStation
   BEGIN   Sprite
      x 0
      y 6
      w 6
      h 4
      RotateType 4
      BEGIN Marker
           x             1.5
           y             1.0
           orientation.x 0.0
           orientation.y 0.0
           Index         0
        END
        BEGIN Marker
           x             3.1
           y             1.0
           Index         1
        END
        BEGIN Marker
           x             4.7
           y             1.0
           Index         2
        END
   END
   SpriteScale          1.1
   AutoOrder            Paper
    AutoOrderQuantity    120
   MadeOf             Composite
   Properties          StaticObject
   Properties          Electrical
   Properties          RoomSpecific
   Properties          Processor
   Properties          ExplodeWhenWet
   Research          Prayer
   BEGIN Workers
      Worker          Prisoner
   END
END


I took out "Object Printer" from below as it is out of place in a processor...

Code: Select all

BEGIN Processor
   Processor           Printer
    Input               Paper
   InputCount         10
    Output              Bible
    OperatingTime       45.0
    Properties          ShowDuringOperation
    Worker              Prisoner
    Qualification       SpiritualGuidance
END


-Then test if it works... But things can go wrong getting with workers to do labor; you have a reform program, that's good.
You might need production rules for input/output and rules import and export stuff...

GL!
User avatar
Landuros
level1
level1
Posts: 10
Joined: Sat Dec 12, 2015 10:38 am

Re: PA Mod Markers?

Postby Landuros » Sun Dec 13, 2015 1:06 am

Wow! That was perhaps the quickest reply I have ever seen. Thanks Brento!

I have tried your codes, but with no prevail. The printer's working position still cannot be reached. Do I have to define where prisoners stand in the second marker? (i.e. Index 1).

Here is my current code:

Code: Select all

BEGIN Object
   Name             Printer
   Research          Prayer
   Width             3
   ConstructionTime    25.00000
   MoveSpeedFactor       0.500000
   Toughness          10.0000
   Price             -2000
   NumSlots          3
   Group             StaticObject
   WorkGroup          PrintingPress
   BlockedBy          Wall
   BlockedBy          StaticObject
   BlockedBy          UtilityStation
   BEGIN   Sprite
      x 0
      y 6
      w 6
      h 4
      RotateType 4
      BEGIN Marker
           x             1.5
           y             1.0
           orientation.x 0.0
           orientation.y 0.0
           Index         0
      END
      BEGIN Marker
           x             3.1
           y             1.0
           Index         1
        END
        BEGIN Marker
           x             4.7
           y             1.0
           Index         2
        END
   END
   SpriteScale         1.1
   AutoOrder           Paper
   AutoOrderQuantity   120
   MadeOf              Composite
   Properties          StaticObject
   Properties          Electrical
   Properties          RoomSpecific
   Properties          Processor
   Properties          ExplodeWhenWet
   Research            Prayer
   BEGIN Workers
      Worker          Prisoner
   END
END


My production.txt does include some productionrules, so no need to worry about that!

Also, can you just assign a ToolbarSprite like this?

Code: Select all

BEGIN   ToolbarSprite
      x ...
      y ...
      w 2
      h 2
      RotateType 4
   END


If you could help again, that would be great. Thanks

-EDIT- Just found out my markers weren't actually on the sprites. Changed it so they were, still does not work.
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: PA Mod Markers?

Postby Brento666 » Sun Dec 13, 2015 4:17 am

Ey!
It could be many, many things... Just going on things I'm noticing on a glance; I always have orientation on all my markers..
-Empty/comment- lines at tops and bottoms of files you got everywhere right?

-No creating toolbar sprites is still not doable... For non square objects; I can't advise anything apart from re-using a named base game sprite, if you are lucky enough to find one that suits your object..!

GL! Hope you find the bug!

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 2 guests