Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Item remove all similar Items. #47

Closed
projectdelphai opened this issue Jan 4, 2014 · 18 comments
Closed

Remove Item remove all similar Items. #47

projectdelphai opened this issue Jan 4, 2014 · 18 comments
Labels

Comments

@projectdelphai
Copy link
Member

For example, if you have a backpack of three milks, and you call:

dmilk

then all the milks are dropped and you are left with an empty backpack.

Post any solutions here.

@projectdelphai
Copy link
Member Author

My initial thought was to add each similar item with a suffix on the end to distinguish the items. So your backpack may look like this:

milk1
milk2
milk3

and then you could just call:

dmilk2

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

All right! That works. But as the game will go on the user will end up with items named milk1, milk71 and milk134 in his backpack. That will look weird as for a game.
How about it just shows something like:
milk * 3

And after a command
dmilk

it goes like:
milk * 2

and we can then modify delete command to remove multiple times the same item with a single command:
dmilk2
which will remove two milk items from his backpack

@projectdelphai
Copy link
Member Author

I really like the option of just saying

dmilk

and one of the item dropping. I feel like that's probably the route we should go.

However, I'm against stuff like milk*3 because that feels too much like stacking items. It's not really realistic to have a 173 bottles of milk hanging out in your pocket. I think that you should have a certain amount of inventory say 10 to start out with and then have it increase or decrease as you go. Either that or some sort of weight system (I believe skyrim has something like this). Only money should be stackable and even then should be capped at a certain point (500 gold or something) to instigate the use of chests or banks.

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

Weight system for sure and we increase the maximum weight with advancing level. Looks like Items just got another property.
Money system sound so classic. Kudos to that too.

@projectdelphai
Copy link
Member Author

It should probably increase with strength though. Just because a character is a master thief doesn't mean that he or she can carry the same weight as a hardened soldier.

However, if we do go with a weight system, that that means the number of items doesn't matter, just the weight of the items. So stacking is a go then and a backpack could look like this:

gold [400]
milk [3]
dagger [2]
lock and pick

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

And of course it should increase with strength. I typed the word strength in previous commend but then just backspaced it.
Looks like a lot of changes then. This bug-labelled thread changed to feature thread now.

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

I endorse the displaying-weight-with-backpack-items idea too.

@projectdelphai
Copy link
Member Author

hmm, I actually meant those numbers to be the number of items. I'm thinking of not displaying the weight in the backpack, but rather having each item having a realistic weight. So then it would just be common sense which is heavy or not. Maybe something like:

backpack       total weight: 6 lbs total money: 400 gold

milk [3]

So this way you'd know that you have 400 gold and each milk weighs around 2 lbs. I'm thinking that individual weights may clutter the screen too much.

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

Well now who's agreeing about displaying number of items.

I say we display both the total weight and the individual weights. It won't clutter up if we align the weight to right of the screen. No matter what, the user will need individual weights. He needs to know the difference in weights between a shield he obtains from killing different bosses. And something like Marvin's shield won't be much explanatory.
Seems like I will be dropping and picking items all way long in the game just to know their weights without this.

@projectdelphai
Copy link
Member Author

I was thinking about having an inspect command. So you could see the face value of an item which would just be the title and then the inspect command. It would give you a more in depth look at an item such as a description, money value, weight value, and its stat changes.

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

So finally, the backpack will be something like:

  1. Modified command 'b' will output:

backpack total weight: 6 lbs total money: 400 gold

milk [4]
shortsword
super milk [2]

  1. An inspect command. That will be really necessary.
  2. (maybe or maybe later)Another command 'backpack' which displays what I mentioned - items with weight aligned in some fancy way.

@projectdelphai
Copy link
Member Author

Yeah, but if you can get the items aligned properly in the beginning. Go ahead, there's nothing wrong with it inherently. I just think that it would would be hard to do well, but definitely a go if possible.

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

I'm first working on #42.
The last of my comment in #43 will solve the removing single option thing. And then modify the player backpack. We might need another class.
Oh boy! That is a whole lot. That will require changing so much code in almost every entity, parser, prompt, and stuff present there.

@shkesar
Copy link
Contributor

shkesar commented Jan 4, 2014

I say you fix that 'remove single item thing' and we take these backpack thoughts to another issue and figure out the best way.

@pthayer3
Copy link
Contributor

pthayer3 commented Jan 4, 2014

I agree with the inspect command. To code it would you just reference the json file and display the information stored there when the player inspects the items?

For the single item dropping issue could we change the backpack system so that each save file has its own item.json file like the locations. There can be another property for each item that is not shown when inspected but it basically is 'quantity'. If you have three milks in the backpack the property is set to 3, (bkpk_quant = 3) etc. There may have to be different properties for banks and chests, like chest_quant and bank_quant for storage in those areas.

When you drink one or deposit it in a chest the integer will just subtract or move around. Thoughts?

@projectdelphai
Copy link
Member Author

I agree with almost everything. I think that the backpack system can be placed in the profile json file seeing as the character is holding the backpack rather than having an own json file. It would just be a map of

{ backpack: { fmil1: 3, wdag1: 2, tlap1: 1, gold : 400 } }

Then when loading a character profile, it would add it like this to the backpack.

@blackwolf12333
Copy link
Contributor

@projectdelphai This can be closed now, as this was also addressed by #55

@projectdelphai
Copy link
Member Author

Alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants