Can new NPC types be created, and/or allegiances be set?

Discussion about Mods for Prison Architect

Moderator: NBJeff

Observer
level0
Posts: 7
Joined: Wed Oct 28, 2015 1:13 am

Can new NPC types be created, and/or allegiances be set?

Postby Observer » Thu Nov 19, 2015 8:35 am

I'm doing some thinking aloud to myself concerning a possible scenario down the road, and am wondering how restrictive the code currently is regarding editing NPC behavioral flags.

What I would like to do is run a script on a fixed object that causes passing NPC's in a certain radius to switch HostileTo and FriendlyTo settings (apologies if I'm using incorrect terminology; I haven't looked through the code yet). Specifically, causing a guard to change their sprite before going berserk and attacking anything around them, like a prisoner would do. Other guards would have to render the guard unconscious to remove the berserk state (and require a if:then statement to keep the guards from killing them).

Can the game engine recognize new NPC types at this time (and subsequent "delete npc_guard from world at x,y, replace with npc_guard_berserk to world at x,y" instructions), or is it possible to make these behavioral and sprite edits on the fly?

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

Re: Can new NPC types be created, and/or allegiances be set?

Postby Brento666 » Fri Nov 20, 2015 2:46 pm

Getting guards to attack each other isn't possible; you'd have to temporarily replace the guard with a 'faux' prisoner to do that. Prisoners are build from different sprites (separate colored in clothes and a randomized head). Thus it would be difficult to spawn in a 'crazed-guard-looking' prisoner...

Maybe a future update will add possibilities to set 'crooked'/crazy guards and others hostile to them;
->Atm it would be crazy complicated to do and probably take allot of script(!)

If you want/need badly; add a request to 'Mantis'; the bug/mod-feature monitoring tool ... Your idea might be picked up by Introversion.
http://login.introversion.co.uk/?group=136292&;back=http%3a%2f%2fbugs.introversion.co.uk%2flogin_page.php

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 6 guests