Grants objective not displaying?

Discussion about Mods for Prison Architect

Moderator: NBJeff

toepferj
level0
Posts: 5
Joined: Sun Nov 08, 2015 7:28 am

Grants objective not displaying?

Postby toepferj » Sun Nov 08, 2015 8:09 pm

I am trying to learn how to add grants to a mod. I have the mod folder the manifest.txt thumbnail data folder grants.lua language folder with base-language.txt and the name and description of the grant shows up but not the objective! This is the code for grants.lua:
function CreateGrants()

CreateSandboxGrant();

end

function CreateSandboxGrant()

Objective.CreateGrant ( "Grant_Sandbox", 100000000, 0 )

Objective.CreateGrant ( "Grant_Sandbox_Deliveries", 0, 0 )
Objective.SetParent ( "Grant_Sandbox" )
Objective.RequireRoom ( "Deliveries", true )

end

this is the base-languages.txt:

objective_Grant_Sandbox Sandbox - The name.
objective_Grant_Sandbox_Description This will give you $100,000,000. - The description.
objective_Grant_Sandbox_Deliveries Build a deliveries zone - This will show up in the todo

thanks for helping but im really confused I even created different names for the grants and objectives but nothing works!
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Grants objective not displaying?

Postby Brento666 » Sun Nov 08, 2015 10:34 pm

Perhaps...

Code: Select all

function CreateGrants()

   CreateSandboxGrant();
   
end

function CreateSandboxGrant()

   Objective.CreateGrant         ( "Grant_Sandbox", 100000000, 0 )
   --set a prereq
Objective.SetPreRequisite       ( "Completed", "Grant_bootstraps", 0 )
   Objective.CreateGrant         ( "Grant_Sandbox_Deliveries", 0, 0 )   
   Objective.SetParent            ( "Grant_Sandbox" )
   Objective.RequireRoom         ( "Deliveries", true )
   --else try another room? deliveries isn't a real one maybe?
end
Might help?
toepferj
level0
Posts: 5
Joined: Sun Nov 08, 2015 7:28 am

Re: Grants objective not displaying?

Postby toepferj » Mon Nov 09, 2015 1:05 am

Brento666 wrote:Perhaps...

Code: Select all

function CreateGrants()

   CreateSandboxGrant();
   
end

function CreateSandboxGrant()

   Objective.CreateGrant         ( "Grant_Sandbox", 100000000, 0 )
   --set a prereq
Objective.SetPreRequisite       ( "Completed", "Grant_bootstraps", 0 )
   Objective.CreateGrant         ( "Grant_Sandbox_Deliveries", 0, 0 )   
   Objective.SetParent            ( "Grant_Sandbox" )
   Objective.RequireRoom         ( "Deliveries", true )
   --else try another room? deliveries isn't a real one maybe?
end
Might help?

Perhaps It was not very clear. The grant itself works but just does not show the objective I wrote.
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: Grants objective not displaying?

Postby Brento666 » Mon Nov 09, 2015 6:57 am

It looks ok to me two, but trying another room for sport to see if it changes things would be a thing to try... I am bettin deliveries isn't seen as valid somehow.
-If changing it doesn't get the objective to show, that's at least something to you can eliminate...
toepferj
level0
Posts: 5
Joined: Sun Nov 08, 2015 7:28 am

Re: Grants objective not displaying?

Postby toepferj » Mon Nov 09, 2015 8:18 pm

Brento666 wrote:It looks ok to me two, but trying another room for sport to see if it changes things would be a thing to try... I am bettin deliveries isn't seen as valid somehow.
-If changing it doesn't get the objective to show, that's at least something to you can eliminate...

As I stated, I have also done other rooms. Under [Objectives] it says the whole objective.grant thing. Sorry I'm new to modding and their are no tutorials.

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 6 guests