Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [EUD] Documentation Thread
[EUD] Documentation Thread
Jan 13 2018, 12:36 am
By: Sie_Sayoka  

Jan 13 2018, 12:36 am Sie_Sayoka Post #1



Post your findings here until we get a better place to organize them.

EUDDB
CUnit Descriptions
Supported EUDs
EUD Editor 2 For static EUDs.
EUD Editor 1 For dynamic EUDS, DL links and English patch within the thread.
EPD Editor For dynamic EUDs.
DatEdit Useful for the info boxes about each value and other info which EUD editors lack.
Oreo Triggers For automating trigger creation.
Windows CalculatorFor converting to/from hex and viewing bit-mask ranges.


DRAWING FUNCTIONS

I changed the drawing functions of archon energy to see what each would do. I have not tested it on other images but it should give you a general idea.



DatEdit Descriptions:

0: Normal Draw
1: Unk 1
2: Enemy Unit Cloaking (+Spell)
3: Own Unit Cloaking (+Spell)
4: Ally Cloaking
5: Own Unit Cloaking (+Spell)
6: Own Unit Cloaking (+Drawing)
7: (Crash)
8: EMP Shockwave
9: Use Remapping
10: Shadow/FoW (dark.pcx)
11: Unk 11
12: Warp Flash (Crash on Staredit)
13: Don't Mirror Frames
14: Unk 14
15: Hide Graphics
16: Hallucinated
17: Warp Flash

Farty1billion Descriptions


8: For some reason it will duplicate the archon beings. They do not shoot 2 beams.
11: It will crash SC.
12: Not visible in remastered. Uses Warp Texture (210 in images) texture when a building warps in.
15: Selection box will change size because of the archon animations.
17: It will fade from pure white and play a death animation. This is only visual. Most useful for using on things with short visual time like bullets. Normally used at the completion of a Protoss building.

Post has been edited 12 time(s), last time on Feb 21 2020, 5:29 am by Sie_Sayoka.



None.

Jan 13 2018, 12:39 am Lanthanide Post #2



Farty's description of these is better than the Datedit one:
Quote
0 - normal
1 - doesn't draw hallucination
2 - non-vision cloaking
3 - non-vision cloaked
4 - non-vision uncloaking
5 - vision cloaking
6 - vision cloaked
7 - vision uncloaking
8 - EMP
9 - uses remapping
10 - shadow
11 - HP bar
12 - warp flash
13 - selection circle remapping
14 - draw original player color (used for flags -- player color stored in draw data)
15 - draw update rect
16 - hallucination
17 - warp flash




None.

Jan 14 2018, 8:02 am Sie_Sayoka Post #3



SPELL ANIMATIONS

Some spells require animations and units without cast spell animations (castspell in iscript) can not use them. Spells not on this list are assumed to not require an animation and thus can be used by any unit. You can view them yourself by going to datedit>orders and looking at each spell. 7 is the animation value that requires animations whilst 28 is one that doesn't.

Current status: Untested

Requires Cast Spell Animation:

Yamato Gun
Lockdown
Dark Swarm
Parasite
Spawn Broodling
EMP Shockwave
Psionic Storm
Irradiate
Plague
Consume
Ensnare
Stasis Field
Restoration
Disruption Web
Mind Control
Feedback
Optical Flare
Maelstrom

Post has been edited 1 time(s), last time on Jan 15 2018, 10:49 am by Sie_Sayoka.



None.

Jan 15 2018, 10:22 am dpblh Post #4



Quote from Sie_Sayoka
Some spells require animations and units without cast spell animations (castspell in iscript) can not use them.

Is there any way to change behavior of spell? For example make them not require any animation when cast.



None.

Jan 15 2018, 10:45 am Sie_Sayoka Post #5



Quote from dpblh
Quote from Sie_Sayoka
Some spells require animations and units without cast spell animations (castspell in iscript) can not use them.

Is there any way to change behavior of spell? For example make them not require any animation when cast.
I haven't tested it but I assume not with the current whitelisted EUDs. The orders.dat requires those spells to use a cast spell animation which we cannot edit. It may be possible to mimic spells by replacing others but I haven't tested it.



