Jump to content

Need help making special powers


Recommended Posts

So I have been trying to make a character mod, and I wanted to give him special powers. His name is Cole and he is a dragonborn, I want to make him be able to breath fire. I was thinking that i could use the red gem staff fireball ability somehow but I don't know how... If anyone can help it would be much appreciated. :wickerbottomthanks:

Link to comment
Share on other sites

Sorry for being so infrequent with my questions... But I have found the fire staff bin files and i don't have a bin code editor so i cant see the code. I'm looking for a way to make my character shoot a fireball as if he was holding  the fire staff but when he isn't... Please tell me if that doesn't make sense :friendly_wink:  

Link to comment
Share on other sites

Now i have the problem where whenever i enable the mod it says that the mod "failed to run last time and has been disabled" and then i can't click any of the buttons and have to close the game... If you need further information quote me and ask

Link to comment
Share on other sites

@Aphid98

In your log:

...ommon/dont_starve/data/scripts/widgets/crafttabs.lua:249: table index is nilLUA ERROR stack traceback:        .../scripts/widgets/crafttabs.lua(249,1) in function 'DoUpdateRecipes'        .../scripts/widgets/crafttabs.lua(189,1) in function 'OnUpdate'        .../scripts/frontend.lua(538,1) in function 'Update'        .../scripts/update.lua(46,1)

See if you can figure this one out too. Check what's going on in crafttabs.lua at line 249.

 

It's quite easy finding these errors in your log yourself, just press ctrl+f and type "error".

 

Edit: Remember, crafttabs isn't causing the error, your mod is. You need to figure out what your mod does with crafttabs that causes this.

Link to comment
Share on other sites

@Aphid98

In your log:

...ommon/dont_starve/data/scripts/widgets/crafttabs.lua:249: table index is nilLUA ERROR stack traceback:        .../scripts/widgets/crafttabs.lua(249,1) in function 'DoUpdateRecipes'        .../scripts/widgets/crafttabs.lua(189,1) in function 'OnUpdate'        .../scripts/frontend.lua(538,1) in function 'Update'        .../scripts/update.lua(46,1)

See if you can figure this one out too. Check what's going on in crafttabs.lua at line 249.

 

It's quite easy finding these errors in your log yourself, just press ctrl+f and type "error".

 

Edit: Remember, crafttabs isn't causing the error, your mod is. You need to figure out what your mod does with crafttabs that causes this.

I cant find it... Can you? here is the file:

P.S: Thank you for your help! :joyous:

firebreath.lua

Link to comment
Share on other sites

@Aphid98 Er wait, your file has:

return Prefab("common/inventory/firestaff", red, assets, prefabs)

I don't think you're trying to re-make the firestaff. Change the prefab name.

return Prefab("firebreath", red, assets, prefabs)

-

And uh.. what are you trying to make exactly, a fire staff that shoots fire breath? Why is it craftable at all? Don't you want the character to be able to breathe fire, not craft and shoot it? I think you would only need the fire_projectile parts, not the rest of the firestaff code.

Link to comment
Share on other sites

@Aphid98 You might need to make a component that handles it which you can attach to the player. See how the projectile is being used in the red staff, and check the weapon component's relevant code. Then you can bind the functionality to a key, or however you want to activate it.

Link to comment
Share on other sites

@Aphid98 Binding the key is probably the easiest part. See if you can make the component first.

Ideally, you would also have a modified or custom stategraph that can play a firebreathing animation when the fireball is launched, or it would just come out of nowhere.

 

To bind a key, use one of the AddKey_Handler's in TheInput. (See input.lua)

Example:

TheInput = GLOBAL.TheInputlocal key = GLOBAL.KEY_G -- See constants.lua for all keys/codeslocal function PrintHi()    print("hi")endTheInput:AddKeyDownHandler(key, PrintHi)

This prints "hi" to the console when you press "g".

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...