Danilogico

Don't Starve - Help with API for Deluxe Campfires Mod

Recommended Posts

Danilogico    0

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.

Edited by Danilogico
I'm a perfectionist man

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now