Search the Community

Showing results for tags 'api'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Hot Lava
    • [Hot Lava] - General Discussion
    • [Hot Lava] - Suggestions and Feedback
    • [Hot Lava] - Bug Tracker
    • [Hot Lava] - Strats and Records
    • [Hot Lava] - Developer Log
    • Hot Lava Latest Update
  • Griftlands
    • [Griftlands Early Access] - General Discussion
    • [Griftlands Early Access] - Suggestions and Feedback
    • [Griftlands Early Access] - Localization
    • [Griftlands Early Access] - Bug Tracker
    • [Griftlands Early Access] - Developer log
  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Mods and Tools
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included] Art, Music & Lore
    • Community Challenges
    • [Oxygen Not Included] - Latest Content Update
    • [Oxygen Not Included] - Latest Animated Short
  • Don't Starve Together
    • Don't Starve Together FAQ
    • [Don't Starve Together] Developer log
    • [Don't Starve Together] General Discussion
    • [Don't Starve Together] Return of Them
    • [Don't Starve Together] PS4
    • [Don't Starve Together] Xbox One
    • [Don't Starve Together] Bug Tracker
    • [Don't Starve Together] Trading
    • [Don't Starve Together] Server Bulletin
    • [Don't Starve Together] Dedicated Server Discussion
    • [Don't Starve Together] Mods and Tools
    • [Don't Starve Together] Tales of Life and Death
    • [DS + DST] Art, Music and Lore
    • [Don't Starve Together] Suggestions and Feedback
    • [Don't Starve Together] The Forge
    • [Don't Starve Together] The Gorge
    • [Archived Bugs]
  • Don't Starve
    • Don't Starve FAQ
    • [Don't Starve: Pocket Edition] iOS / Android
    • [Don't Starve] General Discussion
    • [Don't Starve] Mods and tools
    • [Don't Starve] Art, Music & Lore
    • [Don't Starve] Suggestions and Feedback
    • [Don't Starve] Videos
    • [Don't Starve] Bug Tracker
    • [Don't Starve] Trading
    • [Don't Starve] Testing Discussion (archive)
  • Klei Entertainment Games
  • Other Stuff

Categories

  • Don't Starve
    • Custom Character and Skins
    • Game Modifications
    • Language Packs
    • Modding Tools, Tutorials & Examples
    • Custom Maps

Categories

  • Oxygen Not Included
  • Griftlands - [Early Access]
  • Don't Starve: Hamlet
  • Don't Starve: Hamlet Early Access
  • Don't Starve Together
  • Don't Starve Together: Return of Them
  • Don't Starve Together: The Gorge
  • Don't Starve Together: The Forge
  • Don't Starve Together: The Forge (Archive)
  • [Don't Starve Together] PS4
  • [Don't Starve Together] Xbox One
  • Don't Starve: Shipwrecked
  • Don't Starve: Shipwrecked [archive]
  • [Don't Starve Together] PS4 (archive)
  • [iOS] Don't Starve: Shipwrecked
  • Don't Starve: Hamlet Closed Beta (ARCHIVE)

Categories

  • Oxygen Not Included
  • Griftlands - [Early Access]
  • Hot Lava
  • Don't Starve Together
  • [PS4] Don't Starve Together
  • [Xbox One] Don't Starve Together
  • Don't Starve: Hamlet
  • Don't Starve: Shipwrecked

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End



Biography


Location


Interests


Occupation


Favorite Game


Modder


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Klei Featured Artist


Early Supporter


Early Supporter


Don't Starve


Don't Starve Together

Found 7 results

  1. Version 1.0.2

    109 downloads

    This is the API for making your own skins for modded items. Guide on how to do it is here:
  2. DISCLAIMER: This guide is for modded items only. Klei prohibited creating custom skins for official items, and this library won't be able to add them. Hey everyone! Since I haven't found up-to-date and easy to use library for creating custom skins for items, I decided to make my own one and share it with you I used @Kzisor / Ysovuka's library as a base for mine. 1. Installation First of all, you'll need to download the library from here: Then, you'll need to put it in your mod's folder. I'll be using path scripts/libs/skins_api.lua. After that, you'll need to include this library for your mod. Add this line into your modmain: modimport("scripts/libs/skins_api.lua") All set! The library is installed, and we can actually add our skins. 2. Making custom skin prefab Unlike Klei's skins, modded skins use different prefabs for every skin. So, you can different properties for every skin! They even can have different functionality. So, you have 2 options: Make a separate prefabs file for skins (or each skin) Make prefab's skins directly in the base prefab's file. To register your skin you'll need to use CreateModPrefabSkin(name, properties) function, where name is a string with the name of your skin, and properties is a table. For example: CreateModPrefabSkin("dummy_formal", { assets = { Asset("ANIM", "anim/dummy_formal.zip"), }, base_prefab = "dummy", fn = formal, rarity = "Timeless", reskinable = true, build_name_override = "dummy_formal", type = "item", skin_tags = { }, release_group = 0, }) Assets: a table of assets for your skin; base_prefab: Prefab of the items you're making a skin for. fn: Prefab's constructor. Acts like a regular prefab constructor. rarity: Your item's rarity. reskinable: Will your item be reskinable using the Clean Sweeper. build_name_override: The build of the skin. The rest of the properties is only used by Klei, so it's better to just keep them unchanged. If you're confused about the Fn, here's an example: Let's say that you want to make a skin for something similar to a carrot. You have a constructor function: local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.AnimState:SetBank("carrot") inst.AnimState:SetBuild("carrot") inst.AnimState:PlayAnimation("planted") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("pickable") inst.components.pickable:SetUp("carrot", 10) inst.components.pickable.onpickedfn = onpicked return inst end To make a skin you'll need to create a new constructor like this: local function carrot_skin() local inst = fn() inst.AnimState:SetBuild("skinned_carrot_build") return inst end Here we create a default carrot (using fn()), and then apply some changes to it (change the carrot's build). After that, we'll need to return our skin, just like a regular prefab. At the end of the file you need to put: return Prefab("carrot", fn, assets), CreateModPrefabSkin("dummy_formal", { assets = { Asset("ANIM", "anim/skinned_carrot.zip"), }, base_prefab = "carrot", fn = carrot_skin, -- This is our constructor! rarity = "Timeless", reskinable = true, build_name_override = "skinned_carrot", type = "item", skin_tags = { }, release_group = 0, }) 3. Updating the recipe and adding strings After creating your skins' prefab, you'll need to update your recipe too. After you've added your item's recipe with AddRecipe, you'll need to call MadeRecipeSkinnable(recipe_name, atlas_data), where recipe_name is the name of your recipe, and atlas_data is a table, containing info about your skin's inventory image. MadeRecipeSkinnable("dummy", { dummy_formal = { atlas = "images/inventoryimages/dummy.xml", image = "dummy_formal.tex", }, }) The second argument is the table. Here you'll add atlas and image of the skin. Here, dummy_formal is the name of the skin, the atlas is a path to .xml file, and the image is the name of the texture. After that, you'll need to name your skin, using STRINGS.SKIN_NAMES table. Is works just like adding names to regular prefabs, but the name of the prefab has to be lowercased. STRINGS.SKIN_NAMES.dummy_formal = "Formal dummy" All set! Your modded item now should have its own skin. 4. Applying skins on placers. If your item is a structure and has a placer, you'll want to apply a skin to its placer too. To do it, you'll need to modify your MakePlacer, to make it look like this: MakePlacer("dummy_placer", "dummy", "dummy", "anim", nil, nil, nil, nil, nil, nil, placer) placer here is a custom function that'll be applying the skin itself. If should look like this: local function placer(inst) inst.ApplySkin = function(inst, skin) if skin == "dummy_formal" then inst.AnimState:SetBuild("dummy_formal") end end end Here placer function adds ApplySkin function. The skin argument is the name of the skin for the item. In this example, we check if the skin is dummy_formal, and apply custom build for a placer if it's true. That's all you need to add a skin for your item! If you have any questions or feature requests, feel free to ask them in the comments! Mods that use this library (You can use them as an example) The Dummy Mod
  3. I need help with API for a Don't Starve Mod: Deluxe Campfires Mod. This mod is in abandoned state. I want the fire and ice stars of this mod to drop, as the fire is off: Fire: 100% chance of 3 Rocks; 75% 1 Nightmare fuel; 5% 1 Red Gem; 5% 3 Red Feather; 1% 1 Fire Staff 0,5% 1 Dragon Fruit 0,5% 1 Star Caller's Staff 0,5% 1 Yellow Gem 0,5% 2 Thulecite Pieces Ice: 100% 2 Rocks; 100% 1 Nitre 100% 2 Ice 75% 1 Nightmare fuel; 5% 1 Blue Gem; 5% 3 Blue Feather; 1% 1 Ice Staff 0,5% 1 Blue Amulet 0,5% 1 Star caller's Staff 0,5% 2 Thulecite Pieces Comand lines in the files, Fire Star:------------------------------------------------------------------------------ if heatStarDropLoot == "yes" then if addLootItems == 1 then -- flame max level 10 if heatStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("firehound") inst.components.lootdropper:SpawnLootPrefab("firehound") inst.components.lootdropper:SpawnLootPrefab("firehound") inst.components.lootdropper:SpawnLootPrefab("firehound") end inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") inst.components.lootdropper:SpawnLootPrefab("redgem") elseif addLootItems == 2 then -- flame max level 9 if heatStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("firehound") inst.components.lootdropper:SpawnLootPrefab("firehound") inst.components.lootdropper:SpawnLootPrefab("firehound") end inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") elseif addLootItems == 3 then -- flame max level 6 if heatStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("firehound") inst.components.lootdropper:SpawnLootPrefab("firehound") end inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") end end end Comand lines in the files, Ice Star:------------------------------------------------------------------------------- if iceStarDropLoot == "yes" then if addLootItems == 1 then -- flame max level 10 if iceStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("icehound") inst.components.lootdropper:SpawnLootPrefab("icehound") inst.components.lootdropper:SpawnLootPrefab("icehound") inst.components.lootdropper:SpawnLootPrefab("icehound") end inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("bluegem") elseif addLootItems == 2 then -- flame max level 9 if iceStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("icehound") inst.components.lootdropper:SpawnLootPrefab("icehound") inst.components.lootdropper:SpawnLootPrefab("icehound") end inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") elseif addLootItems == 3 then -- flame max level 6 if iceStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("icehound") inst.components.lootdropper:SpawnLootPrefab("icehound") end inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") end end end heat_star.lua ice_star.lua Please help me!!! -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I did make a litle progress: if iceStarDropLoot == "yes" then if addLootItems == 1 then -- flame max level 10 if iceStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("icehound") end inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("nitre") inst.components.lootdropper:SpawnLootPrefab("rocks") inst.components.lootdropper:SpawnLootPrefab("rocks") inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") inst.components.lootdropper:AddChanceLoot("nightmarefuel",0.75) inst.components.lootdropper:SpawnLootPrefab("bluegem") inst.components.lootdropper:AddChanceLoot("bluegem",0.05) inst.components.lootdropper:SpawnLootPrefab("feather_robin_winter") inst.components.lootdropper:AddChanceLoot("feather_robin_winter",0.05) inst.components.lootdropper:SpawnLootPrefab("feather_robin_winter") inst.components.lootdropper:AddChanceLoot("feather_robin_winter",0.05) inst.components.lootdropper:SpawnLootPrefab("feather_robin_winter") inst.components.lootdropper:AddChanceLoot("feather_robin_winter",0.05) inst.components.lootdropper:SpawnLootPrefab("icestaff") inst.components.lootdropper:AddChanceLoot("icestaff",0.01) inst.components.lootdropper:SpawnLootPrefab("blueamulet") inst.components.lootdropper:AddChanceLoot("blueamulet",0.01) inst.components.lootdropper:SpawnLootPrefab("yellowstaff") inst.components.lootdropper:AddChanceLoot("yellowstaff",0.01) inst.components.lootdropper:SpawnLootPrefab("thulecite_pieces") inst.components.lootdropper:AddChanceLoot("thulecite_pieces",0.01) elseif addLootItems == 2 then -- flame max level 9 if iceStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("icehound") end inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("nitre") inst.components.lootdropper:SpawnLootPrefab("rocks") inst.components.lootdropper:SpawnLootPrefab("rocks") inst.components.lootdropper:SpawnLootPrefab("nightmarefuel") inst.components.lootdropper:AddChanceLoot("nightmarefuel",0.75) elseif addLootItems == 3 then -- flame max level 6 if iceStar_starsSpawnHounds == "yes" then inst.components.lootdropper:SpawnLootPrefab("icehound") end inst.components.lootdropper:SpawnLootPrefab("ice") inst.components.lootdropper:SpawnLootPrefab("rocks") end end end --------------------------------This,above, is right? I realy don't know.
  4. MOD IN WORKSHOP! This mod replaces the main menu background with some videos. You can pause and skip videos to the next ones! Once you'll start the video, the main menu theme will be stopped, but when you stop the video, it will start to play again! For moders: This mod has its own API! You can add your videos! Guide: Many thanks to the Electroely. This mod wouldn't be possible without him!
  5. Version 0.8.1

    255 downloads

    Thread: http://forums.kleientertainment.com/topic/77146-release-quest-mod The API Mod: Every QuestMod needs the API mod to work. I developed the API mod, to allow every modder to create custom quests/rewards/shopitems (so I don't have all the work creating quests :D). The best way to start if you want to create content, is to look at my questsmods and how I did it. There is also explanation in the modmains. Basic mechanics: Go near to the pigking and he will tell you what task he has for you. Go up and down to hear more about the quest. There are 5 difficulties (1 to 5, esay to hard). The text of diff 1 quest is dark green. 2 is green. 3 is organge. 4 is red and 5 is dark red. Do what the pigking wants and visit him again to get your reward. Skipping: If you don't want to do the quest or it is impossible, you can do the emotion "annoyed" three times near the pigking. This will skipp the quest. Next Quest (default 1 day): In modsettings you can choose, how much time should pass, before the pigking is offering you another quest after solving/skipping previous quest (half time when skipping quest). Loop Quests (default enabled): The questlist of pigking contains a finite number of quests. After every quest was active, the pigking will offer no more quests. But if you enabled the modsetting "LoopQuests", the questlist is again filled with all quests and you can do them again for reward. Number of Quests: For some quests, like "Emote" and "Hunt", you can choose in modsettings of questmod how often you want those quests be added to the questlist. All other quests are only added once. So choose the number of emote/hunt quests according to how often you want to get those quests relative to other specific quests. Shop Mode (default enabled): In the modsettings you can choose if you want to enable "Shopmode". If enabled, you will get coins as reward for doing quests. The shopkeeper always spawns near the portal and you can buy some basic items from him. In modsettings you can enable chance to find coins when looting something. If you disable Shopmode, you will get random items instead directly from the pigking as reward. Blueprint Mode (default disabled): You can enable it in modsettings. This is a mode where you can't build any researchlab. Instead you have to find blueprints to be able to craft stuff. You will get blueprints and few coins as quest reward, but can also enable in modsettings a chance to find blueprints when slowpicking/working. Every found blueprint is also added to the shopkeeper, so every player can buy any found blueprint for 1 coin at the shopkeeper. I think this mode as potential, but at the moment I don't think it will be very famous. Maybe you have ideas to improve this mode? Adding/Removing Quest/Questmods after game start: It is no problem to add/disable a questmod to an already running game. The questlist of the pigking is updated accordingly. Only surface: For now only surface is supported. Quest completed in caves do not count, since communication between caves and surface is not eays. Work in Progress GitHub: https://github.com/Serpens66/QuestMod-Dont-Starve-Together Questmods that require API mod: http://forums.kleientertainment.com/files/file/1703-dst-questsserp-beta/ http://forums.kleientertainment.com/files/file/1704-dst-questshunt-beta/
  6. Version 1.1

    90 downloads

    This is a component for managing special mod music. Try to use it if you can. If you need a practical example, check out Soulful Alchemy. Don't mind the DirectorNode stuff, I was just too lazy to remove it. If you have any questions or concerns, tell me please!
  7. What is the best way for those mods to be compatible with each other? Is there any addendum function which can be hooked? I found only components.locomotor.bonusspeed variable, but it's just variable, and each mod will overwrite it.