Using Yanfly Augments to Rename Weapons and use new Images

40Flashkick

The Motivated and Too Ambitious
Member
Joined
Dec 26, 2016
Messages
14
Reaction score
2
First Language
English
Primarily Uses
Hey there, so I'm using Yanfly's attachable augments and Weapon Animation plug ins and while I was renaming the weapons, I was wondering if there was a way I could also change the in game sprite of the weapon to one of Yanfly's pre-existing weapon freebies. The idea came to me when I saw that with Attachable Augments I could change Item names, and when I saw that, I wondered if I could have the item, when it has a new name, be treated as an existing item that could change its weapon image in game.


For example;


Sword 0001 Uses the default Sword image


Fire Sword 0005 uses Yanfly's 'Sword Red' image.


If I attached an item called 'Fire Coating' to 'Sword' using Attachable Augments and changed the name of the base 'Sword' to 'Fire Sword', could I have the game treat the sword as 'Fire Sword' for the sake of Stats and the changed image? 


And if I can, how do I go about doing that? 
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV
I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
83
Reaction score
31
First Language
English
Primarily Uses
Yanfly actually provided code to do this in one of there Tips and Tricks a while ago.


http://yanfly.moe/2016/05/25/tips-tricks-animation-augments-rpg-maker-mv/


You can set the icon using


icon = [Index];


You can change the weapon image using


item.weaponImageIndex = '[Image]';


Inside a Augment Attach Eval.


You can change the Attack Animations as well. Take a look at the code.


Hope this is what you mean.


This will allow you to mimic the traits of another item, but not change it into the other item.


If you are okay with completely removing the existing weapon from the inventory and replacing it with a new one, meaning you would not be able to remove the augment, you could try this:


$gameParty.gainItem($dataWeapons[weaponId], n, false;


Where n is the number of weapons you wish to gain.


Use:


$gameParty.loseItem($dataWeapons[weaponID], n, false);


to remove items.


Cannot guarantee this will work with your setup, but it should work.[/Image]
 
Last edited by a moderator:

40Flashkick

The Motivated and Too Ambitious
Member
Joined
Dec 26, 2016
Messages
14
Reaction score
2
First Language
English
Primarily Uses
I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
Very sorry! I'm new to the area and still gaining my ground on what to post where. Thank you for moving this and apologies again for posting in the wrong location.

Yanfly actually provided code to do this in one of there Tips and Tricks a while ago.


http://yanfly.moe/2016/05/25/tips-tricks-animation-augments-rpg-maker-mv/


You can set the icon using



icon = [Index];


You can change the weapon image using



item.weaponImageIndex = '[Image]';


Inside a Augment Attach Eval.


You can change the Attack Animations as well. Take a look at the code.


Hope this is what you mean.


This will allow you to mimic the traits of another item, but not change it into the other item.


If you are okay with completely removing the existing weapon from the inventory and replacing it with a new one, meaning you would not be able to remove the augment, you could try this:



$gameParty.gainItem($dataWeapons[weaponId], n, false;


Where n is the number of weapons you wish to gain.


Use:



$gameParty.loseItem($dataWeapons[weaponID], n, false);


to remove items.


Cannot guarantee this will work with your setup, but it should work.

[/Image]
[Image]



Thank you -very- much for this, I appreciate you sharing the information! I'm gonna give it a try and if I come to any issues I'll check back here!


Edit: Everything works perfectly! Thanks a lot, and have a nice day![/image]
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top