Modding Prison Architect

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

silvernightnl
level0
Posts: 3
Joined: Thu Jun 20, 2013 7:58 am

Re: Modding Prison Architect

Postby silvernightnl » Fri Aug 29, 2014 10:13 pm

So I was working on my Spirituality mod (the most used one of the two, although I'm listed as contributor on both), and I was wondering: can I change the effect drugs have on the prisoners? Because I've been over all the files, but I haven't found anything yet. Am I missing anything?
User avatar
Emmote
level0
Posts: 6
Joined: Wed Jun 12, 2013 11:33 am

Re: Modding Prison Architect

Postby Emmote » Sat Aug 30, 2014 4:03 pm

Is the RemoteDoor property of only being unlocked via the door control an actual modable property?

I want to add more doors with that property, but if it's still hardcoded then I won't be able to do what I need.

It doesn't seem to say anything from it's default materials.

Code: Select all

BEGIN Object     
    Name                 RemoteDoor
    ConstructionTime     20.00000 
    Toughness            300.000 
    Teleportable         true 
    Price                -500 
    RenderDepth          2 
    Group                StaticObject 
    BlockedBy            StaticObject 
    BlockedBy            UtilityStation 
    Sprite               RemoteDoor
    MadeOf               SolidMetal 
    Properties           StaticObject
    Properties           Door
END
JulesCain
level1
level1
Posts: 11
Joined: Fri Nov 02, 2012 7:02 pm

Re: Modding Prison Architect

Postby JulesCain » Sat Aug 30, 2014 5:42 pm

Well, i´m glad new modding options have been added and the way to modify the game is more comfortable, BUT there is still a HUGE lack of a described API-Documentation. Without a documentation of functions, parameters, object ..and so on, we will never be able to mod the game in full potential, just doing it in try-and-error and hopefully find some functionnames, objectnames and so an which are working.

I know, there exist some "Lists" of Names and Objects, but it is far far far away of complete and good documentation a programmer/modder needs for scripting or programming.

This wouldnt be any problem in this special case of a beta-release, but why ..whyyy...are the developers published a new mod functionality and didn´t give us a good documentation? Yes, now we are able to add items, add..add add..modify existing stuff..modify modify..but CANT use LUA scripting in its full potential!

Anyway, it would be helpful to specify:
- What can i modify now?
- What will i be able to modify in the future?
- What i will never be able to modify?
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: Modding Prison Architect

Postby xander » Sat Aug 30, 2014 8:09 pm

JulesCain wrote:but why ..whyyy...are the developers published a new mod functionality and didn´t give us a good documentation?

An obvious, if possibly wrong, explanation would be that they have internal tools for developing campaigns and scenarios, and that they cleaned those up a little and released them to us as part of the last alpha release. Additionally, IV is a small company and good documentation takes time which could otherwise be spent working on the game. Finally, it may seem reasonable to assume that the community can do most of the work of developing documentation---the interface really isn't that complicated and trial-and-error will get you a lot of milage. (Note that these are listed in decreasing order of "acceptability", just to be clear---I am not trying to make excuses for IV; I'm only trying to answer your question.)

xander
JulesCain
level1
level1
Posts: 11
Joined: Fri Nov 02, 2012 7:02 pm

Re: Modding Prison Architect

Postby JulesCain » Sat Aug 30, 2014 8:50 pm

I would totaly agree, if they had not spend that much time of the new Alpha-Video explaining the new mod "feature". Its like.."here,we have a totaly cool new mod feature, we dont tell you exactly what you can do with it, but thats cool, because you knew anyway never exactly how to use it."
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: Modding Prison Architect

Postby xander » Sun Aug 31, 2014 12:43 am

JulesCain wrote:I would totaly agree, if they had not spend that much time of the new Alpha-Video explaining the new mod "feature". Its like.."here,we have a totaly cool new mod feature, we dont tell you exactly what you can do with it, but thats cool, because you knew anyway never exactly how to use it."

One of the things that the videos are supposed to do is gin up excitement about the new release. What is going to do that better: "Here is an amazing new feature that we implemented!" or "We are releasing some internal dev tools, but they are pretty incomplete and arcane"? I would also note that you only addressed the first of my three /possible/ reasons why such a tool would be released without documentation, and I only listed three off the top of my head---I'm sure that there are others.

At the end of the day, you can choose to accept that IV released modding tools with little documentation (for whatever reasons) or not. You could politely ask for better documentation, but whinging about it is unlikely to get anything accomplished (and, even then, better documentation may never be forthcoming).

