Classic: it is a method from a script component I added to the containers definitions. So it is not initialized when you spawn it this way, as any script component. This useless code is meant to make enchanted containers that reduce the weight of their content.minmay wrote:The culprit is mod_assets/ext/spells_pack/items/containers.lua, which redefines sack and wooden_box with some useless extra overhead and also introduces this bug. I don't know why we even have that file...Isaac wrote: BTW: Something in the current ORRR3 breaks this code:In a new project, this spawns a sack with rotten bread in it. In the ORRR3, this same script throws an error.Code: Select all
do local item = party:spawn('sack') local loot = party:spawn('rotten_pitroot_bread') item.containeritem:addItem(loot.item) end
"Attempt to call method 'set' (a nil value)"
I've checked, it is not my modded copy, it is in the current project on Dropbox. #R048
[Open / Signup] One Room Round Robin 3 - Calling All Modders
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
It's a neat (even welcome) idea, but it breaks the standard method to create filled containers at runtime. While it's true that (knowing about it now) I can place the sack with contained item, via the editor, and then add that sack to a surface at runtime—to the same end as before... that's still just a workaround, not a good solution; because...again, this breaks the standard method to create filled containers at runtime.AndakRainor wrote:Classic: it is a method from a script component I added to the containers definitions. So it is not initialized when you spawn it this way, as any script component. This useless code is meant to make enchanted containers that reduce the weight of their content.
Is there a way to modify the container script to not fail on a standard call?
*I'm not suggesting to remove it if it can't be fixed, but in that case it should certainly be commented in the script that it breaks standard container behavior, and preferably include an error trap that mentions why this fails when called. If no one is actually using containers at runtime, then it's not actively causing a problem... but (hopefully) people will be using the ORRR3 project file as a resource later on, and they at least need to know about this change, and its imposed limitation.
Last edited by Isaac on Fri Aug 18, 2017 4:56 pm, edited 1 time in total.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
No problem, in any case I still have to update the spell pack for ORRR3. I just delayed it endlessly, because frankly I though the project was dead!
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
Skuggs,Skuggasveinn wrote:Isaac wrote: Some months ago I was replacing a hard drive in my computer, I was going to clone the drive and f***ed up in a major way, I cloned the empty new one over the wrong one, not even the one I was going to replace.
In that process I nuked EVERYTHING regarding to Log modding, all my models, textures, music, dungeons I was working on etc etc
But to say that this accident but a brake on my LoG modding enjoyment is an understatement
That is a horror story mate
Anything in my LoG2 resource files is at your disposal
Ive been (somewhat ) vigilant with archiving most of the scripts / asset packs the community has produced
I also have my own work (to be published v soon)
Let me know if I can help with recouping any content
Akroma
Labyrinth of Lies (viewtopic.php?f=14&t=4400)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Legacy of Lies (viewtopic.php?f=22&t=12983&hilit=+legacy)
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
Man Skuggs, that's a sad story indeed... I have lost data already as well, now I back up everything at maximum weekly, and duplicate most important things in the cloud as well, in case of fire/theft.
As for the ORRR3, I have already done that "finalization" process for the ORRR2 (like Skuggs did for ORRR1) so I'd rather give someone else the "chance" this time... lol. Also I have played a lot less with the LoG2 modding system than some of you around.
I'd be happy to help with testing however, when something approaches beta is ready, whoever does it.
As for the ORRR3, I have already done that "finalization" process for the ORRR2 (like Skuggs did for ORRR1) so I'd rather give someone else the "chance" this time... lol. Also I have played a lot less with the LoG2 modding system than some of you around.
I'd be happy to help with testing however, when something approaches beta is ready, whoever does it.
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
Ah. As you might have guessed, the spell to make those enchanted containers is long gone.AndakRainor wrote:Classic: it is a method from a script component I added to the containers definitions. So it is not initialized when you spawn it this way, as any script component. This useless code is meant to make enchanted containers that reduce the weight of their content.minmay wrote:The culprit is mod_assets/ext/spells_pack/items/containers.lua, which redefines sack and wooden_box with some useless extra overhead and also introduces this bug. I don't know why we even have that file...Isaac wrote: BTW: Something in the current ORRR3 breaks this code:In a new project, this spawns a sack with rotten bread in it. In the ORRR3, this same script throws an error.Code: Select all
do local item = party:spawn('sack') local loot = party:spawn('rotten_pitroot_bread') item.containeritem:addItem(loot.item) end
"Attempt to call method 'set' (a nil value)"
I've checked, it is not my modded copy, it is in the current project on Dropbox. #R048
not itDiarmuid wrote:As for the ORRR3, I have already done that "finalization" process for the ORRR2 (like Skuggs did for ORRR1) so I'd rather give someone else the "chance" this time... lol.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
True. But if I remember I have placed one weight reducing container as a reward in my room... And never thought about spawning containers with scripts, I just never do this and don't really see it as important. But I will fix this the next time I get the files. At the current speed of the mod development, I think I have years to do it thoughminmay wrote:Ah. As you might have guessed, the spell to make those enchanted containers is long gone.
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
Spawning with scripts —aside from being a standard feature, is also the only way to create a container filled with items that one doesn't know in advance. (The container might have randomized ~or selective~ loot; the container might or might not have a key... if the party has already found one.)
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
Spawning uninitialized script components with scripts is also a standard feature
If you need it, you can remove the file (and its import reference) for your work version.
If you need it, you can remove the file (and its import reference) for your work version.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod
So the container spawning bug you reported Isaac is fixed for the next version of the spell pack and Magic of Grimrock (version 3.2). As I said in the spells pack thread, I will upload the version this WE, then I will work on updating the very old version of the pack in ORRR3. Is it okay with you if I do it on the last version shared online or do you want to send me your files instead?