01-11-2024, 09:42 AM (This post was last modified: 11-03-2024, 12:45 AM by kyonides.)
KustomShop XP Version 1.2.1
by Kyonides
Introduction
Change the way your shop looks and even make it a purchase only or a sell only store!
Or change the percent your heroes will get for selling their items!
Fine. Let them get a discount as well but don't spoil them too much!
Side Notes
Sell Only Stores requires a single shop item to work properly, even if it will never be sold.
RMXP: The script will automatically look for a Title backdrop with the same name as the Battleback set for the current map.
Other Engines: You can predefine a backdrop or use a script call to change it at any given time.
Script Calls
Setup Your Shop! - 3 Options
Reminder: BuyOrSell stands for :buy or :sell or nil for normal behavior.
In RMVX & RMVX ACE it is called SellOnly for the purchase only option is already available.
MemorizeLimits is a boolean, i.e. true or false.
Free for non commercial games.
Contact me if you are going commercial. It is inexpensive.
Due credit is mandatory.
Include a link to this post.
That's it!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
It seems I forgot to add a method to let me place the shop menu window at will so I replaced it with something that is very easy to handle instead.
Later on I noticed that some addition to my status window altered the default main menu's statuses of all your heroes. Ooops! But don't worry, my friends! I took care of that as well.
A New Feature
As a way to show you that I'm sorry for any inconveniences you might have experienced before, I added another feature. It is the Sell Only Shop!
That also means that the script's main script call has changed accordingly. The demo now reflects all of these changes, by the way.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
01-12-2024, 12:57 AM (This post was last modified: 01-12-2024, 12:59 AM by Mel.)
Now it works.
Some things I noticed:
- When I buy some items and sell them back to the trader the amount of resold items will be added to the wrong items. (For example when I buy the 2 bronze
swords and 2 iron swords and sell them back he will get 4 iron shields)
- When I sell any other item, for example dispel herbs the amount of sold dispel herbs will be added to the amount of potions he is selling
- When I leave and re-enter the shop all items reset.
I see. Well, I have uploaded a new demo with the updated code to fix those 2 issues concerning the wrong amount of items being sold back to Miroslav the Trader.
Warning: It doesn't deal with the third one for a good reason. It's not a bug but a feature!
This automatic reset does allow you to customize that shop at will. In the examples I've provided in the demo, I can make a random number decide whether or not the trader will accept selling you some items.
Now the modified main script call allows you to define whether the shop should remember those maximum units or not.
Call:
Code:
setup_shop(BuyOrSell, MemorizeLimits)
Example:
Code:
setup_shop(:buy, true)
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
01-19-2024, 08:24 AM (This post was last modified: 01-26-2024, 03:14 AM by kyonides.
Edit Reason: Spelling Correction
)
The Script Has Been Ported to RMVX!
From now on, any RMVX user that still exists can take advantage of this custom shop script as well.
There is a slight change on how it actually works. RMVX has a single sets of tilesets for the whole game, meaning that there is no way to customize the shop's background based on the current map. This is why I have introduced a new script call.
Code:
$game_shop.battleback = "Filename"
There is a default battleback as defined in the BATTLEBACK constant.
Some Unexpected Bug Fix Has Been Included As Well!
Since the RMXP port had an glitch that did not update the GUI properly, I was in need to update it first.
For instance, if you chose not to memorize the items_max parameters after using them the first time, by using a convenient conditional branch, you would notice that it would show the limits even if you never asked it to remember them. Now the script has been modified to deal with this issue so it will not show you those ghostly limits ever again.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
01-21-2024, 12:03 AM (This post was last modified: 01-21-2024, 12:06 AM by kyonides.)
The Script Has Been Ported to VX ACE!
Yes, my dear forumers! I have finally released the VX ACE version of my script today!
It looks similar but not identical to the RMVX release. There were many details that had to be dealt with to adapt it to VX ACE's weird ingame window system. Sometimes I had to write a new class because it refused to draw areas that don't follow the typical contents_height scheme.
But it does work as intended!
ALL VERSIONS Now Allow You to Set a Level Limit for Shop Items!
Set an Average Party Level Limit
ItemIndex stands for a Position as seen by humans, starting at number 1
Code:
shop_levels_min(ItemIndex => MinimumLevel)
A Working Example:
Code:
shop_levels_min(1 => 5)
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
01-22-2024, 09:35 PM (This post was last modified: 01-22-2024, 10:16 PM by kyonides.
Edit Reason: New Screenshot
)
New Script Update!
Version 1.2.0 has recently arrived and it brings 2 very convenient features:
To skip the command window if you only have a buy only or sell only store.
The buy and sell windows now slide in and out just like the rest of the GUI already did.
It also includes a bug fix that corrects the display of the buy and sell windows that kept showing the original item price on screen instead of subtracting the discount before hand.
RMVX ACE ONLY!
Now the windows on the right hand side are no longer as wide as in previous versions. Thus, this provides the bust or portrait with enough space to shine like they should.
Up-to-date Screenshot
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
After receiving a feature request, I added a new constant called BOX_OPACITY to the Setup module so custom boxes that display the shopkeeper's name, the discount percentage and some other stuff on screen can get automatically dimmed at will.
If you don't need it, set its default value to 255, meaning it'll look fully solid then.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
Once again, I received a feature request and I ended up adding ways to hide 1 or 2 windows, set a custom shopkeeper's name and portrait. Then I also added the ability to automatically adjust the shopkeeper's character sprite's Y coordinate based on those changes in the GUI.
And beware of the sip-happy trader!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.