Modding Help: SubObjective not displaying correctly

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

Moderator: NBJeff

Staxed
level0
Posts: 4
Joined: Sat Nov 30, 2013 12:12 am

Modding Help: SubObjective not displaying correctly

Postby Staxed » Sat Nov 30, 2013 3:28 pm

I'm just messing around with create a new grant before I get into more serious mod making for the game (loving the game so far, just got it yesterday).

However, for some reason the sub objective for my simple grant is showing the actual variable name instead of the description. I've checked everything about 100 times and I don't see anything wrong, so I was hoping maybe someone else might notice something? I modeled it after the FirstCellBlock Grant that comes with the default game.

This is what is happening, notice the Sub Objective under the Loan in the Todo list. All of the other phrases seem to be working just fine.

Image

base-language.txt

Code: Select all

objective_grant_loansmall               Loan: $25,000 + $2000 interest
objective_grant_loansmall_description      The First Architect Bank would like to give you $25,000 to help get you started.  Of course, we expect $27,000 in return.
objective_grant_loansmall_payback         27,000 due after 20 prisoner capacity

grants.lua

Code: Select all

function CreateGrants()

   CreateSmallLoanGrant();
   
end

function CreateSmallLoanGrant()

   Objective.CreateGrant         ( "Grant_LoanSmall", 25000, -27000 )
   
   Objective.CreateGrant         ( "Grant_LoanSmall_Payback", 0, 0 )
   Objective.SetParent            ( "Grant_LoanSmall" )
   Objective.RequireRoomsAvailable   ( "Cell", 20 )

end
ascdren
level1
level1
Posts: 19
Joined: Sun Oct 21, 2012 6:11 pm

Re: Modding Help: SubObjective not displaying correctly

Postby ascdren » Sat Nov 30, 2013 6:54 pm

having looked at the scenario mod they made as a tutorial the same thing happens with there version.

I can't see anyway of fixing it at the moment but i'm going to fiddle with a few things and see if i can get it to work
Staxed
level0
Posts: 4
Joined: Sat Nov 30, 2013 12:12 am

Re: Modding Help: SubObjective not displaying correctly

Postby Staxed » Sat Nov 30, 2013 9:55 pm

I downloaded one of the other grants mods that was updated to alpha 15 and it seems to be working just fine though, even checked against that one and still can't see any errors in my code.
RGeezy911
level5
level5
Posts: 1098
Joined: Fri Aug 09, 2013 7:21 pm

Re: Modding Help: SubObjective not displaying correctly

Postby RGeezy911 » Sun Dec 01, 2013 5:35 am

I think I've figured it out. Right after the objective's description, start a new empty line. For example:

Code: Select all

objective_grant_testing_this     My test description...

objective_grant_potato     A Potato Grant
objective_grant_potato_description     My second grant, and a description for it.
objective_grant_potato_peels     My second grant's objective, and a description for it.

...


Notice the line break between "My test description..." and the next grant.

Hope this helps!

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 2 guests