Foxrai

  • Content count

    129
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by Foxrai


  1. kinky to add that to a character or that just doesn't fit the style...
     

     

    Naa.. most chars just don't fit their style at all :D Just do little "censor" and it's good. Make her bra-made-of-leaves or something. 

     

    Try to understand developers. There has to be SOME rule. And if we let some1 pass the rule a little... another person will pass the rule more.. another more... and more... and more. 

     

    character has the style ;) So I guess censoring it won;t kill it :D 


  2. Little update:

    We played a while, everything worked. But on second start of the game sudden error occured out of nowhere:

    [string "../mods/workshop-389385830/modmain.lua"]:70: attempt to call global 'resolvefilepath' (a nil value)

     

    No changes where made between games. Solution was adding this to modmain.lua:

    local resolvefilepath = GLOBAL.resolvefilepath
     
    Thank you @Kzisor and thank you @Dleowolf, who suggested last error correction here!
     
    :yaypigs:
     

     

     

  3. @rezecib, Ops sorry my bad really o.o wish I could delete it now -.-

     

    Hmmm that might be the case - because when I read the tutorials I didn't really know if a character itself is an "entity" as well, or only items. So I take it now, as I just should add the same networking parts to character prefab, like I did with item prefab? That's the thing I didn't really understand from the above tutorials. 

     

    Um.. breaking player_classified? Indeed I got a recipe in char prefab.. wow too many things to break stuff grrr... Sorry again ^^ no more garbage adding here.


  4. @rezecib,

     

    First of all - very great tutorial about mods! I guess I still don't get many things, but after reading all of these it sure did make some things clear.

     

    I might have a request to you tho :/ I triple checked everything in my mod (character + weapon) with Your tutorial here.. It seems ok. Every additions for from DS to DST seems on the place.. But something doesn't work - no crash or thing, but just like character statistics, components, so all skills, HP, hunger, sanity, eater etc... All are broken - not working for CLIENT, while HOST is all fine...

     

    *Custom item works fine tho. Just the character itself seems broken on DST, while working fine on DS and ROG...

     

    Any idea what can be wrong there? :/

    Attaching my lua and logs from last login as a client...

     

    What stupid mistake did I make here? -.- I guess that might save others who does the same..

     

     

    wakkari.lua

    log.txt


  5. , but it's a lot more complicated than just "making light".

     

    Complicated or not.. Still it works and doesnt work at once.. why?

     

    When Item is dropped on the ground - it shines! (lights on!)  well it has square shape but still its light...

    When item is in hand - no light -.-

     

    Is that some functions order or thing ? :/

    local assets={    Asset("ANIM", "anim/orbstaff.zip"),    Asset("ANIM", "anim/swap_orbstaff.zip"),      Asset("ATLAS", "images/inventoryimages/orbstaff.xml"),    Asset("IMAGE", "images/inventoryimages/orbstaff.tex"),} local prefabs ={    "torchfire",	"ice_projectile",	"staffcastfx",}    --ICE Staff functionslocal function onattack_blue(inst, attacker, target)    if attacker and attacker.components.sanity then        attacker.components.sanity:DoDelta(-TUNING.SANITY_SUPERTINY)    end        if target.components.freezable then        target.components.freezable:AddColdness(1)        target.components.freezable:SpawnShatterFX()    end    if target.components.sleeper and target.components.sleeper:IsAsleep() then        target.components.sleeper:WakeUp()    end    if target.components.burnable and target.components.burnable:IsBurning() then        target.components.burnable:Extinguish()    end    if target.components.combat then        target.components.combat:SuggestTarget(attacker)        if target.sg and not target.sg:HasStateTag("frozen") and target.sg.sg.states.hit then            target.sg:GoToState("hit")        end    endend  --Bell Staff functions basics + shinelocal function OnEquip(inst, owner)    owner.AnimState:OverrideSymbol("swap_object", "swap_orbstaff", "swap_orbstaff")    owner.AnimState:Show("ARM_carry")    owner.AnimState:Hide("ARM_normal")end--light parameterslocal function fn(inst)    inst.Light:SetIntensity(0.4)    inst.Light:SetRadius(1)    inst.Light:SetFalloff(0.9)endlocal function OnUnequip(inst, owner)    owner.AnimState:Hide("ARM_carry")    owner.AnimState:Show("ARM_normal")end		local function fn(Sim)    local inst = CreateEntity()    local trans = inst.entity:AddTransform()    local anim = inst.entity:AddAnimState()    local sound = inst.entity:AddSoundEmitter()    MakeInventoryPhysics(inst)		--light	inst.entity:AddLight()	inst.Light:SetColour(180/255, 195/255, 150/255)          anim:SetBank("orbstaff")    anim:SetBuild("orbstaff")    anim:PlayAnimation("idle")         inst:AddComponent("inspectable")	   -- lines 66-72 - ice staff weapon based with increased range      inst:AddTag("icestaff")     inst:AddComponent("weapon")    inst.components.weapon:SetDamage(0)    inst.components.weapon:SetRange(7, 11)    inst.components.weapon:SetOnAttack(onattack_blue)    inst.components.weapon:SetProjectile("ice_projectile")         inst:AddComponent("characterspecific")    inst.components.characterspecific:SetOwner("wayrra")         inst:AddComponent("inventoryitem")    inst.components.inventoryitem.imagename = "orbstaff"    inst.components.inventoryitem.atlasname = "images/inventoryimages/orbstaff.xml"          inst:AddComponent("equippable")    inst.components.equippable:SetOnEquip( OnEquip )    inst.components.equippable:SetOnUnequip( OnUnequip )      return instendreturn  Prefab("common/inventory/orbstaff", fn, assets) 

  6.  

    local function OnEquip(inst, owner)    owner.AnimState:OverrideSymbol("swap_object", "swap_orbstaff", "swap_orbstaff")    owner.AnimState:Show("ARM_carry")    owner.AnimState:Hide("ARM_normal")end

    Well this is how you declared OnEquip. Its a function. Line 89 sets the equip handler to your local OnEquip function. Line 90 'states' that it is setting the unequip handler to a local function named OnUnequip but you dont have that function in your code.

     

    1. write the function to do what you want it to do

    2. remove line 89 if you dont actually need any special handling

     

    Whichever solution works for you, use.

     

     

    Ye i just noticed my own stupid error -.- Fixed  :-)


  7. lantern file = mininglantern.lua (prefab itself is still called lantern though)

    the morning star is called nightstick (I think, idk what that is, I'm a RoG noob), but it's a lot more complicated than just "making light".

     

    ye i just realized. + I don't want any ROG specified code parts... It has to be compatible with DS, ROG and DST so... working on  "making" light :p

    • Like 1

  8. Use the Morning Star code and remove the durability and wetness modifier if that's what you are looking for.  It is a weapon that emits light. 

     

    what is the name for that? -.- I can't seem to find anything looking at least similar in DS lua files.. Guess it's inside of something like all staffs are in one file... looking for :p


  9. Use the Morning Star code and remove the durability and wetness modifier if that's what you are looking for.  It is a weapon that emits light. 

     

    I ll check it out :) Didn't think of that.

     

    Sorry, I didn't realize the last snipped with the light code wasn't in your prefab. You obviously need to put something like that in your prefab, since the torchfire can't give light anymore. Follow this explaination.

     

    Reading what you linked here - nice piece of information! Least for modding-noobs like myself o.o

    Thank you ^^ 


  10.  

    I can't help you with the coding, but why not reference the lantern or morning star?  Both are equipped in the weapon slot and emit light.

     

    related to weapon - let's say a spear for now. Shining spear. for now.

     

    Did you try removing all the following bits?
     

     

    Yes I did.. When I remove any of them It will just stop emitting the flames... but ALSO it stops giving any light aura.. I thought using lightbulbs code will be handy here but it doesn't work either... 

     

    On an unrelated note, your missing the following code in your example.

     

    Hehe ye thank you for pointing it out. YET it's Don't Starve + ROG version ;) 

     


  11. I want to make shining hand item - weapon kind.

    My base was lightbulb at first, and then "torch" but there came an little issue... I tried following codes:

    local assets={    Asset("ANIM", "anim/orbstaff.zip"),    Asset("ANIM", "anim/swap_orbstaff.zip"),      Asset("ATLAS", "images/inventoryimages/orbstaff.xml"),    Asset("IMAGE", "images/inventoryimages/orbstaff.tex"),} local prefabs ={    "torchfire",}     local function fn()      local function OnEquip(inst, owner)        owner.AnimState:OverrideSymbol("swap_object", "swap_orbstaff", "swap_orbstaff")        owner.AnimState:Show("ARM_carry")        owner.AnimState:Hide("ARM_normal")                 inst.fire = SpawnPrefab( "torchfire" )        --inst.fire.Transform:SetScale(.125,.125,.125)        local follower = inst.fire.entity:AddFollower()        follower:FollowSymbol( owner.GUID, "swap_object", 0, -110, 1 )        end      local function OnUnequip(inst, owner)        inst.fire:Remove()        inst.fire = nil             owner.AnimState:Hide("ARM_carry")        owner.AnimState:Show("ARM_normal")    end         local inst = CreateEntity()    local trans = inst.entity:AddTransform()    local anim = inst.entity:AddAnimState()    local sound = inst.entity:AddSoundEmitter()    MakeInventoryPhysics(inst)          anim:SetBank("orbstaff")    anim:SetBuild("orbstaff")    anim:PlayAnimation("idle")         inst:AddComponent("inspectable")         inst:AddTag("sharp")     inst:AddComponent("weapon")    inst.components.weapon:SetDamage(48)         inst:AddComponent("characterspecific")    inst.components.characterspecific:SetOwner("wayrra")         inst:AddComponent("inventoryitem")    inst.components.inventoryitem.imagename = "orbstaff"    inst.components.inventoryitem.atlasname = "images/inventoryimages/orbstaff.xml"          inst:AddComponent("equippable")    inst.components.equippable:SetOnEquip( OnEquip )    inst.components.equippable:SetOnUnequip( OnUnequip )      return instendreturn  Prefab("common/inventory/orbstaff", fn, assets)

    I also tried the lightbulb one but didn't work at all..

    local light = inst.entity:AddLight()light:SetFalloff(0.7)light:SetIntensity(.5)light:SetRadius(1)light:SetColour(230/255, 230/255, 100/255)light:Enable(true)

    After using torchfire the item does shine when Equipped and stops when not equipped but you know how the torch/willow lighter looks - it has FIRE ANIMATION (yellow sparks, flames thing following the torch stick)

     

    Is there anyway to remove showing of flames and leaving only LIGHT?

     

    I tried commenting out some lines but effects where like:

    NO LIGHT AT ALL 

    or

    LIGHT + FLAMES visible -.-

     

    Guess I'm lost :/


  12. @Foxrai, clients do not need to have the statistics ran on their side as they do not have the components to handle that running. Statistical information should only be ran on the server side as otherwise it would cause an error. There are certain exceptions to this such as speed, but many things have replica's which already do all the hard work for you.

     

    If I'm understanding correctly when a player joins your server their UI isn't showing correctly? Is this an accurate assessment? If not could you please provide a screen capture to better denote exactly the issue clients are seeing?

     

     

    I tried changing them tho.. but it's no difference at all... looks like this :

    attaching log as well.. (from client position)

    and new prefabs but as i said with old ones it was exaclty the same...

    (corrected double minimap in prefabs, and changed commons/master)

     

    NOTE: THERE IS NO DEAD PLAYER on map! World is fresh generated, just the two of us who are on the screen. So the ghost icon is a bug as well... -.- HOST works fine

     

    NOTE2: the item works fine after Your modification 

     

    bug_by_foxraifox-d8gtbnt.jpg

    log.txt

    wakkari.lua


  13. @Kzisor,

     

    I guess with character it wasnt that issue o.o for free time - i donno if it's the item causing it thats why keeping in this thread - Item seems to be fine.

     

    Ow wait.. If I have master postinit then it means it's only for HOST ye? So only person hosting server gets that? And under that there are character statistics.. Shouldn't I change master to common for DST?

     

    that's in wakkari.lua

     

    'cause atm character run by guest doesnt have any stats (hunger, sanity etc) nothing. And all of these are under "master"


  14. @Foxrai, it's okay, everyone has to start somewhere. I will be making a series of guides to help new modders take their beginning steps into modding Don't Starve and Don't Starve Together. The first chapter is already out, it's about setting up your working environment to achieve the maximum efficiency possible while developing mods.
     

     

    Indeed there is many of the tutorials and stuff but none really explains WHAT DOES WHAT in the mods...

    Only like: Make it that way! Why? Because!

     

    Some things are simple to figure out by looking on original DS items, but not everything...Like for example I'm fighting with "Light" add now. It will come and it's satisfaction when you made it.. but still.

     

    Nice of you to make such introduction to mods ^^


  15.  

    @Foxrai, I think I found the issue.

     

    local inst.entity:AddNetwork() is wrong. Remove the local from it and it should work correctly.

     

    Also in your wakkari.lua file in the master_postinit function you don't need the following line:

     
    -- Minimap icon
    inst.MiniMapEntity:SetIcon( "wakkari.tex" )
     
    common_postinit is ran on both the server and the client and master_postinit is only ran on the server.

     

     

     

    Ok I see o_o

     

    Thank you for having patience to me in the first place... 

    Is really a noob if it comes to coding :/ even with reading forums tutorials and original ds files xP It just hates me.


  16. @Kzisor ok. Not touching the character then. Gonna be testing it soon then :)

     

    looks like this now (skipping assets lines):

     

    local prefabs = 
    {
    }
     
    local function fn()
     
        local function OnEquip(inst, owner)
            owner.AnimState:OverrideSymbol("swap_object", "swap_bellstaff", "swap_bellstaff")
            owner.AnimState:Show("ARM_carry")
            owner.AnimState:Hide("ARM_normal")
        end
     
        local function OnUnequip(inst, owner)
            owner.AnimState:Hide("ARM_carry")
            owner.AnimState:Show("ARM_normal")
        end
     
        local inst = CreateEntity()
        local inst.entity:AddNetwork()
        local trans = inst.entity:AddTransform()
        local anim = inst.entity:AddAnimState()
        local sound = inst.entity:AddSoundEmitter()
        MakeInventoryPhysics(inst)
         
        anim:SetBank("bellstaff")
        anim:SetBuild("bellstaff")
        anim:PlayAnimation("idle")
     
     if not TheWorld.ismastersim then
    return inst
    end
     
        inst:AddComponent("inspectable")
        
        inst:AddTag("sharp")
     
    (...) > weapon stuff blablabla
         
        inst:AddComponent("equippable")
        inst.components.equippable:SetOnEquip( OnEquip )
        inst.components.equippable:SetOnUnequip( OnUnequip )
     
        return inst
    end
    return  Prefab("common/inventory/bellstaff", fn, assets, prefabs)

  17. @Foxrai, first off it's not a stupid question. Secondly, it is recommended to read to sticky at the top of this sectionby rezecib to fully understand the differences brought to Don't Starve Together from Don't Starve.   Finally, because it's an easy question to answer I'll give you the answer, but please read the sticky!   You need to add inst.entity:AddNetwork() to your local function fn, right after the other entity initialization code. You'll also need the following code before any components since components do not run on the clients computer.

     

    Finished reading the sticky twice before posting previous post. Now took a peek again too...  

     

    And I swear I had those in mod o.o maybe I added too much of stuff... 

     

    looks like this now:

     

    local inst = CreateEntity()

    local inst.entity:AddNetwork()
    local trans = inst.entity:AddTransform()
    local anim = inst.entity:AddAnimState()
    local sound = inst.entity:AddSoundEmitter()
    MakeInventoryPhysics(inst)
     
    and before ANY components the other lines stands.
     
    I also had:   inst.entity:SetPristine() <<< such line Donno where from tho.. I probably read somewhere to add that -.-'
     
    Hmmm does that mean the same goes for the characters itself? :o