None.

Jan 15 2018, 11:14 am dpblh Post #6



Quote from Sie_Sayoka
I haven't tested it but I assume not with the current whitelisted EUDs. The orders.dat requires those spells to use a cast spell animation which we cannot edit. It may be possible to mimic spells by replacing others but I haven't tested it.

Just curios, was it possible before SC:R?



None.

Jan 16 2018, 9:27 am Sie_Sayoka Post #7



Probably, I wouldn't know though.



None.

Jan 25 2018, 9:40 pm Sie_Sayoka Post #8





PSI FIELD IMAGES

The psi field sprite is split into 4 different images (584-587). Replacing another units' sprite with psi field will result in the full circle.

584 Top Right
585 Bottom Right
586 Top Left
587 Bottom Left

There are only 3 draw functions that work on Psi Fields that persist. It seems like the remapping is hardcoded? so you can only get blue, however, for some reason the shadow draw function will overlap it. You can see the results in the image posted.

6: Own Unit Cloaking (+Drawing)
10: Shadow/FoW (dark.pcx)
17: Warp Flash

Warp Flash will fade and turn invisible. It does not start out white. The various other cloaking draw functions do work but only for the duration of the cloaking animation.



None.

Apr 10 2018, 2:07 pm Sie_Sayoka Post #9



https://i.imgur.com/WKIC8L0.mp4

NON-WORKER BUILDING

By using Firegraft within EUD Editor 2 we can get any unit to create buildings. Drone buildings will consume the unit but cancelling the morph will replace it with a drone. Issuing a different order while creating a Terran building will halt the construction.

1. Firegraft>Button Set. Select the unit you want to be your builder and add the build tree or specific buildings you want to make. The button info can be copy/pasted from other cards.
2. Firegraft>Requirements>Unit. Select always under each building that you want to create. If you want it locked behind specific tech then just remove the 'current unit is' tag.
3. Firegraft>Requirements>Order. Select always for Drone Start Mutate/Build (SCV)/Build (Probe)
4. Done

If you would like to resume construction for Terran buildings after halting:

1. Firegract>Order. Set 'Is Building (SCV)' to always.
2. Datedit>Unit>AI Actions. Right-click Action to Harvest&Repair.

Unfortunately we can not use this method to create men or special buildings.


https://imgur.com/8sJZoG4

ATTACKING MEDICS

This method will let us create medics that can attack, heal, and cast spells. Unfortunately the animations and sound effects do have some issues for all units using medic sprites.

1. Datedit>Unit>AI Actions. Set all of the idle actions to 'Idle (Medic)'. This will allow the unit to heal.
2. Datedit>Sprite. Change the unit that you want to be a combat medic's sprite to that of a Medic.
3. Datedit>Image. Change the Medic's Iscript to a Ghost's. This will prevent rock sprites from creating by adding in casting animations. This is the only iscript that I've found to be compatible.
4. Firegraft>Button Set. Add in medic spells.
5. Firegraft>Requirements>Technology Using. Set the medic spells to always or if you'd like to gate them behind research remove the current unit is tag.
6. Firegraft>Requirements>Order. Set 'Cast Spell (Heal)' to always. The other spells do not have requirements.
7. Because we are doing visual changes the unit can't be pre-placed. Create it via triggers or training.

Attached is cryptocurrency malware both the map and eud editor files.

Attachments:
eud.rar
Hits: 3 Size: 328.18kb

Post has been edited 3 time(s), last time on Apr 10 2018, 2:30 pm by Sie_Sayoka.



None.

Apr 11 2018, 6:28 pm lifebot Post #10



Very nice finds Sayoka. Saw you testing all day yesterday



None.

Apr 14 2018, 11:45 am Sie_Sayoka Post #11



Thanks.


https://imgur.com/OH431EN

SUBUNIT TURRETS

Turrets are a complicated mess and I haven't fully tested what can be done with them yet. However there are a few factors that determine if a unit can use a subunit.



