# PC Box Methods

LazyNPCs lets you query PC Box sizes, and lets you resize them quickly via Molang. This is great for NPCs that sell extra PC boxes, etc etc.

### Precursor: How do PCs work in Cobblemon?

A PC is a store of Pokemon. In Cobblemon, there's two types of store: Party Store (with 6 slots), and the PC Store.  A PC Store is made up of Boxes, which each store 30 Pokemon. By default, a PC has 30 boxes - you can change the default box amount in the Cobblemon config. A PC Store also has an "overflow buffer", where Pokemon are sent if the PC box count is reduced. When adding new boxes, Pokemon are sucked out of the overflow buffer and are made accessible again to the player.

A PC also has a "box count lock". When a PC is loaded, it is resized to the value in the config. So if you started a server with the default 30 box PCs in the Cobblemon config, and then changed that to 50, whenever a player logs in their PC is resized. That's great, but if you want to change a specific players box count... you don't want it being reset to the config!

That's where the lock comes in. LazyNPCs automatically sets the lock when resizing. This stops the default config from overriding the player's PC size. However, this has consequences - if you change the config to be larger than the player's current box count, and they've ever resized, it'll stay locked. This is not a problem for the majority of people, as they'll use LazyNPCs as a money sink for player's to expand their PCs with.

{% hint style="warning" %}
**Be careful DOWN sizing the Player's PC!**

If a player has 50 PC Boxes, and all are full, and you resize down to 30, 20 boxes of Pokemon will be sent to the "overflow" storage. They'll only be viewable to the player if you re-add those 20 boxes. Not a major problem, but something to watch out for! LazyNPCs requires you to set a variable in order to downsize to avoid accidentally doing this.
{% endhint %}

### q.player.pc\_size()

This method returns the amount of boxes the player's PC currently has.

### q.player.resize\_pc(new\_size: Double, allow\_decrease: Boolean \[default False])

This will resize the player's PC to the new box count. By default, the allow\_decrease field, which decides whether a resize can DECREASE a player's total box count, is set to false and can be ignored. If you want to decrease sizes, you must set this to true.&#x20;
