Staredit Network > Forums > SC1 Mapping Tools > Topic: euddraft
Jun 11 2016, 6:15 pm
By: trgk  

Jun 11 2016, 6:15 pm trgk Post #1

euddraft : Framework for creating & applying various plugins to a map.

This tool uses EUDA. Map using this tool will require EUD Enabler too work.

Download Github

This is simple plugin to repeatedly apply eudplib plugins to map. These plugins are included out of box:

- datadumper : Dump file content to SC memory and put its address to somewhere.
- grpinjector : Upload GRP(SC Graphics) data to memory and link it to somewhere.
- keepSTR : Make STR section un-freeable. The memory will live even after game is finished.
- noAirCollision : Air unit won't collide and repel each other.
- scmloader : Give more priority to map MPQ than that of SC mpqs.
- soundStopper : Stop specific sound.
- unlimiter : Remove bullet/sprite/image count limit.

Basic usage

1. Create setting file. Extension should be .eds/.edd
eds : Compile once. edd : Compile every time when any of the file changes.

input : Path to input map
output : Path to output map

# Arguments
key1 : value1
key2 : value2

# Plugin may have no arguments


2. Run setting file to euddrafts.

> euddraft.exe [setting]

You can set file associations to speed up the process.

3. All finished. You'll see nothing if it succeeds, and see some error message if it fails. Fix error accordingly.

These are basic usage of included plugins.

# myiscript.bin will be dumped to somewhere, and the dumped address should be stored at 0x6D1200.
myiscript.bin : 0x6D1200

# Same as dataDumper, except it includes special processing for starcraft GRP.
mygrp.grp : 0x58A364

# Normally you won't want to use this.
# Make STR section unfreeable. Every data from dataDumper or grpInjector goes to STR section,
# so If you want them to live up even after game ends, this might help.

# Air unit won't repel each other if you use this.

# Prioritize map mpq than SC mpq. Only effects data loaded after first trigger loop such as
# unit sounds, portraits, or game dialogs.

# Add function to stop certain sound.
# ex) stopSound("staredit\\wav\\bgm.wav")
# You'll need to use inline_eudplib to use this function.

# Free bullets/sprite/image count limits.


Jun 11 2016, 6:28 pm trgk Post #2

Custom plugins

- You can create euddraft-wide plugins by putting plugin file to euddraft\plugins folder.
:::: Import plugin with [pluginName]

- Or, you can place your plugin file to the folder where your setting file is stored.
:::: Import plugin with []. Check the py extension.

Plugin may define 3 functions. Example function utilizes only afterTriggerExec.

- onPluginStart : Run once before map's first trigger loop, before beforeTriggerExec.
- beforeTriggerExec : Run before every trigger loop
- afterTriggerExec : Run after every trigger loop

Or, you can register custom function to euddraft namespace using @EUDRegistered directive. See default soundstopper plugin for more details.
Registered function can be used inside normal triggers via inline_eudplib.

.. note:: inline_eudplib is TrigEditPlus exclusive directive. Classic text trigger editor won't read them and will destroy it.
:::: They are compatiable with classic triggers however. It is hidden there.

Example plugin:
from eudplib import *

def ApplyHallucinatedFlag(unitepd):
# /*0x0DC*/ u32 statusFlags;
# 0x40000000 : Hallucination
origStatusFlags = f_dwread_epd(unitepd + (0xDC // 4))
f_dwwrite_epd(unitepd + (0xDC // 4), origStatusFlags | 0x40000000)

def afterTriggerExec():
for ptr, epd in EUDLoopUnit():
# /*0x118*/ u8 irradiateTimer;
# /*0x119*/ u8 stasisTimer;
# /*0x11A*/ u8 plagueTimer;
# /*0x11B*/ u8 stormTimer;
timers = f_dwread_epd(epd + (0x118 // 4))
timers = f_dwbreak(timers)
stasis = timers[3]

# If unit is frozen, then unfreeze it and apply hallucination
if EUDIf()(stasis >= 2):
# Set stasisTimer to 1. As SC sets it to 0, SC will do some
# complex unfreezing processes.
new_timers = timers[0] * 65536 + 1 * 256 + timers[2]
f_dwwrite_epd(epd + (0x118 // 4), new_timers)

# Apply hallucination to unit and its subunits.
# /*0x070*/ BW::CUnit* subUnit;
for su_ptr, su_epd in EUDLoopList(ptr + 0x70):

DoActions(SetMemory(0x6509A0, SetTo, 0)) # EUD turbo trigger

Post has been edited 1 time(s), last time on Jun 11 2016, 7:10 pm by trgk.


Jun 11 2016, 6:38 pm LoveLess Post #3

Let me show you how to hump without making love.

Yeah I have seen unlimiter before:


Jun 11 2016, 6:48 pm trgk Post #4

For plugin creators:

Supported functions

Basic syntax

Post has been edited 4 time(s), last time on Jun 11 2016, 7:09 pm by trgk.


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:07 pm]
lil-Inferno -- eeee
[04:54 pm]
NudeRaider -- bebe
[03:13 pm]
lil-Inferno -- meme
[2021-8-02. : 7:51 am]
Ultraviolet -- its interfaces are easier to get used to imo
[2021-8-02. : 7:51 am]
Ultraviolet -- I'd recommend EE2
[2021-8-02. : 12:25 am]
TheHappy115 -- ATM, I only use a really basic EUD editor but I'd like the upgrade if possible
[2021-8-02. : 12:25 am]
TheHappy115 -- I've been having issues with EUD Editor 3 (namely compiling changes) is there a spot I can see a tutorial on how to make the compiling actually work. I may have wrong plugins which may be the issue
[2021-7-31. : 8:02 am]
Ultraviolet -- Dem0n
Dem0n shouted: and hope they never touch it again
prob the best we can hope for at this point
[2021-7-29. : 6:54 pm]
RdeRenato -- xd
[2021-7-29. : 5:10 pm]
IlyaSnopchenko -- that, or they should've instead made the probes to fly somehow, so all the workers were equally capable :)
Please log in to shout.

Members Online: Roy, jun3hong, LDConval, C(a)HeK, Excalibur, Scheckyu3