The image must have a .lol file. This determines if the image can hold a subunit/turret, or in the case of BCs it's for Yamato overlay. Both archons use them for other things and can't hold subunits. Floor missile trap and Missile turret could possibly be other units that can use subunits but we can't edit the sprites for them. In conclusion only Goliath/BC/Vessel/Tank/Wraith can hold subunits.

1. Datedit>Sprite. Change a turret to the image you want the new turret to be.

And that's it. Normal units work as well and even doodads!

If adding a turret onto a BC/Vessel:

1. Datedit>Unit>Advanced>Subunit1. Change it to tank turret (6).

The Vessel turret is tied to the iscript and can not be changed into a different sprite.

There's a lot of tweaking that can be done to achieve desired effects. You can copy the settings of a tank turret onto another unit to use that as a subunit. Then you can different types of tanks.

Because the walk animations of Goliath turrets are weird, Siege turrets lack movement frames, and the muzzle flash of Tank Turrets may not be desirable you can change the iscript of them into a Vulture's. Vulture iscript only has directional frames, lacks sound, and has no muzzle flash.

1. Datedit>Image>Image of subunit you want to change. Change it into vulture.
2. Datedit>Image>Vulture Shadow. Change the draw function to 17. This hides the shadow after a brief period.

Normally a unit has to stop to attack however we can bypass this by changing the unit AI. Note that the Goliath turret can't turn 360 degrees like the tank.

1. Datedit>Unit>AI Actions>Attack Unit. Change 'Attack (Subunit)' to 'Attack (Building)'.


https://imgur.com/KdvQQhP

POWERUP PICKUPS

Changing a Powerup sprite into something else and picking it up will revert it back into its original sprite while being held by the worker. However by enabling a unit to be picked up it will affect the sprite being held by the worker. This held sprite will not be that of the original unit but that of a completely different unit. What determines this held sprite is a 177 difference between the original Unit ID and the held sprite's Image ID. More info and links here. An incomplete list of effects can be found here.

1. Datedit>Unit>Unit you want to pick up>AI Actions. Change both computer idle and human idle to 'Idle (Power-Up)'.
2. Have a worker pick up the unit.

The held sprite will perform attack animations when the worker attacks. If the held sprite is a unit that can't attack we need to disable some of its iscript functions.

1. Datedit>Image>Held Unit>General Properties. Uncheck 'Use Full Iscript'.

This will also prevent movement frames but not directional frames.

However because of the way this works there are a number of drawbacks.

1. Only a few images are able to be changed as Unit IDs only go up to 227.
2. The original unit will be unstable because of the changes to its AI and may crash when not being held.
3. Killing the worker holding the unit may crash the game.

It may be possible to make it more stable by removing the unit as soon as its not being held but more testing is necessary. It also may be possible to make more stable effects by changing the iscript of the held images or disabling 'full iscript' or 'graphics turn'.

Post has been edited 5 time(s), last time on Feb 3 2020, 6:08 pm by Sie_Sayoka.



None.

Apr 20 2018, 10:20 pm Sie_Sayoka Post #12



SUBUNITS PT.2

https://imgur.com/bt7Xrdz

You can make any unit into a subunit by changing its flags.

Datedit>Unit>Advanced. Check Subunit, remove Full-Auto Attack for the unit you want to be a subunit.
Datedit>Unit>AI Actions. You may want to change the behavior of the subunit as they will attack while the base unit is moving.
Datedit>Unit>Advanced. Select the unit you want to hold the subunit (e.g. Goliath) and choose the subunit through the Subunit1 field. Subunit2 doesn't do anything.


SHADOW ISCRIPTS



https://imgur.com/uFiLbiQ
https://imgur.com/SlRaLfH

You can add additional images to units by changing the iscripts of their shadows. This will only work if the iscript you use creates an image. Iscripts will point directly to the GRP file which we can not edit.

Datedit>Image>Unit Shadow. Change the shadow iscript.

Some interesting, yet flawed, iscripts to use would be Psi Field Type1 and Science Vessel(Base). The psi field iscript generates 3 quarters of the pylon aura with the first quarter seen at the top right. Since we can't edit the GRP files there is no way to fill in that quarter. The vessel iscript creates a turret. In order for the base unit to attack you will need to disable the attack frame calls.

