Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Nowhere, because they don't affect stats. onComputeCooldown is called whenever a MeleeAttackComponent, FirearmAttackComponent, ThrowAttackComponent, or RangedAttackComponent is used. onComputeCritChance and onComputeAccuracy are called whenever the champion's crit chance or accuracy is wanted (either they make an attack or they have the stats or inventory panel open).
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
Hi there,
I just wonder, when you use some tileset with the floor set as heightmap/material (e.g. beach ground), does this kind of floor count as object(s) or anything? Does this need more ressources or take more size in the savegame?
I just wonder, when you use some tileset with the floor set as heightmap/material (e.g. beach ground), does this kind of floor count as object(s) or anything? Does this need more ressources or take more size in the savegame?
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Ask a simple question, get a simple answer
It must be one object per tile, exactly as for any other "flat" floors. But a flat floor with a basic model of only one square face takes less memory than any more detailed model.bongobeat wrote:Hi there,
I just wonder, when you use some tileset with the floor set as heightmap/material (e.g. beach ground), does this kind of floor count as object(s) or anything? Does this need more ressources or take more size in the savegame?
Re: Ask a simple question, get a simple answer
I assumed that any deformation in the ground would cause/generate a divided model for the floor of any tile that it crosses, or is it some kind of render hack?AndakRainor wrote:It must be one object per tile, exactly as for any other "flat" floors. But a flat floor with a basic model of only one square face takes less memory than any more detailed model.
Re: Ask a simple question, get a simple answer
Tiles only place the objects they have in their "floor", "ceiling", "wall", "pillar", etc. tables. The forest_ground tile, for example, places no objects whatsoever.
The actual heightmap mesh is created by HeightmapComponent. This doesn't create additional objects, and in fact the heightmap mesh is not saved in savegames, it gets generated again every time the game is loaded (you can test this quite easily). It is a single mesh for the entire level, not multiple meshes, and the mesh is contiguous along contiguous tiles.
The actual heightmap mesh is created by HeightmapComponent. This doesn't create additional objects, and in fact the heightmap mesh is not saved in savegames, it gets generated again every time the game is loaded (you can test this quite easily). It is a single mesh for the entire level, not multiple meshes, and the mesh is contiguous along contiguous tiles.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
But the question I suppose had was whether or not the geometry is denser in places of deformation, or if the mesh is uniformly dense and just deformed by the heightmap, or not.
*When I said, 'model', I did mean the floor of the entire map; not separate floor models for every tile.
*When I said, 'model', I did mean the floor of the entire map; not separate floor models for every tile.
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
Is there a way to remove an item from a surface via scripts? (Something like what a removeItem() if it existed)
Destroying them throught GameObject:destroy() or erasing their table seems to leave their ghost on the surface...
That raises the problem where if you trigger the destroy script again, it'll destroy every instance of that item on the map, even though their ID is nil.
Destroying them throught GameObject:destroy() or erasing their table seems to leave their ghost on the surface...
That raises the problem where if you trigger the destroy script again, it'll destroy every instance of that item on the map, even though their ID is nil.
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
Re: Ask a simple question, get a simple answer
The geometry is not uniformly dense.Isaac wrote:But the question I suppose had was whether or not the geometry is denser in places of deformation, or if the mesh is uniformly dense and just deformed by the heightmap, or not.
*When I said, 'model', I did mean the floor of the entire map; not separate floor models for every tile.
Keep in mind that triangles are really cheap. Performance-wise, the heightmap mesh is almost free on modern GPUs.
Impossible unless you find a security hole.zimberzimber wrote:Is there a way to remove an item from a surface via scripts? (Something like what a removeItem() if it existed
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- zimberzimber
- Posts: 432
- Joined: Fri Feb 08, 2013 8:06 pm
Re: Ask a simple question, get a simple answer
Well, removing and re-adding the surface component works if it holds a single item
My asset pack [v1.10]
Features a bit of everything!
Features a bit of everything!
Re: Ask a simple question, get a simple answer
Actually, it doesn't. This taints the item and will cause a crash as soon as the user tries to save the game or pick up the item.zimberzimber wrote:Well, removing and re-adding the surface component works if it holds a single item
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.