#A Thingy
1 messages · Page 1 of 1 (latest)
yea
yikes, alright, you want the easy way, or the hard way?
Hard way saves chips and cloud data, easy way is easier but uses alot of cloud data
The Hard Way
Have a string variable and configure it and enable Cloud, this means the data saves even when you leave/rejoin
Decide the max number of ores a player can pickup at a time, lets say its 9999 (this would be the max amount you can EVER pickup, you can set your own custom limits later)
9 max ore lets you store 512 different types of ores with one variable
99 max ore lets you store 256 different types of ores with one variable
999 max ore lets you store 128 different types of ores with one variable
9999 max ore lets you store 64 different types of ores with one variable
99999 max ore lets you store 32 different types of ores with one variable
Now that we've decided your limits, lets store the ores!
Define each of your ores an index, lets say you have the ores Coal, Copper, Iron, Gold, Emerald, Diamond
Coal = 0
Copper = 1
Iron = 2
Gold = 3
Emerald = 4
Diamond = 5
All these indices do is tell your circuits "This is where this ore goes in the "Backpack", this defines its order"
Now that you have defined these, you can follow the image below:
Now, whenever you sell, you need to go through the every amount of ore the player has, sell the ore for that value, and then set the amount of that ore to 0000
closer look
The String Substring with the "0000" inside it should have as many 0's as the number of digits in the max ore number of digits
I think I got this, but where do I put the list of ores and how much it gives?
Me personally?
- I'd use an
Event Definition, rename it "Ore Settings", and I'd add 2 inputs, aList<String>forOre Namesand aList<Int>forOre Prices - When the local player joins, I'd send the event
Ore Settingsto local
This way you can set the ore prices and names however you want, and they will update when you rejoin (or re-execute the event), making them super cheap to take from as they are "baked" into the event
This is what I have but I'm confused of where I wire the data into the system
Sorry the pictures positions are switched, idk why it did that
you dont need the "Max ore stack number of digits" variable, thats just an example
If you were using 9999, it would be 4, 999 its 3, 99, its 2
Make sure your variable Local Ore In Backpack has 512 zeros inside it, else the system will break
So I need to add 512 Zeros in the Local Or In Backpack?
yes
That's A lot, Okay.
its how much you have of each ore, by default should be 512 0's
I'm gonna be making it so there are around 32-64 Different Ores
And max backpack will be around 10-15
I haven't decided it all yet so its mostly all estamates
32 ores would mean you get to have 99999 ores of each type
64 ores would mean you get to have 9999 ores of each type
I'd go with 64
roughly 10,000 ore is ALOT
Can anyone help me?
What do you mean 10K ores, I am very confused. I mean 64 different types of ores. (Sorry I'm slow on some things I might seem very dumb)
You are able to have from 0000 up to 9 999 (almost 10 000) of each of the 64 ores. I’m not sure how this system works, so you will have to ask @lament summit , but I assume that the max amount of any type of ore that can be stored is 10^Floor(512/“Different Types Of Ore”) - 1, so the amount should be 99 999 999 for 64 different types of ores. Again, I’m not too sure.
its 512/MaxStackDigits = MaxUniqueOre
my math is prob wrong lol
Is the maximum amount of characters in a String Variable 512? If so, a String Variable should be able to hold 64 groups of characters, each 8 digits long. Again, I’m not too sure how this system works and stores information.
ye my math was wrong lol
I'm trying to make my own mining simulator too but I don't get this. I'm kinda new to circuits but I'm really looking forward to learning! Is there a way you could dumb this down for me 😅
@grave yew