Jaymod in game menu

Any questions regarding getting Jaymod running.
RooKy
Server n00b
Posts: 4
Joined: Thu May 14, 2009 5:06 am

Jaymod in game menu

Post by RooKy » Thu May 14, 2009 5:13 am

I am wondering if its possible to edit the ingame menu. I would like to add a new menu to the ingame menu called RULES. After you went to the menu, I want a window to popup with our clan rules on it.
It would be great if someone can help on it.
I openend the jaymod-2.1.7.pk3 file and i can find the ingame menu.
But how can I add something like I want? It should look like the credits menu, but than vieuwing the rules.
If this isnt possible can I create a command like !rules what will show a window with rules in it?

Ty in advance.


RooKy

MickyP
Server n00b
Posts: 40
Joined: Thu Jul 13, 2006 10:23 am

Re: Jaymod in game menu

Post by MickyP » Fri May 15, 2009 4:12 pm

Yes it is possable

You need to make a new pk3 file containing 3 files.

ingame_main.menu (copy from the ui folder in the jaymod pk3)
menus.txt (copy from the ui folder in the jaymod pk3)
rules_main.menu (this is just the filename I used)

Now start to edit

open ingame_main.menu

Change

Code: Select all

#define WINDOW_HEIGHT	176
to

Code: Select all

#define WINDOW_HEIGHT	200
This increases the hight of the ingame menu

Change

Code: Select all

BUTTON( 6, 104, WINDOW_WIDTH-12, 18, "^xJAY^4MOD", .3, 14, close ingame_main; open jaymod_main )
BUTTON( 6, 128, WINDOW_WIDTH-12, 18, "DISCONNECT", .3, 14, clearFocus ; open ingame_disconnect )
BUTTON( 6, 152, WINDOW_WIDTH-12, 18, "EXIT GAME", .3, 14, clearFocus ; open quit )
to

Code: Select all

BUTTON( 6, 104, WINDOW_WIDTH-12, 18, "^xJAY^4MOD", .3, 14, close ingame_main; open jaymod_main )
BUTTON( 6, 128, WINDOW_WIDTH-12, 18, "RULES", .3, 14, close ingame_main; open rules_main )
BUTTON( 6, 152, WINDOW_WIDTH-12, 18, "DISCONNECT", .3, 14, clearFocus ; open ingame_disconnect )
BUTTON( 6, 176, WINDOW_WIDTH-12, 18, "EXIT GAME", .3, 14, clearFocus ; open quit )
This has added a button to the menu

Open menus.txt

Add this line

Code: Select all

loadMenu { "ui/rules_main.menu" }
This tells ET to load your rules menu

Make a new file called rules_main.menu

This is the basic text

Code: Select all

#include "ui/menudef.h"

// Defines //

//#define WINDOW_X 32
//#define WINDOW_Y 32
//#define WINDOW_WIDTH 576
//#define WINDOW_HEIGHT 795
#define WINDOW_X 16
#define WINDOW_Y 16
#define WINDOW_WIDTH 610
#define WINDOW_HEIGHT 460
#define GROUP_NAME "grpIngamerules"

// Macros //

#include "ui/menumacros.h"

// Server Rules //

