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
KhrougH
Posts: 68
Joined: Tue Sep 04, 2018 11:45 pm
Location: Roma

Re: Ask a simple question, get a simple answer

Post by KhrougH »

Pompidom wrote: Tue Nov 06, 2018 8:04 pm That Mega drive is horrible. The link you sent me back then averaged at 3 mbps. While I can get a full 200 mbps from WeTransfer.com
yes, but you can't share files on wetranfer. you can only send to a mail and after one week the file disappear.
MEGA is the same than DropBox. you also have a client for downloading and uploading , and you can pause it and continue when you can... well... :D i find it a good FREE solution.
[...]
All those moments will be lost in time, like tears in rain.
Time to die.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Code: Select all

defineObject{
	name = "ud_roof_01",
	baseObject = "base_wall_decoration",
	components = {
		{
			class = "Model",
			model = "mod_assets/vb_models/models_under_d/env/ud_roof_01.fbx",
			staticShadow = true,
		},
	},
	replacesWall = true,
	tags = { "VB","Under Dungeon" },
}
ud_roof_01:setWorldRotationAngles(0,90,180)


I want to create an ud_roof_rotated_01 that's automatically rotated. So I don't have to deal with world rotation scripts.
User avatar
Isaac
Posts: 3179
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Add an onInit hook function to one of the components, that inspects the object's position and relation to other objects near it, and rotates its facing accordingly; or depending on how it's used, it could just rotate the model component itself.

A related example of this can be found in the asset pack (IRRC), with the "forest_chasm", but it's not directly applicable, not in the 'cut & paste' sense.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

Isaac wrote: Sat Nov 10, 2018 12:18 am Add an onInit hook function to one of the components, that inspects the object's position and relation to other objects near it, and rotates its facing accordingly; or depending on how it's used, it could just rotate the model component itself.

A related example of this can be found in the asset pack (IRRC), with the "forest_chasm", but it's not directly applicable, not in the 'cut & paste' sense.
I was hoping someone would just post it in the code :D
User avatar
Isaac
Posts: 3179
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Pompidom wrote: Sat Nov 10, 2018 12:57 pm I was hoping someone would just post it in the code :D
Ah ha... But your post said, "I want to create...", so I pointed the way. ;)
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

forest_heather.

Is there any way to increase the rendering distance of this specific object ?
User avatar
Isaac
Posts: 3179
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

In the object definition you can change the start & end Dissolve values for the model component. The defaults are 4 & 6 (tiles) distance.
You might also consider changing the maxUpdateDistance of the animation component, as the default is 5; otherwise they will be visible, but won't move.

Code: Select all

defineObject{
	name = "forest_heather",
	baseObject = "base_floor_decoration",
	components = {
		{
			class = "Model",
			model = "assets/models/env/forest_heather.fbx",
			dissolveStart = 4,
			dissolveEnd = 6,
		},
		{
			class = "Animation",
			animations = {
				sway = "assets/animations/env/forest_heather_idle.fbx",
			},
			playOnInit = "sway",
			loop = true,
			maxUpdateDistance = 5,
		},
		
	},
	editorIcon = 240,
	reflectionMode = "never",
	minimalSaveState = true,
}
**If this is just filler for distant (inaccessible) hills, you might consider using flat plane model, with an animated texture; (or even just a static one).

___

About "ud_roof_01", you will have to be very specific about what it is that you want it to do.
Pompidom
Posts: 497
Joined: Sun May 06, 2018 9:42 pm

Re: Ask a simple question, get a simple answer

Post by Pompidom »

For inside buildings I simply worldrotate them upside down.
I was simply wondering if I could simply create an object that was already 180 degrees rotated instead of having to WorldRotate manually every single roof. Not really that important.

https://www.youtube.com/watch?v=jafRE3s ... e=youtu.be

In this clip at 0:15 you can see the normal roofs and then inside the shop at 0:22 rotated 180°
User avatar
Isaac
Posts: 3179
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Pompidom wrote: Sun Nov 11, 2018 6:58 pm I was simply wondering if I could simply create an object that was already 180 degrees rotated instead of having to WorldRotate manually every single roof. Not really that important.
Load the model into the GMT, rotate it 180°, save it, and use in a second object.

*Or change the default object to have it swap the model (where appropriate) in an onInit hook; but in that case... you could just rotate the component instead.
User avatar
THOM
Posts: 1267
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

--ähm ...

Or simply copy the object definition and add to the new model component

Code: Select all

rotation = vec(180, 0, 0), 
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Post Reply