Tentative changelist for 2.1.19

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
AdrTru
Posts: 223
Joined: Sat Jan 19, 2013 10:10 pm
Location: Trutnov, Czech Republic

Re: Tentative changelist for 2.1.19

Post by AdrTru »

Is it possible to disable writing gameEffects list on Item when EquipmentItem commponent is disabled?
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Tentative changelist for 2.1.19

Post by Drakkan »

AdrTru wrote:Is it possible to disable writing gameEffects list on Item when EquipmentItem commponent is disabled?
+ 1
Breath from the unpromising waters.
Eye of the Atlantis
Granamir
Posts: 202
Joined: Wed Jan 07, 2015 7:19 pm

Re: Tentative changelist for 2.1.19

Post by Granamir »

minor bug:
"GameObject:getSubtileOffset()" gives only x offset
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Tentative changelist for 2.1.19

Post by MrChoke »

Granamir wrote:minor bug:
"GameObject:getSubtileOffset()" gives only x offset
I confirm this bug. I thought it was because multiple return vars were not used. Not true. Its bugged.

Code: Select all

local sx, sy = go:getSubtileOffset() 
print(sx, sy)
This printed:
0.111234 nil
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Tentative changelist for 2.1.19

Post by MrChoke »

Ugh. I just confirmed a bug. Its in the Brain component, the "seesParty" property. It is erroneously getting set to true even though the party should not be seen. It doesn't appear to fail if there is a solid wall blocking. However, it does fail for walls with door components, even if multiple of these block the party. When it fails, it will go to true for one movement of the monster and then go back to false. I cannot pinpoint why it is doing it only that it clearly shouldn't be.

This is bad for me. I was planning on using "seesParty" to kick in my own AI when the built-in AI was not active. Now with this bug, I cannot do it. Can this one be addressed hopefully in 2.1.9??
Thanks.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Tentative changelist for 2.1.19

Post by petri »

MrChoke wrote:Ugh. I just confirmed a bug. Its in the Brain component, the "seesParty" property. It is erroneously getting set to true even though the party should not be seen. It doesn't appear to fail if there is a solid wall blocking. However, it does fail for walls with door components, even if multiple of these block the party. When it fails, it will go to true for one movement of the monster and then go back to false. I cannot pinpoint why it is doing it only that it clearly shouldn't be.
I think you doors are 'sparse'
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Tentative changelist for 2.1.19

Post by petri »

MrChoke wrote:I just came across this. On MonsterComponent, we have addItem(), removeItem(), dropAllItems(). But we have no way to get the list of items that a monster is holding. Unless I missed it. Yes, this may be an enhancement, but how about a "getAllItems()" method e can iterate through?
Use the contents() method.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Tentative changelist for 2.1.19

Post by MrChoke »

petri wrote:
MrChoke wrote:Ugh. I just confirmed a bug. Its in the Brain component, the "seesParty" property. It is erroneously getting set to true even though the party should not be seen. It doesn't appear to fail if there is a solid wall blocking. However, it does fail for walls with door components, even if multiple of these block the party. When it fails, it will go to true for one movement of the monster and then go back to false. I cannot pinpoint why it is doing it only that it clearly shouldn't be.
I think you doors are 'sparse'
Hi. I didn't know about sparse. I did try it though and the problem is still happening. To ensure that it was not any mistake I made with custom objects, I replaced all of them with "castle_door_wood". This is not a sparse door. The "seesParty" property will still go to true for one move and then back to false. It seems to do it only at perfect or close to perfect diagonals to the party, never at horizontal or vertical positions.

I also see if I put a sold wall tile in the perfect diagonal direction, it stops happening.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Tentative changelist for 2.1.19

Post by MrChoke »

petri wrote:
MrChoke wrote:I just came across this. On MonsterComponent, we have addItem(), removeItem(), dropAllItems(). But we have no way to get the list of items that a monster is holding. Unless I missed it. Yes, this may be an enhancement, but how about a "getAllItems()" method e can iterate through?
Use the contents() method.
Yes, that works. I have updated JKos's Github documentation site to reflect this. Thanks!
cameronC
Posts: 80
Joined: Wed Apr 11, 2012 10:54 pm

Re: Tentative changelist for 2.1.19

Post by cameronC »

petri wrote:
minmay wrote:- I have seen a lot of scripting problems where a Component:getName() method and/or a way of iterating through all a GameObject's components would be very useful.
Oops Component:getName() seems to be missing, I'll add it. btw. component iterator already exists, see crystal_shard_recharging definition for example.
This is great to learn. Is there a similar way to get all the traits of an item or champion, instead of checking for specific ones?
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.

Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
Post Reply