Staredit Network

Staredit Network -> UMS Showcase -> 256 = 0
Report, edit, etc...Posted by Deathknight on 2004-04-17 at 21:02:49
Ok. An Ultralisk with FULL upgrades(255 upgraded Zerg Carapace and Chitinous Plating) will have an armor of 1+1. Chitinous Plating upgrades Ultralisk armor by 2 so therefore 257 = 1 in Starcraft. Just something that should be noted.
Report, edit, etc...Posted by Pinecone on 2004-04-17 at 22:50:38
lt seems akward to create a thread just for that, wouldnt you put something like that in the tutorials?
Report, edit, etc...Posted by (U)Bolt_Head on 2004-04-18 at 04:30:41
QUOTE(Ðeathknight @ Apr 17 2004, 08:02 PM)
Ok. An Ultralisk with FULL upgrades(255 upgraded Zerg Carapace and Chitinous Plating) will have an armor of 1+1. Chitinous Plating upgrades Ultralisk armor by 2 so therefore 257 = 1 in Starcraft. Just something that should be noted.

Trying to make since out of this post is extremely difficult.

Anyways I think I know what your getting at. Values like upgrades and locations are restricted by the amount of space associated with that data. Only one byte is allowed for these, A byte consist of 8 binary bits (1s or 0s). An example would be 1001 0001 in this case that is equal to 128+16+1. Using 8 bits you can only reach numbers as high as 255. If you include 00000000 then there are 256 variables (2^8). In some programs such as starforge (old versions anyway) if a number larger than 255 is inserted then it subtracts 256, because there is no meaning for that number. In the case of upgrades 0 represents no upgrades so the max is 255. When you add 1 more it rolls over and your back to 0. This of course happens again at 512, 768, 1024 and so on. What your talking about is in no way tied only to the ultralisk.
Report, edit, etc...Posted by .Coko[CK] on 2004-04-18 at 05:45:34
It is tied to any unit with at least 1 upgrade, and remember that you can change this armour level in MOD's so therefore really fcuk the game up.
I also know binary, its a #####, and not the best system, just remember that it will always go back to zero, i think!
Report, edit, etc...Posted by (U)Bolt_Head on 2004-04-18 at 06:06:46
Maybe i should make a thread called 2 = 1
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-18 at 10:04:46
This defies what I know about the binary math system. Starcraft should of crashed, and returned a "Stack Overflow".
Report, edit, etc...Posted by .Coko[CK] on 2004-04-18 at 11:08:09
Yeah i've seen stuff like that before, its really funny, basically all maths is flawed...
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-18 at 11:37:34
It means that blizz put code in there to set 256=0.

But... why would they do that if you're only supposed to have 3 upgrades per race?
Report, edit, etc...Posted by Deathknight on 2004-04-18 at 13:48:34
Did I say it could ONLY be done to an ultralisk? No.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-04-18 at 14:05:12
Yoshi- No yoshi most likely it is the editor that has the "code 256=0" But honestly I'm not sure if SC has anything like that. You would have to ask a programer or some one who knows more about SC's programing.
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-18 at 16:30:17
I AM a programmer. I'm telling you what I know tongue.gif

You aren't supposed to be able to do that.
Report, edit, etc...Posted by Clokr_ on 2004-04-18 at 17:45:40
I think that SC will show something like that. Anyway think that SE was made by another person, not by the people that made SC. So maybe he started it thinking of allow all upgrades and then blizzard said only 3.
Report, edit, etc...Posted by SI on 2004-04-18 at 18:26:14
QUOTE(Yoshi da Sniper @ Apr 18 2004, 09:04 AM)
This defies what I know about the binary math system. Starcraft should of crashed, and returned a "Stack Overflow".

umm, no. If the machine code has for example
add dx ,2
mov [eax], dx

it automatically trims it to 1 byte size.
Report, edit, etc...Posted by Yoshi da Sniper on 2004-04-18 at 19:18:37
But "Byte" memory storage tries to preserve itself within a byte of space, no?
Report, edit, etc...Posted by Mini Moose 2707 on 2004-04-18 at 20:42:04
This 256 stuff is right. Bolt showed me it. I set units to be owned by Player 257. I played the map as Player 1, and sure enough, they were owned by me.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-04-19 at 02:28:06
QUOTE(Mini Moose 2707 @ Apr 18 2004, 07:42 PM)
This 256 stuff is right. Bolt showed me it. I set units to be owned by Player 257. I played the map as Player 1, and sure enough, they were owned by me.

A simple test, but I was lost in this conversation a while ago. Thanks for bringing it back down to earth for me Moose lol.
Report, edit, etc...Posted by Thermo on 2004-04-19 at 13:17:07
Heh blizz probably put in coding to ignore the carry bit when it ran out of space so it heads back to 00000000 which i guess is player 1??

So if they did it for players they probably did it for everything including ups.
Report, edit, etc...Posted by Deathknight on 2004-04-19 at 17:04:20
I think we have an explanation for it now. wink.gif
The End.
Report, edit, etc...Posted by SI on 2004-04-19 at 21:17:23
QUOTE(Thermo @ Apr 19 2004, 12:17 PM)
Heh blizz probably put in coding to ignore the carry bit when it ran out of space so it heads back to 00000000 which i guess is player 1??

So if they did it for players they probably did it for everything including ups.

As I already said its the cpu itself which drops carry bits that are larger than the expected result size.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-04-20 at 02:37:36
I once had a school teacher tell me that inorder for a students to learn things they must be taught 9 times.

(although she only told me once and that was 5 years ago)

I guess you have 7 more times to tell everyone Suicidal
Report, edit, etc...Posted by SI on 2004-04-20 at 06:33:44
QUOTE((U)Bolt_Head @ Apr 20 2004, 01:37 AM)
I once had a school teacher tell me that inorder for a students to learn things they must be taught 9 times.

(although she only told me once and that was 5 years ago)

I guess you have 7 more times to tell everyone Suicidal

lol, *sigh*, guess I had better get started with the accelerated learing methods for the next time someone asks...
Report, edit, etc...Posted by Clokr_ on 2004-04-21 at 13:57:15
QUOTE(Mini Moose 2707 @ Apr 18 2004, 07:42 PM)
This 256 stuff is right. Bolt showed me it. I set units to be owned by Player 257. I played the map as Player 1, and sure enough, they were owned by me.

That test is not valid because when you cannot save in the map the value 257, so there is where the editor transforms it to value 1. StarCraft just reads '1' and not '257'.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-04-21 at 14:54:21
That sentance was hard to read Clokr.

Anyways thats kinda what he was getting at. He wanted to test the players over 256 and I told him that it just interperates it as player 1. (he didn't belive me untill he tested that)
Report, edit, etc...Posted by Mini Moose 2707 on 2004-04-21 at 16:00:35
What do you mean I can't save with the valuie 257? I was using an early version of StarForge (which I got from Bolt) that lets you input any number and save it fine. I could put in negative 394 with it if I wanted to. That test wasn't done the same way all the others were.
Report, edit, etc...Posted by Deathknight on 2004-04-21 at 21:09:40
And what were the results? With the negative I mean.
Next Page (1)