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.

Yesterday, 3:47 pm Sie_Sayoka Post #19



CUNIT

We now delve into the realm of CUNITs. CUNIT allows us to access memory not available through EUD editor alone. If you check the EUD DB it's everything between Player ID 19025 and 19108.

CUNITs use the Unit Index (press enter whilst having a unit selected in SCMD) and as such you aren't able to use conditions and actions in triggers as you normally would since the type and owner of the unit isn't taken into account. When a unit is created it will fill the next available empty index and will only give up that index if it dies or is removed. Because of this, having automated triggers and keeping track of the Unit Index is highly encouraged when using CUNITs.

In this example we will modify the HP of a unit to make it regenerate by 1 per frame until it's at full HP. The first step will be to find the Player ID that's associated with unit HP. If you look at the EUD DB it's 19027.



We then need to find the Unit Index of the unit we want to affect the HP of, in this case we want it to affect the Marine so it's 2.

The formula to find the value that we need is listed below. This works for all Unit Indexes between 1 and 1699, however, Unit Index 0 will just be the original Player ID. For the sake of example I'll calculate the first 3 but we will only use the last value.

Quote
Player ID + 84(1700 - Unit Index) = Player ID for Unit Index

Unit Index 0: 19027 = 19027
Unit Index 1: 19027 + 84(1700 - 1) = 161743
Unit Index 2: 19027 + 84(1700 - 2) = 161659

As you can see from the EUD DB page, the value works in increments of 256. Meaning 256 = 1 HP, 512 = 2 HP, etc. For this example we will only add 1.

It's a safe practice to use masked as it prevents values from overflowing into other things. The mask only allows the values to be modified within a certain range. To determine the value of the mask (which is in hexadecimal) you must first find what byte and length it uses. The EUD DB usually has info regarding this but if it is undocumented you may have to figure it out yourself using EUD Editor 1 or some other means.

Quote
byte 0 length 1: 0x000000FF
byte 1 length 1: 0x0000FF00
byte 2 length 1: 0x00FF0000
byte 3 length 1: 0xFF000000

byte 0 length 2: 0x0000FFFF
byte 3 length 2: 0xFFFF0000

If it's flags it's either on or off, follow EUD DB instructions.

The EUD we are using is byte 2 length 1 so we will use a mask of 0x0000FF00.

Add the EUD into the triggers. It should look like this:

Quote
Trigger("Player 1"){
Conditions:
Always();

Actions:
Masked MemoryAddr(0x00628150, Add, 256, 0x0000ff00);
Preserve Trigger();
}

The Marine's health should rise by 1 per frame. However, there's nothing to stop it from going over its max HP. Since there's no native HP detection we will use EUDs for that as well.

Within the map the Marine has a max HP of 40. We want to tell the trigger to stop working once it has 39 HP since we are using "at most". 256 * 39 = 9984 and we add that into our condition with the same Player ID and mask. The trigger should look like this:


Quote
Trigger("Player 1"){
Conditions:
Masked MemoryAddr(0x00628150, At most, 9984, 0x0000ff00);

Actions:
Masked MemoryAddr(0x00628150, Add, 256, 0x0000ff00);
Preserve Trigger();
}


And that's it for CUNITs. The files are attached as "HP regen". If there are any inaccuracies let me know so I can correct them.



DISABLE COLLISION



Status Flags can be used to disable collision. I've used them to modify the previous map to allow other units to walk through the numbers without issue. Normally, moving or creating units will cause collision checks which can slow down ground units. This effect becomes apparent when using hyper triggers or EUD hypers to move units every trigger cycle, sometimes causing the affected units to not move at all. By disabling collision we also disable these checks.

The "no collision" flag will allow other units to ignore that unit's collision.
The "is gathering" flag allows the targeted unit to ignore other units collision.

The goal, within the context of this map, is to allow the numbers to not hinder nor be affected by other units and also to let the 'other' units have normal collision. To achieve this we have to do the following:

Quote
On map start:

Create number units.
Enable "no collision" flag for these units.
This will allow targeted units to ignore collision for number units.


Per trigger cycle:

Enable "no collision" flag for targeted unit.
Enable "is gathering" flag for targeted unit.
At the moment neither the targeted or number units have collision with each other.

Move numbered units from anywhere to placeholder location.
Move number units from placeholder location to targeted location.
The units are moved instead of created/removed to keep track of unit index.

Disable "no collision" flag for targeted unit.
Disable "is gathering" flag for targeted unit.
Disabling them allows targeted units to have normal collision with each other

By doing this in a normal map you'll most likely have to do trigger automation for all the unit indexes.


COMMAND CARDS

Through Command Cards within the Firegraft section of EUD Editor we are able to change the behavior and information that can be displayed on them. Within the example map I've created an "Inventory" button which when pressed will display 3 different values that can be controlled with the Stargate. There's two parts to this system, the manipulation of command cards and the manipulation of values on them.




Many of the Command Card functions can be deduced by comparing what each property does, much like within DatEdit. The requirements tab is a list of all the requirements the host unit needs in order to produce/research the target. One thing of note is that you always want to have equal or less than the total capacity. This can be done by removing or disabling requirements.



Quote
Position: The position the button appears on the card.
1 2 3
4 5 6
7 8 9

Icon: The icon the button has.
Available: The text the button has when it's available.
The first character will be the hotkey for the button.
The second character is additional displayed informations, EUD Editor will offer a preview of this info.
<0> - Label Only
<1> - Units or Buildings
<2> - Upgrades
<3> - Spell
<4> - Techs
<5> - Morphing
Additional characters will show normally.


Unavailable: The text the button has when it's unavailable.
Conditions: The type of conditions required.
Value: The specific conditions required.
Action: The type of action that the button does.
Value: The specific action the button does.

Now we move onto button arranging. We want to add an Inventory button to the Marine's command card as shown above. Right click in an empty space within the Button List and create a new button. An untranslated window will appear, it doesn't matter what you select as we will be changing all the values. Alternatively you can just copy/paste a button.

We make the new inventory button use the command card of the Uraj Crystal. It can be any command card but preferably one that the player will never own the unit of. This works similarly to the command card changes that workers have when creating buildings. Now move to the Uraj's command card.



We need to create a cancel button that will bring us back to the Marine's command card.



Then we create the buttons to display our values within the inventory. In the example above I use an unused tech. I would advise using technology to display values as other types may show unwanted additional information (upgrades) or provide error messages (such as units) but it depends on your purposes. The flag will display the cost of the unused upgrade when the mouse hovers over it. Because the marine isn't able to research technology the button will do nothing when pressed.


Now we can edit the tech cost to display the values that we want. You can edit the initial cost of the value within SCMD, in this case I've made it 0 minerals and gas. Then to change the mineral/gas values dynamically I use the linked EUDs. The EUD DB lists the information required to change the cost of the tech.


STRING FIX



The latest patch (1.23.3) screwed up default strings in maps. To fix them follow these steps:

1. Go here.
2. Click 첨부파일
3. Click 내PC 저장
4. Download dataDumper.py
5. Add/Replace dataDumper.py within the eud draft/plugins folder
6. Compile the map using Eud Editor

Attachments:
gui.e2s
Hits: 0 Size: 20.56kb
gui1.scx
Hits: 0 Size: 141.82kb
HP regen.e2s
Hits: 0 Size: 2.94kb
HP regen1.scx
Hits: 0 Size: 87.91kb

Post has been edited 1 time(s), last time on Today, 2:44 pm by Sie_Sayoka.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:45 am]
Kolokol -- Okay, are both of these games referencing something else here? If so, what are they both referencing?
[05:45 am]
Kolokol -- So I am looking at the custom campaign "Legacy of the Confederation". One of the missions has references such as "Doctor Halsey" and "Noble", but the campaign was made almost 10 years before Halo Reach.
[02:55 am]
Dem0n -- ya
[02:45 am]
Wing Zero -- Ah damn it Demon
[02:03 am]
KrayZee -- Yeah, we just need 3 more. We can get a complete F if it's 4.
[10:06 pm]
jjf28 -- i'll take that advice into cooperation
[2020-2-26. : 7:43 pm]
KrayZee -- Okay, but we need other people to cooperate and not ruin it
[2020-2-26. : 6:27 pm]
Wing Zero -- Next we need to spell out F in the boxes
[2020-2-26. : 5:25 pm]
Sie_Sayoka -- the i is silent
[2020-2-26. : 4:58 pm]
NudeRaider -- for a second I thought Sie was talking about CUNTs
Please log in to shout.


Members Online: Moose, ilecaj, jun3hong, Mustoeaq50