[XP] Item Storage

Started by G_G, May 01, 2009, 08:50:28 pm

Previous topic - Next topic

Blizzard

I think this has something to do with not having a constructor that takes no arguments or the class not being properly defined for construction in the RMX-OS configuration.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

June 03, 2012, 01:45:43 pm #61 Last Edit: June 03, 2012, 01:48:12 pm by game_guy
Ah okay, that makes sense then. I added a default parameter in my Game_Chest class, hopefully that'll fix the issue, if not I'll peak at the configuration in RMX-OS again and see if I can solve it.
EDIT: Peaked at RMX_OS fixed it.

zottel89

June 03, 2012, 01:49:29 pm #62 Last Edit: June 03, 2012, 02:25:33 pm by zottel89
Thanks sooo much for adding this feature, game_guy :)

Unfortunately, I don't really get how this "Key Item" system works
yet...   but don't worry, it's either my stupidity or I'm overlooking something...

So the description says (line 60-65):

  #============================================================================
 # KeyItemId       = Element ID for non removable items.
 #                   Items/weapons/armors with marked with this element
 #                   cannot be removed.
 #============================================================================
 KeyItemId         = 17



Sooo... does that mean I have to insert the IDs (of the items I don't
want the player to be able to storage) at line 65 ?!
As in:

KeyItemId           =  17, 24, 39  (for example)

And if so, how do I know the difference between Item/Armor/Weapon ?!

