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!
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

That is damn pretty amazing.

My search on the forum gave multiple posts from 2015 that it was impossible, my bad :)

If you happen to know the posts where this technique is explained, please share it!
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 »

AFAIK one has never existed, I just mentioned that it was possible. The effect can be static or animated, and can be used to created (the unsupported) visual appearance of deeper or higher terrain. care must be taken with it, because —unmodified— the party, monsters, and item positions do not reflect the additional height or depth. At extreme heights, the party can walk right into a hill, and float over a chasm.

There is nothing special about the methods, it's done the same for any object. getWorldRotation returns the matrix, and that can be altered with setWorldRotation.

*You can experiment with this in-game, or using the Grimrock Model Toolkit, using any model in the asset pack.

**The effect is global. It affects the entire terrain map.

*** This works with a water mesh as well, and can be used to greatly reduce the heightmap deformations seen on the watersurface when it covers depressions in the terrain.

Image
This pond can seamlessly be walked into and out of, and the party does go underwater in the conventional way.
Last edited by Isaac on Fri Mar 08, 2019 4:42 am, edited 2 times in total.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

In that case, I have a simple solution. Lower the heightmap layer to -2, place a sandpile with the same color as the ground around it and make the .model:disable()
Add some extra stones/plants to make it look more appeasing and you basically have the same thing.

https://youtu.be/J7mGtWycYkU
NolanDaneworth
Posts: 21
Joined: Thu Feb 28, 2019 5:55 pm

Re: Ask a simple question, get a simple answer

Post by NolanDaneworth »

Are there any materials to read on defineSpell, defineTrait, etc ?
Have some ideas to bring priest magic into grimrock (apart from heals and cures that are in other thread) plus redo some already existed
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

https://www.nexusmods.com/legendofgrimr ... ?tab=files

Start here

The spell pack contains over 100 custom spells, including all sorts of buffs and other "priest related" spells.
The example basic spell pack dungeon editor file can be inspected on how it's all done.
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 »

NolanDaneworth wrote: Sat Mar 09, 2019 2:19 pm Are there any materials to read on defineSpell, defineTrait, etc ?
Have some ideas to bring priest magic into grimrock (apart from heals and cures that are in other thread) plus redo some already existed
Yes.


https://github.com/JKos/log2doc/wiki/Asset-Definitions
NolanDaneworth
Posts: 21
Joined: Thu Feb 28, 2019 5:55 pm

Re: Ask a simple question, get a simple answer

Post by NolanDaneworth »

Thank you again
User avatar
Lorial
Posts: 91
Joined: Sat Dec 29, 2018 12:27 pm

Re: Ask a simple question, get a simple answer

Post by Lorial »

I have a modelling question/request regarding the standard tileset of the pyramid, specifically the arching regular tomb walls.
Apparently, there is no proper custom tileset for the pyramid.
In a normal 1-tile high room they connect perfectly with the ceiling and higher rooms are no problem either if you stand on the lowest level as the inward-arching top of the walls covers the "hole". However, having lower rooms allow the player to see behind or "beyond" the arching top of the tomb walls.

I tried using the Grimrock Model Toolkit and Blender combination for the first time to change the .model file to an .obj one (and back), create a "flat" wall without the arching part by simply dublicating a lower part and removing the arch. Upon implementing it it simply won't work, though. I can place the wall in the editor, but either do I see nothing or strange brown/grey walls a few tiles away from the placed wall.

Here is the entry of my objects.lua:
SpoilerShow

Code: Select all

defineObject{
	name = "tomb_wall_01_flat2",
	baseObject = "base_wall_decoration",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/tomb_wall_01_flat.fbx",
			material = "tomb_wall",
			dissolveStart = 4,
			dissolveEnd = 6,
			staticShadow = true,
		},
		{
			class = "Occluder",
			model = "mod_assets/models/tomb_wall_01_flat.fbx",
		},
	},
	minimalSaveState = true,
}
I also tried defining a material in the .lua file for it (including editor crashes), but the texture stuff seems unnecessary for an item that I just slightly alter in appearance, such as the wall model.

1) Is it possibly that the size of my edited model which I could not change is simply too large? I seem to be unable to scale the model down (from 1 to 0.01) as seen in another video even though the main part is highlighted in red.

2) Is there a way to simply replace at least the tomb_walls_1 to 4 with my custom made model?

3) As an alternative, I tried using a "border" that only covers the open part of the top of the tomb wall tileset, but it won't show either. Guess I could try base_wall_decoration instead of base_wall, but still... a simple object/model cannot be so hard to implement, so what am I missing here?!

SpoilerShow

Code: Select all

defineObject{
	name = "tomb_border",
	baseObject = "base_wall",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/tomb_border.fbx",
			staticShadow = true,
		},
		{
			class = "Occluder",
			model = "assets/models/env/dungeon_wall_01_occluder.fbx",
		},
	},
	minimalSaveState = true,
}
[code][/spoiler]
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

It's not very easy to tell what's wrong with your model if you won't share the actual model...
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
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

I think it's because the tomb tile set was the first one AFAIK, and they might not have even had elevations or ladders in the game at that point (I have no idea really).

The problem as I read it, is that the outcropping on the top of the wall trim, has no top side to it, and Lorial wants to add one, or otherwise make it suitable for an intended use.

It's possible to alter the original model in Blender and use that one instead, but it is also possible to just add your own [patch] model as a second model component in the wall object. This has the bonus that you do not need to include a full copy of the original model... Although it's from the tomb set, so the model isn't likely that large of a file.
Post Reply