Datedit>Image>Science Vessel (Turret)>General Properties. Uncheck Use Full Iscript.


GLAVE WURM EMULATING

Emulating the Mutalisk's Glave Wurm is difficult because of the requirements of the weapon behavior. Normally if you set a weapon's behavior to Bounce it will not actually bounce because the requirements haven't been met.



Glave Wurm has SpecialState1 frames which allow it to create an additional bullet. Most images do not have this property and the ones that do are not ideal as bullets. However, Nuke Beam has both the SpecialState1 frames and a very small profile.

Datedit>Image>Nuke Beam>Iscript ID. Change it to Glave Wurm. If you don't want to to be red you can change the draw function to something else.

Because nuke beam isn't a unit or bullet we will have to jump through a lot of hoops to turn it into a bullet.

Datedit>Sprite>Image>Nuke Beam. Choose a unit you won't use like an unused unit.
Datedit>Flingy>Unused Unit. Change the speeds to what you want. Change the Move Control to Partially Morbile, Weapon.
Datedit>Weapon>Graphics>Unused Unit. Change the weapon you want.
Datedit>Weapon>Behavior>Bounce.

Note that because we used the Glave Wurm iscript it will create both 'Glave Wurm/Seeker Spores Hit' and 'Glave Wurm Trail' images. You can change these sprites to what you want and/or change the draw functions of them. If you do change them then the normal Mutalisk's glave wurm will be affected by these changes.



None.

Apr 30 2018, 2:46 am Sie_Sayoka Post #13



SCREEN DETECTION

http://farty1billion.dyndns.org/EUDDB/?pg=entry&id=531
http://farty1billion.dyndns.org/EUDDB/?pg=entry&id=528

By using these EUDs we can pinpoint the screen location to the pixel. There are, however, limitations to what we can do with this.
  • The values are counted in pixels. Each terrain tile has 32 pixels.
  • The values start from the top left both for the map (which can be seen at the bottom left in SCMD) and for the screen.
  • Because the values start at the top left you will not be able to detect the rightmost and bottommost screen positions.
  • The screen resolution of BW is 640x480. You can calculate the center of the screen by offsetting the EUD values by 320x240. I'm not sure how it works in remastered.
  • The player ID for screen coordinates is shared for all players locally. This means that if you use a trigger that affects all players (e.g. create unit) it will desync.
  • Trigger actions that would be safe to use would be things such as display text, center view, play wav, etc.


DIRECTIONAL SOUND

Because we can detect the location of the screen we can implement directional sound within maps. 1.18 allows us to use .ogg audio files which can support stereo. By editing sound effects we can emulate both the direction and distance from a sound source. Unfortunately 1.18 also changed the behavior of how mute unit speech works and normal sound effects will be played at full volume. It may be possible to change the volume through EUDs but I haven't looked into it yet.

First we need to edit the sound effects to give it a sense of direction and distance. I use Audacity. It's free and suits our purposes just fine. I wont go too much into how to edit the sounds as it will probably depend on what kind of audio you're editing.
  • If the file you're editing is mono (such as SC wavs) you will need to convert it to stereo.
  • Panning left or right will make the audio sound like its coming from... the left or right.
  • Increased pitch will make it sound like its coming from above. Decreased pitch from below.
  • Lowering the volume and higher frequencies will make it sound like its far away.

You may end up with some artifacts due to pitch scaling so you can try tremble.

For the purposes of this example I'm only going to use 9 different audio files. One for the center and 8 for directions. sound.scx has triggers you can view as well as the sound effects. sound2.scx just adds the explosion visual. The map contains a grid of 4x4 squares. Because each tile is 32 pixels, a square will be 128x128 pixels which can be viewed within the triggers. Hotkey the barracks and create a marine to cause an explosion. The explosion occurs at the low platform square. The explosion sfx will change direction depending on where the low platform square is on the screen.

Ideally within an actual map you'd have automated triggers to calculate both the sound source and the screen position.

Attachments:
sound.scx
Hits: 0 Size: 180.42kb
sound2.scx
Hits: 0 Size: 287.62kb



