Aphid98 Posted March 28, 2015 Share Posted March 28, 2015 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. Link to comment Share on other sites More sharing options...
Coski Posted March 28, 2015 Share Posted March 28, 2015 post here : http://forums.kleientertainment.com/forum/52-kleislist/ Link to comment Share on other sites More sharing options...
Aphid98 Posted March 29, 2015 Author Share Posted March 29, 2015 I have learned more about this but one thing is still in my way, Does anyone know where the red gem staff script is? Link to comment Share on other sites More sharing options...
Aphid98 Posted March 29, 2015 Author Share Posted March 29, 2015 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 Link to comment Share on other sites More sharing options...
Aphid98 Posted March 29, 2015 Author Share Posted March 29, 2015 post here : http://forums.kleientertainment.com/forum/52-kleislist/Wow... did you make that picture on your profile? Because it is amazing... Link to comment Share on other sites More sharing options...
Blueberrys Posted March 29, 2015 Share Posted March 29, 2015 @Aphid98 "..\scripts\prefabs\staff.lua" contains code for all (most?) staffs, See the red one for fire. Link to comment Share on other sites More sharing options...
Coski Posted March 30, 2015 Share Posted March 30, 2015 Wow... did you make that picture on your profile? Because it is amazing... you can ask this in my profile feed.and no , I didn't make that picture. Link to comment Share on other sites More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 @Aphid98 "..\scripts\prefabs\staff.lua" contains code for all (most?) staffs, See the red one for fire.Thanks alot! that really helped! I think it might work now Link to comment Share on other sites More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 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 More sharing options...
Blueberrys Posted March 30, 2015 Share Posted March 30, 2015 @Aphid98 Please provide your log after the crash. Link to comment Share on other sites More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 Btw: I am using the not quite pyro mod as a reference with the flaregun and all Link to comment Share on other sites More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 @Aphid98 Please provide your log after the crash.Here it is:log.txt Link to comment Share on other sites More sharing options...
Blueberrys Posted March 30, 2015 Share Posted March 30, 2015 @Aphid98In you log:firebreath.lua:141: unexpected symbol near '<eof>'Check line 141. If you don't find the problem, post the file. Link to comment Share on other sites More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 @Aphid98In you log:firebreath.lua:141: unexpected symbol near '<eof>'Check line 141. If you don't find the problem, post the file.OK found that error, now a new one has occurred. I have the new log here as welllog.txt: Link to comment Share on other sites More sharing options...
Blueberrys Posted March 30, 2015 Share Posted March 30, 2015 @Aphid98In 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 More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 @Aphid98In 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! firebreath.lua Link to comment Share on other sites More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 Wait!! nvm i think i found it Link to comment Share on other sites More sharing options...
Aphid98 Posted March 30, 2015 Author Share Posted March 30, 2015 @Blueberrysso i found it! But when i try to craft it, it it does the animation takes the resources and then the character says "I can't do that"...Any ideas as to what that is? Link to comment Share on other sites More sharing options...
Blueberrys Posted March 31, 2015 Share Posted March 31, 2015 @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 More sharing options...
Aphid98 Posted March 31, 2015 Author Share Posted March 31, 2015 @BlueberrysReally? Well wow i'm dumb... So how would i make it a special power, not an item? Link to comment Share on other sites More sharing options...
Aphid98 Posted March 31, 2015 Author Share Posted March 31, 2015 Wow... I just realized, All of my errors... I wouldn't have gotten any of them if i made it a special power... XD Link to comment Share on other sites More sharing options...
Blueberrys Posted March 31, 2015 Share Posted March 31, 2015 @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 More sharing options...
Aphid98 Posted March 31, 2015 Author Share Posted March 31, 2015 @BlueberrysHow would i bind it? Link to comment Share on other sites More sharing options...
Aphid98 Posted March 31, 2015 Author Share Posted March 31, 2015 @BlueberrysBtw: Thanks so much for your help I really appreciate it Link to comment Share on other sites More sharing options...
Blueberrys Posted March 31, 2015 Share Posted March 31, 2015 @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 More sharing options...
Recommended Posts
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.