Comments (18)
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
from jadventure.
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
from jadventure.
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.
from jadventure.
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.
from jadventure.
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
from jadventure.
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.
from jadventure.
I endorse the displaying-weight-with-backpack-items idea too.
from jadventure.
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.
from jadventure.
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.
from jadventure.
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.
from jadventure.
So finally, the backpack will be something like:
- Modified command 'b' will output:
backpack total weight: 6 lbs total money: 400 gold
milk [4]
shortsword
super milk [2]
- An inspect command. That will be really necessary.
- (maybe or maybe later)Another command 'backpack' which displays what I mentioned - items with weight aligned in some fancy way.
from jadventure.
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.
from jadventure.
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.
from jadventure.
I say you fix that 'remove single item thing' and we take these backpack thoughts to another issue and figure out the best way.
from jadventure.
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?
from jadventure.
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.
from jadventure.
@projectdelphai This can be closed now, as this was also addressed by #55
from jadventure.
Alright.
from jadventure.
Related Issues (20)
- NPC health carries over when reverting save HOT 8
- Selling to guide and then killing him causes negative gold drop HOT 5
- Creating new profiles deletes equipped armors in all other profiles HOT 2
- Saving after killing an NPC on one profile saves NPC death on all profiles HOT 1
- Items should cost more when you sell them to the npc HOT 4
- Merge json/ and json/original_data HOT 1
- Conversation menu infinite loop HOT 5
- when buy things with Guide,it will always loop.[BUG] HOT 1
- Standalone jar doesn't recognize external libraries HOT 4
- Use Adapt for Intent Parsing HOT 2
- i lost my file HOT 3
- prices display while selling HOT 1
- Save Selection Should be Clearer HOT 1
- Debug Error Reporting
- Link github pages site on title HOT 2
- Small amount of Dead code in Main Menu class HOT 4
- QueueProvider rework suggestion HOT 3
- Trading into menus package
- Jacoco breaks build
- Cucumber tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jadventure.