[HELP] Healing Crystal Red and Green

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
DeDy
Posts: 132
Joined: Sun Oct 07, 2012 3:41 pm
Location: Brno, Czech Republic

[HELP] Healing Crystal Red and Green

Post by DeDy »

Hi all, please help created red and green crystal.

What am I doing wrong?

Download model, dif, particles, material: http://nightfall.eddo.cz/files/healing_ ... _green.zip

Image
Image
Last edited by DeDy on Fri Mar 01, 2013 12:37 pm, edited 1 time in total.
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html
Grimfan
Posts: 369
Joined: Wed Jan 02, 2013 7:48 am

Re: [HELP] Healing Crystal Red and Green

Post by Grimfan »

Hi DeDy,

You're going to need the advice of someone like Neikun or Skuggasvein on this (since they have both played around with healing crystals before) but from some of their comments it appears that several elements of healing crystals are hardcoded and can't be changed or modified effectively, and I think the blue coloration of healing crystals might be one of those hardcoded things (otherwise one of the two guys I've mentioned would have already made proper green or red crystals). Of course, you're going to need their input on this one to get a clear answer.

Sorry, I can't offer any more help on the matter. :(
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: [HELP] Healing Crystal Red and Green

Post by Skuggasveinn »

Grimfan is correct, the shader for the healing crystal is hardcoded, so if you create something thats a healingcrystal class it will always have the blue shader, the particle effects can be changed as you have found out. So for now there is not much we can do regarding modding the healing crystal.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [HELP] Healing Crystal Red and Green

Post by Komag »

You could completely recreate the effect from scratch though, at least I think it could be done
Finished Dungeons - complete mods to play
User avatar
DeDy
Posts: 132
Joined: Sun Oct 07, 2012 3:41 pm
Location: Brno, Czech Republic

Re: [HELP] Healing Crystal Red and Green

Post by DeDy »

What I can do :( Thanks for the information.
Nightfall: First Contact – http://dedy.euweb.cz/nightfall.html
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Diarmuid »

We were discussing this this week in the LotNR chat with Neikun.

You could completely recreate the effect with still slowly rotating projectiles objects for the crystals and use an invisible altar with a large click zone for the trigger. (More specifically, the altar has an invisible item that when you take invokes onDeactivate, which calls party:heal, setMouseItem(nil) and respawns the item back). The projectile model has to be translated down (like -15) in the GMT, and the projectile shot with an offset above (+15) so that the projectile doesn't collide.

EDIT: and of course, you would need two models, one active and one dead crystal, and swap them.

To get the id of a projectile you just created, use this wrapper function which returns the Id:

Code: Select all

function shootProjectileWithId(projName,level,x,y,dir,speed,gravity,velocityUp,offsetX,offsetY,offsetZ,attackPower, ignoreEntity,fragile,championOrdinal)
	local pIds = {}
	for i in entitiesAt(level, x, y) do
		if i.class == "Item" and string.find(i.id, "^%d+$") then
			pIds[i.id] = i.name
		end
	end
	shootProjectile(projName,level,x,y,dir,speed,gravity,velocityUp,offsetX,offsetY,offsetZ,attackPower, ignoreEntity,fragile,championOrdinal)
 	for i in entitiesAt(level, x, y) do
		if i.class == "Item" and string.find(i.id, "^%d+$") and not(pIds[i.id]) then
			return i.id
		end
	end  
end
So, example usage:

Code: Select all

local crystalId = shootProjectileWithId(projName,level,x,y,dir,speed,gravity,velocityUp,offsetX,offsetY,offsetZ,attackPower, ignoreEntity,fragile,championOrdinal)
and then you can store that somewhere and call this to get rid of it:

Code: Select all

findEntity(crystalId):destroy()
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: [HELP] Healing Crystal Red and Green

Post by Komag »

you got that DeDy? Yeah, me neither :lol:

seriously though, it's pretty advanced stuff, but maybe you are more up to it than I am :)
Finished Dungeons - complete mods to play
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Diarmuid »

I was throwing quick info around for people to catch, sorry I don't have much time to explain everything in detail :roll: . I am also not sure how to redefine alcoves/altars clicking zones. If someone (Neikun?) could supply me with the altar object (an invisible object that has a clickable area roughly the size of the crystal), I'm up for preparing and setting up the crystal projectile system for the community to use.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Neikun »

Eventually we're all going to need an in depth tutorial on how projectiles can be used to make animations.

I know using the altar as a trigger is going to function a lot like the knocking on the door feature of the Big Friendly Warden did. Where You pick up an invisible item that is instantly taken out of your mouse item.
I know that when Diarmuid is talking about a +15 offset it's because if a projectile hits anything, it disappears. That's the nature of a projectile. So if your model exists (15/3) 5 squares below the regular plain, and fire it (15/3) 5 squares about the regular plain, the model will show in the regular plain while the projectile is above the ceiling and outside any walls. Safe from any collision.

Also what will need to happen when the crystal activates and becomes dead, a timer will need to start to revive it again.

I wonder if we would actually need four projectiles in order to get the the smaller crystal pieces to rotate properly.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: [HELP] Healing Crystal Red and Green

Post by Neikun »

I should be able to get on that.

I'm going to need to turn the healing crystal model into an item for easy reference.

WHOO! Feels good to get my Grimrock modding cap back on!
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Post Reply