Jump to content

Recommended Posts

21 minutes ago, TheBigDeal said:

I was messing around with items trying to get them to work, and now there is no errors for me to see whats wrong anymore... no idea where to go from here.

 

Post your client log anyways(or your item code)? The only time I crashed without an error is when the game literally froze my pc and the game killed itself after a while, so I doubt you didn't get any error when crashing.

TBH, i think i made this post half asleep and i forgot i even made it... i temp fixed it though, I just disabled the items for now.

 

What code would be needed for this? modmain and the item.lua? anything else?

Edited by TheBigDeal
40 minutes ago, TheBigDeal said:

TBH, i think i made this post half asleep and i forgot i even made it... i temp fixed it though, I just disabled the items for now.

 

What code would be needed for this? modmain and the item.lua? anything else?

whatever you think is related, and maybe a crash log, (Documents/Klei/DontStarveTogether/clientlog.txt)

Alrighty then, thanks for replying so fast!

So I got the files I think would be needed, so there are 2 items a crown and a trident.

Both of which do not work and the crown I don't think even has any anim files because I didn't get to that yet, literally just added that today and then went back to the trident.

I think that should be all of the files required, if you need any more info or more files please tell me and I shall provide.

I wouldn't worry much about the crown, the trident is the main problem but if you wanna get the crown to not crash also, that'd be cool.

 

Once more, thanks so much!!

DST Modding Stuff.zip

Here

I only reuploaded the stuff that I changed;

Renamed inventoryitem images for crown from "Crown" to "crown" (I also commented the crown zip assets in crown.lua since they dont exist yet in /anim/)

renamed trident and swap_trident builds from "pitchfork" and "swap_pitchfork" to "trident" and "swap_trident"

fixed the override symbol to properly use the "swap_pitchfork" folder inside "swap_trident"'s build, (since it was a copy paste)

I didn't mess around with the character but it didn't crash after these changes

 

7 hours ago, TheBigDeal said:

So i'm working on the crown, and i want it to regen health, i have this for regening health:

    inst.components.health:StartRegen(5, 2)

Where should i put that in the crown.lua to work?

i'd put it in the onequip function, using owner instead of inst

and then putting

owner.components.health:StopRegen()

in onunequip function to stop the regen once you unequip

5 hours ago, Aquaterion said:

i'd put it in the onequip function, using owner instead of inst

and then putting


owner.components.health:StopRegen()

in onunequip function to stop the regen once you unequip

Yeah if i do that it seems that when you spawn in it will start regening, but anytime afterwards it will not.

lol, nvm i misunderstood what you said, it works perfectly now.

But one final question:

In the anim folder and such for the .tex files, how would i go about makng those show different textures and such because i still just have a pitchfork and a crown.

4 minutes ago, TheBigDeal said:

lol, nvm i misunderstood what you said, it works perfectly now.

But one final question:

In the anim folder and such for the .tex files, how would i go about makng those show different textures and such because i still just have a pitchfork and a crown.

Not sure what you mean? can you try to rephrase it? "those" being what?

Yeah that was bad sorry, still half asleep.

So how would i change the atlas-0's to show the correct textures that i have made for when you actually hold the weapon or wear the crown?

I've looked at some of them and they have like double textures, for example the spear has a spear on the left and on the right is the same exact spear, and it is quite confusing.

1 hour ago, Aquaterion said:

you can use Textool to change .tex to .png and vise versa weapons use 1 "sprite" the character rotates it as it needs

So I have this code to make a custom crafting tab:

local asgoretab = AddRecipeTab( "Asgore's Tab", 997, "images/hud/asgoretab.xml", "asgoretab.tex", "asgore_builder")

AddRecipe("King's Trident", 
{GLOBAL.Ingredient("redgem", 3), GLOBAL.Ingredient("nightmarefuel", 1)}, 
asgoretab, TECH.NONE, nil, nil, nil, nil, "asgore_builder", 
"images/inventoryimages/kingtrident.xml", "kingtrident.tex" )

 

and it crashes saying:

[00:00:54]: [string "../mods/Asgore/modmain.lua"]:55: attempt to index global 'TECH' (a nil value)

I looked at another mod which uses the same code which works fine and i am not sure why this is happening.

 

Client log included incase you wanted to see the entire thing

client_log.txt

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
×
  • Create New...