menuDef {
name "rules_main"
visible 0
fullscreen 0
rect WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
style WINDOW_STYLE_FILLED
popup


onOpen {
	setitemcolor background backcolor 0 0 0 0 ;
	fadein background ;
}

onESC {
close rules_main;
open ingame_main
}

// Window //// Rules //
WINDOW( "Server Rules", 94 )
   itemDef {
      name      "window"
      group      GROUP_NAME
      rect      0 0 WINDOW_WIDTH WINDOW_HEIGHT
      style      WINDOW_STYLE_EMPTY
	forecolor	.6 .6 .6 1
      backcolor   0 0 0 1
      border      WINDOW_BORDER_FULL
      bordercolor   0 0 0 0
      visible      1
      decoration
   }
itemDef {
      name      "rulesblockstart"
      group      GROUP_NAME
      rect      2 45 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text        "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock1"
      group      GROUP_NAME
      rect      2 80 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule\r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock2"
      group      GROUP_NAME
      rect      2 115 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock3"
      group      GROUP_NAME
      rect      2 140 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r" 
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock4"
      group      GROUP_NAME
      rect      2 165 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock5"
      group      GROUP_NAME
      rect      2 190 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock6"
      group      GROUP_NAME
      rect      2 215 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock7"
      group      GROUP_NAME
      rect      2 250 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock8"
      group      GROUP_NAME
      rect      2 275 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock9"
      group      GROUP_NAME
      rect      2 300 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock10"
      group      GROUP_NAME
      rect      2 325 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock11"
      group      GROUP_NAME
      rect      2 350 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblock12"
      group      GROUP_NAME
      rect      2 385 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .20
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }
itemDef {
      name      "rulesblockend"
      group      GROUP_NAME
      rect      2 430 $evalfloat(WINDOW_WIDTH-12) 14
      autowrapped
      text      "Your Rule \r"
      textstyle   ITEM_TEXTSTYLE_NORMAL
      textscale   .30
      textalign   ITEM_ALIGN_LEFT
      visible      1
      decoration
   }

// Buttons //

BUTTON( 6, WINDOW_HEIGHT-24, WINDOW_WIDTH-12, 18, "^dB^7ACK", .3, 14, close rules_main ; open ingame_main )
} 
Now you need to add your rules

find in the text each instance of

Code: Select all

text        "Your Rule \r"
Change the text to your rule (don't edit the '/r')

Now comes the trial & error testing

Because your rules might be anything from a few words like "no spawnkilling" to a long definition of your spawnkilling rule, where each rule starts on the new menu the start position will need to be changed.

Look at each ruleblock and look for this text like these 2 examples

Code: Select all

rect      2 45 $evalfloat(WINDOW_WIDTH-12) 14

Code: Select all

rect      2 80 $evalfloat(WINDOW_WIDTH-12) 14
Where you see the numbers 45 & 80 this defines where the new bit of text (rule) is positioned on the menu.
For every new rule this number must be increased by 25 if the rule only takes up 1 line or 35 if the rule takes up 2 lines.
If you want more space between the rules you could try 30 & 40 that is up to you.

When you make the pk3 you must use the same file structure as the orginal pk3 so for this example the 3 files must be in a folder called "ui"

---------------------------------------------------------------------
!rules

No that will not work
Last edited by MickyP on Sat May 16, 2009 10:42 am, edited 1 time in total.

RooKy
Server n00b
Posts: 4
Joined: Thu May 14, 2009 5:06 am

Re: Jaymod in game menu

Post by RooKy » Sat May 16, 2009 12:08 am

Wow this is really helpfull, thanks a lot. So if I got it right, I have to add a new pk3, instead of editting the existing one?

RooKy

MickyP
Server n00b
Posts: 40
Joined: Thu Jul 13, 2006 10:23 am

Re: Jaymod in game menu

Post by MickyP » Sat May 16, 2009 7:32 am

Yes that is correct

Editing existing pk3 files can cause problems unless you know what your are doing.

When you create your new pk3 prefix the name with "zz_" so for example the file name would be "zz_myclansrules.pk3" the zz_ just makes it load over the standard pk3 files

For making a pk3 I suggest downloading pakscape it’s used for various q3 games.

RooKy
Server n00b
Posts: 4
Joined: Thu May 14, 2009 5:06 am

Re: Jaymod in game menu

Post by RooKy » Sat May 16, 2009 4:29 pm

Yes I am using the same program aswell. Thanks for all information, I think I can do it wiht this.

Thanks a lot,

RooKy

zoom
Server n00b
Posts: 1
Joined: Fri Mar 25, 2011 11:24 pm

Re: Jaymod in game menu

Post by zoom » Fri Mar 25, 2011 11:28 pm

hey i want to create menu for my clan can you help me?

MickyP
Server n00b
Posts: 40
Joined: Thu Jul 13, 2006 10:23 am

Re: Jaymod in game menu

Post by MickyP » Tue Apr 05, 2011 1:09 pm

zoom wrote:hey i want to create menu for my clan can you help me?
Generaly its not creating a new menu but editing the existing menu.

What is it you require?

Clan colours?
Website link?
Rules?

Which menu are you wanting changing?
The main menu?
Voicechats Menu?

Something else?

Shownie
Server n00b
Posts: 45
Joined: Sun Mar 27, 2011 10:23 am

Re: Jaymod in game menu

Post by Shownie » Tue Apr 05, 2011 1:20 pm

just a note, no need to make two "zz" in the prefix, one is enaough.

Otherwise the rest was indeed a good help. Hardcode is pain in the butt :lol:

User avatar
=DV=VALHALLA
Server n00b
Posts: 15
Joined: Thu Jul 20, 2006 12:33 am
Location: DENMARK
Contact:

Re: Jaymod in game menu

Post by =DV=VALHALLA » Mon Apr 11, 2011 9:27 am

Shownie wrote:just a note, no need to make two "zz" in the prefix, one is enaough.

Otherwise the rest was indeed a good help. Hardcode is pain in the butt :lol:
that depends on how many "extra" packs you got :wink: if you got more than 1 you will experience that it wont load some of them if you dont name some of the others for example zz_ or zzz_ :wink:
Image

Bonbonpwn
Server n00b
Posts: 4
Joined: Mon Apr 11, 2011 3:30 am

Re: Jaymod in game menu

Post by Bonbonpwn » Wed Apr 13, 2011 5:05 am

MickyP wrote: Website link?
How i can make link to my website?? :)

