1. Hello everyone! how to initialize the player to give him the recipe such as Kalashnikov? If for example the name of the player, "Dev", or ID 1111111

    Code:
      void OnPlayerInit(BasePlayer player)
    {}
     
  2. Something like this:
    Code:
            void OnPlayerInit(BasePlayer player)
            {
                var gameObjectArray = FileSystem.LoadAll<GameObject>("Assets/Items/");
                var itemDefinitions = (gameObjectArray.Select(x => x.GetComponent<ItemDefinition>()).Where(x => x != null)).ToList();            player.blueprints.Learn(itemDefinitions.First(def => def.shortname == "shotgun_waterpipe"));
                player.blueprints.Learn(itemDefinitions.First(def => def.shortname == "lock.code"));
            }
     
  3. Thx! Where to see the names of items?
     
  4. Wulf

    Wulf Community Admin

  5. You can use .displayName for the long name, otherwise itemConfig mod exposes them or rusty has a list too.. Or just make a temp command in your mod to dump them.
     
  6. Wulf

    Wulf Community Admin

    Or use the existing documented lists. ;)
     
  7. Thanks for that, didn't even know that existed I was looking at the doc menu on here and never could find that list.
     
  8. Wulf

    Wulf Community Admin

    I added it last night actually, but originally Mughisi had a Google Sheet with it.