Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: EUD Operating System Detection
EUD Operating System Detection
May 25 2011, 5:33 am
By: Wormer  

May 25 2011, 5:33 am Wormer Post #1



Let's say I wish to implement EUD conditions (HP detection in particular). Is there a way to detect the operating system so I can implement EUDs for both Mac and Windows?



Some.

May 25 2011, 1:26 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Yes there is. At least you can check if the sc client is for MAC or Windows, but (probably) not which version. Many EUD triggers don't work for Mac or crash them, so you'll have to find one that doesn't crash when checked. Then compare the value with the expected value for Windows computers and you know if it's the Windows sc or for MACs.

Sorry I can't give a specific answer which values are stored at different memory locations.




May 25 2011, 5:12 pm FoxWolf1 Post #3



Quote from NudeRaider
Many EUD triggers don't work for Mac or crash them, so you'll have to find one that doesn't crash when checked. Then compare the value with the expected value for Windows computers and you know if it's the Windows sc or for MACs.

If it helps, when designing the Mac-friendly EUD anti-hack (now, unfortunately, defeated :|), Tank and I used keypress detection for this purpose. Since you were bound to have to use common keys at some point (or else be at a micro disadvantage far too severe for hacking to even hope to make up for...not to mention being unable to chat, or quickly toggle your hack's functions), we made it so that the anti-hack was triggered by these keys. Keypress detection is non-functional but harmless for Macs, so the end result is that the anti-hack, which would drop Macs if it ever went off for them, was never triggered for Mac players. The result was a verifiably functional Mac-friendly EUD anti-hack, which served quite well at protecting the game from hackers, while not dropping Mac users, until Oblivion was updated with general protection against EUD hack detection methods.

Of course, your situation is somewhat different, since you'll need to keep things "in synch" constantly. Perhaps you could an early-game "OS check" to choose which OS's EUD triggers will run would do it, since, according to our wiki, Set Deaths, on its own, will not desynch...

Though, it's worth pointing out that although a lot of people have talked about making cross-platform maps with gameplay-affecting EUD conditions, as far as I know, nobody's actually done it. So although the theory is that running a parallel trigger for Mac would prevent a desynch, I can't find an instance which verifies in practice that this method actually works. Also, there is very little available in terms of community resources to help with making Mac EUDs; you're pretty much on your own for actually finding and making the EUD condition that you need. So I'd recommend that if you can find another method that will allow you to achieve your goals without having to use EUD conditions without too much compromise, that you seriously consider using that alternative.




None.

May 25 2011, 5:49 pm Wormer Post #4



Thank you guys!

Fox, I recall you've made some anti-hack with Tank a while ago, but never knew how you did it. What I have in mind is a virtual hitpoints system based on HP detection of a particular unit. I need to retrieve amount of damage unit suffers. I also want this to work for Macs. So the idea was to detect the OS of the player at start and then use one or another set of EUD triggers based on that information.

I also don't know if it's possible to detect unit HP on Macs at all. Please if this is possible and anyone knows the address offset of the units array for Macs it would be of great help for me!

Also, our wiki is wrong, :( because Deaths data is synchronized (from my own experience), not each frame as the other data but quite often. One can only reliably store unsynched information between trigger cycles in switches.



Some.

May 25 2011, 10:21 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Wormer
I also don't know if it's possible to detect unit HP on Macs at all. Please if this is possible and anyone knows the address offset of the units array for Macs it would be of great help for me!
HP detection on MACs works just like on PCs. Just use a memory viewer to search for the respective HP value. Check the EUD tutorials for the exact process. Requires a MAC, obviously. :P




May 27 2011, 2:15 am jjf28 Post #6

Cartography Artisan

This has been something I’ve been interested in implementing for a while (http://www.staredit.net/topic/13582/), I don't own a Mac so I can't actively work the problem; but I did download a Mac version of StarCraft and used it on a friends computer, but without a effective RAM reader I’m basically lost, could only confirm the EUD's in question would drop Macs - and brute force values that have a 99.99% chance of failing in some map under some conditions :/

If you could help me find a good Mac RAM reader I could probably finish off this problem (some searching suggests this is nearly impossible). Otherwise, I’m currently working on building my own RAM reader/writer from scratch in Java for Macs, but as memory is very different and opportunities for me to test are rare, I don’t give it a good chance of working.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 28 2011, 12:38 am rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from jjf28
If you could help me find a good Mac RAM reader I could probably finish off this problem (some searching suggests this is nearly impossible).
http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&q=mac+cheat+engine

Also, easy way to detect what OS you're using:
Set deaths of whatever to "12fec6aa"
If the mac address for whatever is 12fec6aa, you're using a mac. If it's not, nothing happens, and you're using windows.

I can practically guarantee there will only be one 4 byte number which is 12fec6aa in SC at any given time.



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

May 28 2011, 12:44 am jjf28 Post #8

Cartography Artisan

tyvm, found a link to "bit slicer" (googleable) - i'll try it out tonight



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 28 2011, 1:03 am TiKels Post #9



Why wouldn't you just design two of each EUD trigger, one mac, one windows, and have them side by side. I fail to see the need to detect operating systems.



"If a topic that clearly interest noone needs to be closed to underline the "we don't want this here" message, is up to debate."

-NudeRaider

May 28 2011, 1:10 am Roy Post #10

An artist's depiction of an Extended Unit Death

Quote from TiKels
Why wouldn't you just design two of each EUD trigger, one mac, one windows, and have them side by side. I fail to see the need to detect operating systems.
The EUD written for Windows may correspond to something else for Mac, i.e. Windows is detecting screen position, but a Mac might have that address represent the HP of a unit, therefore firing the trigger when it shouldn't fire. And vice-versa.




May 28 2011, 1:12 am jjf28 Post #11

Cartography Artisan

So i'm at friends house, in a hour or so i'll mine like 500 constants on Mac and cross test them on my laptop, i'll keep you posted.

as far as the need to detect operating system, i have a very unique case requiring them, I have to detect energy changes in order to solve CMMU / Firelag for dark swarms, it sometimes ruins games and causes confusion over if the player acctually had a "swarm glitch". However, despite the glitches critical nature, the glitch is quite rare and the game can continue despite it; therefore i want to disable the triggers when Macs are in the game so as not to drop them - which I would, of course, consider a more-critical problem.

and I would rather not cross-platform the fix as it takes 33 triggers (due to energy being a local value) increasing the memory burden of the map







Edit: So... he said i could use his computer but for abstract reasons wouldn't let me on all night, have nothin yet :/

Post has been edited 1 time(s), last time on May 28 2011, 3:51 pm by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy