Making a scripted entity free

Discussion about Mods for Prison Architect

Moderator: NBJeff

crazybmanp
level0
Posts: 5
Joined: Tue Oct 09, 2012 12:05 am

Making a scripted entity free

Postby crazybmanp » Fri Oct 23, 2015 11:24 am

I have a scripted entity that i would like to make free, but it would seem that setting the Price to zero causes it to not show up in the staff menu.

I am really new to PA modding and i can't seem to find documentation on various effects of price on the wiki or other guides.
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Making a scripted entity free

Postby Brento666 » Fri Oct 23, 2015 12:08 pm

Hi Crazy Man!
You're right in concluding anything needs a price set for it to show up in menus.. Zero wont work..

You could maybe try a very small floating point nr; like 0.00001 (don't know if that'll work, it'll probably be uglier to display in the menus than a price of 1.

So I would actually suggest either just using a (symbolic) price of 1 for your item.
Or actually set so you don't pay but receive a small amount as a subsidy, say 1000...

Wish I had a better solution for you, but don't...
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: Making a scripted entity free

Postby Trixi » Fri Oct 23, 2015 4:41 pm

Well im using a price of -1 for my dev tool, as im standing for the same problem. and i build entities, because i need something to start a script vie menu. Well, the reason why i have chosen -1 is that will also work, if you have a negative bank balance, while price of 1 blocks if you have a negative bank balance.

Yes, you can cheat you money with it, 1000$ for 1000 clicks, but well i have also an entity with a price of -100.000$ :D

i dont think that floating will work.
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: Making a scripted entity free

Postby aubergine18 » Fri Oct 23, 2015 5:24 pm

-1 is often used to represent 'none', hence same problem as 0.

In many menus 0 will work fine (eg. objects, utilities, foundations, materials), but I think staff menu in particular requires 1 or above.
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: Making a scripted entity free

Postby aubergine18 » Fri Oct 23, 2015 5:30 pm

btw, try adding a ConstructionTime setting as that sometimes makes things appear on menus
Trixi
level2
level2
Posts: 245
Joined: Wed Mar 04, 2015 9:22 am
Location: Ulm, Germany
Contact:

Re: Making a scripted entity free

Postby Trixi » Fri Oct 23, 2015 8:58 pm

aubergine18 wrote:-1 is often used to represent 'none', hence same problem as 0.


I wouldn't be surprised if this game sometime use bith to represent none :)
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: Making a scripted entity free

Postby aubergine18 » Fri Oct 23, 2015 9:04 pm

MaxStackSize is a good example of -1 and 0 being same; all Vehicle objects have a MaxStackSize of -1, even though MaxStackSize defaults to 0. Very odd stuff.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 6 guests