Ask a simple question, get a simple answer
-
billb52
Re: Ask a simple question, get a simple answer
Zo Kath Ra
Thankyou for your speedy reply, it is exactly what I wanted and works a dream!
Thankyou for your speedy reply, it is exactly what I wanted and works a dream!
Re: Ask a simple question, get a simple answer
Turtles drop between 0 - 2 turtle steaks at default.
What's the quickest way to turn off all "default randomized" drops?
What's the quickest way to turn off all "default randomized" drops?
Re: Ask a simple question, get a simple answer
MonsterComponent:setLootDrop(table) Will replace an individual turtle's loot, or you could redefine the turtle's monster definition to affect them all; just change the table to suit.
This is the default, and it sets a 75% chance for a steak, twice.
The complete monster definition is in the downloadable asset pack for the game.
But this abbreviated definition should work for you; just change the percentages in the loot table.
Code: Select all
lootDrop = { 75, "turtle_steak", 75, "turtle_steak" },
The complete monster definition is in the downloadable asset pack for the game.
But this abbreviated definition should work for you; just change the percentages in the loot table.
Code: Select all
--Place in monsters.lua, in the mod scripts folder.
defineObject{
name = "turtle",
baseObject = "turtle",
components = {
{
class = "Monster",
meshName = "turtle_mesh",
hitSound = "turtle_hit",
dieSound = "turtle_die",
footstepSound = "turtle_footstep",
hitEffect = "hit_blood",
capsuleHeight = 0.2,
capsuleRadius = 0.7,
health = 90,
evasion = -10,
exp = 60,
resistances = { ["poison"] = "weak" },
traits = { "animal" },
headRotation = vec(90, 0, 0),
lootDrop = { 75, "turtle_steak", 75, "turtle_steak" },
},
},
}
Re: Ask a simple question, get a simple answer
I finally got around downloading the default grimrock 2 asset pack, I added the 2 lines to my init.lua, but no dice.
No explanation how to add it...
https://ibb.co/fBdAzo
As usual, I have no idea what I'm doing :p
No explanation how to add it...
https://ibb.co/fBdAzo
As usual, I have no idea what I'm doing :p
Re: Ask a simple question, get a simple answer
Well - question is, what do you want to do?
Re: Ask a simple question, get a simple answer
Adding the complete asset pack I suppose and activating it in my mod like I did with all the other stuff by adding the correct lines into my init.lua file. For example the asset pack contains a "snail" monster from LoG1. So basically as long I can't see a snail in my monster list in the dungeon editor, then I suppose I failed to add properly the downloadable asset pack 
https://ibb.co/cMdFX8
The assets folder is the grimrock2_asset_pack_2
https://ibb.co/cMdFX8
The assets folder is the grimrock2_asset_pack_2
Re: Ask a simple question, get a simple answer
First principle here, is that the game already has the asset pack imported as part of it. By making user defined assets, one both creates new assets, and can overwrite any existing assets that they assign an identical name. See the above script, and where it lists its own name as the turtle, and uses the existing turtle object as a base for itself. In this way it overwrites the defined turtle object, while retaining its own changes to it.
The first line of the script is a comment, it mentions where to save the file in your mod folder.
The first line of the script is a comment, it mentions where to save the file in your mod folder.
Last edited by Isaac on Sun Jun 24, 2018 7:44 pm, edited 1 time in total.
Re: Ask a simple question, get a simple answer
You don't need to add the asset pack because it's already loaded when you start the game (or the editor). Mind that alle assets from the main-game lie in a folder called "assets". This is already included in the game-file.
All added assets are usuall placed in a folder named "mod_assets" (and so the path-names starts to these assets).
Now the confusing part: Some assets are included in the game-file (like the model and the texture of the snail you've mentioned) but the definition is not.
I can't remember exactly but I think there is a definition of the snail included in the script folder of the asset-pack, but it is not "activated" - no path leads to it. So that would be the task to be done by you.
EDIT: Kind of a race between Isaac and me, hm?
All added assets are usuall placed in a folder named "mod_assets" (and so the path-names starts to these assets).
Now the confusing part: Some assets are included in the game-file (like the model and the texture of the snail you've mentioned) but the definition is not.
I can't remember exactly but I think there is a definition of the snail included in the script folder of the asset-pack, but it is not "activated" - no path leads to it. So that would be the task to be done by you.
EDIT: Kind of a race between Isaac and me, hm?
Re: Ask a simple question, get a simple answer
Assets for some of the Grimrock 1 monsters exist in the Grimrock 2 asset pack, but they are not defined in the Grimrock 2 game. They don't all work in polished manner either. The snail (for instance) has default animations that will clip its eye-stalks through some of the LoG2 doors. The floor grates in LoG2 do not accommodate the Tentacle monster's animations; and actually that can't be fixed without using a custom floor grate model.
Re: Ask a simple question, get a simple answer
Concerning the LoG1 monsters mind that there are a few things to look at when you want to include them.
have a look at this thread: viewtopic.php?f=22&t=8278
have a look at this thread: viewtopic.php?f=22&t=8278