• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
DarrylBD99's Wardrobe

Resource DarrylBD99's Wardrobe 1.1

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
I can't help with the crash if you don't show the errorlog. Anyway, you just add the clothes names (the one you defined in NAME = ) on that array and then match it with the item ID. Be aware that the array starts numbering from 0 so the first element on the list will have 0 as index.
Example:
Ruby:
Expand Collapse Copy
OUTFITS = [
  "Classic Ourfit",
  "Magma Outfit",
  "Ruby Outfit"
]
As a note, you have to add a , at the end of each line except the last one (like with the Ruby Outfit one).
The item list in the code I shared would then be:
Ruby:
Expand Collapse Copy
items = {
  :CLASSICOUTFIT_M => 0,
  :MAGMAOUTFIT_M => 1,
  :RUBYOUTFIT => 2
}
Again, you have to add , at the end of each line except the last one.
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
Heres a crash when I try to open up the wardrobe with a different outfit on.
Screenshot 2024-02-23 143428.png


This is the text I added: The basic clothes is the original outfit you start with which should be 0. Than everything after that is 1 and so on.
OUTFITS = [
"Basic Clothes",
"Classic Clothes",
"Magma Outfit",
"Ruby Outfit"
]

items = {
# Item ID => outfit index in OUTFITS array
:NORMALOUTFIT_M => 0,
:CLASSICOUTFIT_M => 1,
:MAGMAOUTFIT_M => 2,
:RUBYOUTFIT => 3
}
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
Why are you calling the pbWardrobe? If you copied my code at the very end of the plugin, after all the ends, then you should simply call pbBuyClothes(clotheList) and change the clotheList with the list of clothes like with the mart script.

As for the error log, you should copie all the text that appears in the window that pops up. This way, it's easier to find where the error is.
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
The mart script in the UI_Pokemart scripts section? Or something like this? Thats just an example. It doesnt work.
pbBuyClothes([
:RUBYOUTFIT
])
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
26357

The list you added here.
So after the ends you put this in the script editor?
def pbBuyClothes(itemList)
for outfit in itemList do
if $bag.has?(outfit)
outfit_index = pbItemToIndex(outfit)
pbUnlockOutfit(outfit_index)
quantity = $bag.quantity(outfit)
$bag.remove(outfit, quantity)
end
end
end
#pbBuyClothes(clotheList)
pbBuyClothes([
:RUBYOUTFIT,
:RSEMAGMAOUTFIT,
:RSEAQUAOUTFIT,
:MAGMAOUTFIT_M,
:REDOUTFIT_M,
:RSEREDOUTFIT,
:GOLDOUTFIT_M,
:LUCASOUTFIT,
:CLASSICOUTFIT_M
])
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
Yes, it should look something like that:
1708725503082.png

And the
Ruby:
Expand Collapse Copy
pbBuyClothes([
:RUBYOUTFIT,
:RSEMAGMAOUTFIT,
:RSEAQUAOUTFIT,
:MAGMAOUTFIT_M,
:REDOUTFIT_M,
:RSEREDOUTFIT,
:GOLDOUTFIT_M,
:LUCASOUTFIT,
:CLASSICOUTFIT_M
])
has to be after the code for the pokemart in the event for the shop.
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
Yes, it should look something like that:
View attachment 26359
And the
Ruby:
Expand Collapse Copy
pbBuyClothes([
:RUBYOUTFIT,
:RSEMAGMAOUTFIT,
:RSEAQUAOUTFIT,
:MAGMAOUTFIT_M,
:REDOUTFIT_M,
:RSEREDOUTFIT,
:GOLDOUTFIT_M,
:LUCASOUTFIT,
:CLASSICOUTFIT_M
])
has to be after the code for the pokemart in the event for the shop.
Here it is set up in an event, but how would it be put underneath the pbPokemonMart correctly?

