Community documentation
Community documentation
Hi,
As some of you may know, I copied and converted the official documentation to GitHub so anyone can improve it, because AH obviously doesn't have the time ( or motivation )
https://github.com/JKos/log2doc/wiki
And I also added some missing pieces, like BrainComponent properties and added a list of Traits which I generated with JohnW's asset definition scraper script, but there is still a lots of unclear/missing stuff. So I thought that I'd start a new thread for this purpose. The idea is that anyone can post a documentation request here for some function/feature which needs some clarification and someone who has the time and understanding can post the description. I can add the answers to the GitHub (when I have the time), if you don't want/know how to do it.
REQUEST:
I for example would like to know that what the hell does toLocal(ox, oy, facing, x, y) function do? I think it's related to setWorldPostion somehow, calculates distances from ox,oy to x,y or something, but I don't quite get the logic behind it, anyone? I'm sure that it's useful.
As some of you may know, I copied and converted the official documentation to GitHub so anyone can improve it, because AH obviously doesn't have the time ( or motivation )
https://github.com/JKos/log2doc/wiki
And I also added some missing pieces, like BrainComponent properties and added a list of Traits which I generated with JohnW's asset definition scraper script, but there is still a lots of unclear/missing stuff. So I thought that I'd start a new thread for this purpose. The idea is that anyone can post a documentation request here for some function/feature which needs some clarification and someone who has the time and understanding can post the description. I can add the answers to the GitHub (when I have the time), if you don't want/know how to do it.
REQUEST:
I for example would like to know that what the hell does toLocal(ox, oy, facing, x, y) function do? I think it's related to setWorldPostion somehow, calculates distances from ox,oy to x,y or something, but I don't quite get the logic behind it, anyone? I'm sure that it's useful.
- 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
- cloneObject viewtopic.php?f=22&t=8450
Re: Community documentation
Maybe useful for moving monsters towards arbitrary points?toLocal(ox, oy, facing, x, y)
Given original X and Y coordinates, facing, and new X and Y coordinates, returns delta X and delta Y values local to facing. For example, toLocal(1,2,0,3,5) returns (2,-3), the X and Y movement necessary for a party facing north to get from (1,2) to (3,5).
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: Community documentation
Thanks a lot minmay, but are you sure? Since toLocal(0,0,2,1,1) returns -1 1
Example:
party (P) is facing to the south (down)
I don't get how the movement to X is -1 1? Or is it world position not grid position? Maybe I just need some sleep
Example:
party (P) is facing to the south (down)
Code: Select all
01234
0P****
1*X***
2*****
3*****
- 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
- cloneObject viewtopic.php?f=22&t=8450
Re: Community documentation
Global space is oriented north (up) so if the party is facing south, moving left oriented to the party will move east (right) in global space, and moving forward oriented to the party will move south (down) in global space. That's why it's called toLocal.JKos wrote:I don't get how the movement to X is -1 1?Code: Select all
01234 0P**** 1*X*** 2***** 3*****
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: Community documentation
Ok, thanks I think that got it now after some sleep and thanks for updating the Wiki too.
- 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
- cloneObject viewtopic.php?f=22&t=8450
Re: Community documentation
Again many thanks for taking the initiative!
toLocal simply transforms a grid coordinate to the local space of an "entity". ox,oy,facing are the origin and facing of that entity and x,y are the coords to be transformed.
toLocal simply transforms a grid coordinate to the local space of an "entity". ox,oy,facing are the origin and facing of that entity and x,y are the coords to be transformed.
Re: Community documentation
Thanks to you Petri and AH for such a extensive modding support that even the documentation is too much work
I made some structure changes and added description for delayCall
I made some structure changes and added description for delayCall
- 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
- cloneObject viewtopic.php?f=22&t=8450
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: Community documentation
Great work jkos! If there are any gaps left come the Christmas break, I will be sure to contribute!
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: Community documentation
Having the documentation as a wiki is such a good idea! I'll add things if I notice something is missing.
Re: Community documentation
I would welcome some informations about
- champion conditions - some list of it (like poisoned, petrified etc...), if it is possible to define some new and then just simply assign them to some monster attacks etc.
- some mortat and pestle information. if it is possible somehow define new ingredients and somehow to create clones of mortar (like tools for crafting other stuff). It was quite simple for Log1 but I do not see this possibility now, which is strange.
- champion conditions - some list of it (like poisoned, petrified etc...), if it is possible to define some new and then just simply assign them to some monster attacks etc.
- some mortat and pestle information. if it is possible somehow define new ingredients and somehow to create clones of mortar (like tools for crafting other stuff). It was quite simple for Log1 but I do not see this possibility now, which is strange.