[Open / Signup] One Room Round Robin 3 - Calling All Modders

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by AndakRainor »

minmay wrote:
Isaac wrote: BTW: Something in the current ORRR3 breaks this code:

Code: Select all

do
	local item = party:spawn('sack')
	local loot = party:spawn('rotten_pitroot_bread')
	item.containeritem:addItem(loot.item)
end
In a new project, this spawns a sack with rotten bread in it. In the ORRR3, this same script throws an error.
"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
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...
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.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by Isaac »

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.
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.

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.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by AndakRainor »

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!
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by akroma222 »

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 :cry:
But to say that this accident but a brake on my LoG modding enjoyment is an understatement ;)
Skuggs,
That is a horror story mate :cry: :evil:
Anything in my LoG2 resource files is at your disposal
Ive been (somewhat :lol: ) 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
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by Diarmuid »

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.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by minmay »

AndakRainor wrote:
minmay wrote:
Isaac wrote: BTW: Something in the current ORRR3 breaks this code:

Code: Select all

do
	local item = party:spawn('sack')
	local loot = party:spawn('rotten_pitroot_bread')
	item.containeritem:addItem(loot.item)
end
In a new project, this spawns a sack with rotten bread in it. In the ORRR3, this same script throws an error.
"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
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...
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.
Ah. As you might have guessed, the spell to make those enchanted containers is long gone.
Diarmuid 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.
not it
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.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by AndakRainor »

minmay wrote:Ah. As you might have guessed, the spell to make those enchanted containers is long gone.
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 though :P
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by Isaac »

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.)
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by AndakRainor »

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.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: [Open / Signup] One Room Round Robin 3 - Calling All Mod

Post by AndakRainor »

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?
Post Reply