AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Tech Support (https://forums.alliedmods.net/forumdisplay.php?f=36)
-   -   Beginner's Guide to Installing Heroes (https://forums.alliedmods.net/showthread.php?t=32438)

imported_FireWalker877 02-12-2005 00:56

Beginner's Guide to Installing Heroes
 
Installing Superheroes

So you've successfully installed the Superhero Mod? Well congratulations! The next step is to add custom heroes.

Before you begin, you are going to need to know a few things.

First, you will need to know how to unzip the hero files. I recommend using WinZip because it is a fairly straight forward program. You can download it from www.winzip.com.

Open the .zip file with WinZip. Inside you should see a list of files, if you don't, try saving the .zip to your hard drive. Now, when a scripter creates a hero, he always uploads two types of files.

The first type of file you find is the SMA. It will be named sh_heroname.sma. Think of this file as the hero's source code. It is the raw code that is actually written by the scripter. When the scripter is happy with the way the code looks, he compiles it, bringing us to the second type of file. The AMX file is the file that is actually read by the AMX system. It has been translated into a code that the server understands. If you were to look at the AMX file with WordPad, you would be completely confused.

There can be as many as three AMX files in the ZIP file, each with the same or a similar name (sh_heroname.amx); however, these files are very different. If there is only one AMX file in your ZIP file, you can skip this paragraph. As you may know, there are three supported versions of AMX; AMX 9.8, AMX 9.9, and AMXX. You need to choose the hero file that corresponds to your version of AMX. If you run AMXX, you need the file that ends with AMXX (sh_heroname.amxx). To see which version each AMX file goes with, scroll to the far right of the WinZip window until you see the PATH column. Under this column is listed either €œ\amx98€ or €œ\amx.€ \amx98 corresponds to AMX 9.8 and \amx corresponds to AMX 9.9. Select the AMX file that will be used on your server.

If you installed AMX 9.8, take the hero's AMX file and place it in ROOTFOLDER\cstrike\addons\amx\plugins\. Then, in this folder, find the file plugins.ini. Open it with WordPad and scroll down until you see the superhero section. Find the new hero's alphabetic position in the list of sh_hero.amx entries and insert sh_heroname.amx.
e.g.
sh_agent.amx
sh_anubis.amx
sh_aquaman.amx
sh_batgirl.amx
Save the plugins.ini file and exit WordPad.

If you installed AMX 9.9, take the hero's AMX file and place it in ROOTFOLDER\cstrike\addons\amx\plugins\. Then, move to the folder ROOTFOLDER\cstrike\addons\amx\config\. Find the plugins.ini file, open it with WordPad, and scroll down until you see the superhero section. Find the new hero's alphabetic position in the list of sh_hero.amx entries and insert sh_heroname.amx.
e.g.
sh_agent.amx
sh_anubis.amx
sh_aquaman.amx
sh_batgirl.amx
Save the plugins.ini file and exit WordPad.

If you installed AMXX, take the hero's AMXX file and place it in ROOTFOLDER\cstrike\addons\amxmodx\plugins\. Then, move to the folder ROOTFOLDER\cstrike\addons\amxmodx\configs\. Find the plugins.ini file, open it with WordPad, and scroll down until you see the superhero section. Find the new hero's alphabetic position in the list of sh_hero.amxx entries and insert sh_heroname.amxx.
e.g.
sh_agent.amxx
sh_anubis.amxx
sh_aquaman.amxx
sh_batgirl.amxx
Save the plugins.ini file and exit WordPad.

Congratulations, the base hero is now installed. If there were no custom models or sound files included with your hero, you can stop reading.

If the hero you just installed has a custom model or sound file, you will need to place it in the correct folder. Look at the install path in the WinZip window as described under the AMX file section. If there is no path listed, but a model is included, you are going to have to do a little detective work, jump to the next paragraph. Pretend you are installing Morpheus, a popular custom hero. Morpheus requires the file morpheus_mp5.mdl to be installed. If you look at the install path in the WinZip window, you will see that the model must be placed in ROOTFOLDER\cstrike\models\shmod\. Place morpheus_mp5.mdl in that directory, and your hero is ready to go. You can stop reading now.

So there was no Path listed, huh? Ok well go find some Excedrin, €˜cause this might get confusing. At the beginning of this tutorial, I told you that the SMA file is the scripter's code. You are going to have to find out where the scripter wanted the custom model or sound file to be placed. Open the SMA file using WordPad. You will see the SmallC code which dictates how the hero is to operate. The model's path might be included at the top of the SMA in a commented section, but that is probably not the case. You are going to have to find the precache function. The precache function tells your client to load the file in their memory. If the client doesn't have the required file, the precache function tells his computer to download it from your server. To locate the precache function, go to Edit > Find. In the Find dialog, type precache and click Find Next. Your computer should jump to the line that reads:

public plugin_precache()

This is the precache function's declaration. Below it you should see something like:

precache_model("models/shmod/custom_model.mdl")
or
precache_sound("shmod/custom_sound.wav")

These lines tell you what directory the files need to go in. For this hero, custom_model.mdl goes in ROOTFOLDER/cstrike/models/shmod/, and custom_sound.wav goes in ROOTFOLDER/cstrike/sound/shmod/.
Go try it out!

Now, if you would like to customize your new hero's configuration variables (change its level setting, damage, etc.), open up its SMA. You will find a function near the top called plugin_init(); if you don't see it, do a search for init. This is the code that initializes the hero and defaults its settings. In this function you will find lines beginning with the register_cvar command.
e.g.
register_cvar("heroname_level", "8" )
register_cvar("heroname_damagemult", "0.75" )
In this example heroname_level and heroname_damagemult are two of the hero's cvars. 8 and .75 are their respective default values.

To modify the hero's level, copy the level cvar heroname_level, and paste it in the superhero config file, shconfig.cfg. The location of shconfig.cfg depends on your version of AMX. For AMX9.8, it is located in ROOTFOLDER\cstrike\addons\amx\. If you installed AMX9.9, try ROOTFOLDER\cstrike\addons\amx\config\shero\. AMXMODX people should find it in ROOTFOLDER\cstrike\addons\amxmodx\configs\. The cvars should be set to your custom value. This is what a set of cvars should look like:
//Heroname
heroname_level 7
heroname_damagemult 1.25
The // before Heroname keep AMX from trying to read that line, this is what people mean when they tell you to comment out a line. With the new cvars in your shconfig.cfg file, the hero will be available at level 7 and their weapons will do 25 percent more damage.
Save shconfig.cfg and restart your server. Good luck!

jtp10181 02-12-2005 00:59

AWESOME! Nice work! When I get time I will definatly use this in a new page for the documentation.

Rippah 02-12-2005 09:18

pictures?

kanu | DarkPredator 02-12-2005 16:26

pictures of what? how to type and click?

imported_FireWalker877 02-13-2005 18:02

If you have to use pictures to install a superhero, you shouldn't even be trying to run a server. 8)

Botamis 02-14-2005 18:13

I tried to add MasterChief. I'm almost sure I'm using amxx and i followed those instructions until where it said to open plugins.ini and all mine says is.

Code:

; AMX Mod X plugins

; Admin Base - Always one has to be activated
admin.amxx                ; admin base (required for any admin-related)
;admin_sql.amxx                ; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx                ; basic admin console commands
adminhelp.amxx                ; help command for admin console commands
adminslots.amxx                ; slot reservation
multilingual.amxx        ; Multi-Lingual management

; Menus
menufront.amxx                ; front-end for admin menus
cmdmenu.amxx                ; command menu (speech, settings)
plmenu.amxx                ; players menu (kick, ban, client cmds.)
;telemenu.amxx                ; teleport menu (Fun Module required!)
mapsmenu.amxx                ; maps menu (vote, changelevel)

; Chat / Messages
adminchat.amxx                ; console chat commands
antiflood.amxx                ; prevent clients from chat-flooding the server
scrollmsg.amxx                ; displays a scrolling message
imessage.amxx                ; displays information messages
adminvote.amxx                ; vote commands

; Map related
nextmap.amxx                ; displays next map in mapcycle
mapchooser.amxx                ; allows to vote for next map
timeleft.amxx                ; displays time left on map

; Configuration
pausecfg.amxx                ; allows to pause and unpause some plugins
statscfg.amxx                ; allows to manage stats plugins via menu and commands

; Counter-Strike
;restmenu.amxx                ; restrict weapons menu
;statsx.amxx                ; stats on death or round end (CSX Module required!)
;miscstats.amxx                ; bunch of events announcement for Counter-Strike
;stats_logging.amxx        ; weapons stats logging (CSX Module required!)


; Custom - Add 3rd party plugins here

Anyone know what's going on?
-Botamis

kanu | DarkPredator 02-14-2005 18:34

if that is your plugins.ini file, then superhero mod and all of the heros will not work
do they work for you? does anything?

if superheroes do work, that is the wrong file

bLiNd 02-14-2005 18:37

next time read.... - http://shero.rocks-hideout.com/docs/install_amxx.htm

(_msv)dakilla(_msv) 02-15-2005 13:44

wow that really nice work thats was better then mine

Botamis 02-15-2005 14:03

I did that. I put masterchief in there(he is the hero I wanted to add). First off, when I change things in files it rarely changes my server or the hero. Here is my idea. I wanted to have a lan listen server that has all hero's at level 0 and have 20 total levels. I've tried so hard to get it to work but everything I do doesn't change it at all.

-Botamis


All times are GMT -4. The time now is 01:11.

Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.