Jump to content
Nemon

dxe script files

Recommended Posts

I've succesfully written a disassembler for the games compiled script files. I re-implemented one of the compiled mission scripts in source code and had the game load the mission. There are a few things i need to figure out but i think i have about 95% figured.

http://nemon.myby.co.uk/disassembler.jpg

I know it doesn't mean much to most people but its a good result for me. This tool isnt going to help you guys, its for me to use to write the source code of the scripts.

Here is the reimplemented source of the compiled script levels/mission01/mission01.dxe

import Application;

import World;

import Underlay;

import Global;

import Math;

import Sound;

import setups.Setup;

import utils.dev.editor.WorldHolder;


object _world;

object _backdrop;


init( )

{

	Setup.start_loading_video();

	Sound.set_default_environment("street");

	Sound.add_soundbank( "mission01_sound" );

	Sound.add_soundbank( "music_act01_sound" );

	Application.add_to_dynamic_texture_scope( "/data/levels/mission01/texture_scope.xml" );

	Application.load_global_material_manager();

	World.load( "/data/levels/mission01/mission01.xml" );

	Setup.init( 0 );


	object var1 := Math.string_to_vector( 

		Math.Vector3(

			(((160000-29250)-250)+40000),

			((((-80000)-38250)-250)+40000),

			0 )

		);


	Global.mission_name := "mission01";

	Global.mission_center_pos := var1;

	Global.mission_camera_height := "70000";

	Global.mission_time := "day";

	Global.mission_ambience_soundbank := "ambience_industrial_day_sound";

	Sound.add_soundbank( Global.mission_ambience_soundbank );

	Global.mission_tacticalmap_posteffect := "tacmap_day";

	Global.long_path_distance := 11000;

	Global.level_difficulty := 1.3;

	_world := WorldHolder.WorldHolder().init( "/data/levels/mission01/xml/world.xml" );

	_world.create_world( "world", "all", Math.Vector3(0, 0, 0) );

	Global.script_lightmap_manager.load_lightmaps();

	_world.lock_unit_groups();

	_backdrop := WorldHolder.WorldHolder().init( "/data/levels/backdrop/world_m01.xml", _world );

	_backdrop.create_world( "world", "static", Math.Vector3((((160000+500)-29250)-250), ((((-80000)-38250)-250)), 0) );				

	Global.mission_compass_offset := 12;

	Setup.last_init();

}


update( p0, p1 )

{	

	Setup.update( p0, p1 );

}


paused_update( p0, p1 )

{

	Setup.paused_update( p0, p1 );

}


render ( )

{

	Setup.render();

}


save ( p0 )

{

	Setup.save( p0 );

}


load( p0 )  

{

	Setup.load( p0 );

}

It's still not perfect but apears to work.

Edited by Nemon

Share this post


Link to post
Share on other sites

Getting to the core ...

when we can modifie scripting files or create new ones and get additional bundles to run with main bundle we are done and grin can keep the mod tools

Share this post


Link to post
Share on other sites

Getting to the core ...

when we can modifie scripting files or create new ones and get additional bundles to run with main bundle we are done and grin can keep the mod tools

grin may bring on the tools anyway :P

the more tools and insight the better we can mod

@nemon

great work :D

Share this post


Link to post
Share on other sites

Mmmmmmm....now we're talking about meat 'n' potatoes type stuff :)

when might we see a downloadable toy for this? and btw, tell raven I said hi.

Edited by DonMiguel

Share this post


Link to post
Share on other sites

:yawn: I dont know about you lot but the waiting is killing me, come on already :harhar:;) keep going guys.

Im sure but a lot of peeps are not aware how importent this thread is.

Shhhhhh

Share this post


Link to post
Share on other sites

Hey, how is the progress with this?

Looks like there is a lot of info in .dxe files, been wondering those game mode scripts.

Edited by vlad

Share this post


Link to post
Share on other sites

Great work nemon! Can't wait (already tried some editing with a hexeditor but that's almost impossible (you can't tell what are opcodes and what are values).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×