Auto Filling 101

Knapsack Auto Filling Configuration and Operations


Basic Understanding:

  • Based on both global and player control flags, players can dictate when items will auto-fill directly into a Knapsack when they are picked up.
  • Players DO NOT have to have Full Inventory for Auto-Filling to store items into fills.
  • Players have two options for filling their Knapsacks.
    • Set 1 or all Sacks to fill first (before player inventory is full) by setting a sack flag on each sack they want to fill first. Example: "/ks fill 2 -first". Issuing this command on sets fill number 2 (same as Knapsack2) to fill automatically whenever the player picks up items, regardless of his own inventory not being full. If the preferred method for a player is to fill a Knapsack first but only for specific items, then the player can then extend the filling first knapsack by adding filtered or preferred items. Example: "/ks fill 2 add cobble, redstone dust". Issuing this command sets fill number 2 (same as Knapsack2) to only fill first when the player picks up the items added to the fills filter (cobblestone and redstone dust in this case).
    • When a players inventory becomes completely full (100%) items will immediately start auto-filling to their defined fill-chain.
  • What is a fill chain? A Fill-Chain is the order in which a player can dictate what Knapsack fills before another Knapsack does. Additionally, players can control what items go into these Knapsacks by setting preferred items for each Knapsack. If no preferred items are defined, Knapsacks fill automatically by their natural fill-chain ordering (the order in which knapsacks were added when the fill chain was created).

    NOTE: If the server is forcing players to automatically fill first for a specific [size] Knapsack, in some cases the fill-chains natural ordering can be ignored and items are filled to first available fill sacks in the chain. Scenarios are different for everyone, depending on filters fills and how the filtered fills are ordered in the chain with the non-preferred(filtered) fill as well as if fills.


  • Filling Knapsacks:
    • You have 3 Knapsacks, (let's keep it simple and use 2 size 9's and 1 size 18). You want cobblestone and iron_ore to fill to Knapsack1(18) and dirt to fill to Knapsack2(9) and your not concerned about what goes in Knapsack3 (9). Then you decide on your filling strategies and decide to fill 3,1,2 (/ks fill add 3,1,2), (/ks fill 1 -first), (/ks fill 2 -first), (/ks fill 3 -first), (/ks fill 1 add cobblestone,iron_ore), (/ks fill 2 add dirt). You manage to fill Knapsack2 and you decide to turn off Knapsack1 for the time being so cobble and iron fill to you instead. You toggle Knapsack1 off (/ks fill 1 -t). So far you are left with 2 Knapsacks to use. However Knapsack2 is full so it will not come into play. So you fart around and now have Knapsack3 full with a bunch of spider eyes, string and whatnot... Your Knapsacks are full and your filling will be suspended and will now go to your player inventory. If you happen to transfer a few stacks of dirt from Knapsack2 to your inventory the next time you pickup dirt, it flow right back into Knapsack2 so long as you didn't change any of the flags.

    • Understanding what takes place... Before any storage takes place, items are looked at in the players inventory first. If the player has 62 pieces of cobblestone in their inventory and are about to pickup 10 more pieces. 2 pieces will go to the players inventory to complete that stack, or up to the max stack size for any specific item. Then storage begins to process filling following the guidelines below:

Before Auto-Fill initiates its determination strategies, it will look at the players inventory. If the item being picked up is current in the players inventory in an non-full state (stack qty is less then max stack size for that item), the pickup will take place to the player until that stack is full. If no, Auto-Fill looks for a preferred sack first. If it finds a sack with the item being picked up as a filtered/preferred item, it then looks at the global sack fill first setting. If that is true the fill takes place. If it's not, Auto-Fill looks at the sack level fill first (player controlled). If that is true, the fill takes place. If neither are true, no sack is determined yet. Auto-Fill then proceeds to look through the rest of the fill chain, starting with all non-preferred sacks (fills with no items filtered on them). If there are any of these sacks, it looks for the (-first) setting. If encountered, the fill takes place. Other wise determination continues through the fill chain. If auto-fill cycles through the entire fill chain without finding a preferred(filtered) sack or a non-preferred sack, nothing is filled and most likely the pickup will go to the player. However, this is all dependent on weather the players inventory is full or not. If the players inventory is full and there are no preferred(filtered) sacks found and/or non-preferred sacks, the fill takes place starting at the 1st sack in the fill chain, provided it has room, etc....

Just because you set up a fill with an item or two does not mean it fills there immediately. To ensure the items you filtered to a fill begin to store into that fill right away, use the fill sack flag "-first" (/ks fill [id] -first).

