Cooldowns on Spell Casting

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!
Post Reply
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Cooldowns on Spell Casting

Post by David Ward »

Is there a way to adjust cooldowns on spellcasting? Bigger spells that have longer cooldowns make sense. Unless I'm missing something, it's not as simple as writing in a cooldown for, say, a meleeattack. Any thoughts?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Cooldowns on Spell Casting

Post by minmay »

Just attach an onComputeCooldown hook to a hidden trait?
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
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Cooldowns on Spell Casting

Post by David Ward »

Noob question here - I don't see "onComputeCooldown" in http://www.grimrock.net/modding/scripting-reference/

How does that work then?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Cooldowns on Spell Casting

Post by minmay »

It's not in the scripting reference but it exists, it's just like any other hook. Look at the asset pack, two of the game's traits have onComputeCooldown hooks.
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
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Cooldowns on Spell Casting

Post by David Ward »

Gotcha. I take it then there may be a few of these that are not listed on the scripting reference page?
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Cooldowns on Spell Casting

Post by JKos »

Nice one minmay, updated to here https://github.com/JKos/log2doc/wiki/Asset-Definitions

I think that minmay should get some kind of award for his help to the community, you know all the answers even it's not documented, maybe AH should hire him :D.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
Post Reply