Jump to content

Recommended Posts

So I have recently come up with a new idea: how to go about disabling a certain slot during a particular condition (a certain level of sanity, for example), and then enabling it again once a different condition has been met. I'm just not sure how to go about doing this, I've been looking into inventorybar.lua, equippable.lua, and equipslot.lua, but I have been unable to find anything there on how to make this happen.

  • Developer

So I have recently come up with a new idea: how to go about disabling a certain slot during a particular condition (a certain level of sanity, for example), and then enabling it again once a different condition has been met. I'm just not sure how to go about doing this, I've been looking into inventorybar.lua, equippable.lua, and equipslot.lua, but I have been unable to find anything there on how to make this happen.

The game doesn't currently have the concept of disabled inventory slots.  If you were to add this, I'd suggest adding the idea of a disabled slot to 'inventory.lua' and then change the way the slot is visiualized in 'inventorybar.lua'.  Hope that helps.

The game doesn't currently have the concept of disabled inventory slots.  If you were to add this, I'd suggest adding the idea of a disabled slot to 'inventory.lua' and then change the way the slot is visiualized in 'inventorybar.lua'.  Hope that helps.

 

I have not looked into inventory but aren't body/head/weapon basically inventory slots that require a certain type to be able to equip into those slot? So you could make more of them but with requirements that can't be met effectively making them disabled. Sounds like it should work, not sure how you would do it per say but I have seen mods with new slots like a backback and amulet slot so I know its possible.

I have not looked into inventory but aren't body/head/weapon basically inventory slots that require a certain type to be able to equip into those slot? So you could make more of them but with requirements that can't be met effectively making them disabled. Sounds like it should work, not sure how you would do it per say but I have seen mods with new slots like a backback and amulet slot so I know its possible.

Basically what I want to do is to disable the body slot. I'm just not sure if it would be easier to take away that slot, or to make 'body slot' items unable to be equipped. Either way, I still have to figure out how to go about doing so.

Basically what I want to do is to disable the body slot. I'm just not sure if it would be easier to take away that slot, or to make 'body slot' items unable to be equipped. Either way, I still have to figure out how to go about doing so.

Look around at mods one give allot of extra slots as well as giving an amulet ab backpack slot that likely will show you where to start

Look around at mods one give allot of extra slots as well as giving an amulet ab backpack slot that likely will show you where to start

Okay, so in this mod, I found this text:

 

function inventorypostinit(component,inst)
inst.components.inventory.numequipslots = 5
end
 
Now, I think this is what I've gotta change, just, I'm not exactly sure what the code would look like? Do I have to do this in modmain.lua, since said mod was made in modmain? And also, how would I go about choosing which mod is taken away?
 
I'm not expecting you to know the answers to these questions, I'm just brainstorming here.
 
Thanks for the reply.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...