Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 81 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: CoD2 Menu Mod questions
That_One_Guy
General Member
Since: May 12, 2005
Posts: 18
Last: Aug 5, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Aug. 5, 2008 04:44 am
Hi, I have been making a meun mod for CoD2, and I've gotten stuck. I have a few questions:

How do you get rid of that annoying white line to the left of the menu buttons, as well as the cod2 logo and the "game experience may change in online play"?

How can you move the buttons themselves around?

How can you add a link to a server and/or add a "add this server to your favorites" button?

Thanks in advance.

Share |
That_One_Guy
General Member
Since: May 12, 2005
Posts: 18
Last: Aug 5, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Aug. 5, 2008 04:47 am
Here is a picture of what I have right now:


http://i13.photobucket.com/albums/a293/thatoneguy1382/menuv5.jpg
Share |
[ATB]
General Member
Since: Feb 10, 2007
Posts: 135
Last: Apr 29, 2020
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Aug. 5, 2008 07:06 am
Nice Picture! [thumbs_up]

The file you want to edit (and include in your iwd) is main.menu and can be found in iw_06.iwd. Make a copy and put it in a folder named ui_mp ...

To remove the line, find 'setdvar ui_seperator_show "1" ' (line 81) and change the "1" to a "0".

To remove the logo, find 'ui_logo_show "1" ' (line 79) and change the "1" to a "0"

To remove the message, find (line 487):
Code:
itemDef 
		{
		name 		esrb
		text 	"@MENU_GAME_EXPERIENCE_MAY_CHANGE"
		type 		ITEM_TYPE_BUTTON
		style 		WINDOW_STYLE_EMPTY
		textstyle 	ITEM_TEXTSTYLE_SHADOWED
		rect 		20 390 MAIN_RECT_WIDTHMAIN_RECT_HEIGHT MAIN_RECT_HORZALIGN MAIN_RECT_VERTALIGN
		textalign	MAIN_TEXTALIGN
		textscale	.25		
		textalignx	MAIN_TEXTALIGN_X
		textaligny	MAIN_TEXTALIGN_Y
		forecolor	MAIN_FORECOLOR
		visible		1
		textfont	UI_FONT_NORMAL
		decoration
		}

...and change 'visible' to "0"

As for moving the buttons... Each button is set out more or less the same e.g:
Code:
itemDef 
		{
		name		player_select
		text		"@MENU_SELECT_PROFILE"
		type		ITEM_TYPE_BUTTON
		style		WINDOW_STYLE_EMPTY
		textstyle	ITEM_TEXTSTYLE_SHADOWED
		rect		MAIN_RECT_X 250 MAIN_RECT_WIDTH MAIN_RECT_HEIGHT MAIN_RECT_HORZALIGN MAIN_RECT_VERTALIGN
		textalign	MAIN_TEXTALIGN
		textscale	MAIN_TEXTSCALE		
		textalignx	MAIN_TEXTALIGN_X
		textaligny	MAIN_TEXTALIGN_Y
		forecolor	MAIN_FORECOLOR
		visible		1
		dvarTest	"cl_ingame"
		showDvar	{ "0" }
		textfont	UI_FONT_NORMAL
		mouseEnter
		{
			play "mouse_over";
		}
		action 
		{ 
			setdvar ui_playerProfileAlreadyChosen 0;
			open player_profile;
			play "mouse_click";
		}
	}


rect, textalign, textscale, textalignx, textaligny and forecolor correspond to the defines at the top of the page.... If you want to move them all together (e.g. to the left of the menu) then change the value of '#define MAIN_RECT_X 385' at the top of the page to 85 or something. If you want to move the buttons separately, so they're not together, change where it says 'MAIN_RECT_X' in the button's itemdef (see above) to a value to go left or right, and change the '250' to go up or down...

To add a link to a server you would be better taking a look at Twofingers' -F|H- Menu Mod (v1) and basically copying his main.menu entries and changing the values (name, IP address, xy etc..) to suit your purpose. The bit you want is:
Code:
itemDef 
		{
		name play
		text "^1-F|H- Private^7"
		type ITEM_TYPE_BUTTON
		style WINDOW_STYLE_EMPTY
		textstyle ITEM_TEXTSTYLE_SHADOWED
		rect 280 460 MAIN_RECT_WIDTH MAIN_RECT_HEIGHT MAIN_RECT_HORZALIGN MAIN_RECT_VERTALIGN 
		textalign 0
		textscale .25		
		textalignx 0
		textaligny 14
		forecolor .9 .9 .9 .9
		backcolor 0 0 0 0
		visible 1
		textfont UI_FONT_NORMAL
		mouseEnter 
		{
			play "mouse_over";
		}
		action 
		{ 
			play "mouse_click";
                         exec "connect 63.209.32.124:28960"
				
		}
			
	}


As there isn't much that hasn't already been done with CoD2, I find the best way to learn is to unpack an existing mod and have a look what has been added or changed compared to the file that comes with the game...

Hope that's of some help.
Share |
That_One_Guy
General Member
Since: May 12, 2005
Posts: 18
Last: Aug 5, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Aug. 5, 2008 06:31 pm
Thank you! I figured it was something along those lines (as I had been looking at other people's files in menu mods) but I had no idea what any of that all meant. Thanks for clearing that all up!
Share |
That_One_Guy
General Member
Since: May 12, 2005
Posts: 18
Last: Aug 5, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Aug. 5, 2008 07:18 pm
Hmmm...even when I copy/paste that link to the server and don't change anything, it won't work. You just put that into the main.menu file right?
Share |
That_One_Guy
General Member
Since: May 12, 2005
Posts: 18
Last: Aug 5, 2008
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Tuesday, Aug. 5, 2008 08:41 pm
Never mind, I got it! Here is the final version:


http://i13.photobucket.com/albums/a293/thatoneguy1382/menufinal.jpg
Share |
[ATB]
General Member
Since: Feb 10, 2007
Posts: 135
Last: Apr 29, 2020
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Aug. 5, 2008 09:19 pm
Nice! I like it [thumbs_up]
Share |
|S!T|
General Member
Since: Nov 8, 2007
Posts: 93
Last: Dec 9, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Apr. 6, 2009 05:28 pm
ehm - i got an error with this...
first of all - i use a modified (by me) AdmiralMod (works 100% fine)
and i wanted to change the background... i follow the tut and when i start up cod2 this comes up


Code:


Error during initialization:
Create2DTexture( wm_background, 1, 1, 0, 894720068 ) failed: 8876086c = Invalid call



what is this??
wm_background is the modified background from admiralmod - but i never see this one - i only used this becouse the normal background_american_w isn't anymore in the admiral mod... i tried to copy it in and changed the gsc for both...but nothing happens....
only this error with both...
maybe my picture is wrong??
i haven't used photoshop for it - i use Paint.net ... but there is the dds plugin too (and its for free :) )

hope somebody can help!!

Edith:
here is the picture

http://img12.imageshack.us/my.php?image=gamescreen.gif

1024x512px

edited on Apr. 6, 2009 01:30 pm by |S!T|

edited on Apr. 6, 2009 01:32 pm by |S!T|
Share |
Pahozom
General Member
Since: Oct 30, 2013
Posts: 6
Last: Aug 9, 2014
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Saturday, Aug. 9, 2014 02:21 pm
How deleted "R" [main menu]?


edited on Aug. 9, 2014 07:21 am by Pahozom
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»