Jump to content

I need help with a custom character item issue.

Recommended Posts

(My English is not good, so I used a translator.)
Hello. There seems to be a problem with my custom character item mod. The game ends abruptly without warning. I spent days trying to fix this, but it didn't work.
I think custom items are the problem. After deleting it, the mod worked fine. But I can't figure out exactly where the problem is.
I don't know if this will help, but I'll attach the log and lua files.
(Ignore any language you see for the first time. It's just Korean.)

modmain.lua dragoonspear.lua client_log.txt

Link to comment
Share on other sites

Hi there.

dragoonspear_recipe in modmain.lua, when used for dragoonspear_recipe.sortkey, cannot be used since it's null (nil value as seen in the log) so it mean its either not instantiated, or some issue happened when trying to instantiate it.

If you check the line above, you will notice that you named your variable recipe dragoonspear_Recipe. Lua is case sensitive ("myVariable" is not the same as "MyVariable"), hence why it could not find dragoonspear_recipe. Just make sure your variable has the exact same name and it should be fine.

Edited by Nelzanger
Fixed typos
  • Like 1
Link to comment
Share on other sites

The log says that there is an error in modmain.lua at line 77 and it says that 'dragoonspear_recipe' is a nil value (it doesn't exist).

local dragoonspear_Recipe = AddRecipe( "dragoonspear", -- Here you create a local 'dragoonspear_Recipe' with uppercase R
 { Ingredient("twigs", 2), Ingredient("flint", 2), Ingredient("houndstooth", 2)},
dragoonspear_recipe.sortkey = 0 -- But here you're using one with lowercase r


Change 'dragoonspear_recipe.sortkey = 0' to 'dragoonspear_Recipe.sortkey = 0'.

Link to comment
Share on other sites

@Nelzanger @-t- 

(Sorry for being late. I was sleeping.) First of all, thank you for your kind reply. As you said, even though I tried to fix the file, the game suddenly shuts down like before. So I read the log file once (if I read it correctly), there seems to be an error in line 81 of the modmain file.
It is written:


[00:00:30]: [string "../mods/inlyeng/modmain.lua"]:81: attempt to index field 'INLYENG' (a nil value)

I'll attach the log file again.


Link to comment
Share on other sites

You should put your character's describe strings in your character's speech file, even if it's for a modded item.

STRINGS.CHARACTERS.GENERIC.DESCRIBE.DRAGOONSPEAR = "아주 날카로운 창이야."  --일반적인 캐릭터에게 조사하기 뜨면 뜨는 문구


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

  • Create New...