ChaosWarlock
New member
- Joined
- Dec 27, 2021
- Messages
- 4
Hi Everyone. I'm looking for some help in solving a unique issue.
I'm making a spreadsheet to help calculate profits on an economy based game I'm playing. In this game when I craft an item it requires x number of resources but once that item is crafted not only do I receive the item but I also receive a percentage of the resources used to craft the item. I'll call this the resource return rate. I'm trying to create a formula where I can plug in the number of items I want to craft and it will give me the number of resources I need to craft them based on the compounding resource return rate.
For example. If I have 100 resources, it costs 10 resources to craft 1 item, and my resource return rate is 50%. I would craft 10 items and be returned 50 resources. I could then craft 5 items and be returned 25 resources. Then I craft 2 items with 5 resources left over returning 10 resources. Then craft 1 item with 5 resources left over returning 5 resources. And finally craft 1 item with 5 resources returned. At which point I would have 19 items and 5 resources. So in this example if I had indicated that I wanted to make 19 items it would have told me that I would need 100 resources.
I've tried to use a compounding depreciation formula that I found online but I'm not exactly where all of the pieces fit. I'll start off by saying that I'm not sure if this is even the right formula for what I'm trying to do.
p = principal number of resources required to craft the desired number of items
r = resource return rate
t = the number of times you craft or number of items desired?
c = the number of resources where you can't craft any more items
p(r)^t=c
I'm making a spreadsheet to help calculate profits on an economy based game I'm playing. In this game when I craft an item it requires x number of resources but once that item is crafted not only do I receive the item but I also receive a percentage of the resources used to craft the item. I'll call this the resource return rate. I'm trying to create a formula where I can plug in the number of items I want to craft and it will give me the number of resources I need to craft them based on the compounding resource return rate.
For example. If I have 100 resources, it costs 10 resources to craft 1 item, and my resource return rate is 50%. I would craft 10 items and be returned 50 resources. I could then craft 5 items and be returned 25 resources. Then I craft 2 items with 5 resources left over returning 10 resources. Then craft 1 item with 5 resources left over returning 5 resources. And finally craft 1 item with 5 resources returned. At which point I would have 19 items and 5 resources. So in this example if I had indicated that I wanted to make 19 items it would have told me that I would need 100 resources.
I've tried to use a compounding depreciation formula that I found online but I'm not exactly where all of the pieces fit. I'll start off by saying that I'm not sure if this is even the right formula for what I'm trying to do.
p = principal number of resources required to craft the desired number of items
r = resource return rate
t = the number of times you craft or number of items desired?
c = the number of resources where you can't craft any more items
p(r)^t=c
- I know the value of r (0.5 from the example above).
- My thought was that if I set c to 1 less than the number of resources required to craft 1 item then that would be the stopping point. So from my example above c would be 9).
- I'm not sure if t should be the total number of items I want to craft (19 in the example above) or the number of times I craft items and return resources (5 in the example above). If t is not the total number of items I want to craft then I'm not sure where I would enter that into the formula.
- I'm trying to solve for P and I'm not sure how to do that. I haven't had a math class in 20 years so I'm not sure if I can just divide both sides by (r)^t to isolate p.