Equipment Upgrade System by Charlie Fleed, Version 1.2
#1
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
  • Define weapons with slots available for weapon-enhancing objects.
  • Fixed enhancements that cannot be removed once they have been applied.
  • A scene for Customizing weapons.
  • Default and fixed weapons support. (v0.3)
  • Support for actors added to the party with initialization (v0.3)
  • Limit enhancement to specified types of weapons(v0.4).
  • v0.5 Improved info windows (show actor's name when a weapon is equipped)
  • v0.5 Includes Patch for GUILLAUME777's Multi-Slot
  • v0.5 In the Equip Scene slots and their contents are displayed along with weapon's description
  • v0.6 Discard unequipped enhanced weapons from the enhance scene.
  • v1.0 It is now possible to give the party a weapon with slots already filled with enhancements.
  • v1.0 Added full support for Enhanced Armors!!!
  • v1.0 Items in the Enhance Scene is automatically sorted: Weapons first and then Armors.
  • v1.1 Added code to avoid elements used as tags from being considered in the calculation of the elemental damage correction.
  • v1.1 Added equipment upgrades.
  • v1.1 Upgrades that add slots.


  • v1.1 Included patch for DerVVulfman's Multi-Slot.

  • v1.2 Bugfix.

Screenshots

Version 1.1: Scene Enhance
[Image: sceneenhance2.jpg]

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.
Reply }
#2
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.
Reply }
#3
Good idea for version 0.6. I'm on it.

EDIT:[Image: th_06.jpg](it's all a picture...)[Image: th_enhancebg.png]
Reply }
#4
:rolleyes: Yay.
Reply }
#5
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.
Reply }
#6
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???? Huh?

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.
Reply }
#7
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.
Reply }
#8
In the script page Enhanced Weapons, change the gain_weapon method with this 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

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).
Reply }
#9
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?
Reply }
#10
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?
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   ATOA CBS Equipment Set Variables Patch kyonides 0 269 10-14-2024, 12:47 AM
Last Post: kyonides
   The Wanderers: The Customizable Encounters System DerVVulfman 0 355 08-24-2024, 07:12 PM
Last Post: DerVVulfman
   Angie's Equipment Sets DerVVulfman 3 9,571 08-04-2024, 01:44 AM
Last Post: DerVVulfman
   Super Simple Vehicle System - Enhanced DerVVulfman 65 95,978 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 2,970 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   The Charlie Mini-Map / Dynamic Maps Patch DerVVulfman 2 5,008 03-29-2022, 11:55 PM
Last Post: DerVVulfman
   Charlie's Mini-Map Extended DerVVulfman 16 16,835 09-02-2020, 03:49 AM
Last Post: DerVVulfman
   Commercial System Package DerVVulfman 11 14,613 01-04-2020, 12:37 AM
Last Post: Pelip
   KItemDesc XP Zilsel Version kyonides 4 7,873 12-01-2019, 06:11 AM
Last Post: kyonides
   ACBS - Atoa Custom Battle System 3.2 Victor Sant 150 259,272 03-02-2019, 04:47 AM
Last Post: dragonprincess44



Users browsing this thread: 2 Guest(s)