Anyone been able to add functional staff?

Discussion about Mods for Prison Architect

Moderator: NBJeff

User avatar
dsdude123
level2
level2
Posts: 77
Joined: Tue May 27, 2014 2:40 am
Location: Seattle,WA
Contact:

Anyone been able to add functional staff?

Postby dsdude123 » Mon Sep 01, 2014 10:44 pm

I've been able to add new staff to the menu but all I get is a sideways staff member that doesn't move nor show up properly. Also, can't figure out how to set wages.

Image Image
User avatar
knoest26
level5
level5
Posts: 1380
Joined: Thu Jul 11, 2013 6:55 pm
Location: The Netherlands
Contact:

Re: Anyone been able to add functional staff?

Postby knoest26 » Mon Sep 01, 2014 10:49 pm

The reason he's sideways is because you probably set the rotatetype wrong and the reason he doesn't move is because he doesn't need to move.

The is no reason for him to move as he's not coded to wander around when he's idle and probably doesn't have a job
User avatar
Phraxas
level2
level2
Posts: 107
Joined: Sun Aug 31, 2014 12:10 am
Location: USA - PA

Re: Anyone been able to add functional staff?

Postby Phraxas » Mon Sep 01, 2014 10:53 pm

Idk, according to previous experiences with actual system administrators, this guy seems to be working exactly correctly.
User avatar
dsdude123
level2
level2
Posts: 77
Joined: Tue May 27, 2014 2:40 am
Location: Seattle,WA
Contact:

Re: Anyone been able to add functional staff?

Postby dsdude123 » Mon Sep 01, 2014 10:54 pm

knoest26 wrote:The reason he's sideways is because you probably set the rotatetype wrong and the reason he doesn't move is because he doesn't need to move.

The is no reason for him to move as he's not coded to wander around when he's idle and probably doesn't have a job


Ah, what should it be set to? I never could understand rotatetype :P
User avatar
Phraxas
level2
level2
Posts: 107
Joined: Sun Aug 31, 2014 12:10 am
Location: USA - PA

Re: Anyone been able to add functional staff?

Postby Phraxas » Mon Sep 01, 2014 10:56 pm

dsdude123 wrote:Ah, what should it be set to?

0,0
User avatar
dsdude123
level2
level2
Posts: 77
Joined: Tue May 27, 2014 2:40 am
Location: Seattle,WA
Contact:

Re: Anyone been able to add functional staff?

Postby dsdude123 » Mon Sep 01, 2014 11:00 pm

Phraxas wrote:
dsdude123 wrote:Ah, what should it be set to?

0,0


Already was set to 0. Seems that setting it to 4 solved the problem.
User avatar
dsdude123
level2
level2
Posts: 77
Joined: Tue May 27, 2014 2:40 am
Location: Seattle,WA
Contact:

Re: Anyone been able to add functional staff?

Postby dsdude123 » Tue Sep 02, 2014 12:41 am

knoest26 wrote:The reason he's sideways is because you probably set the rotatetype wrong and the reason he doesn't move is because he doesn't need to move.

The is no reason for him to move as he's not coded to wander around when he's idle and probably doesn't have a job


It seems that even when there is a job that the staff should do, they don't. Perhaps the modding system isn't ready for new staff yet.
Dynamite874
level1
level1
Posts: 15
Joined: Tue Oct 30, 2012 11:24 pm
Location: United Kingdom
Contact:

Re: Anyone been able to add functional staff?

Postby Dynamite874 » Tue Sep 02, 2014 12:48 am

Well adding Guards crashes every single time :D
pcgrosen
level1
level1
Posts: 10
Joined: Tue Jun 11, 2013 5:20 am

Re: Anyone been able to add functional staff?

Postby pcgrosen » Tue Sep 02, 2014 1:54 am

. . . I haven't even gotten them to show in the menu like that. Could you fill me in on how you did that? Thanks!
pcgrosen
level1
level1
Posts: 10
Joined: Tue Jun 11, 2013 5:20 am

Re: Anyone been able to add functional staff?

Postby pcgrosen » Tue Sep 02, 2014 2:06 am