Screenshot 2024-02-23 162755.png
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
Make another script call, like you did for the pbPokemonMart, and add this in it:
Ruby:
Expand Collapse Copy
pbBuyClothes([
:RUBYOUTFIT,
:RSEMAGMAOUTFIT,
:RSEAQUAOUTFIT,
:MAGMAOUTFIT_M,
:REDOUTFIT_M,
:RSEREDOUTFIT,
:GOLDOUTFIT_M,
:LUCASOUTFIT,
:CLASSICOUTFIT_M
])
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
Make another script call, like you did for the pbPokemonMart, and add this in it:
Ruby:
Expand Collapse Copy
pbBuyClothes([
:RUBYOUTFIT,
:RSEMAGMAOUTFIT,
:RSEAQUAOUTFIT,
:MAGMAOUTFIT_M,
:REDOUTFIT_M,
:RSEREDOUTFIT,
:GOLDOUTFIT_M,
:LUCASOUTFIT,
:CLASSICOUTFIT_M
])
With this event:
event1.png

I get this error:
error.png

I did add this to scripts:
def pbUnlockOutfit(outfit_index)
outfit_unlock = WardrobeConfig::OUTFITS[outfit_index]
if !$player.outfit_unlocked.include?(outfit_unlock)
$player.outfit_unlocked.push?(outfit_unlock)
echoln "Outfit #{outfit_unlock} Unlocked"
else
echoln "Outfit #{outfit_unlock} Already Unlocked"
end
end
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
The one you copied was already in the script. What you have to add were the two I passed. The last two that start with def on this image:
26359
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
I don't even know what the code above is about. What plugin are you editing and why is it so short?
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
You don't write there. Ever. If you understood that from what I said, I explained things wrong.

What I meant is to copy this in the file with this plugin's code. For that, you have to go in the plugins folder and then search for the "TC Wardrobe" or "Wardrobe" folder. There you open the file called 001_main (you can open it with the notepad (or whatever the program with this icon is called
1708727839179.png
). Here you go to the bottom of the file and add the code I shared at the very end of it.

You can copy it at the end of 002_config, that is a shorter file, if you prefer. Just make sure that my code is at the end and has nothing after it.
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
You don't write there. Ever. If you understood that from what I said, I explained things wrong.

What I meant is to copy this in the file with this plugin's code. For that, you have to go in the plugins folder and then search for the "TC Wardrobe" or "Wardrobe" folder. There you open the file called 001_main (you can open it with the notepad (or whatever the program with this icon is called View attachment 26368). Here you go to the bottom of the file and add the code I shared at the very end of it.

You can copy it at the end of 002_config, that is a shorter file, if you prefer. Just make sure that my code is at the end and has nothing after it.
Sorry just realized. Deleted the code from the where I had and moved it to bottom of main in the plugins folder.
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
When I try the mart part now to buy the outfits using pbBuyClothes it doesnt read it and nothing happens. If I add pbWardrobe it just goes right to that.

Screenshot 2024-02-23 170619.png
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
pbWardrobe is to open the UI for the wardrobe. It doesn't have to be on the shop's event.
pbBuyClothes simply checks if the player has one of the items defined in the list on their bag and transforms it into an item that the wardrobe UI can display and interact with.
You NEED the shop's code with the list of clothes in the event (before the pbBuyClothes) for the game to open the shop and let the player buy the clothes items you made.
 

Lord Lucario 35

Cooltrainer
Member
Joined
Apr 22, 2021
Posts
112
pbWardrobe is to open the UI for the wardrobe. It doesn't have to be on the shop's event.
pbBuyClothes simply checks if the player has one of the items defined in the list on their bag and transforms it into an item that the wardrobe UI can display and interact with.
You NEED the shop's code with the list of clothes in the event (before the pbBuyClothes) for the game to open the shop and let the player buy the clothes items you made.
Something like this? The pbBuyClothes still gives out an error message.
clothes shop.png
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
663
Why have you taken away the list from pbBuyClothes? I said that it uses the list to check if the player has any of the items listed in it in the bag.

You need the pbPokemonMart with the list of items to buy AND pbBuyClothes with the same list of items to convert them for this plugin to use.
 
Back
Top