что такое metamod в css

Что такое метамод, установка metamod

Counter-strike входит в число самых популярных видеоигр, однако даже она со временем может надоесть. Именно поэтому, для этой игры постоянно выпускаются самые различные дополнения в виде модов, полезных модулей или же сборок. Чтобы не иметь никаких проблем с установкой всего этого, многие геймеры используют специальную программу, именуемую metamod, которая позволяет значительно упростить данный процесс.

Что такое metamod?

Metamod это специальный мод для серверов Контр-Страйк, который позволяет устанавливать различного рода расширения, то есть моды, модули и многое другое, максимально удобно и просто.

Важной особенностью, которой обладает Metamod, является то, что он позволяет устанавливать моды и расширения для Counter-strike, с которыми не работает стандартный мод данной игры. Таким образом, Metamod позволяет значительно расширить стандартные возможности как самой игры, так и сервера Counter-strike, что делает его очень хорошим выбором для всех владельцев серверов.

Выполняем установку Metamod

Если у вас есть собственный сервер для игры в Counter-strike и вы желаете максимально облегчить себе жизнь, то есть выполнять установку различных модулей и модов для Counter-strike без каких-либо проблем, тогда Metamod является отличным выбором для вас. Чтобы выполнить его установку необходимо произвести следующие действия:

— Первым делом, конечно же, необходимо скачать сам Metamod что лучше всего делать используя официальный сайт;

— В папке в которой лежит ваш сервер, должна быть папка с именем cstrike, её необходимо открыть и создать в ней другую папку, с именем addons;

— Когда папка будет создана, в ней следует создать ещё одну папку, назвав ей metamod;

— В папке с названием metamod, необходимо создать ещё одну папку, назвать которую стоит dlls, после чего перенести в эту папку файл с названием metamod.so, который вы скачали с официального сайта metamod;

— На этом шаге нужно быть максимально внимательным, так как здесь нам нужно будет заменить строку в файле с названием liblist.gam (файл можно найти в папке cstrike). Данный файл необходимо открыть в каком-либо текстовом редакторе, вполне подойдёт блокнот, после чего найти в нём строку следующего содержания:

Далее эту строку следует изменить на такую строку:

gamedll «dlls/mp.so» на строку gamedll «addons/metamod/dlls/metamod.so»;

— После выполнения необходимой замены строк, следует перейти в папку с именем metamod, в которой нужно создать специальный файл plugins.ini, который используется для указания путей для модов и модулей при их установке на сервер;

— Если всё описанное выше выполнено, то осуществляем перезапуск всего сервера;

— Далее необходимо проверить работает ли установленный только что metamod, вариантов того как это можно сделать хватает. Один из наиболее простых из них это ввести в консоли сервера команду meta list. В том случае, если команда срабатывает и выводит какую-либо информацию, значит metamod установлен правильно и его можно спокойно использовать по назначению, то есть устанавливать с его помощью всевозможные моды, модули и другие расширения для сервера или для самой игры.

Установка metamod модулей

После скачивания модуля или мода, который вы желаете использовать на своём сервере, вам нужно воспользоваться файлом plugins.ini, для указания путей к установленным модулям и модам, чтобы metamod смог их прочитать. Сам файл plugins.ini лежит в папке с названием metamod. В том случае, если в паке такого файла нет, вам стоит его создать.

После этого metamod получить доступ к этому модулю и сможет в полной мере его использовать.

Иногда возникает надобность проверить версию metamod, чтобы сделать это, необходимо воспользоваться консольной командой meta version, которая выводит в консоль необходимую информацию о версии используемого metamod.

Источник

Metamod:Source

Contents

Introduction

Metamod:Source is an API manager and interception handler that sits in between the Half-Life 2 Engine (Source) and a subsequent Game Modification (MOD). It can dynamically load «Metamod:Source Plugins», written in C++, to intercept, override, and hook Engine and GameDLL API interfaces. It also allows for inter-plugin communication. As a backend it contains SourceHook, a powerful library for safely manipulating virtual table hooks.

Where to Download

Metamod:Source is hosted on Source Forge or can be accessed via the Metamod:Source Home Page.

Naming Conventions

The name «SourceMM» is no longer used.

History

Metamod:Source is derived from the Metamod concept of intercepting calls between a game’s engine and mod library. While not based on the same code, the API is designed to be similar and familiar to Half-Life 1 programmers.

SourceMod Core1