Remember: Players DO NOT have to have FULL inventories for Auto-Fill to begin it's storing strategies.
Use the SackFlags to dictate what fills are to store items first!!



An example fill chain ( 2,1,4,3 ):

KnapsackFillingFlags
2-on, -first
1cobblestone-on
4ore-on, -first
3pork-on, -first

Pickup: iron_ore - preferred fill #4 would receive the fill immediately.
Pickup: cobblestone - player receives this pickup first, unless the player was full and/or the global sack fill first setting is true for whatever size Knapsack this is.
Pickup: pork - preferred fill #3 would receive the fill immediately.
Pickup: coal - non-preferred fill #2 would receive the fill immediately
Pickup: dirt - non-preferred fill #2 would receive the fill immediately

* NOTE: If "PreferredSacks.NonPreferredPickups" is true, and you have non-preferred fills and they become full, auto-fill will attempt to fill into a preferred Knapsack over player inventory based on the (-first) flag of that preferred Knapsack. Additionally, if your preferred fills become full and you are filling first to any non-preferred fills the item will fill to the first available non-preferred fill in the chain. If there are none, the player will receive the pickup.


Updated in this build of auto-fill is the ability to use Item Numbers/Ids in conjunction with the item names when adding to your preferred fill items. Rather than having to know the exact naming convention for an item, you can simply enter "pork" and the system will try to match your entry with the closest item. In this case it would be CookedPorkchop (320:0). Another example would be "ham" matching to RawPorkchop (319:0), etc...

If you need help with Items for your Fill-Chains, use the new KS command " /ks item [item name, id or partial name] " for item matching results


By default, Filling DOES NOT take place if a player is Flying, Sprinting or Riding Animals.
These CAN be changed/enabled in the Auto-Fill Section.



Basic Configuration:

Config. Section: >> ' Config: AutoFill '

  • AutoFill:
    • Enabled: true
    • MaxSacks: 6
    • PreferredSacks:
      • NonPreferredPickups:
        • Allow: true
    • GameModeChange:
      • ExtendedMsg: true
    • Realism:
      • Flying: false
      • Sprinting: false
      • RidingAnimals: false
      • RidingMinecarts: true
      • Boats: true

"Enabled" setting is as it reads. Don't want to use Auto-Filling, set to false.
"MaxSacks" setting sets the limits for the server per player on how many Knapsacks they can add to their Auto-Fill Chain. Set this to zero(0) to allow unlimited filling sacks.
"PreferredSacks.NonPreferredPickups.allow" setting enables fills to fill non-preferred items into preferred fills when non-preferred fills become full "GameModeChange" and "ExtendedMsg" are for when game modes change and how Knapsacks displays messages to the player if needed, when enabling and disabling Auto-Fill. By default, Auto-Fill is toggled off when game mode switches out of Adventure and/or Survival Modes.
"Realism" - Control when Auto-Fill will perform a pickup. By default, flying, sprinting and riding animals is set to off or not allow filling when the player is doing these.



Knapsack Configuration:

Config. Section: >> ' Knapsacks: sack1, sack2,... '

  • AutoFillSackFirst: false

The "AutoFillSackFirst" setting is the servers global "Fill First" setting specific to EACH SIZE Knapsack (sack). Setting this to "true" will force all players knapsacks, regardless in size, to fill first for every item picked up.

  • WARNING Setting this "true" may also bypass natural fill-chain logic for filtered items because this setting is just a like a light switch, on or off. If it's on, they just fill. However, with the new auto-fill logic, auto-fill will make every attempt to fill logically for that fill attempting to abide by filters first, then non-preferred fills, taking into account the new PreferredSacks.NonPreferredPickups setting.




Creating the Auto-Fill Chain

Performed in-game by a player

  • Before any auto-filling can take place players need to add Knapsacks to their auto-fill chain
    • /ks fill add id,id,id... - where 'id' is the Knapsack Id - Not sure use: /ks list
      Note: The number of Knapsacks a player can define here is based on "MaxSacks"

Player Global Flags

Performed in-game by a player using " /ks fill [-flag_below] " To list global flags use " /ks fill -flags "

  • "-t" - Toggles ALL Auto-Filling on or off depending on its current state - Not sure use /ks fill or /ks fill -flags
  • "-nomsg" - Globally sets limiting messages for Knapsacks at the Sack Level(see Knapsack flags for clarification)
  • "-allmsg" - Globally sets all messages off for Auto-Filling

Player Knapsack Flags

Performed in-game by a player using " /ks fill [id] [-flag_below] "
To list Knapsacks flags use " /ks fill [id] -flags " -or- to see all Knapsacks, flags and filling items, use " /ks fill list "

  • "-t" - Toggles a Knapsack on or off depending on its current state.
  • "-first" - Establish this Knapsack as a potential "first" fill sack - may not always happen based on other factors for Knapsacks.
  • "-nomsg" - Disables general Storage Messages that repeat for each item as it's store. Only one message is displayed per item. So if you were picking up 10 stacks of cobblestone you would generally receive 1-2 storage messages during the pickup and store. Then if you pickup an different item in between the next store of cobblestone you will receive a storage message for that next item.
  • "-allmsg" - This will disable all message for the Knapsack it is flagged on.

Player Knapsack Preferred Items

Performed in-game by a player using " /ks fill [id] rem [item,item,...] -or- add [item,item,...]"
Not sure if you have one defined on that Knapsack you want it for? Use: " /ks fill [id] list -or- /ks fill list "
If you try to add an item for a Knapsack that already has it defined it will not matter. It will just be ignored.

  • "add item,item,item,item,.... - Add preferred items to a fill
  • "rem item,item,item,item,.... - Remove preferred items from a fill
    Quote from Example::

    You have 2 Knapsacks. 1 is size 9 and the other is size 27. You want to set up your large size sack to hold all your mining blocks and your smaller size sack to hold your mined minerals. NOTE: If the fill-chain is not created yet, use /ks fill add 1,2

    - Size 9 Sack: /ks fill 1 add coal,flint
    - Size 27 Sack: /ks fill 2 add cobblestone,coal_ore,iron_ore

    Then to mark these fills to store immediately regardless of your inventory being full, use " /ks fill 1 -first " then " /ks fill 2 -first "


Auto-Fill Commands Summary

GENERAL CMDSSACK LEVEL COMMANDSPREFERRED ITEM COMMANDS
/ks fill add [id,id,id]/ks fill [id] -t (or) -o - Toggle Knapsack[id] on/off/ks fill [id] add [item,item,item,..] - Add Pref. Item to Knapsack [id]
/ks fill remove [id,id,id]/ks fill [id] -first - Fill Knapsack[id] first/ks fill [id] rem [item,item,item,..] - Remove Pref. Item from Knapsack [id]
/ks fill removeall/ks fill [id] -nomsg - Toggle Knapsack[id] Transfer Msgs/ks fill [id] clear - Clear Knapsack[id] Preferred Items
/ks fill list/ks fill [id] -allmsg - Toggle All Knapsack[id] Fill Msgs
/ks fill [id] l -or- list (player) - List Knapsack[id] Preferred Items
/ks fill [id] -f (or) -flags - Show Knapsack[id] flags
/ks fill [id] flagsclear - Clear Knapsack[id] Flags


/ks fill d or def - List the Default Filling Methods for all Size Knapsacks

To Re-Order your fill chain and/or add fills to the chain at the same time, use " /ks fill add id,id,id,id..... ".
So for example if you have 2 Knapsacks in your current fill chain (2,1) and you craft or are given another Knapsack that you want to add to your fill-chain as the first Knapsack, you would simply use " /ks fill add 3,2,1 ". This will add the new Knapsack (3) to the fill-chain as well as set it to the first in the chain. If at some point in time you want to re-order this same fill-chain (3,2,1) again, use " /ks fill add 1,3,2 "


GLOBAL CMDS
/ks fill -t (or) -o - Toggle Auto-Fills On/Off
/ks fill -nomsg - Toggle Transfer Global Filling Msgs
/ks fill -allmsg - Toggle All Global Filling Msgs
/ks fill -flags (or) -f - Show Auto Fill Global Flags
/ks fill flagsclear - Clear Global Flags

Auto Filling Permission Nodes

PERMISSION NODEGRANTS PERMISSION TO
knapsacks.autofillAllows players to use/create Knapsack Auto Fills
knapsacks.autofill.preferredAllows players to set preferred items to their Knapsack Fills
knapsacks.autofill.flags.sacksAllows players to set flags for Knapsack Fills
knapsacks.autofill.flags.playerAllows players to set their Global Filling flags

Item / Materials Lists

Download Spreadsheet of all the Items / Materials list for quick reference



There are Images of the fills in pre-fill setup, after setting up and after storage in the Images Tab


Comments

Posts Quoted:
Reply
Clear All Quotes