Sidebar tutorial for Renegade modders [message #485846] |
Sun, 09 February 2014 00:41 |
|
You will want to download http://www.cncmods.net/files/sidebar.zip for this tutorial.
Now that scripts 4.1 allows you to use the sidebar stand-alone in a Renegade map, its time to write a tutorial for how its done.
The first thing you need to create are textures for the sidebar. Included in the sidebar.zip file are some example textures from Tiberian Sun: Reborn as well as a source Photoshop file provided by Chronojam to show how it all fits together.
You need to create a top half texture, bottom half texture and up and down arrow textures. They can be the same for both teams or different for each team.
Then, you need to create an ini file. If your map is named C&C_MyMap, the ini file should be named C&C_MyMap_tt.ini
In this file put something like this
[General]
AlternateSelectEnabled=false
NewUnpurchaseableLogic=false
VehicleBuildingDisable=false
GDIUpArrowTexture=gdisidebarup.tga
GDIDownArrowTexture=gdisidebardown.tga
GDIBackgroundTexture1=gdisidebar1.tga
GDIBackgroundTexture2=gdisidebar2.tga
NODUpArrowTexture=nodsidebarup.tga
NODDownArrowTexture=nodsidebardown.tga
NODBackgroundTexture1=nodsidebar1.tga
NODBackgroundTexture2=nodsidebar2.tga
Sidebar=true
Obviously the names of the textures should match the names you gave them when you created them.
You can also optionally add
SidebarSoundsEnabled=true
SidebarRefillSound=xyz
SidebarInfantrySound=xyz
SidebarVehicleSound=xyz
if you want sounds to play when sidebar items are purchased.
The sounds need to be 2D sound presets created in LE. (obviously replace xyz with the name of the sound to use). The sounds are played whenever something is purchased (i.e. double click etc)
Note that the sidebar does not display any text on top of the icons except for the cost so you will need to either rely just on the pictures or you will need to add text to your icons.
Also note that all players using your map will require scripts
4.1 (as will the server) in order for this to work.
Also, the sidebar does not allow you to purchase beacons (unlike the PTs) so if you want beacons to be purchasable, you will have to add separate terminals to let you do that (there are plenty of scripts to make that happen)
This should be all you need to know in order to use the sidebar in your map. If you have any questions, post here (or talk to me on IRC/IM) and I will do my best to answer them.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
Re: Sidebar tutorial for Renegade modders [message #485850 is a reply to message #485846] |
Sun, 09 February 2014 02:19 |
|
ok, time for part 2 of the tutorial (which is necessary if you want objects to disappear when the building that normally builds them goes away)
First, in the C&C_MyMap_tt.ini file (or whatever), put this line at the end after the others
NewTechLevel=true
Then in leveledit, go to Global Settings then Purchase Settings. For each of Character Classes (GDI), Character Classes (Nod), Character Classes (Secret GDI), Character Classes (Secret Nod), Vehicles (GDI), Vehicles (Nod), Vehicles (Secret GDI) and Vehicles (Secret Nod), create a temp preset copy (or if you already have one, edit it). What you need to change is the Factory Building Type for each entry. For soldiers, set it to Soldier Factory. For vehicles, set it to Vehicle Factory. If you are using my helipad tutorial (to be posted shortly) set helicopters/air units to Helipad.
If there are units you dont want on the sidebar (e.g. the secret hidden extra vehicles), set their object to none. The usual enable/disable for extras (EXTRAS console command etc) will not work with the sidebar.
That should be all you need to do, no extra scripts are required, the engine logic behind NewTechLevel=true will do all the work of making the items vanish from the sidebar when the relavent building is destroyed.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
|
|