Initially, the SourceMod project was started as the next-generation continuation of the AMX Mod X project. It was designed to be a meta-interface layer for inter-communicating plugins. However, as development continued, it was soon realized that the Valve Server Plugin interface would not be sufficient to provide proper engine access.

Pavol Marko (core1 developer) decided to add «SourceHook» to SourceMod core1. It was embedded as a large library for hooking specific virtual table functions. After multiple revisions (see SourceHook history), it became apparent that 1)SourceHook needed to be game and interface generic, and 2)SourceMod and SourceHook needed to be split into two separate projects. The logic behind this was that SourceHook needed to be a layer above Valve Server Plugins, in order to properly manage hooks with the least possibility of conflicts. Furthermore, SourceMod should be a plugin to the SourceHook interface, rather than managing it. This decision can be likened to Admin-Mod’s early decision to split into the first Metamod project.

SourceHook Finalized

After four major revisions, SourceHook was mature enough to be used in a production environment. While PM concentrated on fleshing out SourceHook, BAILOPAN and DS created the GameDLL wrapper portion.

Version 1.0

On May 6, 2005, Metamod:Source 1.0 was released with SourceHook v4.1 as a backend. GameDLL wrapping was achieved by providing the engine with fake copies of the IServerGame* interfaces. Once the true GameDLL location was known it would be loaded by Metamod:Source. The fake interface then directly wrapped calls to the real GameDLL.

Version 1.1

On October 21, 2005, the first major revision of Metamod:Source was released, featuring SourceHook v4.4, internal event listeners, dropped reliance on STL, and rewritten GameDLL hooking code. The Day of Defeat:Source release by Valve Software revealed that the binary interface between the engine and mod wasn’t necessarily public or current, and MM:S’s detection was improved for compatibility and speed. Furthermore, Metamod:Source stopped wrapping the GameDLL interfaces and began using SourceHook to hook them.

Version 1.2

On January 7th, 2006, Metamod:Source was updated for SourceHook v4.3, but received no major API changes.

Version 1.3

On August 16th, 2006, Metamod:Source was updated for SourceHook v4.4, minor API changes, bug fixes, and a sync to the latest HL2SDK.

Version 1.4

On April 5th, 2007, Metamod:Source was updated with API for Valve Server Plugin interface hooking and crash-safe user message enumeration. An experimental gameinfo.txt update tool was also added. No SourceHook changes were made in this release.

Version 1.6

Currently in development, Metamod:Source received a near complete overhaul to abstract engine-specific code to support Orange Box. Additionally, SourceHook received a massive overhaul and is now v5.0, adding global hooks and various major API simplifications. It is the first backwards compatibility break since 1.1.

Design Considerations

Metamod

Originally, Metamod:Source was a plugin co-existing with SourceMod. However, there are factories, pointers, and certain capabilities not possible from a Valve Server Plugin. Furthermore, the Half-Life 2 engine does not properly unload VSPs, making debugging and resource unloading more difficult. Eventually it was decided the added functionality and fine-tuned control outweighed the extra cost of having to configure an intercepting binary.

Plugins

Plugins are specific to Metamod:Source. This means that Valve Server Plugins and Metamod:Source Plugins are entirely separate in the API characteristics. While it is certainly possible to expose the necessary interfaces to VSPs, it creates an added layer of complexity for dealing with things that Metamod:Source might not directly control. For example, when a Metamod:Source plugin is removed at runtime, all of the necessary hooks are also removed. A VSP has no clear callback for detecting this event, therefore it would be more difficult to ensure proper unloading. VSP and MM:S plugins also have different ways of attaching and detaching server cvars and concmds.

By keeping the plugin system isolated, Metamod:Source can also provide a unique set of console commands and API. For example, plugins can listen for certain Metamod:Source-specific events and provide communication channels with other plugins.

Hooking

Metamod:Source is powered by SourceHook, a versatile library for hooking virtual functions. The original Half-Life 1 engine used structs of function pointers which could easily be modified as they passed from one library to another. However, HL2 is comprised almost entirely of pure virtual interfaces. SourceHook was designed for declaring single hooks against a given virtual function and a this pointer, which is not only faster than a blanket hooking system like Metamod’s, but more flexible and precise.

Hooking under Metamod:Source has a number of features that don’t exist in a hooking system style like Metamod’s, and it achieves something closer to detours, rather than Metamod, which is hardcoded. For example

Documentation

For more information on installing, configuring, and coding for Metamod:Source, see Documentation.

The Future

While Metamod:Source is a stable/production product, more features are on the horizon. There are distant plans for a detouring library and a library for efficiently automated signature scanning.

