How does the "Bear Form" spell work?

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

How does the "Bear Form" spell work?

Post by Isaac »

The scripting reference does not (unless I missed it) list the means to ~get~ the player's Portrait; yet the 'Bear Form' spell replaces the PC's portrait, then restores it when it ends.

??
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: How does the "Bear Form" spell work?

Post by JohnWordsworth »

Maybe it is possible to call Champion:setPortrait(nil) to reset a portrait back to the character's default?
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: How does the "Bear Form" spell work?

Post by Isaac »

It did not when I tried it... Just now.

You can set the portrait to whatever you like, but finding out what it was beforehand seems just as much a mystery as it was in Grimrock 1.

*But this time the functionality is shown in the game. ;)
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: How does the "Bear Form" spell work?

Post by petri »

There is no way to getPortrait because for imported portraits the portrait file may not even exist. Consider what happens if you move a save game with imported portraits to another computer. That's why save games contain image data for portraits, not just references to files.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: How does the "Bear Form" spell work?

Post by Isaac »

petri wrote:There is no way to getPortrait because for imported portraits the portrait file may not even exist. Consider what happens if you move a save game with imported portraits to another computer. That's why save games contain image data for portraits, not just references to files.
Thank you for the reply, that settles that.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: How does the "Bear Form" spell work?

Post by petri »

Maybe some Glögg could persuade me to add onDrawPortrait hook which could be used to override the current portrait on the fly. How useful would this be?
User avatar
sapientCrow
Posts: 608
Joined: Sun Apr 22, 2012 10:57 am

Re: How does the "Bear Form" spell work?

Post by sapientCrow »

I think that would be fantastic and very useful.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: How does the "Bear Form" spell work?

Post by JohnWordsworth »

That would be really cool, as it would also allow for custom status effects.

If we're dreaming about future GUI Glogg session hooks, it would also be cool to have a "onDrawAttackPanels" hook say, so that we could draw our own "spell panel" or "mortar & pestle" panel or equivalent without having to guess the position of the portraits based on the current resolution!

Added to my iCloud Notes so that I remember them!
Last edited by JohnWordsworth on Fri Nov 07, 2014 10:07 am, edited 1 time in total.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: How does the "Bear Form" spell work?

Post by Isaac »

petri wrote:Maybe some Glögg could persuade me to add onDrawPortrait hook which could be used to override the current portrait on the fly. How useful would this be?
Those that want it, want it to implement NPC party members ~without losing the original portrait (allowing them to restore the previous champion); or to implement spells like the Bear Form, or other champion altering effects.

Clever modders could even include animated or condition changing portraits in their [fixed PC and/or NPC] mods. 8-)
JohnWordsworth wrote:If we're dreaming about future GUI Glogg session hooks, it would also be cool to have a "onDrawAttackPanels" hook say, so that we could draw our own "spell panel" or "mortar & pestle" panel or equivalent without having to guess the position of the portraits based on the current resolution!
Indeed. I had a work mat in my ORRR2 room, that I would have liked to skin differently than the default pestle.
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: How does the "Bear Form" spell work?

Post by Xanathar »

There's never enough Glogg for everything we would want :D

Regarding onDrawPortrait .. I was the one suggesting to have getPortrait and the reason I did it was to

1) be able to restore a portrait after a change (like John said) - but this can also be done with the hook and

2) be able to draw the portrait somewhere else [for dialogues etc. like here: http://static-4.nexusmods.com/15/mods/1 ... 578712.jpg )

So to cut it short.. how much Glogg does a drawPortrait costs ? :lol:
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
Post Reply