Shownie
Server n00b
Posts: 45
Joined: Sun Mar 27, 2011 10:23 am

Re: Jaymod in game menu

Post by Shownie » Wed Apr 13, 2011 9:39 am

=DV=VALHALLA wrote:
Shownie wrote:just a note, no need to make two "zz" in the prefix, one is enaough.

Otherwise the rest was indeed a good help. Hardcode is pain in the butt :lol:
that depends on how many "extra" packs you got :wink: if you got more than 1 you will experience that it wont load some of them if you dont name some of the others for example zz_ or zzz_ :wink:
And thats why no custom made paks should be added :lol:
Mod runs best if it is "clean" :)

Ah that may be true, but don't understand why to make so many custom paks :?

MickyP
Server n00b
Posts: 40
Joined: Thu Jul 13, 2006 10:23 am

Re: Jaymod in game menu

Post by MickyP » Wed Apr 13, 2011 12:19 pm

You need to make a new pk3 file containing 4 files.

ingame_main.menu (copy from the ui folder in the jaymod pk3)
menus.txt (copy from the ui folder in the jaymod pk3)
myclan_web.menu (this is just a example filename you need to create)
myclan_web.cfg (this is just a example filename you need to create)

Now start to edit

open ingame_main.menu

Change

Code: Select all

#define WINDOW_HEIGHT   176
to

Code: Select all

#define WINDOW_HEIGHT   200
This increases the hight of the ingame menu

Note if you are running other buttons such as rules you need to add 24 so it would then be 224 not 200

Change

Code: Select all

BUTTON( 6, 104, WINDOW_WIDTH-12, 18, "^xJAY^4MOD", .3, 14, close ingame_main; open jaymod_main )
BUTTON( 6, 128, WINDOW_WIDTH-12, 18, "DISCONNECT", .3, 14, clearFocus ; open ingame_disconnect )
BUTTON( 6, 152, WINDOW_WIDTH-12, 18, "EXIT GAME", .3, 14, clearFocus ; open quit )
to

Code: Select all

BUTTON( 6, 104, WINDOW_WIDTH-12, 18, "^xJAY^4MOD", .3, 14, close ingame_main; open jaymod_main )
BUTTON( 6, 128, WINDOW_WIDTH-12, 18, "MY SITE", .3, 14, close ingame_main; open myclan_web )
BUTTON( 6, 152, WINDOW_WIDTH-12, 18, "DISCONNECT", .3, 14, clearFocus ; open ingame_disconnect )
BUTTON( 6, 176, WINDOW_WIDTH-12, 18, "EXIT GAME", .3, 14, clearFocus ; open quit )
This has added a button to the menu