License

Metamod:Source is licensed under the zLib/libpng License. It is free to use for both open-source and proprietary projects.

Источник

Using Metamod

Client Commands

Metamod v1.17 2003/08/01
by Will Day
http://www.metamod.org/
compiled: Aug 4 2003, 22:43:33 Eastern (debugging)

Client Cvars

"metamod_version" is "1.17"

Installation

If you want to install Metamod by hand, here’s what you have to do:

If a directory you want doesn’t exist, create it.

gamedll "dlls/mp.dll" gamedll_linux "dlls/cs_i386.so" to: gamedll "addons/metamod/dlls/metamod.dll" gamedll_linux "addons/metamod/dlls/metamod_i386.so"

Configuration

File: plugins.ini

Plugins are described in a file «plugins.ini» and each line describes a plugin to load:

Also, the filepath (once expanded to full path name) is expected to be unique within the list of plugins. Thus, a plugin with a fullpathname matching that of a previous plugin is considered a duplicate, and is not loaded.

For instance, in "cstrike/addons/metamod/plugins.ini" these are all valid lines:

Note that order in the plugins.ini file is significant. Plugins are loaded and accessed in the order specified, so ordering can be important, depending on the plugin(s).

The game dll is auto-detected, along the same lines AdminMod operated (looking at the «gamedir»); see «mm_gamedll» below if you want to use a «bot» DLL.

You can override the name of this file by specifying it via the +localinfo field «mm_pluginsfile«.

For compatibility with previous versions, Metamod will also look for a file «metamod.ini» under the gamedir, ie «cstrike/metamod.ini«.

File: config.ini

This contains basic config information, at the moment duplicating most of the +localinfo variables, but allowing for more flexible expansion of config options in the future. Also, it provides somewhat more reliable options setting, since +localinfo munges some argument values (in particular, pathnames with leading dots, ie «../dlls/blah.dll»).

