The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Trihan on May 17, 2012, 12:16:59 AM

Title: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Trihan on May 17, 2012, 12:16:59 AM
Sorry everyone. The client who commissioned this script has requested that I refrain from making it available to the public until after he releases his project. I would ask that anyone who is already using this script remove it until further notice. My sincerest apologies for any inconvenience this may cause.
Title: Re: [VXA] Unlockable Shop Items
Post by: pinkapinkie on May 17, 2012, 06:34:38 AM
Nice script, but i have a little suggestion to improve it.
Would it be possible to tweak the script so that you can actually see in the shop which items will be available and what you need to unlock them? They could be greyed out for example, before you are able to buy them, or they could have a little lock icon next to the item's icon to show that they are still locked.

Nice work anyways, keep up!
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on May 17, 2012, 11:21:13 AM
Interesting idea, but it wasn't part of the original request.

The problem with doing that is that if you have a large number of unlockable items, it'll potentially be more annoying than helpful because you'll have huge lists to scroll through. I'll certainly think about making it a toggleable option, though, after I finish up my other scripts.
Title: Re: [VXA] Unlockable Shop Items
Post by: Brady on June 09, 2012, 03:06:10 AM
Hey~
I've been trying to use this script (alongside with Yanflys script) and it's...just not working.  I mean there's no crashes or anything, it's just simply not having any visible effect.  If I put the items in the shop that are tagged to be locked, they're available straight away, and if I don't put them in they never become available, no matter how many are purchased.  I checked over my notetags for them are they're all correct, and I have the script just under teh Ace Shop script...but

I've no idea.  I'm totally new to VXA and not a scripter on the best of days, so it's entirely possible I've done somethin' terrible, but I never made any changes to your script and only string changes in the Ace Shop script.

Any ideas?  (I'm not sure what details you might need to help you diagnose it, so just let me know if you do.  If you need a check of the game it's in my page linked in my sig.  I'll be adding an updated version in the next five mins or so, but neither work with the script sadly :(
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 09, 2012, 11:25:35 AM
The wording of your post brings one thing to mind; you said nothing happens no matter how many of an item you "purchase". That's not how this script works, the items are unlocked once you SELL that many items to the shop. Does it work if you possess the appropriate number of items from your unlock criteria and sell them to a shop?
Title: Re: [VXA] Unlockable Shop Items
Post by: Brady on June 09, 2012, 10:10:35 PM
OH!
Now I feel like a fool, I had it figured that it was " buy x*5 to unlock y".  Clearly I just didnae read carefully enough.  Your way does make more sense to be fair ;)

Just tested it and it works absolutely fine, I was just bein' a numpty.  Cheers :)
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 09, 2012, 10:32:23 PM
It wasn't part of the original request to have items that are unlockable by "buying" a certain number; do you think it would be helpful to add such a feature? I'm not sure who would really use it, but I can see where it might be useful.
Title: Re: [VXA] Unlockable Shop Items
Post by: Brady on June 09, 2012, 10:38:09 PM
Well I had it in my mind that you, say buy ten potions then BAM, a hi-potion gets unlocked.
The logic behind it (that made me not question it or re-read the description) was that it forces the player to just spend, to just play the game and to use level-appropriate gear for a while until they have access to the higher gear, rather than just saving up after a few fights and skipping the low level stuff in favour of higher level goodies.
I mean, if you have to buy 10 potions, you might as well use them.

Selling them works well for gear and such (and I do like it more that way); you have gear, sell that back and unlock newer gear when you're done with it and seeking more, but less so for potions, becasue that implies that you buy a potion..then just sell it back o.o

I suppose the script would be more flexible if it had an option to choose whether the item should be unlocked by selling the <require>s or by buying them, but that's really up to whether you'd like to modify/re-write your own script.  I'm using your work, and like it either way, so amn't gunna complain if you don't :)
Title: Re: [VXA] Unlockable Shop Items
Post by: Lethrface on June 09, 2012, 10:52:29 PM
This looks awesome.  I like the idea.
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 10, 2012, 12:00:07 AM
Thanks, glad you like it. :)

I can see the logic in that Brady; if I do revisit this and make that change, what I'll probably do is only count items that weren't bought in a shop towards the unlock criteria.
Title: Re: [VXA] Unlockable Shop Items
Post by: Wiimeiser on June 10, 2012, 05:32:03 AM
Kind of breaks the sell-only shop...
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 10, 2012, 09:32:34 AM
How so?
Title: Re: [VXA] Unlockable Shop Items
Post by: Wiimeiser on June 10, 2012, 01:00:34 PM
For whatever reason it's not selecting an item...
When you select a category to sell it doesn't select anything and all you can do is leave.
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 10, 2012, 02:34:13 PM
Hmm, I just tried it and it works for me...

