Mystery Topic Revealed: Glögg Session Part 3!
Mystery Topic Revealed: Glögg Session Part 3!
Welcome to the third Glögg powered coding session ever!
The idea of this session is to extend the modding capabilities of Grimrock 2 and more importantly to have fun! How does this work? Quite simply, you tell what you would like me to code today, and my Glögg fumed brain tries to do its best to implement them. I get to decide which features are implemented based on how generally useful they are and how simple and fun they are to code. Also it is a good idea to explain shortly why this feature is useful to have. Bonus points if you are having Glögg with me!
I have reserved a full working day for this session, but still our time is quite limited, so I can't do complex features or features requiring new content unfortunately.
The glögg is heating up! Let's have some fun, people!
The idea of this session is to extend the modding capabilities of Grimrock 2 and more importantly to have fun! How does this work? Quite simply, you tell what you would like me to code today, and my Glögg fumed brain tries to do its best to implement them. I get to decide which features are implemented based on how generally useful they are and how simple and fun they are to code. Also it is a good idea to explain shortly why this feature is useful to have. Bonus points if you are having Glögg with me!
I have reserved a full working day for this session, but still our time is quite limited, so I can't do complex features or features requiring new content unfortunately.
The glögg is heating up! Let's have some fun, people!
Re: Mystery Topic Revealed: Glögg Session Part 3!
It's been some time since I touched the Lua parts of Grimrock, I wonder how long it takes me to get up to speed.
Damn, this is some fine Glögg!
Damn, this is some fine Glögg!
Re: Mystery Topic Revealed: Glögg Session Part 3!
Here are the features that would be most useful to me:
- PartyComponent:setSpeed(number) method, to change the speed of movement and turning. Useful for making Toorum-like characters, a haste spell, etc.
- PartyComponent:move(direction) and PartyComponent:turn(direction) methods that work as if the party moved normally. This is mainly for custom movement control schemes. PartyComponent:knockback() doesn't quite work for movement since it is constrained to one speed, and there's no equivalent for turning at all.
Less useful, but still useful (IMO):
- onComputeAttackPower hook for skills/traits would be a great complement to onComputeAccuracy.
- Support for the "offset" property in CameraComponent, and CameraComponent:setFOV() method. I've implemented a "spyglass" item that lets you smoothly zoom in and out, and to accomplish this it currently defines 256 different CameraComponents. From a player perspective it works fine, but it's really gross from a coding perspective.
- PartyComponent:setSpeed(number) method, to change the speed of movement and turning. Useful for making Toorum-like characters, a haste spell, etc.
- PartyComponent:move(direction) and PartyComponent:turn(direction) methods that work as if the party moved normally. This is mainly for custom movement control schemes. PartyComponent:knockback() doesn't quite work for movement since it is constrained to one speed, and there's no equivalent for turning at all.
Less useful, but still useful (IMO):
- onComputeAttackPower hook for skills/traits would be a great complement to onComputeAccuracy.
- Support for the "offset" property in CameraComponent, and CameraComponent:setFOV() method. I've implemented a "spyglass" item that lets you smoothly zoom in and out, and to accomplish this it currently defines 256 different CameraComponents. From a player perspective it works fine, but it's really gross from a coding perspective.
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.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Mystery Topic Revealed: Glögg Session Part 3!
The first two should be easy.. now, let's see!
Re: Mystery Topic Revealed: Glögg Session Part 3!
Done:
- PartyComponent:isIdle()
- PartyComponent:move()
- PartyComponent:turn()
- PartyComponent:setMovementSpeed()
- PartyComponent:getMovementSpeed()
move() and turn() should only be called when the party is idle (not moving/turning), i.e. when isIdle() return true.
- PartyComponent:isIdle()
- PartyComponent:move()
- PartyComponent:turn()
- PartyComponent:setMovementSpeed()
- PartyComponent:getMovementSpeed()
move() and turn() should only be called when the party is idle (not moving/turning), i.e. when isIdle() return true.
Re: Mystery Topic Revealed: Glögg Session Part 3!
hope you will enjoy your Glögg petri !
here is my wish list:
- 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...
- disable writing gameEffects list on Item when EquipmentItem commponent is disabled
- more support for error debug inside editor (John W. mentioned this one --
if the error log could include a path when you get the dreaded "attempt to concatenate field 'id' (a nil value)" crash upon saving. Just adding "attempt to concatenate field 'id' in object 'myObject' (a nil value)" would be great. Even better would be "attempt to concatenate field 'id' in object 'entity.script.outerObject.innerObject' (a nil value)".
Another option would be to have a "test save" button in the editor. I've contemplated trying to write one, but without debug.getlocal I don't think it's possible.
Similarly described viewtopic.php?f=22&t=9361.
here is my wish list:
- 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...
SpoilerShow
this will probably need to expand the GUI for mortar and pestle and somehow implement if some item has "herb" trait to display in it.
- more support for error debug inside editor (John W. mentioned this one --
if the error log could include a path when you get the dreaded "attempt to concatenate field 'id' (a nil value)" crash upon saving. Just adding "attempt to concatenate field 'id' in object 'myObject' (a nil value)" would be great. Even better would be "attempt to concatenate field 'id' in object 'entity.script.outerObject.innerObject' (a nil value)".
Another option would be to have a "test save" button in the editor. I've contemplated trying to write one, but without debug.getlocal I don't think it's possible.
Similarly described viewtopic.php?f=22&t=9361.
Last edited by Drakkan on Wed Feb 25, 2015 10:31 am, edited 1 time in total.
Re: Mystery Topic Revealed: Glögg Session Part 3!
- added CameraComponent: setFov(), setNearClip(), setFarClip(), getFov(), getNearClip(), getFarClip()
Now some more of that Glögggggg!!
Now some more of that Glögggggg!!
Re: Mystery Topic Revealed: Glögg Session Part 3!
How useful is camera offset? It's a little bit tricky to implement...
Re: Mystery Topic Revealed: Glögg Session Part 3!
I shall thank you! The error checking for illegal script globals has already been done for 2.2.4Drakkan wrote:hope you will enjoy your Glögg petri !
- more support for error debug inside editor
Re: Mystery Topic Revealed: Glögg Session Part 3!
Wow, thanks!
I can't think of anything I need CameraComponent offset for, since you can just move the parent game object. It just struck me as strange that it wasn't supported, but if it's tricky then that makes perfect sense.
I can't think of anything I need CameraComponent offset for, since you can just move the parent game object. It just struck me as strange that it wasn't supported, but if it's tricky then that makes perfect sense.
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.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.