Staredit Network > Forums > SC1 Mapping Tools > Topic: euddraft
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.

Code
[main]
input : Path to input map
output : Path to output map

[plugin1]
# Arguments
key1 : value1
key2 : value2

[plugin2]
# Plugin may have no arguments

[plugin3]



2. Run setting file to euddrafts.

Code
> 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.

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


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


[keepSTR]
# 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.


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


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


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

[unlimiter]
# Free bullets/sprite/image count limits.





EUD

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 [pluginPath.py]. 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 *


@EUDFunc
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.
ApplyHallucinatedFlag(epd)
# /*0x070*/ BW::CUnit* subUnit;
for su_ptr, su_epd in EUDLoopList(ptr + 0x70):
ApplyHallucinatedFlag(su_epd)
EUDEndIf()

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.



EUD

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:







None.

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.



EUD

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Excalibur, Revenant, eksxo