Wagtunes' Modding Questions

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
wagtunes
Posts: 316
Joined: Sun Feb 04, 2018 11:04 pm

Re: Wagtunes' Modding Questions

Post by wagtunes »

I figured it out.

This line:

Code: Select all

spawn("fx",2,self.x,self.y,1,"effect")
That "2" is the level number. I thought by using "self" if would figure the exact position on its own. But it only does for the square location and not for the level of the dungeon.

I didn't know that.

Okay, next thing. Where can I get a list of effects that the game is capable of producing? I assume there are quite a few of them.
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Wagtunes' Modding Questions

Post by Zo Kath Ra »

wagtunes wrote: Sun May 23, 2021 8:06 pm If that's the case, what is the fx object for? It doesn't really seem to do anything on its own. There are no slots to enter any code or anything.
You can place an "fx" object in the Dungeon Editor so you don't have to spawn it later.
Then you can use FX:setParticleSystem(name) and other functions to modify the fx object:
http://www.grimrock.net/modding_log1/sc ... reference/ -> FX

Yes, you still need to do this in a script.
But at least the position of the particle system is visible in the editor.
User avatar
Zo Kath Ra
Posts: 931
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Wagtunes' Modding Questions

Post by Zo Kath Ra »

wagtunes wrote: Sun May 23, 2021 8:18 pm Okay, next thing. Where can I get a list of effects that the game is capable of producing? I assume there are quite a few of them.
Download the asset pack, if you haven't already.
assets/particles/
wagtunes
Posts: 316
Joined: Sun Feb 04, 2018 11:04 pm

Re: Wagtunes' Modding Questions

Post by wagtunes »

Zo Kath Ra wrote: Sun May 23, 2021 8:41 pm
wagtunes wrote: Sun May 23, 2021 8:18 pm Okay, next thing. Where can I get a list of effects that the game is capable of producing? I assume there are quite a few of them.
Download the asset pack, if you haven't already.
assets/particles/
Yes, I have downloaded the asset pack. I will start going through that part of it. Haven't gotten to it yet.

Thanks for all your help. I am starting to learn this stuff. It has been, at times, a painful experience.
wagtunes
Posts: 316
Joined: Sun Feb 04, 2018 11:04 pm

Re: Wagtunes' Modding Questions

Post by wagtunes »

Question: I just pulled up a particle effect from the asset pack at random.

Code: Select all

defineParticleSystem{
	name = "damage_screen",
	emitters = {
		{
			spawnBurst = true,
			emissionRate = 1,
			emissionTime = 0,
			maxParticles = 1,
			boxMin = {0,0,1},
			boxMax = {0,0,1},
			sprayAngle = {0,30},
			velocity = {0,0},
			texture = "assets/textures/particles/damage_screen.tga",
			lifetime = {0.4, 0.4},
			colorAnimation = false,
			color0 = {0.35, 0, 0},
			opacity = 0.45,
			fadeIn = 0.001,
			fadeOut = 0.3,
			size = {2.3, 2.3},
			gravity = {0,0,0},
			airResistance = 1,
			rotationSpeed = 0,
			blendMode = "Translucent",
			objectSpace = true,
		}
	}
}
In going over all this code, I'm going to go out on a limb and say that it is possible to create your own fx based on the texture line alone. Replace the texture with a different texture and you get a different effect. Correct? Then, modifying other parameters, well, I guess there's no telling what could happen and I assume you can blow things up pretty badly.

Assumptions above correct?
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: Wagtunes' Modding Questions

Post by Isaac »

There is a script in the asset pack named particle.lua you can use those named particle systems with the fx object; just by name—no need to re-define them. Example: "teleporter", "death_dust", "crystal"...
wagtunes wrote: Sun May 23, 2021 6:27 pmYou said if you retrigger the script within 10 seconds you'll crash the editor.
That is specific to the script you have that explicitly assigns the name 'effect' to every object it spawns—irrespective of any existing object that might already have that id; this causes a crash when it happens.
If you have a dungeon you can send me with the source code to test it here, I can then be certain beyond any doubt.
The link for this is in your quote, so that you could run the fx demo map that was shown. ;)

https://www.dropbox.com/s/dp5yb052gotnq95/fx.zip?dl=1
wagtunes
Posts: 316
Joined: Sun Feb 04, 2018 11:04 pm

Re: Wagtunes' Modding Questions

Post by wagtunes »

Isaac wrote: Mon May 24, 2021 2:21 am There is a script in the asset pack named particle.lua you can use those named particle systems with the fx object; just by name—no need to re-define them. Example: "teleporter", "death_dust", "crystal"...
wagtunes wrote: Sun May 23, 2021 6:27 pmYou said if you retrigger the script within 10 seconds you'll crash the editor.
That is specific to the script you have that explicitly assigns the name 'effect' to every object it spawns—irrespective of any existing object that might already have that id; this causes a crash when it happens.
If you have a dungeon you can send me with the source code to test it here, I can then be certain beyond any doubt.
The link for this is in your quote, so that you could run the fx demo map that was shown. ;)

https://www.dropbox.com/s/dp5yb052gotnq95/fx.zip?dl=1
Thanks but if you check a few posts above, I figured out the problem. I had the wrong level.

Curious about my question above regarding making custom fx.
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: Wagtunes' Modding Questions

Post by Isaac »

http://www.grimrock.net/modding_log1/as ... icleSystem

This is a reference of the Particle system field values.

The regular LoG1 scripting reference shows the functions of the Fx object.
wagtunes wrote: Sun May 23, 2021 8:18 pm This line:

Code: Select all

spawn("fx",2,self.x,self.y,1,"effect")
That "2" is the level number. I thought by using "self" if would figure the exact position on its own. But it only does for the square location and not for the level of the dungeon.
It does actually. If you use self.level, the spawn occurs on the level of the script_entity—if self is not defined as an argument.

Using 2, spawns on level 2.
wagtunes
Posts: 316
Joined: Sun Feb 04, 2018 11:04 pm

Re: Wagtunes' Modding Questions

Post by wagtunes »

Okay, I'm up to my next project. I have a number of 2d images that I'd like to turn into 3d models in Blender. Is there an "easy" way to do this? I watched one video where a guy took a painting of a café that he made in Photoshop and then added into Blender and then did all these loop cuts and stuff that had my head spinning. I don't think I could pull that off.

Now the images are simple. One is an Egyptian Ankh.

Image

Is there an easy 2 or 3 click process to make this 3d?
minmay
Posts: 2768
Joined: Mon Sep 23, 2013 2:24 am

Re: Wagtunes' Modding Questions

Post by minmay »

No. You're asking for the digital equivalent of turning a cardboard cutout of Michelangelo's David into the actual sculpture. Turning a 2D image into a 3D one would require information that isn't there: there's no way to tell from this picture what the back or sides of the ankh look like, or how deep the carvings are, or if they're even carvings at all, they could just be painted on! Or how big parts of the ankh are compared to others, because there's no reference for the perspective of the camera.

The closest thing you can get is to take a couple hundred pictures of the object from different angles (look up "3D scanning"), but this takes ages, obviously requires that you have physical access to the object in question, and it won't give you a model suited for immediate use in a game so you'll still need to edit it heavily.

For a relatively simple object like this, the fastest way would be to sculpt it yourself using the image as a reference. If that doesn't appeal, you can always try searching the Web for free 3D models that are close to what you want. Perhaps this is close enough to what you want?
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.
Post Reply