Jump to content
Sign in to follow this  
segra

Dune 2 Script Tools 1.3

Recommended Posts

Nice! I haven't checked out those, but I remember messing around with BUILD.EMC using Minniatian's decompiler. Can you tell what UNIT.EMC does except drawing different unit animations (I guess, based on what BUILD.EMC does)?

Share this post


Link to post
Share on other sites

in unit.emc, each unit has a main script

[bullet]

PushWord 6000

Execute Delay

AddSP 1

Execute Die

Pop (Return)

[sonicBlast]

PushWord 1800

Execute Delay

AddSP 1

Execute Die

Pop (Return)

That code just delays script execution for the specified amount (6000 and 1800), then the unit dies

MCV has this piece of code, which i assume var 0 is the "action" button that was pushed, and 12 is ACTION_DEPLOY

l2257:

PushVar 0

PushByte 12

Evaluate Equal

IfNotGoto l2266

Execute MCVDeploy

  • Upvote 1

Share this post


Link to post
Share on other sites

i can verify that actually, from OpenDune

void Unit_SetAction(Unit *u, ActionType action)

<snip>

u->o.script.variables[0] = action;

(setaction is called from a number of places, one of them is the GUI)

Share this post


Link to post
Share on other sites

That pseudo-asm they used in those scripts is pretty odd choice, imo. I wonder why they chose to do something like that.

Share this post


Link to post
Share on other sites

its possible the original scripts looked like more

Units {

Bullet {

Delay(6000);

Die();

Return;

}

}

it would just require more work on the decompiler and the compiler to get it to that state

Share this post


Link to post
Share on other sites

That pseudo-asm they used in those scripts is pretty odd choice, imo. I wonder why they chose to do something like that.

In what way is it an odd choice?

Share this post


Link to post
Share on other sites

well, just the fact that they're compiled scripts, but not part of the actual game code.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...