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
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

I think that a heal spell needs to be targetable on the other party members; that or have its healing effect split among them, only healing a small amount (until higher levels). It should also cost a tremendous amount, since energy is freely regenerated with time and potions. If made a feasible option to heal with energy potions ~why make healing potions at all?
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

I have 3 healing spells - one for self (greater healing), one for entire party (healing based on number of injured champions), and heal other (heal target in front/behind the caster based on their position)
My asset pack [v1.10]
Features a bit of everything! :D
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

zimberzimber wrote:(heal target in front/behind the caster based on their position)
That is a pretty neat idea; and sounds very functional. The player adjusts the champion positions to target, and inherently the mage at the back heals the melee fighter in front. 8-)
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

Isaac wrote:
zimberzimber wrote:(heal target in front/behind the caster based on their position)
That is a pretty neat idea; and sounds very functional. The player adjusts the champion positions to target, and inherently the mage at the back heals the melee fighter in front. 8-)
Yup! And the same applies to other buff spells like that vanilla protection one.
I'm thinking about slightly changing that, removing the self targeted spell, and have it heal the first row on the casters column. 1 less spell to code, and a little bit more action for the player. (You'll have to bring the mage to the first row and use the heal spell to heal self)
My asset pack [v1.10]
Features a bit of everything! :D
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Question: What is craftcomponent:create() , and how is it used?

** :oops: I meant craftpotion:create()
Last edited by Isaac on Mon Aug 15, 2016 8:34 am, edited 1 time in total.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Ask a simple question, get a simple answer

Post by akroma222 »

Isaac wrote:Question: What is craftcomponent:create() , and how is it used?
No craftcomponent that i can see.... :?
Do you mean CraftPotionComponent? (if not, where may I find this - craftcomponent:create() ?)
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

akroma222 wrote:
Isaac wrote:Question: What is craftcomponent:create() , and how is it used?
No craftcomponent that i can see.... :?
Do you mean CraftPotionComponent? (if not, where may I find this - craftcomponent:create() ?)
Yeah; my mistake.

CraftPotionComponent:create()
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 »

You can see it in the mortar definition;

Code: Select all

defineObject{
	name = "mortar",
	baseObject = "base_item",
	components = {
		{
			class = "Model",
			model = "assets/models/items/mortar_pestle.fbx",
		},
		{
			class = "Item",
			uiName = "Mortar and Pestle",
			gfxIndex = 117,
			weight = 1.0,
			description = "An alchemist tool used to craft potions from herbs.",
			traits = { "usable" },
		},
		{
			class = "CraftPotion",
			requirements = { "alchemy", 1 },
		},
	},
}
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

AndakRainor wrote:You can see it in the mortar definition;
...
You can, but I'm curious what its create() method does. It seems to take arguments, but with no obvious outcome or output.

*Perhaps it ignores arguments, but then what does it do?
Last edited by Isaac on Mon Aug 15, 2016 9:37 am, edited 1 time in total.
minmay
Posts: 2789
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

The create function is included as a field on all GameObjects and Components. I don't think it's actually useful for anything from the user scripting interface.
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