Jump to content

Recommended Posts

And whit a little tweaking it is fixed. BTW This weapon is meant to be Super OP Which is why it requires so many Dragonflies to be killed, it used to required 4 Shadow hearts but I removed that cause I though it couldn't be used.



And Nope I did, I havent updated the Zip provided, I found and fixed it right after posting that Error.

Untitled2.png

Great! Good luck with it.

You should probably change the name of the mod, though, or you won't be able to do another one ;)
If you don't catch my drift, I say this because in the modinfo.xml you have "The Keeper" as the description, and your full name as the name of the mod, so right now your name will be written as the name of the mod on Steam.

I was looking for the name, so I could look out for it one Steam.

Alrighty, now I've got a question, is it possible to make The End make whatever it kills drop only ash? I want that to be it more balancing factor, it almost one shots every creature in the game, But, you get ash instead of the creature/boss drops from your kill.

Overriding loot drops is not a simple thing. There's a component called "lootdropper", which everything that drops loot has. It determines which loot is dropped. Loot is dropped when something dies, which is an event handled by the stategraphs, usually triggered by the "health" component. There are common events, but each boss and almost every other thing that has it's own stategraph and event, have separate death event code. Changing all the stategraphs is a VERY intrusive move, and is probably not what you want, but it might be your only option...

You might think you could just override/extend the GenerateLoot() or DropLoot() functions in "lootdropper" for every single entity that has a "lootdropper" script, but since neither of those functions have any idea what killed them, let alone which weapon they received damage from, I'm having a hard time seeing where you'd put that stuff in, simply because of the component-based nature of all this.

It's a complicated issue, which I think merits a new topic.

Edited by Ultroman

  Alrighty, So something for the future. Rn I'm trying to fix an audio bug, I decided o change my character's voice... and well, no sound plays now.

andreas.lua

modmain.lua

sound.zip

Edited by Andreasgamming

If you only want to affect things which have a "combat" component, then you can override GetAttacked() on the "combat" component for all entities that have one, and IF the weapon is the right one, call the SetLoot() function on their "lootdropper" component (if they have one) BEFORE the health:DoDelta() function is called within GetAttacked(), and give it a list of loot to drop, instead of its normally generated loot.

The problem here, is that the health:DoDelta function is the one that ultimately fires the death event (by calling SetVal() in the "health" component), but it is also responsible for possibly negating or absorbing some of the damage you're trying to apply, so you don't actually know if the thing you're attacking is going to die from the damage, until health:DoDelta has applied it, sooo...that won't work consistently either.

The system is just not set up for the weapon determining the loot.

Edited by Ultroman

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...