Jump to content

0xF

Creator
  • Posts

    709
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by 0xF

  1. Version 2.1.2

    2,284 downloads

    This library allows developers to create their own ItemDefinitions, which will allow them to create custom items with their own unique values. What is an ItemDefinition created with the library? It is a full-fledged ItemDefinition just like the other ones created by Rust developers, a new item definition is created based on an existing one with modified settings. It has its own shortname and itemid, and can also have its own itemMods created by the developer, which is very convenient. You can use the give command, item.info.[anything], and any other way you want. A simple example of item creation: using Oxide.Core.Plugins; using System; using System.Collections.Generic; namespace Oxide.Plugins { [Info("CIDLibraryDemo", "0xF", "0.0.0")] partial class CIDLibraryDemo : RustPlugin { [PluginReference] private Plugin CustomItemDefinitions; public static CIDLibraryDemo Instance; private static readonly ItemDefinition PARENT_DEFINITION = ItemManager.FindItemDefinition("longsword"); void Init() { Instance = this; } void OnServerInitialized(bool initial) { CheckCID(); } void OnCIDLoaded(Plugin library = null) { CustomItemDefinitions ??= library; RegisterItems(); } private void CheckCID() { if (CustomItemDefinitions == null) throw new Exception("The library CustomItemDefinitions not installed or loaded. Please download it from https://codefling.com/extensions/custom-item-definitions"); if (CustomItemDefinitions.Version.Major < 2) throw new Exception("The version of the CustomItemDefinitions library being used is outdated for use by this plugin. Use version 2.* or higher."); } private void RegisterItems() { CheckCID(); CustomItemDefinitions.Call<ItemDefinition>("Register", new { // Not all available fields are listed here. // You can view all available fields by looking at the CustomItemDefinition class in the library. shortname = "test.demoitem", parentItemId = PARENT_DEFINITION.itemid, maxStackSize = 1, category = ItemCategory.Weapon, defaultName = "Name for an item with multilingual support", // autogenerate from string OR new Translate.Phrase("some_token_for_name", "english-version") defaultDescription = "Description for an item with multilingual support", // autogenerate from string OR new Translate.Phrase("some_token_for_desc", "english-version") defaultSkinId = 2973264769, staticOwnerships = new List<(Translate.Phrase label, Translate.Phrase text)> { new ("TEST 1", "Test 1 ToolTip"), // OR new (new Translate.Phrase("lang_static_ownership_label_1", "TEST 1"), new Translate.Phrase("lang_static_ownership_text_1", "Test 1 ToolTip")) new ("TEST 2", "Test 2 ToolTip"), }, itemMods = new ItemMod[] { PARENT_DEFINITION.GetComponent<ItemModEntity>(), // This modifier is responsible for the sword's Held Entity and is present in the parent, but you can create your own. new ItemModTest() { onItemCreatedLogMessage = "Custom item created with ID: {0}" } } }, this); } private class ItemModTest : ItemMod { public string onItemCreatedLogMessage; public override void ModInit() { base.ModInit(); CIDLibraryDemo.Instance.Puts("ModInit"); } public override void OnItemCreated(Item item) { base.OnItemCreated(item); if (!string.IsNullOrEmpty(onItemCreatedLogMessage)) CIDLibraryDemo.Instance.Puts(string.Format(onItemCreatedLogMessage, item.uid)); } // Used when a player is attacked for an item with the ItemModWearable mod when ItemModWearable.ProtectsArea(). // Not applicable to the item in the example, only mentioned for illustrative purposes. // There are other methods of overriding. public override void OnAttacked(Item item, HitInfo info) { base.OnAttacked(item, info); CIDLibraryDemo.Instance.Puts(string.Format("OnAttacked | Item ID: {0}", item.uid)); } } } } What are some things to keep in mind? Follow the example; The author will not do your work for you; learn how items and mods work. You can start here: wiki.facepunch.com You must take care to register unique shortname. ItemId should never be changed in your plugin, as items created with an old itemId will break if they don't have their definition. After your plugin is unloaded, all items created with your item definitions will lose interaction, as all ItemMods will be removed. This is done for safety, don't worry, after loading the plugin back in, all items will work again as before. CustomItemDefinition class structure: public class CustomItemDefinition : Pool.IPooled { public int parentItemId; // required public string shortname; // required public int? itemId; public Translate.Phrase defaultName; public Translate.Phrase defaultDescription; public ulong defaultSkinId; public int? maxStackSize; public ItemCategory? category; public ItemDefinition.Flag flags; public ItemMod[] itemMods; // required public bool repairable; public bool craftable; public List<ItemAmount> blueprintIngredients; public int workbenchLevelRequired; public List<(Translate.Phrase label, Translate.Phrase text)> staticOwnerships; } ItemMods details: ItemMods are overwritten, this means the new item definition will not include the itemMods of the parent. If you need to import an item mod from the parent, you can use PARENT_DEFINITION.GetComponent<ItemModWhatYouNeed>() if you need to import everything ItemMods PARENT_DEFINITION.itemMods Custom itemMods are added using the method of creating a new class, i.e. new YourItemMod() Here you can also specify the fields you want, example: new YourItemMod() { field: value } Quick answers to questions: Items have become coal, what does that mean? This is a fallback ItemDefinition in case the plugin providing this item is no longer available. The items will be restored if the plugin is returned. Will there be a video? No, it's library. Where can I learn more about this? Disassembling and self-study. Explore the workings of ItemDefinition and their mods on your own. Here's a little overview on items from Facepunch: https://wiki.facepunch.com/rust/Items_Overview
    Free
  2. 0xF

    Sortify

    Hello, in my plugin the sorting is done in a different way, optimized and without removing items
  3. 0xF

    Explosive Chest

    Hello, thank you for your interest in the plugin, this plugin has no particular purpose, just a plugin for fun, but I'm glad you found it useful.
  4. 0xF

    Admin Map

    Hello, just released an update, in it work has been done on the agreed topics, also updated the list of permissions and their designation in the description if you still need it
  5. 0xF

    Admin Map

    Yes, this applies to moderators as well, I think it should be limited to owner level only or removed altogether. I think I'll delete it, I'll do it soon.
  6. 0xF

    Admin Map

    Yes, the description is outdated, that's my fault, I'll fix it. I will now respond to your messages: 1. Yes, it is because you have auth level 2. It says so in the first video in the description, right after the first paragraph in the first seconds. 2. No, you can't remove the panel and it's not because I can't or I'm too stupid to realize that it would be a good idea to add it to the MAP. This is a limitation of the CUI, I will not go into details, if you are interested in the details - you can familiarize yourself with it. 3. No, you don't have to read all the patchnotes, but if you are really interested in the plugin, you can do it, all the patchnotes for the history of the plugin are available and they are made to be read.
  7. 0xF

    Error: Unkown command: viewinv

    Changed Status from Closed to Not a Bug
  8. 0xF

    Error: Unkown command: viewinv

    Changed Status from Pending to Closed
  9. 0xF

    Admin Map

    Teleport by marker are present in this plugin, no need for an additional one. For this you need to press Ctrl and press RMB at the point you want to teleport to. About merging into 1 plugin, that doesn't make sense. If you just take 2 plugins and merge it will not give you optimization because the code is written the same. Also it is more difficult to determine where the fault is in case of plugin breakage and if the plugin is one, you can not unload something separately, but only all together and lastly if the plugin breaks, it will break the same whether it is 1, or 10 separately, the only difference is how fast the developer will update it.
  10. 0xF

    Admin Map

    Hello, no nothing like that will be added to this plugin, because this plugin represents exactly the map. I don't see anything wrong with plugins being separate, even if you combine several plugins into one it won't become more optimized.
  11. 0xF

    Map Marker Bug

    Changed Status from Pending to Closed Changed Fixed In to 1.2.7
  12. 0xF

    Sortify

    Hello, yes, this was the case in version 1.0.0, in version 1.0.0 sorting was only done by category and items were moved in random order of their category. In version 1.0.3 items are sorted more consistently, as a different sorting scheme [category name -> rarity -> shortname -> amount] has been implemented. Sorry for the long reply, didn't have a chance to reply in the discussions
  13. 0xF

    Sortify

    Hello, thank you for your suggestions. 1. It will not be implemented as it deviates from the original idea, what you described is a funnel plugin, my plugin is for sorting and filtering containers. 2. You can change icons of custom categories
  14. 0xF

    Map Marker Bug

    Hello, this has been fixed in the version for discord server members. I'm going to release it soon, if you don't want to wait you can get it in discord.
  15. 0xF

    Problem with the plugin

    Sorry for the long reply, I don't get any alerts for support requests
  16. 0xF

    Problem with the plugin

    Changed Status from Pending to Not a Bug
  17. 0xF

    Problem with the plugin

    Hello, you must have the time format specified, there should be no numbers, go back to the default configuration and see what it should be like
  18. 0xF

    Sortify

    Version 1.0.8

    545 downloads

    Introducing Sortify, the best plugin for making it easy to sort and filter boxes and containers from various plugins, all without the need for complex integrations. Sortify offers an intuitive solution to easily categorize your items, all within an elegant and efficient Rust-style user interface. Key Features: Custom Categories: With Sortify, you can create and customize your own categories to suit your unique needs. Rust style user interface: The plugin has a minimalistic and aesthetic Rust style user interface. Ease of Use: Sortify is designed with ease of use in mind. Whether you're a beginner or an experienced user, you'll find Sortify incredibly easy to use. It does not require complex training or any action on the part of the player, which allows the player to immediately begin organizing elements effectively. Permissions: sortify.allow - permission to use the plugin Video at moment version 1.0.0 (after the sorting scheme was changed, see gif):
    $15.00
  19. 0xF

    Timed Permissions In Statusbar

    Changed Status from Pending to Closed
  20. 0xF

    Timed Permissions In Statusbar

    Glad it worked for you, I will really appreciate your review, thanks If you have any questions, you can message me in discord, I can't answer here anywhere but support requests.
  21. 0xF

    Timed Permissions In Statusbar

    I think the reason is that you have granted the timedpermissionsinstatusbar.hide permission on the group, this permission is not meant to be granted, this permission is used to switch the visibility of the player, so please try to remove all places where you set this permission
  22. 0xF

    Timed Permissions In Statusbar

    One more question: was the group given by the temporary permissions plugin or just?
  23. 0xF

    Timed Permissions In Statusbar

    Hello, I will ask you some questions that may be the reason: is the group name specified correctly? Is this plugin running after CustomStatusFramework? Is the Timedpermissions plugin installed together with IQPermissions? If you set the game language to English, will you have statuses displayed? Please answer these questions, maybe your case falls under one of them.
  24. 0xF

    Players not showing on map

    Changed Status from Pending to Closed
  25. 0xF

    Sale in Vedding Machine Bug

    Changed Status from Pending to Closed
2.1m

Downloads

Total number of downloads.

9.8k

Customers

Total customers served.

142.3k

Files Sold

Total number of files sold.

3m

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.