Equipment Upgrade System by Charlie Fleed, Version 1.2 - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html) +---- Thread: Equipment Upgrade System by Charlie Fleed, Version 1.2 (/thread-2299.html) |
Equipment Upgrade System by Charlie Fleed, Version 1.2 - Charlie Fleed - 12-30-2008 Equipment Upgrade System by Charlie Fleed
Version 1.2 Introduction This system allows to define weapons (armors) with a certain number of slots, which can be used to add enhancement objects. Enhancement objects are actually weapons (armors) specifically tagged. Enhancements' stats get summed with those of the weapon (armor) on which they are attached. EDIT: The new demo (v0.3) shows an initial party of two actors. One of them has a fixed default weapon that is customizable. An event on the map allows to add a third actor, initialized to his starting parameters, and he has a not-fixed default weapon that is customizable. EDIT: The new demo (v0.4) also shows three types of weapons and limits enhancement only to specified types of weapons. Features
Screenshots Version 1.1: Scene Enhance
Demo Equipment Upgrade System v1.2 (mediafire) Equipment Upgrade System v1.1 (google) Instructions Inside the demo. Compatibility This system does not use the SDK. A patch for the multi slot script by guillame777 is available. EDIT: included since version 0.5. Notes for scripters Animated Battlers patch for MNK_STATIONARY_WEAPONS (requested by jimmyly) Author's Notes For those interested in its logic, customizable weapons are derived from weapons. Every time a customizable weapon is purchased a new temporary entry in the database is created, with stats copied by the weapon in the original database. A copy of this one is also saved into a modified game_party in order to store and automatically save and load all the customized weapons. When a savegame is loaded all the created weapons are added to the database on the fly, while the saved copy of the original database is unchanged. Terms and Conditions This system may be used and modified freely for non commercial games, provided that credit is given to the author: Charlie Fleed. For its use in commercial games, please contact me through this forum. Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Jimmyly - 03-10-2009 Hey Charlie I want to request from you and I hope it not too much. What I want to request is it possible to remove the Window Skin and add a Picture back ground instead so it can look a lot different when people are using it. Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Charlie Fleed - 03-10-2009 Good idea for version 0.6. I'm on it. EDIT:(it's all a picture...) Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Jimmyly - 03-12-2009 :rolleyes: Yay. Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Yin - 03-14-2009 This is great by the way. Is there something like this for armor too? What do I have to change to make this for armor also? All except accessories. And how would I go about adding more slots... Say 20? Is that possoble? To make it scrollable to 20. EDIT: Also, how can I make it so that certain weapons start off with enhancements already. Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Charlie Fleed - 03-14-2009 I take it when you ask "is that possible?" you mean with the current script and only through the configuration, because with enough time you can do everything by modifying the script... With this assumption, the maximum number of slots is 5 and it is hard coded in several windows, i.e. their contents are not programmed to scroll. Besides... man, 20 slots???? Armors, well, it's been asked countless times, doing the same with armors requires a careful editing of the script with the duplication of many parts. I will do it when I have enough time to dedicate to it and to test it. This kind of operations are typical bug generators and rushing it is the last thing you need to do. Weapons with enhancements... I think that with some script commands it would be possible to give the party a weapon with some slots filled, but things like full shop support are a little more complicated. As soon as I get to my rmxp pc I will try something and tell you. Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Yin - 03-15-2009 Also, how do I make it so that the weapon that is equipped shows in the enhancement menu? My characters weapons are locked and they only use 1 weapon. That's also why I need more slots than the usual 5. I'm using smaller numbers than what in your demo, example: your demo has I think +40 atk items while mine has +5 atk items. I'll be waitng for the armor edit too! The reason I asked about the starting off with enhanced items is because I have some AI controlled character that come in later in the game that I don't want the player to be able to change. So, what would the script calls be? Sorry, if I'm asking too many questions. Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Charlie Fleed - 03-15-2009 In the script page Enhanced Weapons, change the gain_weapon method with this one: Code: def gain_weapon(weapon_id, n, slots=nil) then, to add a weapon with slots filled use a script command like this one: $game_party.gain_weapon(153,1,[146,...]) 153 is the ID of the weapon 1 is the quantity [146,...] is an array containing the IDs of the enhancements. You can also fill, say, only one slot in a 4-slots weapon, in this case just use [146]. Finally, equipped weapons do show up in the enhance scene (the name of the actor that's using the weapon appears next to the weapon's name). Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Yin - 03-15-2009 That's weird, it must be conflicting with another script I have. I'll see if I can locate the problem. Oh, another question. How do I make it so that when the enhancement is removed, it is gone forever + a confirmation window for it? Customizable (Enhanced) Equipment by Charlie Fleed, Version 1.0 - Charlie Fleed - 03-15-2009 I highlighted the changes in red, maybe you made some error replacing the old code with the new one. CODE
def gain_weapon(weapon_id, n, slots=nil)
#print("gain weapon("+weapon_id.to_s+","+n.to_s+")") # arma e non nessun arma if weapon_id > 0 # l'arma appartiene al database if weapon_id < @max_database_weapon_id + 1 # l'arma è di tipo enhanceable if $data_weapons[weapon_id].element_set.include?($ew_element_id) if n>0 for i in 1..n new_weapon=Enhanced_Weapon.new(weapon_id) if slots!=nil for i in 0...[new_weapon.slots,slots.length].min new_weapon.add_accessory(i,$data_weapons[slots[i]]) end end @enhanced_weapons[new_weapon.id]=new_weapon $data_weapons[new_weapon.id]=new_weapon @weapons[new_weapon.id] = 1 # Patch for GUILLAUME777's Multi-Slot if MULTI_SLOT_PATCH RPG.initialized_item_types=false RPG.set_new_item_types end end return else # print("non si può togliere un'arma enhanced perchè non se ne entra mai in possesso") return end end # l'arma è di tipo enhanced else @weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, 99].min return end end ew_gain_weapon(weapon_id, n) end Are you getting an error? When? Quote:How do I make it so that when the enhancement is removed, it is gone forever + a confirmation window for it? You need a different script, this one can't do it (now) :D Just out of curiosity, why do you need something like this? |