Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Bigfoot on April 15, 2012, 05:55:03 am

Title: Item Encumbrance
Post by: Bigfoot on April 15, 2012, 05:55:03 am
Hello there!

I have abandonded my old project in favor of something much more original.  It's an extremely detailed and relaistic survival game.  I originally started it as a roguelike, but have decided to go with RMXP, since I'm quite familiar with it.  However, I'm not too familiar with scripting yet.  I tried playing around with a script, but couldn't get it working.  I even tried using game_guy's item storage script as a starting point, but had no success.

My idea is to have an encumbrance system where each item has a weight value and the character has a carry limit based on weight.  I've been fiddling with this for a week now and still can't wrap my head around how this could be scripted.  Any help would be very much appreciated.  I'm sure others might find a weight system usefull as well.
Title: Re: Item Encumbrance
Post by: Calintz on April 15, 2012, 06:07:08 am
well...an event system could get tricky depending on the ways you can obtain an item. this is most important. is item acquisition controlled? by that i mean, are you going to personally place the items around the map? are you going to use the battle system and receive items that way?

as far as scripting goes, i believe it would be easy actually.
one variable set to the max amount of weight.
give each item a "weight."
once that limit has been reached, stop item acquisition until stuff is discarded and you free up space.

it's all about variables.
Title: Re: Item Encumbrance
Post by: ForeverZer0 on April 15, 2012, 12:28:33 pm
This would be a massive event system, and very hard to do. You would need a variable to define the weight of every item, a check that was constantly summing up all the weight, and all that just to make some sort of action when the weight was exceeded.

If it was done with a script, it would not be very difficult, and be far more efficient.


EDIT:
I have some free time, I might actually dust off my old RMXP and make this real quick. Give me about an hour.
Title: Re: Item Encumbrance
Post by: Bigfoot on April 15, 2012, 04:41:04 pm
That would be great!  I'll be sure to put you in the credits.  I plan on using a few of your other awesome scripts as well.  It wouldn't be a commercial game, but you'll still be in the creds. 

Anyway, this weight system may sound easy at first, but it's really confusing.  Item acquisition would be through event interaction (picking stuff up on a map) and at the end of some combats (receiving the corpse of a deer).  That's the hard part.  Making sure whatever you recieve from combat falls on the ground, ready to be picked up when you have less gear.  I can't figure it out.  If you can though, rats off to ya!
Title: Re: Item Encumbrance
Post by: ForeverZer0 on April 15, 2012, 04:49:29 pm
As long as you are still using the "gain_item", "gain_weapon", and "gain_armor" methods, which are called via the event commands, that will be no problem. I'm about done at the moment. I wasn't sure sure exactly how you were planning on setting it up, so I kinda just made it so that it works various ways depending on the configuration.

Here is the features list at the moment:
Title: Re: Item Encumbrance
Post by: AJNR95 on April 15, 2012, 06:22:33 pm
A mediocre Event System would give you the fundamental features of Item Encumbrance.
Having a Variable that sets as the whole weight that you can carry, that changed with switches;
Then you can do conditional branches, if New Weight is heaver than Total Weight, the item wont
be taken, but still remains. If your New Weight is lighter than Total Weight, than add the weight
of the item to create the New Weight. However, you would need to create a Common Event for
every single item so that when it's used, the weight would lower.

The problem with that is that it doesn't apply to selling items, buying items, weapons, armor
and enemy drops. The only way this would work is if you gain items only through events.

But since this is a Script Request, I'm not needed here.
Title: Re: Item Encumbrance
Post by: Bigfoot on April 15, 2012, 06:27:19 pm
Thank you ForeverZerO!  I can't believe you have taken this on.  I am ForeverInYourDebt!
Title: Re: Item Encumbrance
Post by: ForeverZer0 on April 15, 2012, 07:13:43 pm
Alrighty, give this a try.

http://forum.chaos-project.com/index.php/topic,11675.0.html