Re: EMC format update - XCC ForumRegister | Login | Search
History | Home | Messages

Dune 2 EMC and ICN formatsOlaf van der Spek23:57 14-02-2002
Re: EMC format revealedMinniat10:21 27-10-2002
Re: EMC format updateMinniatian23:33 07-11-2002

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
or refinery
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:
0 Concrete
1 Concrete4
2 Palace
3 Light Factory
4 Heavy Factory
5 Hi-Tech
6 House of IX
7 WOR
8 Constr. Yard
9 Windtrap
A Barracks
B Starport
C Refinery
D Repair
E Wall
F Turret
10 R-Turret
11 Spice Silo
12 Outpost

The unit types are (bullets are also units!):
0 Carryall
1 'Thopter
2 Infantry
3 Troopers
4 Soldier
5 Trooper
6 Saboteur
7 Launcher
8 Deviator
9 Tank
A Siege Tank
B Devastator
C Sonic Tank
D Trike
E Raider Trike
F Quad
10 Harvester
11 MCV
12 Death Hand
13 Rocket
14 ARocket
15 GRocket
16 MiniRocket
17 Bullet
18 Sonic Blast
19 Sandworm
1A Frigate

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


Re: EMC format updateOlaf van der Spek23:49 07-11-20025
    Re: EMC format updateMinniatian09:05 10-11-2002
        Re: EMC format updateOlaf van der Spek19:19 10-11-2002
            Re: EMC format updateMinniatian21:36 13-12-2002
                Re: EMC format updateMinniatian21:40 13-12-2002
small fixes + stack framesMinniatian21:34 27-11-20022
    Re: small fixes + stack framesMinniatian21:40 27-11-2002


Home | Post | Users | Messages