Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Sidebar tutorial for Renegade modders
Sidebar tutorial for Renegade modders [message #485846] Sun, 09 February 2014 00:41 Go to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

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 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

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
Re: Sidebar tutorial for Renegade modders [message #485903 is a reply to message #485846] Sun, 09 February 2014 18:31 Go to previous messageGo to next message
Mauler
Messages: 448
Registered: May 2003
Location: Alberta, Canada
Karma: 0
Commander
I'm curious to why the beacons where not added to the sidebar?
Re: Sidebar tutorial for Renegade modders [message #485997 is a reply to message #485846] Tue, 11 February 2014 19:37 Go to previous messageGo to next message
escelade3 is currently offline  escelade3
Messages: 57
Registered: March 2005
Karma: 0
Recruit
Nice work!

Is there a way to change the sound for when you click on the scroll arrow?


http://img391.imageshack.us/img391/1549/esc2hc.gif
Re: Sidebar tutorial for Renegade modders [message #486003 is a reply to message #485903] Wed, 12 February 2014 02:00 Go to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Mauler wrote on Mon, 10 February 2014 01:31

I'm curious to why the beacons where not added to the sidebar?


Because neither of the BHP mods use them and it probably never occurred to anyone that they were missing Razz


http://steamsignature.com/card/1/76561197975867233.png
Previous Topic: CnC 95 DOS sidebar (WIP)
Next Topic: linking presets
Goto Forum:
  


Current Time: Sat Apr 13 09:03:29 MST 2024

Total time taken to generate the page: 0.00640 seconds