Staredit Network

Staredit Network -> UMS Assistance -> Energy detection with EUDs
Report, edit, etc...Posted by spinesheath on 2006-11-07 at 15:14:42
I never used EUDs yet (I know HOW they work, though). Since this might also be a little tricky, I wondered if any of you could create an example so that I could learn from it and use it.

The setting:
4 Corsairs, select their unit-list indexes to your likings, but tell me their indexes if they are not from 0 to 3 wink.gif
Theoretically these 4 corsairs are owned by different plaxers, but this should be irrelevant, so you should have all 4 cors owned by P1.

The task:
Once a DWeb is cast, I want to know by which corsair - only it's index, that is, as they theoretically will be 1 corsair per player and thus identifyable.
This has to be done by EUDs, as I can do whatever is possible with conventional triggers myself.

Please fix this up as a map, don't just post how you would do it.
You may detect who cast the DWeb any (EUD-)way you want. My suggestion is to try unit energy (of course you may vary the spell cost and such). If you find another way that is simpler, feel free to use it. I guess there is something like a cooldown for DWeb as well, for example. But energy is longer-lasting...


Whoever manages to do this gets:

- the few minerals I can offer
- a spot in the credits if I ever release a map that uses this
- a BIG cookie!
Report, edit, etc...Posted by scwizard on 2006-11-07 at 16:25:44
I can do it for you.

I am one of the 5 or so (my brother swears there are many more) people who can do EUDs well, and I'm particularly good at looking at unit table conditions.

I can't do it today (other stuff to do), but I'll have it for you eventually.

I actually theorized that this could be done a year or so ago in an email to tux.
Report, edit, etc...Posted by spinesheath on 2006-11-07 at 16:53:29
Would be really nice if you gave it a shot biggrin.gif

I am certain that it can be done (maybe some trouble with division by 65536, depending on the position I guess, but that should be doable).

I can't guarantee that I'll be using it yet, because of the uncertainty of patches.
I have some idea for that too, btw:
One should find out if EUDs are working correctly at the start of a map and have an alternative trigger set in store just in case they don't (patch, mac...).
While it is not possible to replace any EUD triggers by standard triggers, in this case I can use a standard algorithm that is good, but not nearly as good as it would be with EUDs.
That would require a good approach for checking if EUDs (conditions, of course) are working. My suggestion would be to use something like:
Set unit energy to X% (some unusual value, so that different memory offsets don't give the same results by accident),
check that value with EUDs, and repeat that procedure with a different value once for verification.

Hm, I am positive that I am able to learn EUDs pretty fast once I got a good example in my hands wink.gif What bothers me the most is that I don't know how Memcalc calculates the players/units... (the exact algorithms and reasons behind)

EDIT: Btw, this has time, I won't need it soon. But please don't forget tongue.gif
Report, edit, etc...Posted by Ichi on 2006-11-07 at 17:22:38
Canthan's map use a system to detecs who attacked (ghosts), you could ask him for a map tongue.gif
Report, edit, etc...Posted by spinesheath on 2006-11-08 at 00:13:52
He probably detects the ghost's cooldown. But I doubt that DWebs cooldown is identical with that one.
Report, edit, etc...Posted by yoni45 on 2006-11-08 at 15:14:53
I'll see what I can do for ya, this should be relatively straightforward smile.gif
Report, edit, etc...Posted by spinesheath on 2006-11-11 at 20:12:43
Thanks to you as well if you give it a try smile.gif

ADDITION:
Bump.
Also: Did anyone try already? If so, what made you not finish it? Harder than expected maybe?
Report, edit, etc...Posted by scwizard on 2006-11-11 at 20:52:25
Oh ya, when I said I'd do it for you I didn't mention a date and put it close to the bottom of my priorities list kwasny.gif

EDIT: No I havn't attempted it yet.
I already have the location of unit rally for mutalisk maddness so...

EDIT: Lemme go and dig up that New_Text_Document__19_.txt

EDIT:
0x0f0 – word – rally point x
0x0f2 – word – rally point y
ok and
0x0a2 – word – mana counter. a2 is internal, a3 is shown in display

EDIT:
F0 - A2 = 4E
Report, edit, etc...Posted by spinesheath on 2006-11-12 at 05:34:50
Well, ok happy.gif
You don't have to hurry, I just wanted to make sure it wasn't forgotten wink.gif
Report, edit, etc...Posted by scwizard on 2006-11-12 at 11:07:07
OK, I was off by 7 apparently. I guess things have changed since that patch.

The difference appears to be 0x55 and not 0x4E
Report, edit, etc...Posted by yoni45 on 2006-11-14 at 18:51:23
QUOTE(spinesheath @ Nov 12 2006, 04:34 AM)
Well, ok happy.gif
You don't have to hurry, I just wanted to make sure it wasn't forgotten wink.gif
[right][snapback]587554[/snapback][/right]


Been busy, will try it... now =)
Report, edit, etc...Posted by scwizard on 2006-11-28 at 17:13:40
November got eaten by the mapping contest pretty much as soon as I posted my above reply.

