Ask a simple question, get a simple answer

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Duncan1246
Posts: 404
Joined: Mon Jan 19, 2015 7:42 pm

Re: Ask a simple question, get a simple answer

Post by Duncan1246 »

minmay wrote:
Duncan1246 wrote:Yes, I have scaled object in Blender first, then export and create a new object in LG. It's works well for a little object (scope) but I fails to do the same for forest_oak,I don't know why.
Again, did you apply the transformation? Object -> Apply -> Scale.
The animation for forest_oak probably includes setting the object location, rotation, and scale. So if you make an object transformation it probably won't do anything. You need to apply it to the actual mesh. Of course this will also likely break the animation.
I haven't understood what "applying" means, I haven't even see it in the bunch of menus displayable in Blender! And, you are right: no problem in "simple" scaling (without "apply") for the old oak model, because it's without animation.I can't made this without transform also animation... so it's better I find another idea.
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?

Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

CTRL + A with the object selected [Windows & Mac]. This normalizes the transformations to zero.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

Is it possible to add a custom condition icon on a champion portrait until this condition finishes like the standard conditions do ? If so, how is it done ?
User avatar
Zo Kath Ra
Posts: 937
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra »

AndakRainor wrote:Is it possible to add a custom condition icon on a champion portrait until this condition finishes like the standard conditions do ? If so, how is it done ?
viewtopic.php?f=18&t=9578&p=92312&hilit ... ons#p92312
- added support for custom conditions (defineCondition)

And that's all I know :(
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

Zo Kath Ra wrote:
AndakRainor wrote:Is it possible to add a custom condition icon on a champion portrait until this condition finishes like the standard conditions do ? If so, how is it done ?
viewtopic.php?f=18&t=9578&p=92312&hilit ... ons#p92312
- added support for custom conditions (defineCondition)

And that's all I know :(
Yeah thank you, I found it detailed here : https://github.com/JKos/log2doc/wiki/Asset-Definitions
So now I can add icons everywhere ;)
User avatar
The cube
Posts: 94
Joined: Tue Apr 23, 2013 6:09 pm
Location: Barren Desert

Re: Ask a simple question, get a simple answer

Post by The cube »

How do i figure out what animations a gameobject has?

I want to make a skeleton commander do the "summon undead" animation, but don't know its name.
I can't just make him do the summon undead action, because i do not want any undead to actually get summoned.

I know how to play an animation, it's like this:
skeleton.go.animation:play("nameOfAnimation")
I just need to figure out the animation's name.
alois
Posts: 112
Joined: Mon Feb 18, 2013 7:29 am

Re: Ask a simple question, get a simple answer

Post by alois »

If you look in the asset pack, in the scripts/monsters directory, you will find the "skeleton_commander.lua" file. At the beginning of the file there is the list of animations, one of which is "summonUndead".

Alois :)
User avatar
Duncan1246
Posts: 404
Joined: Mon Jan 19, 2015 7:42 pm

Re: Ask a simple question, get a simple answer

Post by Duncan1246 »

I have read plenty of things on the water elevation subject, and I applied some (Isaac,Minmay) outdoor with success. But indoors, the objects in the water seems white from outside the water! I attempt to modify some parameters, but I got nothing.
Here is the code:
SpoilerShow

Code: Select all

defineMaterial{
       name = "dc_water_surface",
       shader = "ocean_water",
       diffuseMap = "assets/textures/env/ocean_foam_dif.tga",
       normalMap = "assets/textures/env/ocean_normal.tga",
       displacementMap = "assets/textures/env/ocean_disp.tga",
       doubleSided = true,
       lighting = true,
       alphaTest = false,
       blendMode = "Translucent",
       textureAddressMode = "Wrap",
       glossiness = 80,
       depthBias = 0,
       texOffset = 0,
       foamOffset = 0,
       foamAmount = 0,
       waveAmplitude = 0.25,  --=------[changed from 2 to .25]
       onUpdate = function(self, time)
          self:setParam("texOffset", time*0.15)
       end,   
    }   
This replace water_surface_calm in
SpoilerShow

Code: Select all

defineObject{
	name = "dc_water_surface_underground",
	baseObject = "base_floor_decoration",
	components = {
		{
			-- updates global reflection and refraction maps
			class = "WaterSurface",
			planeY = 0.2,
			fogColor = math.saturation(vec(0.042, 0.09, 0.26), 0.5) * 0.5,
			fogDensity = 0.2,
			reflectionColor = vec(0.77, 0.9, 1.0) * 0.5,
			refractionColor = vec(1,1,1),
		},
		{
			-- builds a continuous mesh from underwater tiles
			class = "WaterSurfaceMesh",
			material = "water_surface_calm",
			underwaterMaterial = "water_surface_underwater",
			offset = vec(0, 0.2, 0),
		},
	},
	dontAdjustHeight = true,
	editorIcon = 264,
}
.
by a script:

Code: Select all

function setWater()
 dc_water_surface_underground_1.watersurfacemesh:setMaterial("dc_water_surface")
end
delayedCall(self.go.id, 0.001, "setWater")
. I use dongeon_floor_water, elevation -1.
Underwater all works well, the surface has a good amplitude of variations, but all that is in water appears white! Where am I wrong?
Duncan
Last edited by Duncan1246 on Wed May 20, 2015 8:18 pm, edited 1 time in total.
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?

Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

the water shader only works on materials that are named "ocean_water", "water_surface_calm", or "water_surface_underwater"
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.
User avatar
Duncan1246
Posts: 404
Joined: Mon Jan 19, 2015 7:42 pm

Re: Ask a simple question, get a simple answer

Post by Duncan1246 »

minmay wrote:the water shader only works on materials that are named "ocean_water", "water_surface_calm", or "water_surface_underwater"
You wants to says litterally, I means I have to replace water_surface_calm, not to define another water_surface??
EDIT: I don't believe it, but it's as simple as that: I change the name and it works without additional script! Thanks!
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?

Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
Post Reply