Search found 1825 matches
- Tue Feb 17, 2015 4:09 pm
- Forum: Modding
- Topic: A small question about getting lua libraries and such
- Replies: 7
- Views: 1590
Re: A small question about getting lua libraries and such
The reason we did this is because we could see situations where malicious mods could be distributed to a large number of people. The game would then run the mod, and bad things could happen. We chose to be cautious and disable everything, rather than guess what would be needed and allow some things ...
- Thu Feb 05, 2015 10:38 am
- Forum: Modding
- Topic: Object not spawning
- Replies: 16
- Views: 2027
Re: Object not spawning
As seronis said, you're end statements aren't matched up. This is hard to see in your code due to the indentation levels not matching up. One problem I see straight away is you have 3 if statements following each other, and then only 1 end statement. if count > 10.0 then if currentStock > 0.0 then i...
- Thu Jan 08, 2015 8:46 am
- Forum: Modding
- Topic: (Table expected, got number)
- Replies: 6
- Views: 759
Re: (Table expected, got number)
Without seeing any context to the currentStock and allBottles code, we can't really help you. The lua_function_list.txt says the following for the return type of Object.GetProperty() Returns: The value of the property on the named object, or nil I'm guessing that currentStock is a value you are assi...
- Tue Jan 06, 2015 9:49 am
- Forum: Modding
- Topic: Water need HELP
- Replies: 11
- Views: 1218
Re: Water need HELP
The AutoOrder is the name of a flag you can give an object in the materials.txt. An example is shown in the Vegetable Garden Mod that Gary made. The VegetableSeeds object AutoOrders some Compost as well.
- Mon Jan 05, 2015 8:04 am
- Forum: Modding
- Topic: Water need HELP
- Replies: 11
- Views: 1218
Re: Water need HELP
Without seeing any code from your mod, it's hard to tell. That sai the mod system is still in heavy development and can't access a lot of the game logic. The game code itself imports ingredients for use in the kitchen. The Vegetable Patch mod shows that the ingredients just get put in stacks and use...
- Sun Dec 28, 2014 8:39 pm
- Forum: Modding
- Topic: What is the scope enforcement on lua files in PA?
- Replies: 8
- Views: 1465
Re: What is the scope enforcement on lua files in PA?
At the moment, each scripted object has it's own lua state, which parses the lua script file of the scripted object. And nothing else. We've disabled a lot of the core libraries in order to avoid malicious mods being downloaded to people's systems. We're currently taking a very zealous approach. If ...
- Wed Dec 24, 2014 8:07 pm
- Forum: Modding
- Topic: How do I get mods for a non-steam version of PA?
- Replies: 8
- Views: 39325
Re: How do I get mods for a non-steam version of PA?
A fun way is to subscribe to the mods you want, launch the Steam version, let it download and unpack everything for you, close it, and then launch the non-Steam version.
- Tue Dec 16, 2014 3:26 pm
- Forum: Modding
- Topic: [Help]Using Lua for mods
- Replies: 5
- Views: 1376
Re: [Help]Using Lua for mods
The Object.Sound() function works with a sound object name and a sound event name, both of which are defined in your sounds.txt file. For example Object.Sound( "Bed", "Place" ) will play the bed placement sound. There isn't much (though there is some) documentation on the modding...
- Mon Dec 15, 2014 1:23 pm
- Forum: Modding
- Topic: [Help]Using Lua for mods
- Replies: 5
- Views: 1376
Re: [Help]Using Lua for mods
To do what you're asking with the guards, you merely need to do the following: ⋅ Use Object.GetNearbyObjects() to find all nearby prisoners in a certain radius. ⋅ Go over the returned list of prisoners and determine if you want to damage them (such as using the guard's orientatio...
- Mon Dec 08, 2014 1:58 pm
- Forum: Modding
- Topic: [MOD DISCONTINUED] The PA Mods Compilation
- Replies: 20
- Views: 5395
Re: The PA Mods Compilation
Why not just make a collection of all the mods? That way, people can still subscribe to a single item, but everything gets updated whenever the original author makes a change.
- Thu Dec 04, 2014 5:44 pm
- Forum: Modding
- Topic: {Help} Mod not showing up in mods list
- Replies: 6
- Views: 2192
Re: {Help} Mod not showing up in mods list
JASPer.Gamer.9.0 wrote:That wouldn't change anything. "Safe Mode" just disables enabling mods, not seeing mods.
Safe mode completely disables the mod system. Mods aren't even enumerated by the game in safe mode, so they won't show up in the list.
- Thu Nov 27, 2014 9:19 pm
- Forum: Modding
- Topic: Object.Leave the map
- Replies: 5
- Views: 1067
Re: Object.Leave the map
In Lua, just writing Pos.x will make it think that you are trying to access a value for a key called "x" in the "Pos" table. Your code should look something like if Object.GetProperty( objectName, "Pos.x" ) == x then Object.Delete( objectName ) end Where objectName is &...
- Thu Nov 20, 2014 2:59 pm
- Forum: Modding
- Topic: question for sensors
- Replies: 4
- Views: 1053
Re: question for sensors
As you said, it would work in the same way as the misconduct sensor. You'd use the GetNearbyObjects function to find any close by "Fire" objects, then, if you found any, find all close by prisoners, and then tell them to NavigateTo somewhere safe. For the doors, again, find all nearby door...
- Wed Nov 12, 2014 9:11 am
- Forum: Modding
- Topic: [Tutorial] sprites.png sizing
- Replies: 21
- Views: 24211
Re: [Tutorial] sprites.png sizing
Ah, I understand now. Yes, good point.
- Tue Nov 11, 2014 8:50 am
- Forum: Modding
- Topic: [Tutorial] sprites.png sizing
- Replies: 21
- Views: 24211
Re: [Tutorial] sprites.png sizing
This is an excellent and informative post. I would say don't worry about keeping them square. In your third example you show a sprite.png that is 512x256. If the mod doesn't need to use the extra space, then making it square would double the size of the sprite and waste space. The packing algorithm ...
