2 items

File information

Last updated

Original upload

Created by

Tugakit

Uploaded by

Ryebread4

Virus scan

Safe to use

Tags for this mod

About this mod

Reupload of version 1.2.0 & 1.4.0 backpack mod by tugakit from before the trojan announcement. - original upload date around 3/30/25

Share
Requirements
Permissions and credits
UPDATE - Uploaded version 1.4.0 with saving functionality

BACKPACK ITEMS DO NOT SAVE IN VERSION 1.2.0
REMOVE THEM BEFORE EXITING



Hey, I saw the backpack mod was compromised and I wanted to reupload version 1.2.0 incase anyone wasn't able to download it before that happened. Tugakit uploaded their code to GitHub around 3/30/25 and I grabbed it planning on adding to it by making it purchasable in the hardware stores and making custom size backpacks for different price points. I never got around to it as I was working on other mods requested by a few members in the community (Dan After Hours & Instant Delivery/No Debt) Along with a purchasable manor mod (Including the ability to build I am still trying to get working).

I do have the original dll file for the increased stack mod before the trojan also but will not be uploading it since I don't have the source code to verify its safe. Plus there are other increase stack mods already uploaded so its not completely gone.

Tugakit noted in the mod description that they were either 'not going to update the mod' or 'if anyone wants to help update the mod'. I can't remember which one it was but that is how i got the GitHub code

its a very simple code so you can read it here. If you don't trust my dll file, you can take this code and compile it yourself in visual studio or whatever IDE you use.


using MelonLoader;
using System;
using UnityEngine;
using UnityEngine.SceneManagement;
using Il2CppScheduleOne.Storage;
using System.Collections.Generic;
using Il2CppScheduleOne.UI;
using Il2CppScheduleOne.Persistence;
using Il2CppScheduleOne.ItemFramework;
[assembly: MelonInfo(typeof(Backpacks.BackpackMod), "BackpackMod", "1.2.0", "Ryebread4", null)]
[assembly: MelonGame("TVGS", "Schedule I")]
namespace Backpacks
{
    public class BackpackMod : MelonMod
    {
        private const int ROWS = 4;
        private const int COLUMNS = 3;
        private const KeyCode TOGGLE_KEY = KeyCode.B;
        private StorageEntity backpackEntity;
        private bool isInitialized = false;
        public override void OnInitializeMelon()
        {
            MelonLogger.Msg("BackpackMod initialized.");
            MelonLogger.Error("--WARNING--", 5f);
            MelonLogger.Error("Items in this backpack will be LOST when you exit the game or the save!", 5f);
        }
        public override void OnSceneWasLoaded(int buildIndex, string sceneName)
        {
            // Only set up the backpack in the "Main" scene.
            if (sceneName != "Main")
            {
                // If we already had a backpack, disable it so it won't break in the menu.
                if (backpackEntity != null)
                    backpackEntity.gameObject.SetActive(false);
                MelonLogger.Msg($"Scene '{sceneName}' detected. Backpack is disabled in non-gameplay scenes.");
                return;
            }
            MelonCoroutines.Start(SetupBackpack());
        }
        private System.Collections.IEnumerator SetupBackpack()
        {
            yield return new WaitForSeconds(1f);
            try
            {
                var templates = UnityEngine.Object.FindObjectsOfType<StorageEntity>();
                if (templates == null || templates.Length == 0)
                {
                    MelonLogger.Error("No StorageEntity template found in scene!");
                    yield break;
                }
                backpackEntity = UnityEngine.Object.Instantiate(templates[0]);
                backpackEntity.name = "BackpackStorage";
                backpackEntity.StorageEntityName = "Backpack";
                backpackEntity.SlotCount = ROWS * COLUMNS;
                backpackEntity.DisplayRowCount = COLUMNS;
                backpackEntity.MaxAccessDistance = 999f;
                backpackEntity.AccessSettings = StorageEntity.EAccessSettings.Full;
                var slots = new Il2CppSystem.Collections.Generic.List<ItemSlot>();
                for (int i = 0; i < ROWS * COLUMNS; i++)
                    slots.Add(new ItemSlot());
                backpackEntity.ItemSlots = slots;
                isInitialized = true;
                MelonLogger.Msg($"Backpack setup complete with {ROWS * COLUMNS} slots.");
            }
            catch (Exception ex)
            {
                MelonLogger.Error("Error setting up backpack: " + ex.Message);
            }
        }
        public override void OnUpdate()
        {
            // Only allow toggling in the "Main" scene.
            if (SceneManager.GetActiveScene().name != "Main")
                return;
            if (!isInitialized)
                return;
            if (Input.GetKeyDown(TOGGLE_KEY))
            {
                try
                {
                    if (backpackEntity.IsOpened)
                        backpackEntity.Close();
                    else
                        backpackEntity.Open();
                }
                catch (Exception ex)
                {
                    MelonLogger.Error("Error toggling backpack: " + ex.Message);
                }
            }
        }
    }
}