Page 3 of 9
Re: Upcoming feature : Mod support
Posted: Sun Dec 08, 2013 8:21 pm
by Smodd
Roomon1 wrote:I suspect you're looking for the Objective calls, as seen here:
Code: Select all
Objective.Create ( "DeathRow_BuildOuterDoor" )
Objective.TargetZone ( 19, 47, 20, 47 )
Objective.RequireObjects ( "JailDoorLarge", 1 )
It looks to me like the game knows how to build various objects. This means that by calling Objective.RequireObjects with the objects you want, the game will automatically make the proper buttons flash.
Does that do the trick?
-Roomon1
Nope it doesn't do the trick.
First line: Creates the objective called DeathRow_Build_OuterDoor which you can name in the base-language.txt under the string objective_DeathRow_Build_OuterDoor
Second line: Creates a glowing targetzone on the Map between the coordinates 19/47 and 20/47
Third line: Shows the game that one large jaildoor is needed in the targetzone. Also it let the string "JailDoorLarge" appear in the zone
Re: Upcoming feature : Mod support
Posted: Mon Dec 09, 2013 3:09 am
by Roomon1
Smodd wrote:Nope it doesn't do the trick.
Really? That's curious, since it seems to do the trick for me. Here's what I've done. Hopefully you'll find the difference between that and what you're doing.
First, I added a new objective to function DeathRow_Intro():
Code: Select all
-- Roomon1: Removed unmodified starting code for brevity
-- Build jail door entrance
Game.AdviserSay ( "Ceo", "adviser_deathrow_buildinside1" )
Game.AdviserSay ( "Ceo", "adviser_deathrow_buildinside2" )
Objective.Create ( "DeathRow_BuildOuterDoor" )
Objective.TargetZone ( 19, 47, 20, 47 )
Objective.RequireObjects ( "JailDoorLarge", 1 )
-- Roomon1: Added this line and the next 3
Objective.Create ( "DeathRow_BuildExtraDoor" )
Objective.TargetZone ( 19, 49, 19, 49 )
Objective.RequireObjects ( "JailDoor", 1 )
Trigger.Create ( "DeathRow_BuildInternalWalls" );
Trigger.RequireObjective( "DeathRow_Building" )
Trigger.RequireObjective( "DeathRow_BuildOuterDoor" )
-- Roomon1: Added this line and the following one
Trigger.RequireObjective( "DeathRow_BuildExtraDoor" )
-- Roomon1: Removed unmodified ending code for brevityThose changes ad a zone that needs a Jail Door just below the main building, as shown in this clipped screenshot:

(
http://imgur.com/8sOE0FD).
It also caused the Jail Door button to flash, as shown in this other clipped screenshot:

(
http://imgur.com/mqojCto]).
It also added the door to the objectives listed, though I should note that the objective list did not show reasonable text. Instead, it showed "objective_DeathRow_BuildExtraDoor". I believe that fixing this would require adding a string to the language file, though I have yet to test that. I would expect placing a line like this in the language/base-language.txt file (or the one for your mod) to do the trick:
Code: Select all
objective_deathrow_buildextradoor Build an extra, useless Jail Door
Re: Upcoming feature : Mod support
Posted: Sat Dec 14, 2013 1:40 pm
by Smodd
Sorry I was away for some days, but anyway it doesn't work for me. I don't find a mistake in my code?! Perhaps you do...
Code: Select all
function PATC01_staffroom()
Game.CamMove ( 13, 2, 44, 21, 2, true )
Game.AdviserSay ( "Warden", "PATC01_warden_staffroom_01" )
Game.AdviserSay ( "Warden", "PATC01_warden_staffroom_02" )
Objective.Create ( "PATC01_staffroom_foundations" )
Objective.TargetZone ( 23, 2, 33, 8 )
Objective.RequireBuilding ( false )
Objective.Create ( "PATC01_staffroom_staffdoor" )
Objective.TargetZone ( 28, 8, 28, 8 )
Objective.RequireObjects ( "StaffDoor", 1 )
Trigger.Create ( "PATC01_staffroom_walls" )
Trigger.RequireObjective ( "PATC01_staffroom_foundations" )
Trigger.RequireObjective ( "PATC01_staffroom_staffdoor" )
end
Re: Upcoming feature : Mod support
Posted: Mon Dec 16, 2013 10:36 am
by mschol
is it possible to add a new menu item (for example a new room) with the current modding system?
Re: Upcoming feature : Mod support
Posted: Mon Dec 16, 2013 10:58 am
by elDiablo
What do you mean "a new menu item"? In the main menu, not really... While the layouts of the main menus are data driven, the functionality is not. In game... not really either (for the same reason). You might be able to add items into the construction menus, but I doubt it would work...
Re: Upcoming feature : Mod support
Posted: Mon Dec 16, 2013 2:53 pm
by elDiablo
Just so everyone else knows, it isn't currently possible to highlight items in the build menu with the scripting system. I will look into adding this.
Cheers
elDiablo
Smodd wrote:Well if you want to support mods i've got a very very basic request:
Please give a introduktion (for example a .pdf) for the strings/commands programmed in in LUA. I looked up all of the .lua files I could find and got a lot of those things worked out... but to work out every single command is more than nervewrecking! If I'm thinking about "Game.CamMove ( A, B, C, D, E, true/false)" I could become a lunatic 'cause this bloddy thing is zooming crazily illogical for me.

Also what I searched for over an hour:
In "Deathrow" you have to place a foundation and a jaildoor. After the CEO stoped talking the buttons for "Foundations" and "Objects" as well as the "Large Jail Door" is flashing. Where the hell is this in the code? I can't find it
Code: Select all
function DeathRow_Intro()
Game.AdviserIncoming ("Ceo")
Game.CamMove ( 48, 15, 85, 38, 0, true )
Game.CamMove ( 48, 24, 85, 46, 30, false )
Game.AdviserSayBatch ( "Ceo", "adviser_deathrowintro" )
Game.CamMove ( 0, 31, 41, 57, 5, true )
Game.AdviserSay ( "Ceo", "adviser_deathrowintrob_1" )
Game.AdviserSay ( "Ceo", "adviser_deathrowintrob_2" )
Objective.Create ( "DeathRow_Building" )
Objective.TargetZone ( 12, 34, 23, 47 )
Objective.RequireBuilding ( false )
Game.AdviserSay ( "Ceo", "adviser_deathrowintrob_3" )
Game.AdviserSay ( "Ceo", "adviser_deathrow_buildinside1" )
Game.AdviserSay ( "Ceo", "adviser_deathrow_buildinside2" )
Objective.Create ( "DeathRow_BuildOuterDoor" )
Objective.TargetZone ( 19, 47, 20, 47 )
Objective.RequireObjects ( "JailDoorLarge", 1 )
Trigger.Create ( "DeathRow_BuildInternalWalls" );
Trigger.RequireObjective( "DeathRow_Building" )
Trigger.RequireObjective( "DeathRow_BuildOuterDoor" )
Objective.Create ( "DeathRowy_BuildFoundations" )
Objective.TargetZone ( 22, 46, 23, 47 )
Objective.RequireBuilding ( true )
Objective.SetFlags ( false, true )
Trigger.Create ( "DeathRow_ExplainFoundations" )
Trigger.RequireObjective ( "DeathRow_BuildFoundations" )
end
Please let there be a small guide on an pdf or something like this!
Re: Upcoming feature : Mod support
Posted: Tue Dec 17, 2013 6:23 pm
by Smodd
It is somehow possible to lock some Systems or Objects/Menu Points?
Re: Upcoming feature : Mod support
Posted: Wed Dec 18, 2013 1:45 am
by mschol
elDiablo wrote:What do you mean "a new menu item"? In the main menu, not really... While the layouts of the main menus are data driven, the functionality is not. In game... not really either (for the same reason). You might be able to add items into the construction menus, but I doubt it would work...
i meant adding an item to, for example, the rooms construction menu, (for, obviously, adding a new room)
adding an button seems possible in the code, but the function it should call seems to be locked away in the binary, and that makes it probably impossible for the time being (who knows what the future will bring

)
Re: Upcoming feature : Mod support
Posted: Wed Dec 18, 2013 1:30 pm
by Meeeps
Hello, sorry for crossposing, but since this thread got the most attention by modder or mod devs, I try to clarify the legal issue here:
viewtopic.php?f=43&t=46456, so my pending qustion is how do you inform IV about mods?
Re: Upcoming feature : Mod support
Posted: Thu Dec 19, 2013 6:09 pm
by Smodd
Why do you want to inform them about mods?
2. Restrictions.
You are not entitled to and must not:
[...]
create data or executable programs which mimic data or functionality in the Game except in the case of Permitted Modding;
If they implement Mod Support, why should it be not permitted?^^
EDIT: Oh sorry I missunderstood you. You meant the "Permitted Modding" to monetise something... well I wouldn't do that, but good luck^^
Re: Upcoming feature : Mod support
Posted: Thu Dec 19, 2013 11:30 pm
by Meeeps
No, I meant this:
The Prison Architect End User License Agreement wrote:If you want to make your Mods available to the Game community please let INTROVERSION know. Any Mods you create from scratch belong to you but any Mods that use INTROVERSION code or assets will belong to INTROVERSION
Edit: It is mainly about distributing...
(There is rarely any mod which does not belong to this category.)
Re: Upcoming feature : Mod support
Posted: Fri Dec 27, 2013 6:46 pm
by Smodd
Guys are you serious? You deleted all of my local files, after I uploaded it?

Also the Upload seems to have only uploaded the folders and no data... so my data is gone and on Steam is nothing?

Re: Upcoming feature : Mod support
Posted: Fri Dec 27, 2013 6:49 pm
by MiriW
Yeah, it didnt really work for me either, but thankfully I had an extra elsewhere :s
Re: Upcoming feature : Mod support
Posted: Fri Dec 27, 2013 6:52 pm
by Smodd
Well I have also a backup, but not from the last version, but this is (sorry) bullshit!
Re: Upcoming feature : Mod support
Posted: Fri Dec 27, 2013 6:55 pm
by Master-Guy
Didn't you upload it somewhere? You can try downloading it from there again.
As far as I see my upload went without any problems, but when selecting it in the workshop, it does not download :S
Edit: Just saw that the item on the Steam workshop is only 42kb, while the directory of my translation is 7mb..