Defining new container sizes.

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!
Post Reply
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Defining new container sizes.

Post by cameronC »

Looking at the scripting reference, the ContainerItem component has getCapacity but no setCapacity function. The capacity of the container is defined by the containerType, which just seems to have "sack" (9 slots) or "chest" (16 slots) as the only options I can find (Defining anything else gives us no slots when the item is opened).

Does anyone have any idea on how to define new containerTypes and the amount of slots they have? For instance, a containeritem with 2 or 4 slots?
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: Defining new container sizes.

Post by cromcrom »

I would love something like that too :-)
A trip of a thousand leagues starts with a step.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Defining new container sizes.

Post by akroma222 »

Isnt there a pellet ammo box that can be opened the same way a sack/box can?
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: Defining new container sizes.

Post by cameronC »

akroma222 wrote:Isnt there a pellet ammo box that can be opened the same way a sack/box can?
There is pellet_box, but that is just ammo and not a container. sack has 9 slots and containerType "sack" and wooden_box has 16 with containerType "chest". Those aer all I can find in the editor, at least.
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Defining new container sizes.

Post by akroma222 »

Ahh I see, I know mortar, sack and chest were the only container types in LoG1
And the mortar has been redone so its not really a container like the others now....
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

Re: Defining new container sizes.

Post by Grimfan »

akroma222 wrote:Ahh I see, I know mortar, sack and chest were the only container types in LoG1
And the mortar has been redone so its not really a container like the others now....
Which of course creates its own question. How to create an object like the mortar (like Germanny's toolbox)?
Post Reply