As you can see, I'm being a total idiot, I guess ^^'
Please be forgiving :(

The item ID of my "diary" ingame is 37...  or "Item37", whatever ^^
How do I block it from being stored, now ?!

And also I'm getting line 498 and line 476 errors since I'm using the new version...
I don't really get why, I'm still just using "$scene = Scene_Chest.new(1)" and when I
try to store something in the chest, I get one of these errors (and I did not use a savegame) :(

Again, I feel like a jerk for asking so many questions >_<

Blizzard

@G_G: I have learned a few things about Ruby's meta model and internal structure while working on ARC. There is a "universal" fix for the problem by calling simply Class#allocate instead of Class#new, but Class#allocate doesn't call Object#initialize so that might cause other problems then. I'll probably use a begin-catch block, try to use Class#new and if it doesn't work, I'll use Class#allocate.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

Quote from: zottel89 on June 03, 2012, 01:49:29 pm
Thanks sooo much for adding this feature, game_guy :)

Unfortunately, I don't really get how this "Key Item" system works
yet...   but don't worry, it's either my stupidity or I'm overlooking something...

So the description says (line 60-65):

  #============================================================================
  # KeyItemId       = Element ID for non removable items.
  #                   Items/weapons/armors with marked with this element
  #                   cannot be removed.
  #============================================================================
  KeyItemId         = 17



Sooo... does that mean I have to insert the IDs (of the items I don't
want the player to be able to storage) at line 65 ?!
As in:

KeyItemId           =  17, 24, 39  (for example)

And if so, how do I know the difference between Item/Armor/Weapon ?!

As you can see, I'm being a total idiot, I guess ^^'
Please be forgiving :(

The item ID of my "diary" ingame is 37...  or "Item37", whatever ^^
How do I block it from being stored, now ?!

And also I'm getting line 498 and line 476 errors since I'm using the new version...
I don't really get why, I'm still just using "$scene = Scene_Chest.new(1)" and when I
try to store something in the chest, I get one of these errors (and I did not use a savegame) :(

Again, I feel like a jerk for asking so many questions >_<


Under the "Systems" tab, you can control which elements are in your game. Create one, call it "Key Item", put that ID in the script configuration. Then for each item, weapon, armor, make sure the "Element Set" has the "Key Item" element checked.

zottel89

Ah okay, I get it now :)
The only problem is ... I did that, but I'm still getting this error as soon as I want to store
something into the chest:


Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

zottel89

June 03, 2012, 05:05:54 pm #67 Last Edit: June 03, 2012, 05:08:37 pm by zottel89
Thanks, that seems to be fixed :)
Unfortunately, I get this one now (only when trying to store items, not when taking them out of the chest):



Tried to do the "?" thing again, but that didn't work.

I feel really bad because of asking one thing after another,
but I can't seem to figure these errors out...

Blizzard

This one might be happening because the save data got corrupted in the meantime. Try deleting the save files and using the script then.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

zottel89

Thanks, but seems like that didn't change anything.

I should say that I always started a New Game when editing
something in the script (I built in a simple choice option to skip the intro and the chest is on the first "real" map,
so that's no problem).

I just noticed that I also can't exit the chest without the game crashing....

It then gives me this one:




.... so....
basically the last 2 errors keep repeating themselves
and it doesn't matter which chest ID is being used in the script call
[$scene = Scene_Chest.new(1)], I tried 1 to 4 and it's always the same result:
The last 2 errors I posted :(

Hm, I'll keep trying to figure something out, but I'm pretty sure I'm still gonna
need help here >_<'


Also strange:   With version 1.3, it all worked perfectly fine oÔ

diagostimo

just tried the rmx-os fix and it worked a charm, thanks guys :)

G_G

June 03, 2012, 08:22:30 pm #71 Last Edit: June 03, 2012, 08:28:47 pm by game_guy
Quote from: zottel89 on June 03, 2012, 05:40:56 pm
Thanks, but seems like that didn't change anything.

I should say that I always started a New Game when editing
something in the script (I built in a simple choice option to skip the intro and the chest is on the first "real" map,
so that's no problem).

I just noticed that I also can't exit the chest without the game crashing....

It then gives me this one:




.... so....
basically the last 2 errors keep repeating themselves
and it doesn't matter which chest ID is being used in the script call
[$scene = Scene_Chest.new(1)], I tried 1 to 4 and it's always the same result:
The last 2 errors I posted :(

Hm, I'll keep trying to figure something out, but I'm pretty sure I'm still gonna
need help here >_<'


Also strange:   With version 1.3, it all worked perfectly fine oÔ


I'll look into it tomorrow.

EDIT: Should be fine now, it was trying to call a method from an older version.

zottel89

June 03, 2012, 08:37:17 pm #72 Last Edit: June 03, 2012, 08:39:12 pm by zottel89
Okay, closing the Chest Window ("Exit") works just fine now,
but I still get the line 503 error:

Script 'ItemStorage' line 503: NoMethodError occured.

undefined method `item_amount´ for nil:NilClass


when I try to store something inside the chest.


Nonetheless I'm still very happy that you're working on this
and that you've made such a great script in the first place :)

No need to hurry, I guess =)

G_G

Ugh! I'm an idiot! >.< I left some more old code in there, it should be fixed now. Sorry about that.

zottel89

June 04, 2012, 08:32:46 am #74 Last Edit: June 04, 2012, 11:52:22 am by zottel89
*yey*

Everything works perfectly now !!
Thank you so much, game_guy  :up:

Edit:
Just a little question/advice:

I don't know if it is possible, but it would be cool if the "Key items" would be grayed out in the "Storage-Window",
of course it's not necessary at all, just a little idea that came into my head. ^^

G_G

Alrighty, done. :3 Easy addition.

zottel89

...have you ever considered changing your nickname to "awesome_guy" ?  :P

G_G

June 09, 2012, 04:06:48 pm #77 Last Edit: June 09, 2012, 04:08:16 pm by game_guy
Actually, I've considered changing my name plenty of times. "game_guy" is too common. But the community doesn't know me as anything else so anything else wouldn't really work. I mean when you google "game_guy" the top three results are Chaos Project, but most everything after that isn't related to me at all.

zottel89

hey game_guy,

I didn't try out your new "updated" script the last time (when you added the "grayed out" ability for key items),
but it seems like there are some 'new' errors in the script, again.

When I try to store something, it gives me this
error:



I didn't do further research, but I guess there could be some more
'new' errors inside.

Would you try it out and maybe fix those ?!

If you get this to work again, with the new "grayed out" key items, it would be the perfect Item Storage script :)

Landith

Simple fix, change that line to
self.contents.font.color = normal_color


and change the line that says (should be 301)

self.font.color = disabled_color


to

self.contents.font.color = disabled_color