Jump to content

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
Link to comment
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

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...