None.

Jan 31 2020, 8:11 am Sie_Sayoka Post #14



ALLY FRIENDLY SPLASH & PREVENTING DAMAGE BUT ALLOWING ATTACKS



Using target flags within the weapon category of datedit we are able to create splash damage that will not harm allies. In this example we will add an additional flag to the gauss rifle to only harm non-robotic (i.e. organic) units. This will mean it will do 0 (as opposed to 0.5) damage to robotic units. Within the test map below the zealot has the robotic flag checked meaning that it will not be harmed by splash. This in effect makes the gauss rifle act as irradiate would, damaging organic units whilst not harming robotic ones.

Although not technically preventing damage done because of alliance status this is, for the vast amount of uses, ally friendly splash. It also has the additional benefit of preventing team killing as damage cannot be done to any robotic units. For maps that have defined teams and does not have alliance shifting the same can be applied with other flags, although I have not tested them.

Attachments:
splash1.scx
Hits: 0 Size: 92.3kb
splash.e2s
Hits: 0 Size: 2.66kb



None.

Feb 5 2020, 2:39 pm Sie_Sayoka Post #15



CREEP SPAWNING & DESPAWNING



It is possible to spawn and despawn creep with some precision using EUDs. Creep has, as far as I can tell, 3 different ways to spawn within the game. First upon creation of a unique building (hatcheries and creep colonies) that create a large area of creep, by creation of a normal zerg building, and by the creep growth/spread creep orders. We will be looking into the latter two instances for this post.

Let's discuss the properties of creep:
  • Creep generation is static and independent of the unit that spawns it. This means that despite moving the unit, the creep will still be in the spot the unit was made.
  • Creep will not be despawned unless there is an update that tells it to. This means we can have permanent creep.
  • Creep spread will spread/despawn at a certain rate per source. I don't know what the exact rate is.

In this example map we have 4 different units that are able to manipulate creep by moving.
  • Reaver: Creates permanent creep via the creep growth order.
  • Zealot: Creates despawning creep via placing/removing a zerg building.
  • Wraith: Creates a despawning area around it via a sunken colony.
  • Marine: Creates a despawning area that is 3x3 tiles vis a zerg building with a 3x3 placement size.

Within the map moving a reaver will cause an observer to spawn/remove. The observer has the creep growth order. Under DatEdit>Unit>Advanced the "Requires Creep" flag must be checked. The zealot creates a 1x1 tile of creep by moving. The size of the creep generated is dependent on the Placement Box size under DatEdit>Unit>Graphics. The wraith will create a despawning area the same size as a full creep colony. I'm unsure why it doesn't create creep further testing is needed. Finally the marine will despawn creep by creating a spire. In order for the spire to not make creep the "Requires Creep" flag is unchecked.

In order for a building to create creep 3 flags must be checked.
DatEdit>Unit>StarEdit>Zerg
DatEdit>Unit>Advanced>Building
DatEdit>Unit>Advanced>Requires Creep

It is possible to instantly spawn large areas of creep using either the creep growth order or building method. With the former option a grid must be made for each tile as the creep created follows the tick rate. I have not found a way to instantly remove creep.

Attachments:
creep.e2s
Hits: 0 Size: 3.88kb
creep1.scx
Hits: 0 Size: 95.01kb



None.

Feb 13 2020, 8:38 am Sie_Sayoka Post #16



FRAME CALLING




By changing the initial direction that a unit is created at we can use a specific frame of an image. This will allow the frame to persist as long as you want and enable the use of custom animations. Whilst this method wont allow us to use every frame it will enable a majority images to be accessible for effects. Below is a list of the frames that can be called upon. Those with an asterisk must be refreshed (removed and created again) periodically as the iscript will change directions e.g. marine idle.

0-16 Zerg Gas Sac Type1
17-33 Zerg Gas Sac Type2
51-67 Ghost*
68-84 Marine*
85-101 Zergling
102-118 Ragnasaur
119-135 Goliath(Base)
136-152 Infested Kerrigan*
153-169 Ultralisk
221-237 Dark Templar(Hero)


