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
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 think the bug fix you mention will fix what I am saying. As long as the game will start copying what we specify in ProjectileComponent::setCastByChampion(number) into TileDamager, getCastByChampion(), since we cannot create the hitEffect object and set it ourselves in ProjectileComponent.
Yes, you can. Leave hitEffect undefined and add onProjectileHit to your projectile component. hitEffect is just a helper for the most common use case ("spawn this object on hit"). You can execute arbitrary Lua code in your onProjectileHit hook.
User avatar
Zo Kath Ra
Posts: 937
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Tentative changelist for 2.1.19

Post by Zo Kath Ra »

minmay wrote:For example my mod uses both regular water and ice, which uses the water shader for reflection/refraction but has a different normal map.
Wow, that looks very good!
Can't wait to try your mod.
User avatar
Eleven Warrior
Posts: 745
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Tentative changelist for 2.1.19

Post by Eleven Warrior »

Hi Guys.

1 - Is it possible that you could add a Draw Tile that allows water to be knee deep, like a flooded area, Like the ocean tile? and uses the walk through water sound.

2 - For some reason at times when I press CTRL C and press CTRL V for objects (copy and paste) the editor crashes. Not all the time though rarely.
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 think the bug fix you mention will fix what I am saying. As long as the game will start copying what we specify in ProjectileComponent::setCastByChampion(number) into TileDamager, getCastByChampion(), since we cannot create the hitEffect object and set it ourselves in ProjectileComponent.
Yes, you can. Leave hitEffect undefined and add onProjectileHit to your projectile component. hitEffect is just a helper for the most common use case ("spawn this object on hit"). You can execute arbitrary Lua code in your onProjectileHit hook.
Wow, you are right. I knew about onProjectileHit but I didn't think that I could spawn the blast object in there and it will work correctly. I thought it did fire right before the blast went off but what I missed is how if I take the X,Y of self.go which is the fireball and spawn the blast right there, it will work exactly as intended. Well almost, I had to do setWorldPositionY(1.35). But then it worked.

So yeah, the only real issue is changing ProjectileComponent::setCastByChampion() from boolean to number for the ordinal. Thanks!!
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Tentative changelist for 2.1.19

Post by MrChoke »

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?

Not having this now presents an immediate challenge for me. I have this common "copyArea" code where I can take all entities in an area and copy or move them to another. That includes monsters too but not items they are holding. I want to re-add the items into the newly "copied" monster but I can't get the list of what the source monster is holding. Ugh.
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 »

Hi,
would you mind fixing lua error for detection item where isnt on map, if it is possible?
Eg. connector for item.usableitem.onUseItem(self, champion) Its describe in viewtopic.php?f=22&t=9361.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Tentative changelist for 2.1.19

Post by minmay »

Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding: if you attack with the light firearm, it puts both hands on cooldown, but if you attack with a light melee weapon in the other hand, it doesn't put the firearm on cooldown.
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
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: Tentative changelist for 2.1.19

Post by Dr.Disaster »

minmay wrote:Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding:
Firearms are ranged weapons. Assigning them melee traits should not be possible / work.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Tentative changelist for 2.1.19

Post by Isaac »

Dr.Disaster wrote:
minmay wrote:Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding:
Firearms are ranged weapons. Assigning them melee traits should not be possible / work.
Technically, they seem to behave like melee weapons with instant attack, and they do trigger the melee attack hook on doors; bows don't. The only firearm that can be dual wielded is the revolver and I can see using that after a melee attack ~as a parting shot. [I don't know if it's unintended.]
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Tentative changelist for 2.1.19

Post by minmay »

Dr.Disaster wrote:
minmay wrote:Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding:
Firearms are ranged weapons. Assigning them melee traits should not be possible / work.
Firearms are weapons, and they even display specifically as "Light Firearm" if given the trait. Backstabbing works with them too. I see no compelling reason to make a "melee trait" distinction unless one actually exists in the code, which I strongly suspect it does not.
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.
Post Reply