Can you package up your project and upload it so I can take a look?
Title: Re: [VXA] Unlockable Shop Items
Post by: Wiimeiser on June 11, 2012, 02:37:18 AM
Only happens if all three scripts (this, Sell Only and Ace Shop Options) are installed, strangely enough
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 11, 2012, 08:34:16 AM
It's because my shop unlocks script overwrites on_category_ok and checks the index of the command window to see whether to activate the buy or sell windows. In the sell only script index 0 is "sell" but my script thinks it's "buy" which is why the scripts were causing a crash.

It's an easy fix; change lines 571 and 594 (in the shop unlocks script) to:

Code: [Select]
if @command_window.current_symbol == :buy

and lines 574 and 597 to:

Code: [Select]
elsif @command_window.current_symbol == :sell

That's the original post updated with the fix.
Title: Re: [VXA] Unlockable Shop Items
Post by: Iperks on June 12, 2012, 05:59:52 PM
damn you! you made my day once again this is yet another great feature i would love to use in my game!!!!!!!!!!!!!
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 12, 2012, 06:04:25 PM
...so why are you damning me? XD
Title: Re: [VXA] Unlockable Shop Items
Post by: Iperks on June 12, 2012, 06:06:15 PM
because im so happy and your so awesome!(i don't really know) :tpg:
Title: Re: [VXA] Unlockable Shop Items
Post by: Brady on June 12, 2012, 09:02:04 PM
I may just be bugging out, but I went and did a dry run before I compressed, and realised that every time I closed the shop, all the unlocked armour (not items) vanished.  As soon as I sold one of anythin', they all unlocked again but...well...

thoughts?
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 12, 2012, 09:55:15 PM
Hmm! That's certainly something that didn't come out of my testing!

Confirmed, though. Weirdly enough it only seems to be one item it's removing from the shop. This will require further investigation. Watch this space!
Title: Re: [VXA] Unlockable Shop Items
Post by: Trihan on June 12, 2012, 10:03:08 PM
Fixed! I've updated the OP, but to fix it without having to redownload:

change line 402 to:

Code: [Select]
@goods.push([1, i, 0, 0, false]) if include == true && !@goods.include?([1, i, 0, 0, false])

and line 423 to:

Code: [Select]
@goods.push([2, i, 0, 0, false]) if include == true && !@goods.include?([2, i, 0, 0, false])

That should fix the issue. Sorry about that!

Edit: My client has requested that I not make his script commissions public until the release of his project, so I will no longer be providing or supporting this script here. See the OP for details.
Title: Re: [VXA] Unlockable Shop Items
Post by: Brady on June 12, 2012, 10:16:22 PM
Fantastic timing, just in time for me to compress the game into my chapter1 demo without that wee issue!  Cheers for getti'n back to me so fast on that one; you're a gentleman and a scholar :)

edit: well hopefully you won't need to change much more anyways then, looks great as it is.  Cheers for the help with it up until now and lookin' forward to you re-licensing it ^^
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Trihan on June 12, 2012, 10:17:45 PM
If that took you a long time to do, I'll make an exception to my request in the OP. It's not my intention to interfere with any projects that are already using these scripts.

Edit: Never mind, he doesn't want anyone using them. :P
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Brady on June 12, 2012, 10:21:52 PM
Are you sure?  o.o

I mean, I wouldn't want to be hasslin' you or anyone else over it.  It won't make any major changes to the game to have it removed as you requested, this was just the first script I managed to get workin' and was tryin' to do everythin' I could to make sure it ran nicely; s'why i've been buggin' you about problems xD

Your script, your call, I'll respect your decision either way :)

edit:  S'cool, I'll wait until you come up with another script I can mooch off of you! :D
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Trihan on June 12, 2012, 10:23:53 PM
Well my next non-commission one will be my dynamic bestiary; you can feel free to use that. ^_^

Now I'd better get the battle rankings script finished before Twilight hangs and quarters me!
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Brady on June 13, 2012, 05:03:54 AM
This may be the wrong place to post this, but you've been helpful so far and it's possibly related.

Ever since I removed the Unlockables script, my YEA Ace Shop Options has been a bit funky; specificially, the "buy" section isn't being categorised like the "Sell" section is.  I can't see how your script would be relevant other than the timing of the issue, but I've honestly no idea what caused it or how to fix it, and am just wondering if you've experienced something similar to this before and have any clue about it.

Appreciate any help, if not..well, cheers anwyays :)
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Trihan on June 13, 2012, 10:48:49 AM
The categorisation of buying items was a change included in my script; Shop Options doesn't do that. ^_^
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Brady on June 14, 2012, 12:32:08 AM
Really?  It categorises selling stuff but not buying it?

Really? o_o'  That seems...weird as hell D:

Any chance I could get a wee tiny baby wee mini script of coolness just to categorise buying items?  Would you/your client be cool with that?  I kinda miss the categorisation!  Well, mainly just miss that one of them is and the other isnae QQ....
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Trihan on June 14, 2012, 09:29:22 AM
Well that was actually something I added myself and wasn't part of the original request, so I may be able to wangle that. I'll ask him.
Title: Re: NO LONGER AVAILABLE. [VXA] Unlockable Shop Items
Post by: Brady on June 14, 2012, 09:53:11 AM
:D