How to get D3 Matcens to work?

For Descent, Descent II and Descent3 level editing and modification assistance.
Post Reply
User avatar
Alter-Fox
The Feline Menace
Posts: 3164
Joined: Thu May 24, 2007 12:49 pm
Location: the realms of theory
Contact:

How to get D3 Matcens to work?

Post by Alter-Fox »

I'm working on an SP level for D3. I've tried to make matcens, but they don't work. Could someone point me to a tutorial, or just describe how to implement matcens in D3 levels?
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Post by Floyd »

i'm almost certain that you'd have to get DALLAS to work first. this link has info on to how: http://www.gameedit.net/?q=node/18
note that only gcc versions <=2.8.1 work. search the archives here or on planetdescent forums for older threads on DALLAS installation if it doesn't work.
you can then script such a matcen in dallas to your liking.
User avatar
Alter-Fox
The Feline Menace
Posts: 3164
Joined: Thu May 24, 2007 12:49 pm
Location: the realms of theory
Contact:

Post by Alter-Fox »

COD D3 had working matcens, but it was entirely unscripted. What I really need to know first is how to create a matcen. I think that's where the problem lies, but I've tried everything I can think of.
User avatar
Duper
DBB Master
DBB Master
Posts: 9214
Joined: Thu Nov 22, 2001 3:01 am
Location: Beaverton, Oregon USA

Post by Duper »

There is a way to add some basic triggers without scripting. It's rather limited, but it works. As memory serves, it's in properties in the item dropdown menu.
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

I've managed to get DALLAS to work with a recent MinGW version, but it does take some tweaking.
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Post by Floyd »

would you enlighten us about how, Sirius? :)

oh, and matcens: open the menu \"Window\" in the editor, then click \"Matcens\". you can give objects new names in the object bar and i assume you assign those in the matcen menu. no DALLAS necessary.
you take it from here :)
User avatar
Sirius
DBB Master
DBB Master
Posts: 5616
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius »

Apparently (it's been a little while since I did it, had to check), I made some alterations to the virtualgcc program to get it to run the right tools and recompiled it.

If it's any help:

Code: Select all

--- virtualgcc_old.cpp	1999-06-17 15:52:30.000000000 +1200
+++ virtualgcc.cpp	2007-06-10 21:33:14.579125000 +1200
@@ -72,6 +72,7 @@
 #include <string.h>
 #include <assert.h>
 #include <stdarg.h>
+#include <ctype.h>
 
 typedef enum{DEBUG_NONE=0,DEBUG_COFF,DEBUG_CSEVEN}Debug_type;
 char Source_filename[_MAX_PATH];
@@ -331,12 +332,12 @@
 char DebugLevelString[32];
 char ChecksumString[64];
 
-void main (int argc, char *argv[])
+int main (int argc, char *argv[])
 {
 	output(\"Virtual GCC Compiler layer for Descent 3\\n\");
 	output(\"Copyright 1999 Outrage Entertainment\\n\");
 	if(!CollectArguments(argc,argv))
-		return;
+		return 0;
 	
 	STARTUPINFO         si   = {0};
 	// Make child process use this app's standard files.
@@ -367,7 +368,7 @@
 	}
 
 	if(missing_variables){
-		return;
+		return 0;
 	}
 
 	if(Level_DLL_build){
@@ -431,6 +432,8 @@
 	output(\"Done.\");
 
 	SetCurrentDirectory(old_path);
+	
+	return 1;
 }
 
 bool Step1(STARTUPINFO *si)
@@ -451,7 +454,7 @@
 	MakePath(output_dllinit,Working_directory,filename,NULL);
 	
 	//build script
-	sprintf(command_line,\"gcc.exe -I. -I%s -mwindows -o %s -c %s %s %s %s\",Working_directory,output_object,Source_filename,WarningLevelString,ChecksumString,DebugLevelString);
+	sprintf(command_line,\"c++.exe -I. -I%s -mwindows -o %s -c %s %s %s %s\",Working_directory,output_object,Source_filename,WarningLevelString,ChecksumString,DebugLevelString);
 	bRet = CreateProcess (NULL, command_line, NULL, NULL, TRUE, 0, NULL, NULL, si, &pi);
 	if (bRet){
 		WaitForSingleObject (pi.hProcess, INFINITE);
@@ -468,7 +471,7 @@
 	}
 
 	//add dllinit function
-	sprintf(command_line,\"gcc.exe -I. -I%s -mwindows -o %s -c %s %s %s\",Working_directory,output_dllinit,DLLInit_filename,WarningLevelString,DebugLevelString);
+	sprintf(command_line,\"c++.exe -I. -I%s -mwindows -o %s -c %s %s %s\",Working_directory,output_dllinit,DLLInit_filename,WarningLevelString,DebugLevelString);
 	bRet = CreateProcess (NULL, command_line, NULL, NULL, TRUE, 0, NULL, NULL, si, &pi);
 	if (bRet){
 		WaitForSingleObject (pi.hProcess, INFINITE);
@@ -495,7 +498,7 @@
 
 	// build up the command line
 	char command_line[256];
-	sprintf(command_line,\"dllwrap.exe --export-all --def %s -o %s %s %s -mwindows\",Def_filename,Output_filename,output_object,output_dllinit);
+	sprintf(command_line,\"dllwrap.exe --driver-name c++ --export-all --def %s -o %s %s %s -mwindows\",Def_filename,Output_filename,output_object,output_dllinit);
 
 	bRet = CreateProcess (NULL, command_line, NULL, NULL, TRUE, 0, NULL, NULL, si, &pi);
 	
User avatar
Floyd
DBB Captain
DBB Captain
Posts: 561
Joined: Sat Apr 26, 2003 2:01 am
Location: Germany
Contact:

Post by Floyd »

i see. thanks :)
User avatar
WillyP
DBB Ace
DBB Ace
Posts: 461
Joined: Sat Feb 11, 2006 9:57 pm
Location: NH
Contact:

Post by WillyP »

There is no need to run DALLAS to get a matcen working... but the setting are many and not default.


First, name the room you want the matcen in, using either Room properties or 'IO', and take note of the face you want to the effect to spawn from. The spawned object will spawn at the room center.

Windows>Matcens opens the Matcen dialog,

'Attach' tab: 'Attach type': set to 'Room and faces', 'Attach Room/Object': your matcen room. For 'Spawn points' enter 1 or more in 'Quantity', then list the face(s) below that.

In the 'Produce' tab, set Number of Object types to 1 or more, then you can select the objects from the drop-downs. Set Qty. to the total number of each object to be produced in the life of the Matcen. When to produce is self explanatory, below that you must set the Maximum objects produced and Number of Alive children to 1 or more. Don't forget to check the 'Enabled' box!

There is no need to change anything in the 'Display' tab, but you can change the visual and sound effects here if you want.

Matcen Tut at DescentiaPedia.

D3 Level Editing at Prepare For Descent.
User avatar
Alter-Fox
The Feline Menace
Posts: 3164
Joined: Thu May 24, 2007 12:49 pm
Location: the realms of theory
Contact:

Post by Alter-Fox »

Thanks, I got it working.
Post Reply