Jump to content

Search the Community

Showing results for tags 'api'.

  • 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] - General Discussion
    • [Griftlands] - Suggestions and Feedback
    • [Griftlands] - Mods and Tools
    • [Griftlands] - Localization
    • [Griftlands] - Bug Tracker
    • [Griftlands] - Developer log
  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included: Spaced Out!] - Bug Tracker
    • [Oxygen Not Included] - Mods and Tools
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] Art, Music & Lore
    • Community Challenges
    • [Oxygen Not Included] - Latest Content Update
    • [Oxygen Not Included] - Latest Animated Short
    • Oxygen Not Included DLC Alpha
  • 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] Beta Branch
    • [Don't Starve Together] PlayStation
    • [Don't Starve Together] Xbox One
    • [Don't Starve Together] Nintendo Switch
    • [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
    • Eets Munchies
    • [Invisible, Inc.] General Discussion and Strategies
    • Mark of the Ninja
    • Shank
  • Other Stuff
    • Other Klei Services

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Don't Starve: Hamlet
  • Don't Starve: Hamlet Early Access
  • Don't Starve Together
  • Don't Starve Together: Beta Branch
  • [Don't Starve Together] Nintendo Switch
  • [Don't Starve Together] PlayStation
  • 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] 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
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Hot Lava
  • Don't Starve Together
  • [Nintendo Switch] Don't Starve Together
  • [PlayStation] 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


Group


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


Oxygen Not Included

Found 16 results

  1. MODS IN MENU IS BACK, BABY! And this time, it's here to stay! No more hand-holding No more spammy tables in the modinfo No more crashing with every Klei update Now fully open with limitless capabilities Fully loads server mods on the clientside Able to access a mod's configuration Allows for Postinits, Prefabs, and Assets to be added Put characters in the main menu Insanely easy and user-friendly How does it work? I'll tell you! A brand new tab will appear in your mods menu. Click it and you'll be able to view mods that are compatible with Mods in Menu! And that's it! Click apply and you will be able to see changes that mod wants to make to the main menu! Ok, but how can I make my mod compatible? Simply add a modclientmain.lua file to your mod. Treat this modclientmain as if it were a second modmain that only loads clientside. (because it is) And that's it! Your mod is ready to access the clientside! Okay but in all seriousness though, there's a few important things I need to note and go over. Firstly, an explanation of what exactly is going on here to help those newer to code understand. Your modmain.lua file is essentially the starting point of your mod when it is loaded. It brings in assets, prefabs, and game changes, all starting from that single file. The new modclientmain.lua is essentially the SAME EXACT THING with all the SAME EXACT CAPABILITIES. However, it is loaded on the clientside via Mods in Menu! "Okay but why would I need that? I could just set my mod to be clientside!", I hear you audibly questioning from your brain. And I have an answer! Making your mod clientside will prevent it from being enabled serverside! This is bad for a modded character for example. This feature is mainly there for server-only mods to reach their characters and items into the main menu for users to enjoy more features! Now I've gotta cover some basic restrictions and changes that everyone should pay attention to. First, your mod's priority. It is very important that you do not reach this priority number (-2147483647) with your server mod as Mods in Menu MUST load after all server mods to prevent major issues. If you need your server mod to load on the backend then do -2147483646 instead. For those interested, all mods loaded by MiM will then load AFTER MiM using the normal priority rules. Next thing to note, is that when working with your modclientmain your goal is to use the absolute minimum code/strings/assets possible! The entire reason Klei originally moved server mods to not enable on the clientside is because they wanted to cut down on load times. Keep this in mind when working with your modclientmain and only require assets/code that is absolutely necessary for your character or changes to appear in the main menu as intended! Depending on your programming experience, there's a multitude of ways that you can use your modclientmain! Handle your modmain and modclientmain files completely separately. This is the easiest for those not too familiar with code but takes more time and effort to upkeep. Have both your modmain and modclientmain require a common file that will register all assets/prefabs/strings/etc that would otherwise be shared between both files. This makes upkeep nice and easy and it cuts out all repeating code. DO NOT DO THIS UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING. Calling modimport("modmain") will load your modmain file, leaving the modclientmain practically untouched and load your full mod as intended serverside. This will be the optimally efficient way to handle your mod but things can go south quickly if you don't do it right, it can be dangerous. There are a couple IF checks to help out with the 2nd and 3rd methods to ensure you don't load serverside things on the client! --This variable gets added to your modding environment by Mods in Menu --Use this check to see if your file is being run on a server or by Mods in Menu if is_mim_enabled then --This is a check I found while building this API actually and it can prove to be quite helpful for mods enabled on both client and server --The gamemode will always return an empty string if you're in the main menu and not in-game if TheNet:GetServerGameMode() == "" then And that's all anyone needs to know really! Attached to this post will be a modclientmain file I whipped up as an example using the Whemy The Witch mod under the first handling method. IF THERE ARE ANY QUESTIONS, PLEASE FEEL FREE TO ASK HERE! SPECIAL THANKS TO: Erik for drawing the mod icon image (isn't it awesome looking?) Hornet for encouraging me and letting me use Hamlet characters as guineapigs Von for letting me use Whemy as a guineapig Get the API on Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=2415978456 modclientmain.lua
  2. Hi everyone, a few years back I had written a tutorial on creating custom skins for modded characters. Today that tutorial becomes deprecated as the Revamped Modded Skins API created by me and some others makes its release. This API will make it easy to add both skins for characters and items/structures. I’m very happy to present this new API to you all and I hope you enjoy it too, as it comes with custom art for new rarities, frames, and even a custom skin unlockable system for modded skins. This will be a multi-tutorial post, so be sure to check out the table of contents and find what you’re looking for! Thank you @Fidooop, @Cunning fox, and @Dudedude for helping to develop the API and having me hop on board. Here is the API related to the topic! Modded Skins [API] Table of Contents: Creating Custom Skins for Modded Characters Creating Custom Skins for Modded Items Miscellaneous Adding an event icon to your custom skin Making a Modded Skin Lockable Setting Custom Offset/Scale for Clean Sweeper effects Compatibility with Mods in Menu Resources Some quick important notes: All of the skin id’s(aka the names of the skins in the code) you choose for your skin should start with “ms_”. For example, an appropriately named skin would be “ms_whimsy_victorian”. (The default ‘_none’ skin is excluded from this rule, however) This tutorial will assume you have your skin assets ready to go if you’ve created a modded item/character before. If not and you are completely unaware on how to create items and character builds in the first place, it is likely you’re not ready for this tutorial yet. I’ll be using my friends character mod as an example throughout the tutorial :), @-Variant, love u bb. Creating Custom Skins For Modded Characters Creating Custom Skins For Modded Items/Structures Miscellaneous Resources And also! Let me know when you've got a mod compatible with the API! So that I may add it to the collection of API compatible mods :>
  3. This API is used for adding inventory images with one simple function! It's compatible with mini signs, crafts, ingredients and shelves. Compatible with all DLCs. The API usage can be found in the Github Repository. I'm pointing to GitHub so that usage is always up to date. Happy Modding!
  4. So I've recently been trying to make a hotkey mod for Wortox that will allow him to teleport and drop souls through custom keybinds. I've been able to get it working, but the only way I found to get the telepoofing feature to work was to make a custom RPC call that would translate the pressing of the designated button into Wortox performing the action server-side, making the mod a server mod instead of a client mod. Dropping an item from an inventory actually already has a pre-built RPC Handler specifically for it (DropItemFromInvTile), but the only handlers that I can see that handle arbitrary actions are the ones that check for a specific button to be pressed ("Leftclick", "RightClick", "ActionButton", etc). The way these handlers are currently set up, if you try to trigger an action by other means (say, a hotkey) while trying to call the RPC handler and making it think an action was made, it will not work. I imagine this was deliberately set up to ensure synchronization between the client and the server, because the function that's called in the playercontroller component by the RPC handler specifically checks if the passed bufferedaction is the same bufferedaction that's retrieved from the available action pool of said handler's button (depending on the action in question). This probably wouldn't be an issue if I wanted to keep the action available on the right-click, however I don't. I actually removed the availability of the action to telepoof from Wortox's right-click by default so the only way for him to telepoof is to use the hotkey, thus leading to this action synchronization problem. My request is would there be any way to include a new RPC handler (and most likely new playercontroller function) to include a way for mods to be able to pass arbitrary actions to the server, allowing for more/better client mod custom button controls? I'll fully admit that I'm still a bit naïve when it comes to capability of the clients so maybe this is a bit of an outlandish request, or maybe it's something that's already possible that's I'm just missing/unaware of, but I think this type of capability would open up a world of more/better possibilities for hotkey client mods. I also still think it would be possible to allow for client/server synchronization if that's truly a worry by passing a check for the deisgnated hotkey in question in the newly needed playercontroller function. However, to achieve this may also require a function to be added to the playeractionpicker component (and maybe even an extra/appended API function to boot) to allow for such synchronization, so I can definitely understand how this may not be a trivial task to tackle nor a high priority one, but I do think it would open up a lot of opportunities for mod developers to add more client-based custom keybinds for actions. I mean if we're being honest, I'd vote to just add API support for adding in custom keybinds to the native controls menu in the options menu instead, but I just thought this route may be less of a hassle for your end while allowing us to achieve the same thing through our own mod's config.
  5. 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
  6. Anyone knows how to connect to api with dont starve mod, and use get, post, put, delete functions?
  7. Hello, modders and skin fanatics alike! After a very long time working on it, I'm happy to announce a brand new mod API that allows one to create their very own skins for their modded characters and items! You can find the mod on the Steam Workshop here: http://steamcommunity.com/sharedfiles/filedetails/?id=835602689 WARNING: This mod is only to be used to create skins for modded characters/items. Klei strongly forbids the use of modders creating skins for any official character/item. If any mod is found using code from this mod in order to skin official characters/items it will be reported on sight. How To Use: Very special thanks to: @Kzisor who's Additional Dressware mod inspired the creation of this mod! @Dudedude who helped out with the assets. @PeterA who walked me through a lot of the Dos and Don'ts so that I wasn't stepping over any lines! @Blueberrys who made the Persistant Data module that helped make this possible. Can be found here: For anyone wanting to skin their modded characters here are the skin portrait backgrounds! Some frequently asked questions: (If you have any more questions post them down below! I'll reply as soon as I can!) Can I skin Wilson or any other official character? No, Peter has told me to make sure that everybody is very aware that this is off limits... We've been given a gift so let's not squander it! How do I use it? The tutorial is up above! It has all the usable functions inside and how to use them! Please don't rip the code and put it in your mod through... Make sure that when you upload your mod you add this mod as a required item. (It is set up this way so that the same code doesn't run multiple times if someone has multiple mods that have skins!) What is an API? An API (Application Programming Interface) is a set of functions which allows you to use advanced techniques without having to write your own code or copy/paste the code in your mod... In order to use this API you must add this mod as a requirement on your mods workshop page. Can I make clothing? No, that is off limits. (and it'd also require a lot of extra code that is not supplied within the mod...) I found a mod that skins official items/characters! What should I do? If it is not the playable pets mod (They technically have the go-ahead to skin the playable mobs) then please immediately report it! We don't want to force Klei's hand and have Modded Skins shut down. What if I made a rip-off character of one of the official characters and skinned that? Still off limits because it is still Klei's character. (even after you change one letter in the name) So this is also prohibited and must be reported if anyone is found doing this! Can this be used to give myself official skins? At the moment I'm more than certain that this is impossible... However, if a way is found to do this using my mod then it's more a fault of Klei's (for leaving a hole in skin restrictions) and not mine because all I did was some UI hacking. What mods are currently using this to make skins? Check out @Chris1488's Modded Skins thread! He's going to try his best to stay on top of what mods get skins and he'll be updating his thread whenever he possibly can! Is mayonnaise an instrument? I'm... not entirely sure? I guess you could make a song using only sounds made by a tub of mayonnaise... But then again you could technically do that with almost everything! So I propose a counter-question. Does that mean that everything is an instrument?
  8. Hi fellow modders After a very long time working on it, I'm happy to announce a brand new mod API that allows one to finally send data from shards to other shards it can be found at: https://steamcommunity.com/workshop/filedetails/?id=1378549454 This isn't the only thing it can do though and be sure to check out the wiki(linked below) to see all its features How to use: Go to the gem core wiki to see all its functionality: https://github.com/Zarklord/GemCore/wiki Very special thanks to: @Fidooop who made sure stuff was done right @rezecib for his wonderful upvalue hacker Some frequently asked questions: (If you have any more questions post them down below! I'll reply as soon as I can!) How do I use it? The tutorial is up above! It has all the usable functions inside and how to use them! Please don't rip the code and put it in your mod through... Make sure that when you upload your mod you add this mod as a required item, and use the LibraryManager module to auto subscribe and download it (It is set up this way so that the same code doesn't run multiple times if someone has multiple mods that use this library!) What is an API? An API (Application Programming Interface) is a set of functions which allows you to use advanced techniques without having to write your own code or copy/paste the code in your mod... In order to use this API you must add this mod as a requirement on your mods workshop page. What mods are currently using this to do shard networking: currently just one mod, but as more mods get released, I plan on keeping this list up to date as possible: The Laziest Deserter: https://steamcommunity.com/sharedfiles/filedetails/?id=1378613951
  9. I was trying to add a structure but when I checked the game files I noticed that that line was at the end, some had "nil, nil, nil, nil, 4" or "nil, nil, nil, 6" Recipe("minisign_item", {Ingredient("boards", 1)}, RECIPETABS.TOWN, TECH.SCIENCE_ONE, nil, nil, nil, nil, 4) Recipe("fence_item", {Ingredient("twigs", 3), Ingredient("rope", 1) }, RECIPETABS.TOWN, TECH.SCIENCE_ONE, nil,nil,nil,nil,6)
  10. 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.
  11. LoadPostPass is really deprecated right ? Even in DST's standard components, it just doesn't work. I feed some pigmans with meat, and check ThePlayer.components.leader.numfollowers, and it says 3 followers. Then I save the game and reset, all my followers are gone, ThePlayer.components.leader.numfollowers resets to 0. I even tested it on both Linux and Windows, no different. Is this how it is supposed to be or just bugs ? Please.
  12. 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!
  13. My QuestMod is ready for first BETA release! You can download them here: http://forums.kleientertainment.com/files/file/1702-dst-questsapi-beta/ http://forums.kleientertainment.com/files/file/1703-dst-questsserp-beta/ http://forums.kleientertainment.com/files/file/1704-dst-questshunt-beta/ (Better use GitHub to download, since it is latest version there) work in progress Github: https://github.com/Serpens66/QuestMod-Dont-Starve-Together For descriptions see download links or this spoiler: But now I need YOUR help: 1) Test every setting and constellation to find bugs and report them with logfile. 2) Let me know your ideas how to better balance task/reward. Maybe write a formula for reward. Quest difficutly ranges from 1 to 5 and the reward should be accordingly. Make it a small reward which can be multiplied by 1, 2 or 3 depending on modsetting "how high should be rewards?". 3) Are the colours for talking okay and readable? dark green, green, orange, red, dark red. 4) Take a look in mymodstrings.lua of the mods and think about better fitting sentences the pigking can say to describe the quest. All strings in sum must give enough information to the player to know exactly what to do. 5) You can also create a file with your custom translation of those sentences (maybe wait until we have good sentences in english). 6) If you are a modder and know a good way how to also add cave (forest-cave communication), you can help me make the mods also work in cave. (For now the mod is only active in surface, of course also if cave is enabled. But if you have "hunt spiders" quest, spiders killed in cave won't count). 7) What other ideas of small quests do you have? 8) If you want to add your custom quests or rewards or shopitems ask your questions about the API mod if something is unclear and report if you need sth or some help with. I'm not sure if adding mod items to the shop is already working. Could have problems with picture? Test it and report please. 9) What other suggestions? If you are going to work on any of those points, better notify me in this thread first. That way me and other will know, that someone is already working on it and we won't get 10 reward formulas New quests that are already on my TODO:
  14. @Ipsquiggle, @PeterA, @ScottHansen, @V2C, This is a request to have a very specific API added to the mod scene, one that used to be possible until very recently. Per this thread: I have determined that this is no longer possible with the previous method which I devised in this post: Due to recent changes with A New Reign in the recipe.lua file; the simple method which I created previously no longer works. So I decided to create the code to have it reviewed and possibly added to the mod API, to support something the community would love to have. Please note that none of this code is tested, that is why I am wanting to have it reviewed and possibly be used as a quick start example to making this possible. The following files will need to be modified in order to make this a reality. scripts/components/builder.lua scripts/components/builder_replica.lua scripts/modutil.lua scripts/recipe.lua scripts/widgets/recipepopup.lua scripts/components/builder.lua:311 for k,v in pairs(recipe.mod_character_ingredients) do if MOD_CHARACTER_INGREDIENT[v.type] ~= nil then if MOD_CHARACTER_INGREDIENT[v.type].removeFn ~= nil then MOD_CHARACTER_INGREDIENT[v.type].removeFn(self.inst.components, v) end end end scripts/components/builder.lua:334 function Builder:HasModCharacterIngredient(ingredient) if MOD_CHARACTER_INGREDIENTS[ingreident.type] ~= nil then if MOD_CHARACTER_INGREDIENTS[ingredient.type].hasFn ~= nil then return MOD_CHARACTER_INGREDIENTS[ingredient.type]:hasFn(self.inst.components, ingredient) end end return false, 0 end scripts/components/builder.lua:518 for i, v in ipairs(recipe.mod_character_ingredients) do if not self:HasModCharacterIngredient(v) then return false end end scripts/components/builder_replica.lua:185 function Builder:HasModCharacterIngredient(ingredient) if MOD_CHARACTER_INGREDIENTS[ingreident.type] ~= nil then if MOD_CHARACTER_INGREDIENTS[ingredient.type].hasFn ~= nil then return MOD_CHARACTER_INGREDIENTS[ingredient.type]:hasFn(self.inst.replica, ingredient) end end return false, 0 end scripts/components/builder_replica.lua:270 for i, v in ipairs(recipe.mod_character_ingredients) do if not self:HasModCharacterIngredient(v) then return false end end scripts/recipe.lua:48 local MOD_CHARACTER_INGREDIENTS = { } local is_mod_character_ingredient = nil function IsModCharacterIngredient(ingredienttype) if is_mod_character_ingredient == nil then is_mod_character_ingredient = {} end return ingredienttype ~= nil and is_mod_character_ingredient[ingredienttype] == true end function AddModCharacterIngredient(ingredienttype, hasFn, removeFn) -- should we worry about duplicate mod ingreident types? MOD_CHARACTER_INGREDIENTS[ingredienttype] = { } MOD_CHARACTER_INGREDIENTS[ingreidnettype].hasFn = hasFn MOD_CHARACTER_INGREDIENTS[ingreidnettype].removeFn = removeFn end scripts/recipe.lua:68 self.ingredients = {} self.mod_character_ingredients = {} self.character_ingredients = {} self.tech_ingredients = {} for k,v in pairs(ingredients) do table.insert( (IsModCharacterIngredient(v.type) and self.mod_character_ingredients) or (IsCharacterIngredient(v.type) and self.character_ingredients) or (IsTechIngredient(v.type) and self.tech_ingredients) or self.ingredients, v ) end scripts/widgets/recipepopup.lua:329 local num = (recipe.ingredients ~= nil and #recipe.ingredients or 0) + (recipe.mod_character_ingredients ~= nil and #recipe.mod_character_ingredients) + (recipe.character_ingredients ~= nil and #recipe.character_ingredients or 0) + (recipe.tech_ingredients ~= nil and #recipe.tech_ingredients or 0) scripts/widgets/recipepopup.lua:369 for i, v in ipairs(recipe.mod_character_ingredients) do --#BDOIG - does this need to listen for deltas and change while menu is open? --V2C: yes, but the entire craft tabs does. (will be added there) local has, amount = builder:HasModCharacterIngredient(v) local ing = self.contents:AddChild(IngredientUI(v.atlas, v.type..".tex", v.amount, amount, has, STRINGS.NAMES[string.upper(v.type)], owner, v.type)) if num > 1 and #self.ing > 0 then offset = offset + half_div end ing:SetPosition(Vector3(offset, self.skins_spinner ~= nil and 110 or 80, 0)) offset = offset + w + half_div table.insert(self.ing, ing) end scripts/modutil.lua:479 env.AddModCharacterIngredient = AddModCharacterIngredient After these changes have been made the optimal usage is as followed: --AddModCharacterIngredient(ingredientName, checkFn, removeFn) local _ingredientName = "magic" AddModCharacterIngredient(_ingredientName, function(inst, ingredient) if inst.magic ~= nil then return inst.magic:GetCurrent() >= ingredient.amount, inst.magic:GetCurrent() end end, function(inst, ingredient) if inst.magic ~= nil then inst.magic:DoDelta(-ingredient.amount) end end) If following this particular code example, the only thing the end modder should be required to do is determine how to handle their newly modded character ingredients availability check (first function in call) and removal of the ingredients (second function in call). Alternatively as a stop gap measure you could add the following code to the scripts/recipe.lua and we could continue to use the previous method, by simply calling the function below. function AddModCharacterIngredient(ingredienttype) if is_character_ingredient == nil then is_character_ingredient = {} for k, v in pairs(CHARACTER_INGREDIENT) do is_character_ingredient[v] = true end end is_character_ingredient[ingredienttype] = true end I am bringing this request to light because I know there are at least 1 mod on the workshop currently that has been broken because of this particular issue. http://steamcommunity.com/sharedfiles/filedetails/?id=644104565&searchtext=chakra Regards, Kzisor/Ysovuka
  15. 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.
×
×
  • Create New...