Open menus.txt

Add this line

Code: Select all

loadMenu { "ui/myclan_web.menu" }
Create a text file called myclan_web.menu and add

Code: Select all

#include "ui/menudef.h"

// Defines //

#define WINDOW_X		0
#define WINDOW_Y		0
#define WINDOW_WIDTH	640
#define WINDOW_HEIGHT	480
#define GROUP_NAME		"grpsutweb"

// Macros //

#include "ui/menumacros.h"
		
// WWW Menu //
	
menuDef
{
	name		"myclan_web"
	visible		0
	fullscreen	0
	rect		WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
	style		WINDOW_STYLE_FILLED
	popup
	
	fadeClamp	0.5
	
	onOpen
	{
		setitemcolor background backcolor 0 0 0 0 ;
		fadein background
		exec "set cl_noprint 1;exec ui/myclan_web.cfg;set cl_noprint 0"
	}
	
	onESC
	{
		close myclan_web ;
		open ingame_main
	}
	
// Background //

	itemDef {
		name		"background"
		rect		0 0 640 480
		style		WINDOW_STYLE_FILLED
		background	"ui/assets/fadebox.tga"
		backcolor	0 0 0 0
		visible		1
		decoration
	}

// Subwindows //

#define SUBWINDOW_WIDTH		192
#define SUBWINDOW_HEIGHT	64
#define SUBWINDOW_X			.5 * (WINDOW_WIDTH - SUBWINDOW_WIDTH)
#define SUBWINDOW_Y			.5 * (WINDOW_HEIGHT - SUBWINDOW_HEIGHT)

SUBWINDOWBLACK( SUBWINDOW_X, SUBWINDOW_Y, SUBWINDOW_WIDTH, SUBWINDOW_HEIGHT, "www.mysite.com" )
LABEL( SUBWINDOW_X+2, SUBWINDOW_Y+16, (SUBWINDOW_WIDTH)-8, 10, "Exit the game and go to My Website?", .2, ITEM_ALIGN_CENTER, .5*((SUBWINDOW_WIDTH)-4), 8 )
	
BUTTON( SUBWINDOW_X+6, SUBWINDOW_Y+SUBWINDOW_HEIGHT-24, .5*(SUBWINDOW_WIDTH-18), 18, "YES", .3, 14,
close myclan_web ; uiScript validate_openURL )
	BUTTON( SUBWINDOW_X+6+.5*(SUBWINDOW_WIDTH-18)+6, SUBWINDOW_Y+SUBWINDOW_HEIGHT-24, .5*(SUBWINDOW_WIDTH-18), 18, "NO", .3, 14,
		close myclan_web ; open ingame_main )
}
Edit any of text sections so they relate to your clan

Create another text file called myclan_web.cfg & add

Code: Select all

set ui_finalURL "http://www.mysite.com"
Change the url to your own site

Original info came from a post on the etpub forum here link to the file seems dead if you need any more info you can read more about it on there

Bonbonpwn
Server n00b
Posts: 4
Joined: Mon Apr 11, 2011 3:30 am

Re: Jaymod in game menu

Post by Bonbonpwn » Wed Apr 13, 2011 11:31 pm

Thx :)

User avatar
=DV=VALHALLA
Server n00b
Posts: 15
Joined: Thu Jul 20, 2006 12:33 am
Location: DENMARK
Contact:

Re: Jaymod in game menu

Post by =DV=VALHALLA » Mon Apr 18, 2011 3:53 am

Shownie wrote:
=DV=VALHALLA wrote:
Shownie wrote:just a note, no need to make two "zz" in the prefix, one is enaough.

Otherwise the rest was indeed a good help. Hardcode is pain in the butt :lol:
that depends on how many "extra" packs you got :wink: if you got more than 1 you will experience that it wont load some of them if you dont name some of the others for example zz_ or zzz_ :wink:
And thats why no custom made paks should be added :lol:
Mod runs best if it is "clean" :)