Fields are whitespace delimited (tabs/spaces). Comments are recognized at only the beginning of a line, and can be in either shell style («#«) or c++ style («//«). The following is a list of currently recognized options, their defaults, and examples of usage:

where is an integer, 0 and up.
Sets the initial debugging level for metamod (same as cvar «meta_debug»).
Default is normally 0. If hlds is run with «-dev», default is 3.
Overridden by: +localinfo mm_debug
Examples:
debuglevel 0
debuglevel 42

You can override the name of this file by specifying it via the +localinfo field «mm_configfile«.

File: exec.cfg

This is necessary for plugins that need to have settings specified prior to early API routines like ServerActivate, since autoexec.cfg is read too early and server.cfg is read to late. In particular, I found this necessary for the Trace plugin, in order to trace routines like RegUserMsg which are called during ServerActivate.

You can override the name of this file by specifying it via the +localinfo field «mm_execcfg«.

For compatibility with previous versions, Metamod will also look for a file «metaexec.cfg» under the gamedir, ie «cstrike/metaexec.cfg«.

File: metagame.ini

Commandline option: +localinfo

This replaces using the metagame.ini file. With previous versions of AdminMod (2.10 and earlier), this same functionality was provided by the file «admin.ini».

Note that each localinfo field can have only one value. If specified more than once on the command line, only the last one will be recognized. (In particular, trying to use mm_gamedll to load multiple dll-style bots will not work. In a case like that, the multiple dll’s must be chained together).

Note, paths should use unix-style forward slashes (/) and not backward slashes (\), even on windows platforms.

Commands

All console command functionality is provide by a single command «meta», with multiple sub-commands:

can be either the plugin index number, or a non-ambiguous prefix string matching description or file.

Also, a single cvar is available:

You could then do any of the following to unload the API Trace plugin:

Источник

Using Metamod

Client Commands

Metamod v1.21p37 2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://koti.mbnet.fi/axh/
compiled: Feb 18 2013, 11:53:27 EET (optimized)

Client Cvars

"metamod_version" is "1.21p37"

Installation

If a directory you want doesn’t exist, create it.

gamedll "dlls/mp.dll" gamedll_linux "dlls/cs.so" to: gamedll "addons/metamod/dlls/metamod.dll" gamedll_linux "addons/metamod/dlls/metamod.so"

Configuration

File: plugins.ini

Plugins are described in a file «plugins.ini» and each line describes a plugin to load:

Also, the filepath (once expanded to full path name) is expected to be unique within the list of plugins. Thus, a plugin with a fullpathname matching that of a previous plugin is considered a duplicate, and is not loaded.

For instance, in "cstrike/addons/metamod/plugins.ini" these are all valid lines:

Note that order in the plugins.ini file is significant. Plugins are loaded and accessed in the order specified, so ordering can be important, depending on the plugin(s).

The game dll is auto-detected, along the same lines AdminMod operated (looking at the «gamedir»); see «mm_gamedll» below if you want to use a «bot» DLL.

You can override the name of this file by specifying it via the +localinfo field «mm_pluginsfile«.

For compatibility with previous versions, Metamod will also look for a file «metamod.ini» under the gamedir, ie «cstrike/metamod.ini«.

File: config.ini

This contains basic config information, at the moment duplicating most of the +localinfo variables, but allowing for more flexible expansion of config options in the future. Also, it provides somewhat more reliable options setting, since +localinfo munges some argument values (in particular, pathnames with leading dots, ie «../dlls/blah.dll»).

Fields are whitespace delimited (tabs/spaces). Comments are recognized at only the beginning of a line, and can be in either shell style («#«) or c++ style («//«). The following is a list of currently recognized options, their defaults, and examples of usage:

where is an integer, 0 and up.
Sets the initial debugging level for metamod (same as cvar «meta_debug»).
Default is normally 0. If hlds is run with «-dev», default is 3.
Overridden by: +localinfo mm_debug
Examples:
debuglevel 0
debuglevel 42

Setting to disable or enable autodetection of gamedll. Extra feature for Metamod+All-Mod-Support Patch.
Default is «yes».
Overridden by: +localinfo mm_autodetect

Setting to disable or enable Metamod’s client commands, ‘meta list’ and ‘meta version’. Extra setting for Metamod+All-Mod-Support Patch.
Default is «yes».
Overridden by: +localinfomm_clientmeta

You can override the name of this file by specifying it via the +localinfo field «mm_configfile«.

File: exec.cfg

This is necessary for plugins that need to have settings specified prior to early API routines like ServerActivate, since autoexec.cfg is read too early and server.cfg is read to late. In particular, I found this necessary for the Trace plugin, in order to trace routines like RegUserMsg which are called during ServerActivate.

You can override the name of this file by specifying it via the +localinfo field «mm_execcfg«.

For compatibility with previous versions, Metamod will also look for a file «metaexec.cfg» under the gamedir, ie «cstrike/metaexec.cfg«.

file: metagame.ini

Commandline option: +localinfo

This replaces using the metagame.ini file. With previous versions of AdminMod (2.10 and earlier), this same functionality was provided by the file «admin.ini».

Note that each localinfo field can have only one value. If specified more than once on the command line, only the last one will be recognized. (In particular, trying to use mm_gamedll to load multiple dll-style bots will not work. In a case like that, the multiple dll’s must be chained together).

Note, paths should use unix-style forward slashes (/) and not backward slashes (\), even on windows platforms.

Commands

All console command functionality is provide by a single command «meta», with multiple sub-commands:

can be either the plugin index number, or a non-ambiguous prefix string matching description or file.

Also, a single cvar is available:

You could then do any of the following to unload the API Trace plugin:

Источник

Installing Metamod:Source

This article will guide you through a Metamod:Source installation.

Normal Installation

Valve sometimes makes changes in their games that break Metamod:Source between releases. When this happens, you may need to install a snapshot versions of Metamod:Source. You can see if this is required on the Required Versions page.

Custom VDF File

Metamod:Source 1.10.0 and later include a metamod.vdf file for easier installation on most games. If you have trouble getting it to load, go here to generate a VDF file specific to your game. This file should be placed into your server’s addons directory.

Known setups that require this step:

GameInfo

Metamod:Source 1.4.2 and lower used an older method for loading itself. The advantage of this method was that Metamod:Source could be loaded before the actual game mod, which gave it a small amount of extra functionality. This functionality was never used by plugin developers, and Steam updates kept overwriting gameinfo.txt files, so we switched to a different loading mechanism.

However this loading mechanism may still be desirable if you run into backwards compatibility issues, or you have a plugin which takes advantage of the early-loading mechanism. If this is your case, here are the gameinfo.txt directions below:

The gameinfo.txt loading method is supported as a legacy feature only. The patcher tool is no longer provided. You can mark gameinfo.txt if you absolutely want to protect it from being overwritten.

We will continue to make sure Metamod:Source can load via this method for as long as the Source Engine allows it. However, we will concentrate more on supporting the new loading mechanism for general use.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *