[Models] New created Models..
Re: [Models] New created Models..
*EDIT* It´s uploaded sucessful!!
Some shots from the example dungeon:
Some shots from the example dungeon:
Dungeon Master Resource Pack worker and passionated Beer drinker
Re: [Models] New created Models..
Lookin' good my friend!
-
- Posts: 73
- Joined: Sun Apr 12, 2015 2:57 pm
Re: [Models] New created Models..
I just got this mod, installed it intending to use some of the assets in a dungeon I'm working in. I'm having a problem with the game crashing while the mod is activated. This happens both in the editor and exported dungeons played from the custom game menu. The crash occurs when you go to attack using any weapon or even bare hands, but does not happen when you try to attack with a weapon you cannot use. This occurs even if there are no assets from the mod in the dungeon, simply enabling it in the init.lua is enough. Also removing all mod assets from the dungeon and disabling the mod instantly fixes the issue. I'm including a copy of the error log below. Any help from either the creator or the community in resolving this would be amazing! <3
SpoilerShow
mod_assets/dmcsb_pack/scripts/objects.lua:11: attempt to index global 'DMDungeonInit' (a nil value)
stack traceback:
mod_assets/dmcsb_pack/scripts/objects.lua:11: in function 'onAttack'
[string "Champion.lua"]: in main chunk
[string "Champion.lua"]: in function 'attack'
[string "AttackPanel.lua"]: in function 'select'
[string "AttackPanel.lua"]: in function 'drawItemSlot'
[string "AttackPanel.lua"]: in function 'update'
[string "AttackPanel.lua"]: in function 'update'
[string "Gui.lua"]: in function 'draw'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
stack traceback:
mod_assets/dmcsb_pack/scripts/objects.lua:11: in function 'onAttack'
[string "Champion.lua"]: in main chunk
[string "Champion.lua"]: in function 'attack'
[string "AttackPanel.lua"]: in function 'select'
[string "AttackPanel.lua"]: in function 'drawItemSlot'
[string "AttackPanel.lua"]: in function 'update'
[string "AttackPanel.lua"]: in function 'update'
[string "Gui.lua"]: in function 'draw'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
Re: [Models] New created Models..
There seems to be a problem in the file objects.lua in line 11
'DMDungeonInit' is written where it does not make any sense...
'DMDungeonInit' is written where it does not make any sense...
-
- Posts: 73
- Joined: Sun Apr 12, 2015 2:57 pm
Re: [Models] New created Models..
Thanks for the quick reply and help THOM! I really appreciate it!
Here's the code in the objects.lua that the error is referring too. I'm guessing that "DMDungeonInit." should be "DMDungeoninit.lua" ? My knowledge of scripting on this is not even really beginner and I'm learning as I go!
Here's the code in the objects.lua that the error is referring too. I'm guessing that "DMDungeonInit." should be "DMDungeoninit.lua" ? My knowledge of scripting on this is not even really beginner and I'm learning as I go!
SpoilerShow
cloneObject{
name = "party",
baseObject = "party",
onAttack = function (self, weapon)
return DMDungeonInit.whatWeapon(self, weapon)
end,
}
name = "party",
baseObject = "party",
onAttack = function (self, weapon)
return DMDungeonInit.whatWeapon(self, weapon)
end,
}
Re: [Models] New created Models..
On my opinion the complete term "DMDungeonInit.whatWeapon(self, weapon)" doesn't make sense. Doesn't refer to an existing command or anything that seem to be defined...
I presume you took this from someone elses script? What should this do?
I presume you took this from someone elses script? What should this do?
Re: [Models] New created Models..
My assumption of this is that the intended purpose is to run the whatWeapon() function on every attack, and have the option to return false ~to negate the attack.
*The logic for choice, probably being in the whatWeapon() function, or something it calls.
*The logic for choice, probably being in the whatWeapon() function, or something it calls.
-
- Posts: 73
- Joined: Sun Apr 12, 2015 2:57 pm
Re: [Models] New created Models..
Yes, this is from the mod that this thread is on. I got the mod from Grimrock.nexus and would like to use the stuff the creator used, but this bug is preventing me from doing so. I'm using the mod 'as is' downloaded directly from the website and applied per the instructions left by the creator. The only thing I have here to go on is the comment line above:
I'm not sure what it's for at all, but I hesitate to remove it in case it interferes with the special scripted items in the mod. What I'm looking for is to fix the crashing, and have the script work so the mod is the way the creator intended it.
Here's the entire section:
SpoilerShow
-- clone Party for special scripting
Here's the entire section:
SpoilerShow
-- clone Party for special scripting
cloneObject{
name = "party",
baseObject = "party",
onAttack = function (self, weapon)
return DMDungeonInit.whatWeapon(self, weapon)
end,
}
cloneObject{
name = "party",
baseObject = "party",
onAttack = function (self, weapon)
return DMDungeonInit.whatWeapon(self, weapon)
end,
}
Re: [Models] New created Models..
In the first Grimrock title, adding hooks (such as the onAttack hook), was only possible at load, by redefining an object; (in this case, the party).
This is the purpose of using cloneObject to redefine [to overwrite] the party object with one that has the onAttack hook. It means that anytime the player tries to attack, the DMDungeonInit.whatWeapon() function is run; presumably to check the attack, and possibly cause it to fail. Either that or it might use the passed parameters for other functions. I haven't read the mod's scripts, so this is a guess.
This is the purpose of using cloneObject to redefine [to overwrite] the party object with one that has the onAttack hook. It means that anytime the player tries to attack, the DMDungeonInit.whatWeapon() function is run; presumably to check the attack, and possibly cause it to fail. Either that or it might use the passed parameters for other functions. I haven't read the mod's scripts, so this is a guess.
-
- Posts: 73
- Joined: Sun Apr 12, 2015 2:57 pm
Re: [Models] New created Models..
Okay so after a long while and a lot of research I decided to remove line 11 in the object.lua file. (I'm doing this by making it a comment) This has fixed the bug for me and so far my testing of various items/props that was included in the mod hasn't caused it to crash again. So here's the result that I used. Thanks to everyone who helped out with this!
SpoilerShow
-- clone Party for special scripting
cloneObject{
name = "party",
baseObject = "party",
onAttack = function (self, weapon)
-- Killcannon edit to fix weapon use bug // return DMDungeonInit.whatWeapon(self, weapon)
end,
}
cloneObject{
name = "party",
baseObject = "party",
onAttack = function (self, weapon)
-- Killcannon edit to fix weapon use bug // return DMDungeonInit.whatWeapon(self, weapon)
end,
}