[MOD] Dispatch Mod

Discussion about Mods for Prison Architect

Moderator: NBJeff

NativeFighter
level1
level1
Posts: 14
Joined: Tue Sep 08, 2015 12:08 am

[MOD] Dispatch Mod

Postby NativeFighter » Fri Sep 25, 2015 11:28 am

Annoyed of having to search for guards around your prison? Annoyed of seeing wounded prisoners and no one healing them? Then this mod is for you! Call anyone, anytime!


Features:
-Dispatch a doctor to the scene (New update: Doctors will come even if very far away).
-Dispatch nearby guards to scene.
-Dispatch Many Guards (Basically brings guards from a larger area, good if you need guards for a remote location / if there is complete mess somewhere).

Things to come:
-Dispatch armed guards.
-Dispatch a K-9 Unit
-Dispatch a Single Guard to the scene.

Known Bugs:
-Guards will be summoned even if they are escorting a prisoner (which brings prisoner with them). I do not have any idea whatsoever how to fix this yet. Sorry. But I'll try and find something.

Credits:
Killpro
Special thanks to Trixi for the scripting lessons :)

Workshop Page: http://steamcommunity.com/sharedfiles/f ... =522933891
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: [MOD] Dispatch Mod

Postby Brento666 » Sun Sep 27, 2015 5:02 pm

Good stuff!
I haven't tried your mod or seen your code... But... for skipping guards escorting prisoners you could maybe check if their Carrying.Id.i / Id.u are -1 before you decide to set a NavigateTo(x, y).

So with guard types try;

if obj.Carrying.Id.i == -1 then
obj.NavigateTo(x, y)
end

Anyway tnx! Will give your mod a go later on (to see what it does and if there's room for any improvements) !
NativeFighter
level1
level1
Posts: 14
Joined: Tue Sep 08, 2015 12:08 am

Re: [MOD] Dispatch Mod

Postby NativeFighter » Mon Sep 28, 2015 7:16 pm

Brento666 wrote:Good stuff!
I haven't tried your mod or seen your code... But... for skipping guards escorting prisoners you could maybe check if their Carrying.Id.i / Id.u are -1 before you decide to set a NavigateTo(x, y).

So with guard types try;

if obj.Carrying.Id.i == -1 then
obj.NavigateTo(x, y)
end

Anyway tnx! Will give your mod a go later on (to see what it does and if there's room for any improvements) !



Thank you for that code. I'll play around with it and hopefully make it work!
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: [MOD] Dispatch Mod

Postby Brento666 » Wed Sep 30, 2015 9:13 am

Np! I made a booboo I meant to say Carrying.i
I have taken a look in your mod and it would be a 2 line addition to yer guard script;

Code: Select all

function Create ()
 this.GetNearbyObjects ( "Guard", 30) --This statement seems useless to me--
 local guards = this.GetNearbyObjects ( "Guard", 30)
 for guard, _ in next, guards do
  if guard.Carrying.i == -1 then
   Object.NavigateTo( guard, this.Pos.x, this.Pos.y )
  end
 end
 this.Delete()
end


Also the first line "this.GetNearbyObjects ( "Guard", 30)" doesn't seem useful to me... Is it needed because your doing the stuff immediately from create? Or is it a remnant of unfinished testing or development?
NativeFighter
level1
level1
Posts: 14
Joined: Tue Sep 08, 2015 12:08 am

Re: [MOD] Dispatch Mod

Postby NativeFighter » Thu Oct 01, 2015 7:37 pm

Also the first line "this.GetNearbyObjects ( "Guard", 30)" doesn't seem useful to me... Is it needed because your doing the stuff immediately from create? Or is it a remnant of unfinished testing or development?[/quote]

First of all, you are great! Thanks to you the mod is now updated and the bug has been removed. Secondly, yes, it is my beginning in scripting for mods so I have in fact realized that this line was useless. It has been removed with the new update.
Once again, thank you so much! Your name has been marked on the credits area.

Regards,
Native.
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: [MOD] Dispatch Mod

Postby Brento666 » Thu Oct 01, 2015 11:19 pm

Nice to know I was helpful in my response! 1 more bug squashed! :D
dr.phees
level0
Posts: 6
Joined: Tue Feb 08, 2011 6:50 pm

Re: [MOD] Dispatch Mod - please add link

Postby dr.phees » Wed Oct 07, 2015 7:30 pm

I would love to use your link, but I don't use steam. Could you also provide a download link in the first post?
NativeFighter
level1
level1
Posts: 14
Joined: Tue Sep 08, 2015 12:08 am

Re: [MOD] Dispatch Mod - please add link

Postby NativeFighter » Fri Oct 09, 2015 4:58 pm

dr.phees wrote:I would love to use your link, but I don't use steam. Could you also provide a download link in the first post?


If anyone could upload it on dropbox would be good as I cannot myself (or any other sites).
dr.phees
level0
Posts: 6
Joined: Tue Feb 08, 2011 6:50 pm

Re: [MOD] Dispatch Mod

Postby dr.phees » Sun Oct 11, 2015 12:18 pm

I was going to offer you to host the file for you, but I thought, why not teach the wonders of internet:

You can hast a simple static webpage on github for free:
http://blog.teamtreehouse.com/using-git ... ur-website

Create a simple site, add a download link and, bam, you have your own website! And all the added github goodness :)

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 7 guests