These are absolutely all external routes for BUILD.EMC!
As you can see the EMC controls VERY specific aspects of building's lifetime.
For example you can modify the range of the turrets but you couldn't
modify their firepower.
But still it's the "Westwood compatible" way of modifying the game :)
Here we go
- functions marked with * aren't used in original script
- missing numbers are just functions that "do nothing" (probably obsolete)
- all numbers in hex
BUILD.EMC External Routines:
0 Delay(ticks) - delays the script for "ticks" frames
(tick is 1/60 of second?)
2 VerifyAttached() - if there's mutual connection between building
and the unit (carryall) returns ID of that unit
else disattaches both sides (please don't ask
me what do this mean ;)
3 Attach(type) - attaches unit (carryall) to the structure
returns ID of attached unit
used to pick up units from factory, repair pad
store returned ID in variable #4!
4 SetFrame(frame) - draws structure frame typically:
-1 buildup frame
0 normal frame
1, 2 special frames
5* Text(nr, [args]) - prints formatted text number nr in panel!
can handle upto 3 arguments
6 Disattach(ID) - disattaches unit (carryall) from the structure
use ID returned by Attach()
7 Deploy() - deploys unit from structure
use in factory, repair pad and refinery
8 GetTarget(range) - returns target for the turret
you can customize the range!
9 SetAngle(ID) - rotate turret so it aims the target
use ID returned by GetTarget()
A* GetAngle(ID) - gets angle between turret and target
B ShootTarget(ID) - shoots at target
use ID returned by GetTurret()
D GetFrame() - returns current frame
for example 2 means there's a harvester in refinery
or there's an unit completed in factory
E* PlaySfx(nr) - plays sound effect!! (0, E, F are special)
F Reveal() - reveals terrain around structure
15 RafineSpice() - use in refinery: gets 1% money from harvester
16 Explode() - shows explode animation
17 DestroyBuilding() - turns building into ashes and releases infantry
The buildings types are:
3 Light Factory
4 Heavy Factory
6 House of IX
8 Constr. Yard
11 Spice Silo
The unit types are (bullets are also units!):
A Siege Tank
C Sonic Tank
E Raider Trike
12 Death Hand
18 Sonic Blast
That's all for now. I'm still working on decoder/encoder of the script so it would
be easier to modify but still requires some basic knowledge of
programming (stack and stuff). I want also to release
a "mod" using the BUILD.EMC to show its features.
BTW: UNIT.EMC has about 63 external functions... I don't plan to
decode them now...