Jump to content

[help] How to change fire_projectile animation


Recommended Posts

Hello, i'd been away for almost a year and i wish to continue with the mod i left behind, i want to publish it but there are some stuff to do before is ready for it.

I made a weapon that shots fire, but the default fire looks awful, i was wondering if it was possible to change it for a better looking one. Is it impossible to change the default fire_projectile? Is just so awful. (i don't mean the fire it self from when something is burning, that one is fine, i mean the projectile)

I saw an amazing fire effect the other day in the mod called "Geralt" (based on the witcher books), if you see the 3rd picture of the mod, the fire looks amazing, the problem is that he's using "onhit" codes, so there is not "onequip" animation, and because my mod is an equipable weapon i made the necessary ground_myitem and swap_myitem png files, so how can i make my own png image animation for the file projectile, is it possible? I hope i'm explaining myself enough, i strongly recommend just checking the 3rd picture from the geralt mod and you'll know what i mean. I notice he made his own fire image animation so that it looks that amazing, but where could i put my own animation for the projectile when i already have a ground and swap animation? Is there a way to also change projectile animation?

PD: The image itself is not my problem ofc, my doubt is - what -  codes should i be using and - where - to make the fire_projectile look how ever i want it to look, having prepared a costumprojectile.zip with the costum projectile animations, or the png's to replace the projectile.

I though that maybe i could change this part of the weapon's code:

    inst.components.weapon:SetProjectile("fire_projectile")

Replacing ("fire_projectile") with my desired animation.zip - but the result was that the weapon stop working/shoting, so i'm clueless on what to try next.

I'm opened to any suggestions.

Thank you in advance.

Edited by Jpianist
Link to comment
Share on other sites

5 hours ago, Lumina said:

Look at "staff_projectile.lua", the fire_projectile prefab is here. Try copy it to do your own prefab with your own anim ?

So i would have to make a mod that changes fire_projectile prefab from staff_projectile.lua? That would change all items that use fire_projectile, i was looking to just change my own weapon's fire_projectile animation. Why it was so simple in geralt mod's, is it that different using a "on the press of a key mod" from "a projectile weapon mod"?

Link to comment
Share on other sites

2 minutes ago, Jpianist said:

So i would have to make a mod that changes fire_projectile prefab from staff_projectile.lua? That would change all items that use fire_projectile, i was looking to just change my own weapon's fire_projectile animation.

No, you have to make a copy of the fire_projectile, and use this copy.

Also, even if geralt's mod could look simple, it's possible that it required a lot of work to do the projectile he is using, i'm sure it's not just "on the press of a key mod" in term of coding.

Link to comment
Share on other sites

Just now, Lumina said:

No, you have to make a copy of the fire_projectile, and use this copy.

Also, even if geralt's mod could look simple, it's possible that it required a lot of work to do the projectile he is using, i'm sure it's not just "on the press of a key mod" in term of coding.

That's not what i meant, please do not think like that, i respect the autor a lot, that mod has a lot of features, looks like it took a great time to make, he obviously has talent and is hard working, i was just talking about the look of the fire, he's not using a projectile, when you press the specified key (R in this case) the mod "throws" his custom animation to the target and makes it burn, so he's not dealing with the fire_projectile like in my case (because i'm using a range weapon), i belive it's simplier in the matter of custom animation, because he's just "throwing" his custom animation, i wish i could do that, i'm throwing a fire_projectile because that seems the only way to do a fire range attack with a custom ranged weapon (i might be wrong).

Link to comment
Share on other sites

Maybe i misunderstood what you were saying, but since i don't know the code of this mod i can't explain how to do the same thing, and i'm not sure that it will be easier to do as he did. Anyway, i can't help you more, so i hope someone will be able to.

Link to comment
Share on other sites

8 hours ago, Lumina said:

Maybe i misunderstood what you were saying, but since i don't know the code of this mod i can't explain how to do the same thing, and i'm not sure that it will be easier to do as he did. Anyway, i can't help you more, so i hope someone will be able to.

Thank you for trying, i guess this is out of my current expertise, i will just settle with the default animation for now, until i get more experience to make something about it. I have a more do-able question, adding a timer/cooldown to a spell, i'm just gonna make that thread and forget about this one for a while.

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...