Page 4 of 8

Re: Tentative changelist for 2.1.19

Posted: Sun Feb 08, 2015 8:41 pm
by AdrTru
Is it possible to disable writing gameEffects list on Item when EquipmentItem commponent is disabled?

Re: Tentative changelist for 2.1.19

Posted: Mon Feb 09, 2015 11:16 am
by Drakkan
AdrTru wrote:Is it possible to disable writing gameEffects list on Item when EquipmentItem commponent is disabled?
+ 1

Re: Tentative changelist for 2.1.19

Posted: Tue Feb 10, 2015 8:01 pm
by Granamir
minor bug:
"GameObject:getSubtileOffset()" gives only x offset

Re: Tentative changelist for 2.1.19

Posted: Tue Feb 10, 2015 8:24 pm
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

Re: Tentative changelist for 2.1.19

Posted: Wed Feb 11, 2015 6:24 am
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.

Re: Tentative changelist for 2.1.19

Posted: Wed Feb 11, 2015 12:13 pm
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'

Re: Tentative changelist for 2.1.19

Posted: Wed Feb 11, 2015 12:24 pm
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.

Re: Tentative changelist for 2.1.19

Posted: Wed Feb 11, 2015 5:53 pm
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.

Re: Tentative changelist for 2.1.19

Posted: Wed Feb 11, 2015 6:11 pm
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!

Re: Tentative changelist for 2.1.19

Posted: Wed Feb 11, 2015 7:08 pm
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?