Tremulous Forum
Mods => Modding Center => Topic started by: Firstinaction on October 03, 2010, 08:41:02 pm
-
How can I do... Can someone tell me step by step. ON mac or pc PLZ... I dont care if you flame me because I posted this. But please tell me because I was looking in my base folder just for no reason and I came across these folders with pics. I really want to change my backround. OMFG.... This is too coolll.... and futuristic.
-
again, go into your data-1.1.0.pk3, and find the jpeg file. (Note its location.) Then make a new pk3 with a bunch of z's in front that has the same filepath as the image, and leading to your image, renamed to the default.
-
AFAIR the menu isn't an image but some weird thing that moves etc.
So it's probably not that simple.
-
In fact the main menu is defined in the file ui/main.menu (surprise!). There is the path to the background image (ui/assets/mainmenu.jpg) and the black star model that is rendered in front of it (models/splash/splash_screen.md3).
So you can just create a pk3 that overwrites this jpeg and/or md3, or you can overwrite the main.menu and point to your own background image. In this case you have to be careful not to delete the controls of the main menu, but on the other hand you could change their position / style etc. as you want.
-
You should be looking at volt's hud for example code. In his hud there is a menu changer for backgrounds which upon clicking the "tremulous" Button the background changes. Also He has different music.
When i looked at how he did it within his hud, it looked really simple
First I'll address your previous questions
1. There is only one gpp hud
2. The hud files go in a ui folder in
Users/name/library/application support/tremulous/base
First there are many huds for 1.2, my favorite being VoltageGpp (http://code.google.com/p/voltagegpp/downloads/list)
hudImage1 (http://networkofdoom.net/~bishop3space/Tremulous/Projects/voltagegpp/voltage_alien.jpg)
hudImage2 (http://networkofdoom.net/~bishop3space/Tremulous/Projects/voltagegpp/voltage_human.jpg)
Secondly from reading your previous posts, I'm going to guess that you're on 1.2 and not 1.1 tremulous.
This create somewhat of a problem since in 1.2 the menus are more locked down, and they reset after connecting to a server. But the ingame human/alien hud are still editable.
If you’re on 1.1, changing the music in the mainmenu is really simple, just install a custom hud, or create a custom menu loader and create a mainmenu.menu as explained in volt’s hud making guide, and then look for this line
onOpen { uiScript stopRefresh ; playlooped "ui/assets/sounds/Volt_intro.wav" }
Right after playlooped within the quotations “here” you need to redefine a new music file, which has to be in .wav file format. Make sure to place the file within your basefolder or tremulous will not be able to find it.
In regards to your menu image switching, if you install volts hud, it’s quite simple to change the backgrounds since he has a background switcher integrated. This means all you have to do is, place your image files within your base folder, then link to them as below
In the file labeled Main.menu
There are several definitions called
//orange nebula background
itemDef
{
name background //name of item
rect 0 0 640 580 //location of item on screen
style WINDOW_STYLE_SHADER //its a shader
backcolor 0 0 0 1 //black
visible 1 //shown
decoration
background "UI/assets/menu/background6.jpg" //location of image
cvartest cg_background
showCvar {7}
}
If you want to just change his images to your own, just replace the location in the quotations following the cvar “background”
If you would like to add onto his menu images do the following within the main.menu
//orange nebula background
itemDef
{
name background //name of item
rect 0 0 640 580 //location of item on screen
style WINDOW_STYLE_SHADER //its a shader
backcolor 0 0 0 1 //black
visible 1 //shown
decoration
background "location" //location of image
cvartest cg_background
showCvar {NextNumberFollowing Last} //Place the next number following the previous one
}
After you’ve created your new itemdefs to include your new imagebackgrounds, don’t forget to add them to the menu background switcher
//button
itemDef
{
name SETTINGS
type ITEM_TYPE_MULTI
text ""
cvar cg_background
cvarFloatList { "" 1 "" 2 "" 3 "" 4 "" 5 "" 6 "" 7 "" NextNumber } //add your new menu numbers here
textstyle ITEM_TEXTSTYLE_SHADOWED
rect 150 50 400 100
textscale .25
forecolor 1 1 1 1
visible 1
action
{
play "sound/misc/menu3.wav";
}
}
Save the menu, and then reload with /vid_restart
This should solve your problems, remember to look back to the hud making guide for further questions.
-
In fact the main menu is defined in the file ui/main.menu (surprise!). There is the path to the background image (ui/assets/mainmenu.jpg) and the black star model that is rendered in front of it (models/splash/splash_screen.md3).
So you can just create a pk3 that overwrites this jpeg and/or md3, or you can overwrite the main.menu and point to your own background image. In this case you have to be careful not to delete the controls of the main menu, but on the other hand you could change their position / style etc. as you want.
Do not create a pk3 to overwrite backgrounds, it's very bad practice and will most likely be more dificult than just creating a main.menu and loading it with custom cvars and new itemdefs to point to new image files.