Mystery Topic Revealed: Glögg Session Part 3!

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

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by Isaac »

petri wrote:How useful is camera offset? It's a little bit tricky to implement...
I dunno... but I can imagine a mod where all the PC portraits were changed to mice, and the camera scuttles along the floor for a time. :D
(Later changing back, and the view restored.)

There was a time that I experimented with the idea of rotating the camera 180° for an upside down dungeon...
(Didn't get very far...)
minmay
Posts: 2768
Joined: Mon Sep 23, 2013 2:24 am

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by minmay »

Isaac wrote:
petri wrote:How useful is camera offset? It's a little bit tricky to implement...
I dunno... but I can imagine a mod where all the PC portraits were changed to mice, and the camera scuttles along the floor for a time. :D
(Later changing back, and the view restored.)
Creating a separate camera object and using setWorldPosition() and setWorldRotation() to match the party (plus an offset) should suffice for this, shouldn't 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.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

Drakkan wrote: - disable writing gameEffects list on Item when EquipmentItem commponent is disabled
This is a little odd request, since EquipmentItem does not have a gameEffect property. Is it ok, if you could just remove the gameEffect by calling ItemComponent:setGameEffect(nil) ?
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by JohnWordsworth »

Sweet! Am a bit busy at work at the moment, so I'm just going to dump the list of random ideas I've got in my notes app (sorry if there are repeats!).

containers - I would love to be able to make a custom container (notebook) which behaves a bit more like the old containers - not in terms of the container view itself by in the way it's handled in the backpack. Basically, I would like to be able to turn off the container panel in the inventory (so I can use my own GUI) and have it send some form of callback when it's supposed to close (ie. when you pick up the item). This was all pretty easy before in LOG1 (perhaps due to a bit of hacky behaviour) but was quite a bit more troublesome when I tried a few weeks ago in LOG2.

defineCondition{} - It would be cool if we could define a custom condition (which could be applied to a monster or a player) like Paralyzed etc. Just needs an onStart and onFinish really, but if it could handle the duration (and extending it).

onDrawAttackPanels() - I would love to implement an alternative "right click" system where it shows you 3 different attack options.

GUI - Either "measureString" or add align (left, center, right) to drawParagraph.

GUI - A bit dreamy perhaps, but it might be easy depending on your implementation. GuiContext.setTransformMatrix() would be cool for simply scaling an entire GUI context (especially to fit to 1280x720p).

GUI - Width / height returns the full window size, not just the size of the preview window.

GUI - drawParagraph with width < 1 character causes an infinite loop which means you have to force quit the game.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

Drakkan wrote:- support for more alchemy ingredients / recipes and mixing similar to Log1, it is very limited now and moders need to make different workarounds, like spawning item on surfaces etc...
The only way I could see this happening is custom panels for item actions. Custom alchemy panel. Hmm...
User avatar
Isaac
Posts: 3172
Joined: Fri Mar 02, 2012 10:02 pm

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by Isaac »

minmay wrote:
Isaac wrote:
petri wrote:How useful is camera offset? It's a little bit tricky to implement...
I dunno... but I can imagine a mod where all the PC portraits were changed to mice, and the camera scuttles along the floor for a time. :D
(Later changing back, and the view restored.)
Creating a separate camera object and using setWorldPosition() and setWorldRotation() to match the party (plus an offset) should suffice for this, shouldn't it?
Possibly. I've not really done much with the cameras yet.

*I did not request the offset btw. :)

____________
Two things I have thought to ask about:
(The second one might be complicated :( )
  • Surface refuses items when onInsertItem returns false.
  • Water surface on a level defaults to the water-object's elevation; this entails the drowning effect works below ~whatever the water-object's elevation is set to.
    (And boy would it be neat if the water would raise up or fall if that elevation changed; though that's not part of the request.)
    Loose concept: https://www.dropbox.com/s/0bhn1if7mq7po ... l.avi?dl=0
Last edited by Isaac on Wed Feb 25, 2015 10:59 am, edited 1 time in total.
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by JKos »

Awesome, better be quick with requests though before Petri is too drunk to code ;) . I was trying to implement alternative attacking system (by using mouse gestures) and it turned out to be pretty hard for power attacks.
So these (or something similar) would be really nice:
Champion:readyPowerAttack(handslot) starts power attack buildup
Champion:cancelPowerAttack(handslot) cancels the power attack (if it's building up or ready).

But if those are too much work, then I can probably replicate the power attacks with this little improvement.
ItemActionComponent:getBuildup() Should work with hard coded powerAttackTemplates too. Now it returns 1 every time.
- 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
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

JohnWordsworth wrote:containers - I would love to be able to make a custom container (notebook) which behaves a bit more like the old containers - not in terms of the container view itself by in the way it's handled in the backpack. Basically, I would like to be able to turn off the container panel in the inventory (so I can use my own GUI) and have it send some form of callback when it's supposed to close (ie. when you pick up the item). This was all pretty easy before in LOG1 (perhaps due to a bit of hacky behaviour) but was quite a bit more troublesome when I tried a few weeks ago in LOG2.
It's not clear for me what you are trying to do... Does your notebook have to be a container? (does it contain items?) What kind of new methods/hooks to existing components would this require?
JohnWordsworth wrote:GUI - drawParagraph with width < 1 character causes an infinite loop which means you have to force quit the game.
How can I repro this?
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

JKos wrote:But if those are too much work, then I can probably replicate the power attacks with this little improvement.
ItemActionComponent:getBuildup() Should work with hard coded powerAttackTemplates too. Now it returns 1 every time.
This works for me. Most items have power attack buildup time of 1s. But if you check the crystal shield, for example, it has buildup = 2.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Mystery Topic Revealed: Glögg Session Part 3!

Post by petri »

Isaac wrote: Surface refuses items when onInsertItem returns false.
Added new hook: SurfaceComponent.onAcceptItem(self, item)
Works similar to SocketComponent.onAcceptItem()
Post Reply