I also want to expand upon point (3) from above: the tools aren't that hard to use, and IV have a history of expecting the community to figure things out on their own. Look at Uplink and Darwinia, for example. Both were moddable, but it required a lot of trial-and-error and reverse engineering to get anything to work. This fits well with the hacker culture that has existed around IV's games. The lack of documentation is almost a feature (not a bug).

xander
User avatar
Pruvan
level2
level2
Posts: 94
Joined: Mon May 27, 2013 4:11 am

Re: Modding Prison Architect

Postby Pruvan » Sun Aug 31, 2014 12:48 am

Chris wrote:There's a document packed into main.dat called lua_function_list.txt, which has some basic help on the new functions. We will try to provide more help (and more script commands) with each coming alpha.


Quoted for relevance.
andesite
level0
Posts: 3
Joined: Thu Oct 11, 2012 9:04 pm

Re: Modding Prison Architect

Postby andesite » Sun Aug 31, 2014 1:07 am

Where can I get the example garden mod as a non Steam user? I want to try modding a bit myself but need the example to start with.

Thanks!
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: Modding Prison Architect

Postby xander » Sun Aug 31, 2014 2:52 am

andesite wrote:Where can I get the example garden mod as a non Steam user? I want to try modding a bit myself but need the example to start with.

Thanks!

A quick Googling seems to indicate that this website might do the trick.

xander
User avatar
koshensky
level3
level3
Posts: 407
Joined: Tue Dec 27, 2011 7:57 pm
Location: Cornwall

Re: Modding Prison Architect

Postby koshensky » Sun Aug 31, 2014 11:30 am

xander wrote:
andesite wrote:Where can I get the example garden mod as a non Steam user? I want to try modding a bit myself but need the example to start with.

Thanks!

A quick Googling seems to indicate that this website might do the trick.

xander


That's a pretty nifty site. Whilst you could certainly google and rummage through the steam workshop website to find it, the URL for the mod is thus:

Code: Select all

http://steamcommunity.com/sharedfiles/filedetails/?id=307279338
User avatar
Fishbus
level0
Posts: 6
Joined: Mon Jul 22, 2013 4:12 pm

Re: Modding Prison Architect

Postby Fishbus » Fri Sep 05, 2014 12:39 am

Hi folks,

I wanted to ask a couple of questions in regards to the cool new modding options available to us.

Firstly, great work guys, this has opened the floodgates, but of course you mentioned there's still lots of other cool things to add.

Anyway, here are my dilemmas:

1) Is there a way to add more than 2 needs interactions on the same provider object?
- Currently, I want to make a new toilet, which is cheap and a bit manky. So it would be great to be able to have a "PrimaryNeed" of Bowels, a "SecondaryNeed" for Bladder and then a third need for decreasing Hygiene.
Is there currently a way to add more - like a "TertiaryNeed"? (or instead making Need1 Need2 Need3 Need[n] etc.). Just something to keep in mind if objects in the future affect more than 2 needs at once.

2) Can objects that worsen needs (e.g. Environment filth) highlight the text and need red instead of green. It's a little cosmetic thing I know but it would help players to recognise at a glance whether something is being positively or negatively influence rather than "just being influenced in some way keep on watching to find out if it's good or not!".

3)Lastly, can you override existing objects? Can I make a bed in my mod, named as the same as the existing default bed in the base game and override the properties (e.g. price, etc).

Thanks! And again, great work.
User avatar
Fishbus
level0
Posts: 6
Joined: Mon Jul 22, 2013 4:12 pm

Re: Modding Prison Architect

Postby Fishbus » Fri Sep 05, 2014 11:58 am

Fishbus wrote:Hi folks,

I wanted to ask a couple of questions in regards to the cool new modding options available to us.

Firstly, great work guys, this has opened the floodgates, but of course you mentioned there's still lots of other cool things to add.

Anyway, here are my dilemmas:

1) Is there a way to add more than 2 needs interactions on the same provider object?
- Currently, I want to make a new toilet, which is cheap and a bit manky. So it would be great to be able to have a "PrimaryNeed" of Bowels, a "SecondaryNeed" for Bladder and then a third need for decreasing Hygiene.
Is there currently a way to add more - like a "TertiaryNeed"? (or instead making Need1 Need2 Need3 Need[n] etc.). Just something to keep in mind if objects in the future affect more than 2 needs at once.

2) Can objects that worsen needs (e.g. Environment filth) highlight the text and need red instead of green. It's a little cosmetic thing I know but it would help players to recognise at a glance whether something is being positively or negatively influence rather than "just being influenced in some way keep on watching to find out if it's good or not!".

3)Lastly, can you override existing objects? Can I make a bed in my mod, named as the same as the existing default bed in the base game and override the properties (e.g. price, etc).

Thanks! And again, great work.


