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!
2498billb
Posts: 41
Joined: Thu Dec 30, 2021 6:06 pm

Re: Ask a simple question, get a simple answer

Post by 2498billb »

Hi Issac
Many thanks for your help Issac
Whisper
Posts: 187
Joined: Fri Apr 13, 2012 5:01 pm

Re: Ask a simple question, get a simple answer

Post by Whisper »

How to check cooldown modifier for Champion?

Also how to chack cooldown modifier for certain weapon (which cooldown can be altered by skill like "15% faster attack with heavy weapons")?


I know there is GetCooldown command but how to write it?
Whisper
Posts: 187
Joined: Fri Apr 13, 2012 5:01 pm

Re: Ask a simple question, get a simple answer

Post by Whisper »

minmay wrote: Thu Dec 08, 2022 8:28 pm Also, you asked for (and I provided) a Chebyshev distance test, but Grimrock uses Taxicab geometry for party and monster movement, not Chebyshev. So it would make more sense to use a Taxicab distance check: abs(e.x-px)+abs(e.y-py) <= [distance] instead of max(abs(e.x-px), abs(e.y-py)) <= [distance]. Consider this.
2 minmay, need your help please.

Using console in-game:

How to check cooldown modifier for Champion?
Also how to chack cooldown modifier for certain weapon (which cooldown can be altered by skill like "15% faster attack with heavy weapons")?
minmay
Posts: 2770
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

You cannot feasibly do either of those things from the in-game console. The cooldown inflicted by attacks depends on the results of 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.
Whisper
Posts: 187
Joined: Fri Apr 13, 2012 5:01 pm

Re: Ask a simple question, get a simple answer

Post by Whisper »

minmay wrote: Tue Mar 14, 2023 1:30 am You cannot feasibly do either of those things from the in-game console. The cooldown inflicted by attacks depends on the results of onComputeCooldown hooks.
Ok, can i ask question about game mechanics.


Do cooldown reductions stack with other? From trait (Quick), from skill (Dodge, 3) and from item (Tirin)?
minmay
Posts: 2770
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

onComputeCooldown hooks stack multiplicatively with each other, so Quick and Uncanny Speed (the Dodge 3 trait) stack.

Bracelet of Tirin does not modify the actual cooldown of actions, instead it makes the wearer's cooldowns elapse faster, by adding 15 to the cooldown_rate stat.
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.
Whisper
Posts: 187
Joined: Fri Apr 13, 2012 5:01 pm

Re: Ask a simple question, get a simple answer

Post by Whisper »

minmay wrote: Wed Mar 15, 2023 8:09 am onComputeCooldown hooks stack multiplicatively with each other, so Quick and Uncanny Speed (the Dodge 3 trait) stack.

Bracelet of Tirin does not modify the actual cooldown of actions, instead it makes the wearer's cooldowns elapse faster, by adding 15 to the cooldown_rate stat.
Ok, thank you. To make sure, it is not possible to check in-game with console command not only both OnComputeCooldown but also cooldown_rate stat?



p.s.
There is item in Final Adventure mod, called Selfidian mirror, it shows cooldown_rate stat (i think, this stat) for champion attacks in-game.. It shows in description of item and is auto-updated with any change.
minmay
Posts: 2770
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Yes, you can easily show a champion's cooldown rate like any other stat, just call Champion:getCurrentStat("cooldown_rate") to obtain it.
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.
Whisper
Posts: 187
Joined: Fri Apr 13, 2012 5:01 pm

Re: Ask a simple question, get a simple answer

Post by Whisper »

minmay wrote: Wed Mar 15, 2023 10:58 pm Yes, you can easily show a champion's cooldown rate like any other stat, just call Champion:getCurrentStat("cooldown_rate") to obtain it.
I copied it and it says "Attempt to index global Champion" (a nil value).
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 »

You have to specify the meant champion.

In example

party.party:getChampionByOrdinal(1):getCurrentStat("cooldown_rate")
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Post Reply