Page 160 of 396

Re: Ask a simple question, get a simple answer

Posted: Sat Oct 15, 2016 6:35 pm
by minmay
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).

Re: Ask a simple question, get a simple answer

Posted: Sat Oct 15, 2016 7:02 pm
by bongobeat
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

Posted: Sat Oct 15, 2016 7:17 pm
by AndakRainor
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?
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

Posted: Sat Oct 15, 2016 8:09 pm
by Isaac
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.
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?

Re: Ask a simple question, get a simple answer

Posted: Sat Oct 15, 2016 8:29 pm
by minmay
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.

Re: Ask a simple question, get a simple answer

Posted: Sat Oct 15, 2016 8:42 pm
by Isaac
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.

Re: Ask a simple question, get a simple answer

Posted: Fri Oct 21, 2016 5:03 pm
by zimberzimber
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.

Re: Ask a simple question, get a simple answer

Posted: Fri Oct 21, 2016 7:32 pm
by minmay
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.
The geometry is not uniformly dense.
Keep in mind that triangles are really cheap. Performance-wise, the heightmap mesh is almost free on modern GPUs.
zimberzimber wrote:Is there a way to remove an item from a surface via scripts? (Something like what a removeItem() if it existed
Impossible unless you find a security hole.

Re: Ask a simple question, get a simple answer

Posted: Sat Oct 22, 2016 12:43 am
by zimberzimber
Well, removing and re-adding the surface component works if it holds a single item :lol:

Re: Ask a simple question, get a simple answer

Posted: Sat Oct 22, 2016 1:01 am
by minmay
zimberzimber wrote:Well, removing and re-adding the surface component works if it holds a single item :lol:
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.