Item Encumbrance

Started by Bigfoot, April 15, 2012, 05:55:03 am

Previous topic - Next topic

Bigfoot

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.

Calintz

April 15, 2012, 06:07:08 am #1 Last Edit: April 15, 2012, 06:09:13 am by Calintz
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.

ForeverZer0

April 15, 2012, 12:28:33 pm #2 Last Edit: April 15, 2012, 01:58:19 pm by ForeverZer0
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.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Bigfoot

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!

ForeverZer0

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:

  • States can be applied to the whole party or individual actor basis

  • Every item, weapon, and armor can have a unique weight

  • Unlimited number of states

  • Can us a dynamic weight capacity that grows with actor power, or static capacity that you can control yourself via simple script calls

  • Automatic setting of game variables that are equal to the party's current weight and total capacity

  • Configurable modifier that allows for defining the rate of dynamic weight capacity based off actor strength

  • Automatic adding of weight to item descriptions if desired so that the player is always aware of each item's weight

  • Configuration for allowing or not items to be picked up by party or equipped by actors if weight would exceed capacity

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

AJNR95

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.
Spoiler: ShowHide


by Blizz: Spoilered, because image is 2.6 MB.
by AJNR95: Unspoilered, because fuck you - ¡Viva la Revolución!
by Blizz: Spoilered again, and Banned.

Bigfoot

Thank you ForeverZerO!  I can't believe you have taken this on.  I am ForeverInYourDebt!

ForeverZer0

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.