Hmm, very interesting musings.
I'm looking forward to finding out what's going on.
Cheers!
Search found 25 matches
- Sun Nov 23, 2014 3:42 am
- Forum: Mod Creation
- Topic: Altering the damage math?
- Replies: 7
- Views: 10193
- Sun Nov 23, 2014 3:40 am
- Forum: Mod Creation
- Topic: Error Calling "onHitMonster"
- Replies: 12
- Views: 11699
Re: Error Calling "onHitMonster"
Ooh, yes, I second that request!
Cheers.
Cheers.
- Sat Nov 22, 2014 9:35 pm
- Forum: Mod Creation
- Topic: Altering the damage math?
- Replies: 7
- Views: 10193
Re: Altering the damage math?
I've managed to figure out that all overridden OnComputeAccuracy and OnComputeCritChance functions are called for all weapons, regardless of which skill the weapon uses. I was able to work around this by checking weapon:hasTrait("light_weapon") for the "light_weapons" overrides, ...
- Sat Nov 22, 2014 8:14 pm
- Forum: Mod Creation
- Topic: Altering the damage math?
- Replies: 7
- Views: 10193
Re: Altering the damage math?
Hmm, this might not be solved as I thought it was. I tried cloning the "light_weapons" skill and making it return 100 for both onComputeAccuracy and onComputeCritChance. Now, both a branch (light weapon) and a cudgel (heavy weapon) always hit and always crit. Not sure what's going on here....
- Sat Nov 22, 2014 7:44 pm
- Forum: Mod Creation
- Topic: cloneObject for LoG2 (update: modifyObjects)
- Replies: 31
- Views: 38224
Re: cloneObject for LoG2
I used the cloneObject script as a basis for a cloneSkill script I made.
Details here:
viewtopic.php?p=85615#p85615
Details here:
viewtopic.php?p=85615#p85615
- Sat Nov 22, 2014 7:42 pm
- Forum: Mod Creation
- Topic: Altering the damage math?
- Replies: 7
- Views: 10193
Re: Altering the damage math?
OK, I got it working. Here's my "CloneSkill" function which is basically a stripped-down version of JKos's "CloneObject" function. Create a file called, "cloneSkill.lua". Enter this as its contents: local olddefineSkill = defineSkill; local defines = { }; defineSkill = ...
- Sat Nov 22, 2014 7:22 pm
- Forum: Mod Creation
- Topic: Altering the damage math?
- Replies: 7
- Views: 10193
Re: Altering the damage math?
Couldn't you redefine the skills using something similar to JKos's CloneObject script (CloneSkill) and add the hooks for onRecomputeStats, onComputeAccuracy, and onComputeCritChance?
I'm about to try this so I'll let you know how I get on...
I'm about to try this so I'll let you know how I get on...
- Sat Nov 22, 2014 12:50 am
- Forum: Mod Creation
- Topic: Error Calling "onHitMonster"
- Replies: 12
- Views: 11699
Re: Error Calling "onHitMonster"
In the mean time, I'll just have to use @JKos's cloneObject script and define each weapon in the game with an overridden 'onHitMonster' function. I wanted to do it with script so I didn't have to update my items.lua for every weapon in the game but at least cloneObject allows me to continue...
- Sat Nov 22, 2014 12:30 am
- Forum: Mod Creation
- Topic: Error Calling "onHitMonster"
- Replies: 12
- Views: 11699
Re: Error Calling "onHitMonster"
Thanks for the suggestions but I tried both of them and neither one helped.
I verified that I was working with the right component by adding a call to MeleeAttackComponent:setCameraShake(true) instead of adding my connector and the camera shakes when the item is used.
I verified that I was working with the right component by adding a call to MeleeAttackComponent:setCameraShake(true) instead of adding my connector and the camera shakes when the item is used.
- Fri Nov 21, 2014 10:38 pm
- Forum: Mod Creation
- Topic: Error Calling "onHitMonster"
- Replies: 12
- Views: 11699
Error Calling "onHitMonster"
I'm having trouble getting a callback to work in the editor. I used the following code to add connectors to the weapons in my level: -- Wire up the MeleeAttackComponents on this level. for e in second_timer.map:allEntities() do if e.meleeattack then e.meleeattack:addConnector("onHitMonster"...