Ah that may be true, but don't understand why to make so many custom paks :?
well i dont understand why people wants to play ET standard maps since the sux big time :P , custom made can sometime be a good addon to a game m8 :wink: , a good thing is that we all have different taste :D , if we didnt we would all be humping the same chick :P
Image

Avery
Server n00b
Posts: 22
Joined: Tue May 10, 2011 12:56 am

Re: Jaymod in game menu

Post by Avery » Tue May 10, 2011 9:16 pm

I'm doing something very similar. I have figured out the rules page. That was really easy. Thanks to those who wrote that one! I am trying to make a button in the ingame menu that is strictly for our other clan servers and our forums.
This is the coding in my ingame_servers.menu

Code: Select all

#include "ui/menudef.h"

// Defines //

#define   WINDOW_X      16
#define   WINDOW_Y      16
#define   WINDOW_WIDTH   300
#define   WINDOW_HEIGHT   260
#define   GROUP_NAME      "grpOptions"

// Macros //

#include "ui/menumacros.h"

// Options Menu   //

menuDef   {
   name      "ingame_servers"
   visible      0
   fullscreen   0
   rect      WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
   style      WINDOW_STYLE_FILLED

   onESC {
      close ingame_servers ;
      open ingame_main
   }

// Window //

   WINDOW(   "^3**^4DRC^3**^1DasRebellion Clan", 80 )

// Buttons //

   BUTTON ( 50, 50, 200, 24, "^7**DRC**Shock & Awe XPS", .25,   17, close ingame_servers ; exec   "set strHTAction connect 66.55.159.57:27960"; exec "vstr strHTAction" )
   LABELWHITE( 0, 77, 300,   18, "^224 Slots,^1jaymod,^1XPSave", .15, ITEM_ALIGN_CENTER, (.5*(WINDOW_WIDTH-0)), 8 )

   BUTTON ( 50, 100, 200, 24, "^9 **DRC**silEnT Fun ", .25, 17, close   ingame_servers ; exec "set strHTAction connect 216.155.146.46:27960"; exec "vstr strHTAction" )
   LABELWHITE( 0, 127, 300, 18, "^210 Slots,^1silEnT Mod" .15, ITEM_ALIGN_CENTER, (.5*(WINDOW_WIDTH-0)), 8 )

   BUTTON ( 50, 150, 200, 24, "^9**DRC****Starwars**", .25, 17,   close ingame_servers ; exec "set strHTAction connect 87.106.142.116:27962"; exec "vstr strHTAction" )
   LABELWHITE( 0, 177, 300, 18, "^220 Slots ^1etpub, starwars mod", .15, ITEM_ALIGN_CENTER, (.5*(WINDOW_WIDTH-0)), 8 )
   
   BUTTON ( 50, 150, 200, 24, "^9**DRC**Special Forces", .25, 17,   close ingame_servers ; exec "set strHTAction connect 87.106.142.116:27962"; exec "vstr strHTAction" )
   LABELWHITE( 0, 177, 300, 18, "^220 Slots, ^1etpro", .15, ITEM_ALIGN_CENTER, (.5*(WINDOW_WIDTH-0)), 8 )

   BUTTON ( 50, 200, 200, 24, "^7Forums", .3, 14, exec "set   ui_finalURL http://http://dasrebellion.com/phpBB3/index.php/" ; close ingame_servers   ; open webconfirm )

   BUTTON ( 15, WINDOW_HEIGHT-24, WINDOW_WIDTH-30,   19, "^8BACK", .3, 14, close ingame_servers ; open ingame_main )

}
and this is the line I have written in my ingame_main.menu:

Code: Select all

BUTTON(   6, 152,   WINDOW_WIDTH-12, 18, "^3**^4DRC^3** ^1Stuff", .3, 14, close ingame_main ; open ingame_servers )
It is not working though, and I need a little help on why. To me, it seems like everything is written correctly. When the file is in the server, the button shows and looks like it would work, but when clicking on it to go into the ingame_servers part, it just exits the menu altogether.

Post Reply