For December this is going to be top (or sharing top) priority.

However if this kind of procrastinating on my part continues you might as well figure out how to do it yourself.

ADDITION:
There was one point soon after my last reply where I was going to make a early version of the concept map, but then UBERCALC DIED!

So blame (U) and vote for chef.
Report, edit, etc...Posted by Heimdal on 2006-11-28 at 20:44:30
If you use the info in the thread about shield batteries' energy, this should be trivial.
Report, edit, etc...Posted by spinesheath on 2006-11-29 at 00:20:14
Hmm, actually, you're right, Heimdal happy.gif
But I don't have much time now...

btw, can someone tell me what exactly happens if I use an EUD condition on a mac?
Report, edit, etc...Posted by Zeratul_101 on 2006-11-29 at 00:37:28
for most conditions, absolutely nothing. although supposedly there have been occurences where EUDs made for PCs have worked for Macs
Report, edit, etc...Posted by Heimdal on 2006-11-29 at 01:35:57
Assuming the mac and PC versions are compiled from the same source (which is a pretty valid assumption), then they should have the same (lack of) bounds checking. Which means that EUD conditions will work on macs (unless there's some kind of memory protection that I'm not aware of; I'm not that familiar with the mac architecture). HOWEVER, the same EUD condition will most likely NOT do the same thing on a mac as it does for a PC. I'd wager that it's more likely to work for things that are located closer to the deaths table in memory.
Report, edit, etc...Posted by spinesheath on 2006-11-29 at 04:29:36
BUT, and that's what I want:
It does not cause any crashes or other problems. And by checking the value you retrieved, you will be able to detect if EUDs are working with the current players.
Hmm, what happens if I try reading some value and some people are on mac, some on PC? They probably won't get the same results, and thus the conditions might be met for one player but nnot for the other. If this condition causes an action that applies to all players, isn't that going to be interpreted as some kind of desync?
Or whatever, I am just guessing, I am not that well informed about SC's memory and multiplayer engine...
Report, edit, etc...Posted by Heimdal on 2006-11-29 at 13:40:34
Everything you said is probably true. There are ways to detect if EUDs are working properly - for example, set some value with a normal action and then use an EUD to detect the same value. If the EUD check comes out true, it worked - otherwise it didn't.

I don't think there's any reliable way to make a map work with both PC and mac players. I think the best thing to do here would just end the scenario in defeat for mac players (maybe after telling them to buy a different computer wink.gif )
Report, edit, etc...Posted by spinesheath on 2006-11-29 at 13:52:54
Well, if you can SAFELY detect if EUDs will work at the beginning of a game, and then enable/disable certain triggers (meaning: replace the EUDs with normal triggers that will give good results as well, but of course the EUDs should be better or otherwise you wouldn't use them obviously), you could continue the game.
I don't want to exclude Macs from my map(s), and this would also keep the map playable after a critical patch, though not at its best.

Of course all of this refers to 4-Player DWeb casting, which IS replaceable with normal triggers, but it would be better with EUDs.
Next Page (1)