Jump to content

bidi1252

Member
  • Posts

    6
  • Joined

  • Last visited

Everything posted by bidi1252

  1. bidi1252

    Dungeon Events

    Could you improve the loot system a bit? With the current system it feels tricky to configure loot I'd like Min/Max support and other options so it's not only tied to a percentage-based system. And I’ll provide a simple example code that I use in my plugins I think it will help you understand better. HashSet<int> usedIndexes = new HashSet<int>(); int itemsToSpawn = UnityEngine.Random.Range(lootTable.MinItems, lootTable.MaxItems + 1); int safety = 0; while (usedIndexes.Count < itemsToSpawn && safety < 100) { safety++; foreach (var item in lootTable.Items) { if (usedIndexes.Contains(lootTable.Items.IndexOf(item))) continue; if (UnityEngine.Random.Range(0.0f, 100.0f) <= item.Chance) { Item newItem = ItemManager.CreateByName(item.ShortName, UnityEngine.Random.Range(item.MinAmount, item.MaxAmount + 1), item.SkinId); if (newItem == null) continue; if (!newItem.MoveToContainer(container)) newItem.Remove(); else { usedIndexes.Add(lootTable.Items.IndexOf(item)); if (usedIndexes.Count == itemsToSpawn) return; } } } } @Marte6
  2. bidi1252

    Shoppy Stock

    I found another possible bug, and it might be related to the following settings: "Purchase From Server - Enabled": true, "Purchase From Server - Permission (not required, if empty)": "", "Purchase From Server - Percentage Of Sold Items To Purchase": 75.0, "Purchase From Server - Minimal Purchase Price (percentage of max sell price)": 150.0, "Purchase From Server - Maximal Purchase Price (percentage of max sell price)": 250.0, In this situation, players can sometimes buy items without paying any money. It looks like the purchase price for some items isn’t being calculated correctly. For example: Sell an item to the server. Keep selling until there’s only 1 left in stock. Try to buy the same item back. The purchase price becomes 0, and players can buy it for free. There’s also an error appearing in the console, but I’m not exactly sure whether it happens during the purchase or sale process. I’ll share the relevant code and log output below. "pie.apple": { "0": { "Default Sell Amount Calculation (DSAC) (Read On Website)": 1000, "Price - Min": 120.0, "Price - Max": 125.0, "Price Parent - Shortname (ignore, if empty)": "", "Price Parent - Skin ID": 0, "Price Parent - Min Boost": 0.0, "Price Parent - Max Boost": 0.0, "Max Daily Sell Amount (-1, to disable)": 50, "Max Daily Sell Amount Permissions (permission: limit)": { "shoppystock.selllimit.1": 2000 }, "Allow Re-Purchase From Server": true, "Override Skinned Items As Unskinned (works only for configuration of skinId 0)": false } }, @ThePitereq
  3. bidi1252

    Shoppy Stock

    Update: The /sell window still doesn’t work as expected — players can still sell unlimited amounts when using /sell. Selling via the button shown in the screenshot works correctly and respects the limit. Because of this, the plugin is still not usable for me at the moment. @ThePitereq
  4. bidi1252

    Shoppy Stock

    Hello, I think I might have found a bug in the plugin, or maybe it’s not working exactly as I understood. As shown in the attached screenshot, I added a product (apple) to the stock market and left "Allow Re-Purchase From Server": true. My understanding (I could be wrong) is that when players sell X apples to the server, then other players should only be able to purchase up to that X amount. In other words, they shouldn’t be able to buy more than what has been sold to the server. However, I couldn’t get this system to work. For example, if players sell 100 apples to the server, other players are still able to buy more than 100. Also, even when I set a limit, sometimes players are able to sell more than they should. I will attach the screenshots and the JSON config file. (The config is from the default plugin settings when first installed, I only modified it to sell apples in data/st/sm/config/money.json.) Thanks! @ThePitereq "Server Sell Items (shortname : [ skinId : ItemConfig ])": { "apple": { "0": { "Default Sell Amount Calculation (DSAC) (Read On Website)": 10, "Price - Min": 0.08, "Price - Max": 0.25, "Price Parent - Shortname (ignore, if empty)": "", "Price Parent - Skin ID": 0, "Price Parent - Min Boost": 0.0, "Price Parent - Max Boost": 0.0, "Max Daily Sell Amount (-1, to disable)": 15, "Max Daily Sell Amount Permissions (permission: limit)": { "shoppystock.selllimit.1": 100 }, "Allow Re-Purchase From Server": true, "Override Skinned Items As Unskinned (works only for configuration of skinId 0)": false } } } Additionally, I noticed an issue with the limits: If players try to sell using the button shown in the screenshot, the limit works correctly and they can’t sell more than allowed. But if they use the /sell command, the limit does not apply and they can sell unlimited items.
  5. bidi1252

    Dungeon Events

    Hi there, To avoid having to patch things manually with every new version, would it be possible to add a feature for this? You've added a MaxActiveAutoSpawn config to control the maximum number of auto spawns. If it's set to 0, it becomes unlimited; and if a specific number is set, it respects that limit. Would it be possible to support a special value like -1, which would completely disable auto spawn for that specific tier? Thanks in advance! I'll include the patch below. //BIDI var availableTiers = _tierInfoMap.Keys.Where(t => t.Enabled && (t.MapName.Contains("Easy") ||t.MapName.Contains("Normal"))).ToList(); if (availableTiers.Count == 0) return null; var viable = new Dictionary<DungeonTierConfig, int>();
2m

Downloads

Total number of downloads.

9.5k

Customers

Total customers served.

138.1k

Files Sold

Total number of files sold.

2.9m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.