PDA

View Full Version : DMW levels.txt and menus.txt


rtqbsm
03-05-2005, 05:10 PM
I know how to change the levels and menus txt for a normal level but what i'm asking is, how do you do it for a DMW?

Corwin
03-05-2005, 05:36 PM
Why don't you just take a look at the level.txt and menu.txt from the game ? It already has DMWs defined in it.

rtqbsm
03-06-2005, 06:07 PM
What skin should I use for a DMW? The Skins that i've used didn't work right. I want it so that when the character dies it goes back to the menu to tell you your score.

Corwin
03-06-2005, 06:33 PM
This is not the skin which define this, take a look at the Remedy DMW example level.
From the OnDeath event of the player FSM, just run a timer which send the command :
MaxPayne_GameMode->GM_Init(nameofthelevelyouareplaying);
This is the command to quit a DMW.
(For a normal level you would have to do with the StoryEvent called "ExitLastLevel" and the
X_SwitchMode->S_SwitchToMode(menu); or something like that, not sure about the syntax)

rtqbsm
03-06-2005, 08:30 PM
I can't put in my level name in MaxPayne_Gamemode->GM_Init(my_level); For where you would put in your level name in place of My_level it just gives you a list of level names. What do I do?

Corwin
03-06-2005, 08:47 PM
You need it defined in the database. OK.

Open the Levels.txt (or .h I don't remember), and find a DMW (01_survival for example)
Copy the whole block (between the {} ) and paste it, at the end for example.

Now change the settings (Name, LNID, Loadingscreen, filename...) to match your level. Leave the other parts as they are, except maybe the [SingleLevelInit] block where you can add the weapons you want to have on Startup .

Now, in MaxEd, do what I said in the last post (you have to quit MaxEd and to reload it to take the changes)

Now go into the menu.txt (or menu.h I don't remember) and find the block talking about the Survival levels and the NYMItems. Copy one of the lines and paste it at the end of the group of these lines.
Change the settings of this last one to match the informations you did set in the level.txt

Example :

[NYMItem]{[General]Name = LNID_SURVIVALMODE_MAP14; LevelName = "14_Survival"; ID = 1;[Message] String = "maxpayne_gamemode->gm_setgamelevel( "timedmode" );";[Message] String = "X_ModeSwitch->S_ModeSwitch( game );";[Message] String = "maxpayne_gamemode->gm_resetlevelitems();";[Message] String = "MaxPayne_GameMode->GM_InitSingleLevel( 14_Survival );";}


(Don't forget the last one.)

If you've done this all right, you should be able to load your DMW level from the DMW sub-menu.

PS : In case you don't know, the LNID_xxx_xxx are to define in the StringDefines.txt file. Just copy one of the lines of this file and change the name to, in this case LNID_SURVIVALMODE_MAP14 and the string value.
Example : #define LNID_SURVIVALMODE_MAP14 "My DMW level"