First we must decide which frame we want to use. For this example we will choose a Photon Cannon that's fully up.

DatEdit>Image>Photon Cannon>GndAttkInit

In this iscript you can see that it's fully up at frame 3. Since this method uses the direction a unit spawns at and the cannon doesn't have this we need to check the Graphics Turn box under General Properties. Next we change the iscript of the cannon to Zerg Gas Sac Type1 as 3 is between 0-16.

We will next change a sprite of the unit into a cannon. Let's choose a Zealot. Whilst this step isn't necessary for this example it's here in case you want to create an effect that doesn't have a corresponding unit.

DatEdit>Sprite>Zealot>Image:Photon Cannon

Next we will change the initial direction the Zealot spawns at.

Datedit>Unit>Graphics>Direction

Because we want Frame 3 we change the direction to 3. After this create a zealot using triggers and you're done.




With this method it's possible to do cool shit like reverse animations (unit undying) or pseudo doodads (gun turrets as tables).

It is recommended to use dynamic EUDs when creating effects as this will allow you to use a single unit slot. This means having the EUDs being applied by triggers and NOT using EUD editor 2. EUD editor 1 has the ability to do dynamic EUDs although you will have to convert the values into SCMD. EPD editor is also an option but it lacks directional EUDs.

Attachments:
gunturret.e2s
Hits: 0 Size: 3.19kb
gunturret.scx
Hits: 1 Size: 35.65kb



None.

Feb 13 2020, 4:03 pm NudeRaider Post #17

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

Minerals rewarded for persistence. Every post is a little gem and you continue to push them out.




Feb 15 2020, 10:16 pm Sie_Sayoka Post #18



Thanks. I see the thread got pinned as well.

GAME UI VALUES

For some maps the default UI may not be able to hold all of the values and information you may want displayed. Luckily there are numerous EUDs that will help with adding additional values. A full list of all UI values can be found here. Over the next few posts I'll be exploring these options.


IMAGE-BASED VALUES



This system uses directional frames (frame calling) to create images which we can combine to create numbers. Within the example map there are two different uses of this system. The first creates numbers whilst the second creates icons. Although I only made them to go from 0-9 it would be easy to create as many digits as you want.

The number is made out of 2-7 "Corsair Attack Overlay (Unused)" as it's an image that's both small enough and straight enough to use within numbers. An alternative albeit slightly larger option would be burst lasers. From there you measure the pixels for the image to know how much you need to move the locations, a painting program is ideal for this.

Currently, this system would not be practical for the way I implemented it by following a unit around. Units will be obstructed or stuck if they walk within the numbers so it's best to put this in a corner somewhere. Disabling collision and having current player only visibility of the numbers will be addressed in a later post.


ANNOUNCEMENT STRINGS

Announcements are messages that do not affect the chat such as "Vespene Geyser Deplated" or "Cannot Create More Units". As such they are a very useful way of displaying information without it affecting communication. This function is built within EUD Editor 2.

EUD Editor 2>Trigger Editor>New>Actions>Custom>ChatAnnouncement

This will function similarly to the display text trigger and display only for the current player.

Attachments:
gui.e2s
Hits: 0 Size: 19.47kb
gui1.scx
Hits: 0 Size: 123.25kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:10 pm]
Moose -- Dem0n
Dem0n shouted: fucc
Dem0n
Dem0n shouted: u got memed
[05:08 pm]
Dem0n -- fucc
[04:59 pm]
NudeRaider -- worth it
[04:54 pm]
Dem0n -- no
[04:42 pm]
lil-Inferno -- EZ mild infuriation
[04:42 pm]
lil-Inferno -- no take the one left of it
[04:20 pm]
Dem0n -- Someone take the middle box in the second to last row
[03:44 pm]
lil-Inferno -- ya
[2020-2-21. : 4:06 pm]
KrayZee -- The fact that it's Victorian London. Plus that secret section in the game.
[2020-2-21. : 3:57 pm]
NudeRaider -- so far I liked Black Flag best
Please log in to shout.


Members Online: Doodan, Vandenheuvelaq10, anarth274496