Jump to content

The problem with transferring script of weapon


Recommended Posts

Hello! We are newcomers to the modifications, and recently faced with problems that we do not recruit how to solve. And we are very grateful if someone helps us.

We tried to take a script from a standard weapon in the DST, which is called "batbat" to transfer the possibility of "vampirism" to other weapons that we did. ( I attached the scripts of the original weapon and ours. )

The game breaks when the mob hits.

80830491a404d1800c69eabbb9c0142c.png

***

In addition, I would like to ask about the pictures with "name" and "none portraits".  I searched the information on the forum, but found nothing. They simply are not added to the game and instead of them there is emptiness. We tried to convert the files into tex. format and nothing.

77c2d46873a3f47452ea8506c28b8563.png

Perhaps these files need to be added as something else? Or?

batbat.lua

bone.lua

Link to comment
Share on other sites

Well, I can't really help you with the name thing, best thing I would suggest is to download someone else's character mod and take a look to see how they did theirs :\

I can, however, try to help you out with the Batbat thing. I'm assuming the "bone.lua" is the custom prefab you're trying to implement, and inside the script I noticed you used "TUNING.BONE_DRAIN" as a value to apply to your health and sanity. Have you defined that variable in the TUNING table? The crash log is saying that it's receiving a nil value in regards to the "DoDelta" function, which would be the result of not storing the value properly.

Make sure in your modmain.lua, you either include a local variable referring to the GLOBAL table's TUNING file or call it directly when storing your value:
 

local TUNING = GLOBAL.TUNING

TUNING.BONE_DRAIN = <your number>

  
OR

  
GLOBAL.TUNING.BONE_DRAIN = <your number>

 

Hope this helped :)

Edited by w00tyd00d
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...