Ok, I've gone ahead and done some field testing.

1) Using "TertiaryNeed" seems to work, I may be safe in assuming there's a *Need wildcard detecting going on. Which is super great.

2) This is just a request, but the request still stands :)

3) Overriding works just fine.

So on to some new issues:

4) So far there's properties to state if something uses "electricity", or needs to be "wired". There's no "water" property yet even though there's hints of it elsewhere in the base files.

5) I made a new shower object. No water spray comes out of it, Perhaps there may be a property down the line.

6) Creating categories - Since I'm creating a new shower head, it would be nice to make room requirements such as a shower need any kind of shower, not just specifically the ShowerHead object. If there's something that will allow me to create a new property or make room require any object that fulfills the category property would be brill.

7) Beds and their markers/orientations - I'm still scratching my head over this, but still no dice. So far RotateType defines how the sprites will rotate through the sprites in your sprite.png. Seems straightforward enough. Markers seems to define where on sprite1 the object/prisoners interact. However, the bed has 4 rotation (3 unique sprites) and I can only seem to define the first sprite marker. The other indexes seem to apply to different objects/actions (e.g. relax or storage placement for equipment/stacks etc.) So what I'm left with is the prisoner aligned correctly on the default orientation, but the other 3 they are all over the place. How do I go about defining these?

That's all I got for now! Cheers again!
User avatar
Fishbus
level0
Posts: 6
Joined: Mon Jul 22, 2013 4:12 pm

Re: Modding Prison Architect

Postby Fishbus » Thu Sep 11, 2014 12:34 pm

Hey,

Another thing I've come across, I'm trying to make a new kind of guard. Unfortunately in my endevours this doesn't work as applying the line to the staff object :

Code: Select all

Properties        Guard

will cause the game to crash when the staff is placed in your prison. Removing this line makes the game work, the staff purchasable but end up doing nothing.

Any help would be appreciated!
mazetar
level2
level2
Posts: 141
Joined: Mon Feb 11, 2013 12:14 am

Re: Modding Prison Architect

Postby mazetar » Thu Sep 11, 2014 1:31 pm

Without reading the crash log I wouldn't be able to help you out more than suggesting you re-check your inputs :)
This may be better dealt with in the PA->Modding section of the forum though.

Looking at Modding Quickstart Guide on the wiki tells me that "Guard" marks entity as a guard.
Did you remember to mark the object as an entity/living being first? That might be the problem? (Just guessing btw!)

After looking into the properties and such it seems like some stuff are just frame work for next month.
It's a nightmare to change a system from using static lists into being flexible and expandable, these things soak time like nothing else.
I'd assume (hope) that water and other properties gets added and fixed then :)

6) Are there any rooms in the game that asks for either object X or object Y? I don't recall if the staff room can have any sofa but I don't think so.
If it can, then look into the definition for that room and you will have your answer :)
User avatar
Fishbus
level0
Posts: 6
Joined: Mon Jul 22, 2013 4:12 pm

Re: Modding Prison Architect

Postby Fishbus » Thu Sep 11, 2014 6:40 pm

mazetar wrote:Without reading the crash log I wouldn't be able to help you out more than suggesting you re-check your inputs :)
This may be better dealt with in the PA->Modding section of the forum though.

Looking at Modding Quickstart Guide on the wiki tells me that "Guard" marks entity as a guard.
Did you remember to mark the object as an entity/living being first? That might be the problem? (Just guessing btw!)

After looking into the properties and such it seems like some stuff are just frame work for next month.
It's a nightmare to change a system from using static lists into being flexible and expandable, these things soak time like nothing else.
I'd assume (hope) that water and other properties gets added and fixed then :)

6) Are there any rooms in the game that asks for either object X or object Y? I don't recall if the staff room can have any sofa but I don't think so.
If it can, then look into the definition for that room and you will have your answer :)


I've spent a bunch of time on this now and I'm now realizing there's a lot of non working cases.

I created a new staff, who is required to do research. Although I've hooked it all up correctly it doesn't work.(the base game files have a lot of the data driven stuff in place, although you have to cross your fingers and hope it's not a placeholder and actually works)

Urgh it's kinda getting pretty frustrating now. I'm even unsure whether commenting works or breaks things as well. For the most part I know my stuff (I work in this area) and I'm just winding down doing a little fun work with a PA mod since it came out.

I guess I'll leave it to next month, but I'm just bringing this stuff up because you never know if it's a known or not to the Introversion fellas and I don't want to risk waiting for another month because I assumed wrongly :)

It sounds like there's a lot of similar cases happening within the mod thread so I'm sure a lot of the issues are visible now. I'm just throwing my 2 cents into the mix as well.

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 4 guests