Entities seem to have a "JobId" property, and all jobs are given a number. Unfortunately, I don't think you can actually get the JobId for a given job, as Object.CreateJob() doesn't return anything. There may still be other ways to assign jobs, which I am looking into right now. I'll update with more info.

EDIT: Annnnnnnd it took me all of 20 seconds! If you define the job with the "Worker" attribute as the name of your entity, the entity should move to perform the job.
User avatar
knoest26
level5
level5
Posts: 1380
Joined: Thu Jul 11, 2013 6:55 pm
Location: The Netherlands
Contact:

Re: Anyone been able to add functional staff?

Postby knoest26 » Tue Sep 02, 2014 2:55 pm

About the rotatetypes, it goes like this
0: It's facing forward
1: Orientated to the left
2: Orientated to the back
3: Orientated to the right
4: Not rotatable
User avatar
dsdude123
level2
level2
Posts: 77
Joined: Tue May 27, 2014 2:40 am
Location: Seattle,WA
Contact:

Re: Anyone been able to add functional staff?

Postby dsdude123 » Tue Sep 02, 2014 3:12 pm

pcgrosen wrote:Entities seem to have a "JobId" property, and all jobs are given a number. Unfortunately, I don't think you can actually get the JobId for a given job, as Object.CreateJob() doesn't return anything. There may still be other ways to assign jobs, which I am looking into right now. I'll update with more info.

EDIT: Annnnnnnd it took me all of 20 seconds! If you define the job with the "Worker" attribute as the name of your entity, the entity should move to perform the job.


Worker attribute as the name? Not sure I quite understand you, can you post the code?
User avatar
Phraxas
level2
level2
Posts: 107
Joined: Sun Aug 31, 2014 12:10 am
Location: USA - PA

Re: Anyone been able to add functional staff?

Postby Phraxas » Tue Sep 02, 2014 4:53 pm

That's just going to create another worker though.
pcgrosen
level1
level1
Posts: 10
Joined: Tue Jun 11, 2013 5:20 am

Re: Anyone been able to add functional staff?

Postby pcgrosen » Thu Sep 04, 2014 4:03 pm

Here's what I mean:

Code: Select all

BEGIN Job
    Name                    TendVegetables
    JobTime                 0.1
    Tool                    Trowel
    Worker                  Prisoner
    Qualification           Horticulture
END

This is from the Vegetable Patch example mod. You could change the "Worker" line to something like this:

Code: Select all

Worker          SystemAdministrator

That would call the Systems Administrator to tend the vegetables. If you changed the other lines, too, you could come up with a more fitting job:

Code: Select all

BEGIN Job
    Name                     RepairComputer
    JobTime                  1.0
    Tool                     Screwdriver
    Worker                   SystemAdministrator
END

Then, inside of your script, you can call the function to create a job:

Code: Select all

Object.CreateJob("RepairComputer")

I believe that would give you a functioning job for your System Administrator to perform.
User avatar
dsdude123
level2
level2
Posts: 77
Joined: Tue May 27, 2014 2:40 am
Location: Seattle,WA
Contact:

Re: Anyone been able to add functional staff?

Postby dsdude123 » Fri Sep 05, 2014 12:06 am

pcgrosen wrote:Here's what I mean:

Code: Select all

BEGIN Job
    Name                    TendVegetables
    JobTime                 0.1
    Tool                    Trowel
    Worker                  Prisoner
    Qualification           Horticulture
END

This is from the Vegetable Patch example mod. You could change the "Worker" line to something like this:

Code: Select all

Worker          SystemAdministrator

That would call the Systems Administrator to tend the vegetables. If you changed the other lines, too, you could come up with a more fitting job:

Code: Select all

BEGIN Job
    Name                     RepairComputer
    JobTime                  1.0
    Tool                     Screwdriver
    Worker                   SystemAdministrator
END

Then, inside of your script, you can call the function to create a job:

Code: Select all

Object.CreateJob("RepairComputer")

I believe that would give you a functioning job for your System Administrator to perform.


Already tried that didn't work

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 6 guests