Jump to content

Working on The End, and some other perks


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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
 Share

×
  • Create New...