Jump to content

need help with a strange item ghosting problem


Recommended Posts

hello there im having a problem with a mod ive made my firend helped me getting working but after adding a crafting recipe to it ive started running in to this odd problem where the item will just not be there but it is there (if that makes sence)

c_give("sooty") will work in 1 world
but then swich worlds or turn the game off and on
c_give("sooty") will give u nothing and nothing pops up in the consoul log 

 

or if u turn the world off and re open it the sooty item will no longer be visible  

 

but the item is there in a inventory slot and this can be seen when picking something up off the ground it will go in to the slot next to where this ghost item is

and heres a github link to it if u dont want to download the zip file https://github.com/monkeybee11/monkey-mod

recipe mod.zip

Link to comment
Share on other sites

I don't see theses lines :

 


    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

Try adding these to your sooty prefab, near line 38. Look at DST prefabs to see where it should go if you aren't sure. Try and tell here if it's better.

Link to comment
Share on other sites

19 minutes ago, Lumina said:

I don't see theses lines :

 


    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

Try adding these to your sooty prefab, near line 38. Look at DST prefabs to see where it should go if you aren't sure. Try and tell here if it's better.

no sry its still not a 100% fix some times it working and some times its doing the ghosting thing

 

Edited by monkeybee
Link to comment
Share on other sites

mate told me to uninstall DST and makesure all the DST files are off my pc  then reinstall it and check if my mod is working
done that and on 2/2 trys sooty is working

(know thats not meny trys but its ohmost midnight here)

 

so a  file mite of gotten corupted ?

 

Link to comment
Share on other sites

Still possible of course. You can also "verify integrity of game files" (something like this) next time instead of reinstalling all.

Anyway, if you don't have the problem anymore it's great. :)

Link to comment
Share on other sites

its still not working D:
just tryed agen today and it gave me a ghost item

ive just updated the code on github to include thos lines u sent me

ive mannaged to get it to tell me this

https://gyazo.com/7bb538bd555c5e6efd481732d7e23b04

me know its not a propper log but it didt crash so im not sure if the log file will show it but heres the log

https://pastebin.com/CYZbKgH4

(it will show a diffront time stamp bc me was stupid and tryed turning the game off and on to see if it woud work befor copying it)

 

Edited by monkeybee
Link to comment
Share on other sites

It looks like you based everything on a single-player mod. You'll run into fewer hiccups if you look at the DST code and mods as a reference instead. For example, in the modinfo you have an API version of 6, but DST uses 10.

But I think your main problem is that you never add networking to sooty. Look at a simple prefab like the spear as a reference.

Link to comment
Share on other sites

ahh ok (kinda under stand)
as for basing it off a single player mod all that me know is
the tuts me and my frend was fallowing it is 

 

and for other refrances me was "playing" around with willows bear and ingame spear to understand what im doing so really the only line of code (that me know of) is from the single player is 

	inst.components.equippable.dapperness = TUNING.DAPPERNESS_LARGE

bc ive copyed that from the sandcastle in SW and changed the DAPPERNESS_TINY to _LARGE

as for the API verion
it was 

API verion 5 in the sample mod file changed it to 6 to stop the thing form popping up telling me its on the wrong API verion 
will fix that ASAP

 

thx for the help ill look in to how to fix it now me know where to start ^_^

 

changing the API to 10  crashes the mod and auto disabled

Edited by monkeybee
Link to comment
Share on other sites

ive fixed my mod now its working ^_^

didt know this but me had to find a mod with the propper API verion and use the build renamer tool on that mods build.bin
then run my img throu spitter agen
then found out
 

owner.AnimState:OverrideSymbol("swap_object", "swap_sooty", "sooty")

works like C:\bla\bla\bla
and the last thing was looking for a folder that wasent there :3 so changed it to "sooty" and every thing is working now :D

(side note qustion how comes the code box on this forums cant have lua as a hilighted thing? seems kinda strange seeing the game uses lua )

Link to comment
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
 Share

×
  • Create New...