Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Death Count Inventories
Death Count Inventories
Jun 5 2009, 11:58 pm
By: Jack  

Jun 5 2009, 11:58 pm Jack Post #1

>be faceless void >mfw I have no face

Basically, if you have 2 crystals possible, red, and blue, and you have 3 slots in your bag, then using probability stuff, you can have a death count that represents every single possible combination of things in your inventory.
So, if DC is 1, then you know that P1 has 1RedCrystal
If DC is 2, P1 has 1BlueCrystal
If DC is 3, P1 has 1BlueCrystal. 1RedCrystal
If DC is 4, P1 has 2BlueCrystals
If DC is 5, P1 has 1RedCrystla, 1 BlueCrystal
If DC is 6, P1 has 2 RedCrystals

So you can use one DC for esssentially infinite slots and items in an inventory. I had an idea on how to reference it easily but I have to go now.BTW it would probably require Triggerduplicators for over 4 slots and 3 items.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Jun 6 2009, 9:56 am Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

but it requires much triggers to change something in the inventory (e.g. if you drop/sell something).

Your method works as long as you have only a few possible items.

other method:
-saving multiple data in 1 DC's digits like I did that in my Diablo 1 map:

e.g:
-you have 99 possible items
-you have a DC with the value 72421829.
-you can break this DC into 4 values: 72 42 18 29
-this values represents which item is on each slot -> we can save 4 slots into 1 DC if we have 2 digit item index [00-99]
-we can access the first slot directly. For other slots we have to use binary countoffs to get rid of the first numbers/index before we can access it. Don't forget to add the values after changing something.

Example of my work in the D1 map:
1 slot has 2 DCs: the index# & additional Information
in the additional information I stored a couple of things:
temporary equipable switch [0,1] | item's durability [000,999] | item's suffix [00,99] | prefix [00,99]




Jul 7 2009, 4:07 am Jack Post #3

>be faceless void >mfw I have no face

Wait how would you use binary countoffs to get rid of the first numbers? Can't you just do (if the number is 45287632)

If P1 has suffered at least 4000000 and at most 49999999 deaths, then add 40 to currentItem
Subtract 40000000 using counter arithmetic, then set switch firstDIgitdone.

If firstdigitdone is set, and P1 has at least 5000000 and at most 5999999 deaths,
Remove 5000000 deaths using counter arithmetic.
Add 5 to current item with counter arithmetic.
Set seconddigitdone.

And so on
From those pseudo-triggers you have worked out that the item in slot 1 is item 45.
That way you use only 10xthe number of digits to check what an item is.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Jul 8 2009, 4:04 am rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

Each DC stores 31 bits of data. Each DC can therefore hold 31 items. If you limit the ability of the inventory to only hold 1 of each type, this is what you do.

Collapsable Box

Now you know exactly what items are in the inventory. Add the DCs back from the buffer. If you use the item, delete its number from the buffer.

My way assumes you can only hold 31 of 31 items. Ahli's way assumes you can hold 4 of 99 items. If you have less than 99 items you can change the base to that number, but it's much easier to just use base 10 or base 2.

For ahli's way on your example: you have 3 slots and 3 possibilities. Empty, red, blue. Empty is 0, red is 1, blue is 2. Store the inventory in a basic base 10 DC like 222, or 201, which means you have 3 blues, or 1 blue 1 red respectively.

For the first inventory place:
Collapsable Box




"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 8 2009, 6:14 am Jack Post #5

>be faceless void >mfw I have no face

Would my system work though? i'll look into yours a bit more, but if I'm correct my way can be used to represent 9 slots which can be ten digits each(0-9) in one DC. For what i want it for it should be plenty as I no longer want it for item inventories.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Jul 9 2009, 2:56 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

2147483647
That's a 10 digit number. Your most significant digit, the billions place, (*000000000) can be 0 1 or 2. (technically 3 and 4 as well, but SC reads it signed, so it's difficult to visualize). The other 9 digits can hold 0-9. So yes, you are correct. My 2nd way is the same as your way and ahli's way. My first way just describes almost the most data possible to store in a single DC. Considering there's 12*228 death counts, it's pretty rare that you'll need to store them in different places, and these fancy systems will only add to your map size.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jul 9 2009, 5:19 am Jack Post #7

>be faceless void >mfw I have no face

For your system, wouldn't the first numbers last digit be a 6? And after that I assume you divide by two for the other numbers past what you said.
I still fail to see what binary maths is involved here though.[/line] nvm Base 2 I get it. *hits self*

Post has been edited 1 time(s), last time on Jul 9 2009, 9:53 am by zany_001.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[2026-4-17. : 11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
Please log in to shout.


Members Online: Zoan, anoeth47