Доброго времени суток.
У меня такой вопрос, как сделать в РунУо что б персонаж не проваливался под землю, в файле MapDefinitions.cs в строках:
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0 и
MultiComponentList.PostHSFormat = true; // OSI Client Patch 7.0.9.0
true, false и там и там пробовал менять ничего не получается. Продавцы тоже все под землей.
Кто сможет подсказать в чем проблема?
DataPath.cs
using System;
using System.IO;
using Microsoft.Win32;
using Server;
namespace Server.Misc
{
public class DataPath
{
/* If you have not installed Ultima Online,
* or wish the server to use a separate set of datafiles,
* change the 'CustomPath' value.
* Example:
* private static string CustomPath = @"D:\games\Electronic Arts\Ultima Online Classic";
*/
private static string CustomPath = @"D:\games\Electronic Arts\Ultima Online Classic";
/* The following is a list of files which a required for proper execution:
*
* Multi.idx
* Multi.mul
* VerData.mul
* TileData.mul
* Map*.mul or Map*LegacyMUL.uop
* StaIdx*.mul
* Statics*.mul
* MapDif*.mul
* MapDifL*.mul
* StaDif*.mul
* StaDifL*.mul
* StaDifI*.mul
*/
public static void Configure()
{
string pathUO = GetPath( @"Origin Worlds Online\Ultima Online\1.0", "ExePath" );
string pathTD = GetPath( @"Origin Worlds Online\Ultima Online Third Dawn\1.0", "ExePath" ); //These refer to 2D & 3D, not the Third Dawn expansion
string pathKR = GetPath( @"Origin Worlds Online\Ultima Online\KR Legacy Beta", "ExePath" ); //After KR, This is the new registry key for the 2D client
string pathSA = GetPath( @"Electronic Arts\EA Games\Ultima Online Stygian Abyss Classic", "InstallDir" );
string pathHS = GetPath( @"Electronic Arts\EA Games\Ultima Online Classic", "InstallDir" );
if ( CustomPath != null )
Core.DataDirectories.Add( CustomPath );
if ( pathUO != null )
Core.DataDirectories.Add( pathUO );
if ( pathTD != null )
Core.DataDirectories.Add( pathTD );
if ( pathKR != null )
Core.DataDirectories.Add( pathKR );
if ( pathSA != null )
Core.DataDirectories.Add( pathSA );
if ( pathHS != null )
Core.DataDirectories.Add( pathHS );
if ( Core.DataDirectories.Count == 0 && !Core.Service )
{
Console.WriteLine( "Enter the Ultima Online directory:" );
Console.Write( "> " );
Core.DataDirectories.Add( Console.ReadLine() );
}
}
private static string GetPath( string subName, string keyName )
{
try
{
string keyString;
if( Core.Is64Bit )
keyString = @"SOFTWARE\Wow6432Node\{0}";
else
keyString = @"SOFTWARE\{0}";
using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) )
{
if( key == null )
return null;
string v = key.GetValue( keyName ) as string;
if( String.IsNullOrEmpty( v ) )
return null;
if ( keyName == "InstallDir" )
v = v + @"\";
v = Path.GetDirectoryName( v );
if ( String.IsNullOrEmpty( v ) )
return null;
return v;
}
}
catch
{
return null;
}
}
}
}
MapDefinitions.cs
using System;
using Server;
namespace Server.Misc
{
public class MapDefinitions
{
public static void Configure()
{
/* Here we configure all maps. Some notes:
*
* 1) The first 32 maps are reserved for core use.
* 2) Map 0x7F is reserved for core use.
* 3) Map 0xFF is reserved for core use.
* 4) Changing or removing any predefined maps may cause server instability.
*/
RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules );
RegisterMap( 1, 1, 1, 7168, 4096, 0, "Trammel", MapRules.TrammelRules );
RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.TrammelRules );
RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas", MapRules.TrammelRules );
RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.TrammelRules );
RegisterMap( 5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.TrammelRules );
RegisterMap( 0x7F, 0x7F, 0x7F, Map.SectorSize, Map.SectorSize, 1, "Internal", MapRules.Internal );
/* Example of registering a custom map:
* RegisterMap( 32, 0, 0, 6144, 4096, 3, "Iceland", MapRules.FeluccaRules );
*
* Defined:
* RegisterMap( <index>, <mapID>, <fileIndex>, <width>, <height>, <season>, <name>, <rules> );
* - <index> : An unreserved unique index for this map
* - <mapID> : An identification number used in client communications. For any visible maps, this value must be from 0-5
* - <fileIndex> : A file identification number. For any visible maps, this value must be from 0-5
* - <width>, <height> : Size of the map (in tiles)
* - <season> : Season of the map. 0 = Spring, 1 = Summer, 2 = Fall, 3 = Winter, 4 = Desolation
* - <name> : Reference name for the map, used in props gump, get/set commands, region loading, etc
* - <rules> : Rules and restrictions associated with the map. See documentation for details
*/
TileMatrixPatch.Enabled = true; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
}
public static void RegisterMap( int mapIndex, int mapID, int fileIndex, int width, int height, int season, string name, MapRules rules )
{
Map newMap = new Map( mapID, mapIndex, fileIndex, width, height, season, name, rules );
Map.Maps[mapIndex] = newMap;
Map.AllMaps.Add( newMap );
}
}
}
ЭЭэээ...
Берем клиент игры. Берем ранку. В файле DataPath.cfg указываем путь до фалов игры. Играем и не проваливаемся никуда.
Работает на 6-7.30 клиентах.
Какая версия клиента используется для входа на сервер?
Для клиентов выше 7.0.9 версии необходимо включить PostHSFormat, а MatrixPatch отключить:
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = true; // OSI Client Patch 7.0.9.0
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = true; // OSI Client Patch 7.0.9.0
БЛИН !!! тема не закрыта, кто может направить на путь истинный уже пробовал менять в DataPath по разному с true на false и наоборот и так и сяк (и с бубеном плясал во круг компа) все равно на сервере все под землей и я проваливаюсь, почему это происходит ведь раньше все РАБОТАЛО достаточно было только в DataPath поменять в каких то строках true на false или на оборот и все норм так что ж щас произошло что еще и где нужно изменить или может клиент надо подобрать нормальный (клиент использую UOML версия 4.0.11с), путь к игре прописан в DataPath, RunUO2.3r987_Full
DataPath.cs
using System;
using System.IO;
using Microsoft.Win32;
using Server;
namespace Server.Misc
{
public class DataPath
{
/* If you have not installed Ultima Online,
* or wish the server to use a separate set of datafiles,
* change the 'CustomPath' value.
* Example:
* private static string CustomPath = @"C:\UO";
*/
private static string CustomPath = @"C:\UO";
/* The following is a list of files which a required for proper execution:
*
* Multi.idx
* Multi.mul
* VerData.mul
* TileData.mul
* Map*.mul or Map*LegacyMUL.uop
* StaIdx*.mul
* Statics*.mul
* MapDif*.mul
* MapDifL*.mul
* StaDif*.mul
* StaDifL*.mul
* StaDifI*.mul
*/
public static void Configure()
{
string pathUO = GetPath( @"Origin Worlds Online\Ultima Online\1.0", "ExePath" );
string pathTD = GetPath( @"Origin Worlds Online\Ultima Online Third Dawn\1.0", "ExePath" ); //These refer to 2D & 3D, not the Third Dawn expansion
string pathKR = GetPath( @"Origin Worlds Online\Ultima Online\KR Legacy Beta", "ExePath" ); //After KR, This is the new registry key for the 2D client
string pathSA = GetPath( @"Electronic Arts\EA Games\Ultima Online Stygian Abyss Classic", "InstallDir" );
string pathHS = GetPath( @"Electronic Arts\EA Games\Ultima Online Classic", "InstallDir" );
if ( CustomPath != null )
Core.DataDirectories.Add( CustomPath );
if ( pathUO != null )
Core.DataDirectories.Add( pathUO );
if ( pathTD != null )
Core.DataDirectories.Add( pathTD );
if ( pathKR != null )
Core.DataDirectories.Add( pathKR );
if ( pathSA != null )
Core.DataDirectories.Add( pathSA );
if ( pathHS != null )
Core.DataDirectories.Add( pathHS );
if ( Core.DataDirectories.Count == 0 && !Core.Service )
{
Console.WriteLine( "Enter the Ultima Online directory:" );
Console.Write( "> " );
Core.DataDirectories.Add( Console.ReadLine() );
}
}
private static string GetPath( string subName, string keyName )
{
try
{
string keyString;
if( Core.Is64Bit )
keyString = @"SOFTWARE\Wow6432Node\{0}";
else
keyString = @"SOFTWARE\{0}";
using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) )
{
if( key == null )
return null;
string v = key.GetValue( keyName ) as string;
if( String.IsNullOrEmpty( v ) )
return null;
if ( keyName == "InstallDir" )
v = v + @"\";
v = Path.GetDirectoryName( v );
if ( String.IsNullOrEmpty( v ) )
return null;
return v;
}
}
catch
{
return null;
}
}
}
}
MapDefinitions.cs
using System;
using Server;
namespace Server.Misc
{
public class MapDefinitions
{
public static void Configure()
{
/* Here we configure all maps. Some notes:
*
* 1) The first 32 maps are reserved for core use.
* 2) Map 0x7F is reserved for core use.
* 3) Map 0xFF is reserved for core use.
* 4) Changing or removing any predefined maps may cause server instability.
*/
RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules );
RegisterMap( 1, 1, 1, 7168, 4096, 0, "Trammel", MapRules.TrammelRules );
RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.TrammelRules );
RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas", MapRules.TrammelRules );
RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.TrammelRules );
RegisterMap( 5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.TrammelRules );
RegisterMap( 0x7F, 0x7F, 0x7F, Map.SectorSize, Map.SectorSize, 1, "Internal", MapRules.Internal );
/* Example of registering a custom map:
* RegisterMap( 32, 0, 0, 6144, 4096, 3, "Iceland", MapRules.FeluccaRules );
*
* Defined:
* RegisterMap( <index>, <mapID>, <fileIndex>, <width>, <height>, <season>, <name>, <rules> );
* - <index> : An unreserved unique index for this map
* - <mapID> : An identification number used in client communications. For any visible maps, this value must be from 0-5
* - <fileIndex> : A file identification number. For any visible maps, this value must be from 0-5
* - <width>, <height> : Size of the map (in tiles)
* - <season> : Season of the map. 0 = Spring, 1 = Summer, 2 = Fall, 3 = Winter, 4 = Desolation
* - <name> : Reference name for the map, used in props gump, get/set commands, region loading, etc
* - <rules> : Rules and restrictions associated with the map. See documentation for details
*/
TileMatrixPatch.Enabled = true; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = true; // OSI Client Patch 7.0.9.0
}
public static void RegisterMap( int mapIndex, int mapID, int fileIndex, int width, int height, int season, string name, MapRules rules )
{
Map newMap = new Map( mapID, mapIndex, fileIndex, width, height, season, name, rules );
Map.Maps[mapIndex] = newMap;
Map.AllMaps.Add( newMap );
}
Подскажите кто разбирается ???
Попробуй удалить эти строчки:
if ( pathUO != null )
Core.DataDirectories.Add( pathUO );
if ( pathTD != null )
Core.DataDirectories.Add( pathTD );
if ( pathKR != null )
Core.DataDirectories.Add( pathKR );
if ( pathSA != null )
Core.DataDirectories.Add( pathSA );
if ( pathHS != null )
Core.DataDirectories.Add( pathHS );
if ( Core.DataDirectories.Count == 0 && !Core.Service )
{
Console.WriteLine( "Enter the Ultima Online directory:" );
Console.Write( "> " );
Core.DataDirectories.Add( Console.ReadLine() );
}
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
if ( pathUO != null )
Core.DataDirectories.Add( pathUO );
if ( pathTD != null )
Core.DataDirectories.Add( pathTD );
if ( pathKR != null )
Core.DataDirectories.Add( pathKR );
if ( pathSA != null )
Core.DataDirectories.Add( pathSA );
if ( pathHS != null )
Core.DataDirectories.Add( pathHS );
if ( Core.DataDirectories.Count == 0 && !Core.Service )
{
Console.WriteLine( "Enter the Ultima Online directory:" );
Console.Write( "> " );
Core.DataDirectories.Add( Console.ReadLine() );
}
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
1) Удостоверься, что сервер работает на том же клиенте, с которого ты входишь в игру.
2) Удостоверься, что ты правишь скрипты того же сервера, который в последующем и запускаешь.
3) Удостоверься, что свои правки ты сохранил, скомпилировал и перезапустил сервер.
4) Если ты запускаешь сервер на клиенте выше 7.0.9й версии, то меняй строки в MapDefinition.cs следующим образом:
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = true; // OSI Client Patch 7.0.9.0
TileMatrixPatch.Enabled = true; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = true; // OSI Client Patch 7.0.9.0
TileMatrixPatch.Enabled = true; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
клиент использую UO version 4.0.11с RunUO2.3r987_Full, все проверил перепроверил несколько раз ВСЕпо пунктам , раньше тоже запускал раз сто и норм было щас правлю файл DataPath(вписываю путь к игре) и в MapDefinitions в обоих строках меняю на false так как клиент ниже 6-го и повторно опять же проверяю перепроверяю все как в выложенных подсказках
ВОТ ПОВТОРНО СОДЕРЖИМОЕ ФАЙЛОВ DataPath и MapDefinitions
DataPath
using System;
using System.IO;
using Microsoft.Win32;
using Server;
namespace Server.Misc
{
public class DataPath
{
/* If you have not installed Ultima Online,
* or wish the server to use a separate set of datafiles,
* change the 'CustomPath' value.
* Example:
* private static string CustomPath = @"C:\UOML";
*/
private static string CustomPath = @"C:\UOML";
/* The following is a list of files which a required for proper execution:
*
* Multi.idx
* Multi.mul
* VerData.mul
* TileData.mul
* Map*.mul or Map*LegacyMUL.uop
* StaIdx*.mul
* Statics*.mul
* MapDif*.mul
* MapDifL*.mul
* StaDif*.mul
* StaDifL*.mul
* StaDifI*.mul
*/
public static void Configure()
{
string pathUO = GetPath( @"Origin Worlds Online\Ultima Online\1.0", "ExePath" );
string pathTD = GetPath( @"Origin Worlds Online\Ultima Online Third Dawn\1.0", "ExePath" ); //These refer to 2D & 3D, not the Third Dawn expansion
string pathKR = GetPath( @"Origin Worlds Online\Ultima Online\KR Legacy Beta", "ExePath" ); //After KR, This is the new registry key for the 2D client
string pathSA = GetPath( @"Electronic Arts\EA Games\Ultima Online Stygian Abyss Classic", "InstallDir" );
string pathHS = GetPath( @"Electronic Arts\EA Games\Ultima Online Classic", "InstallDir" );
if ( CustomPath != null )
Core.DataDirectories.Add( CustomPath );
}
private static string GetPath( string subName, string keyName )
{
try
{
string keyString;
if( Core.Is64Bit )
keyString = @"SOFTWARE\Wow6432Node\{0}";
else
keyString = @"SOFTWARE\{0}";
using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) )
{
if( key == null )
return null;
string v = key.GetValue( keyName ) as string;
if( String.IsNullOrEmpty( v ) )
return null;
if ( keyName == "InstallDir" )
v = v + @"\";
v = Path.GetDirectoryName( v );
if ( String.IsNullOrEmpty( v ) )
return null;
return v;
}
}
catch
{
return null;
}
}
}
}
MapDefinitions
using System;
using Server;
namespace Server.Misc
{
public class MapDefinitions
{
public static void Configure()
{
/* Here we configure all maps. Some notes:
*
* 1) The first 32 maps are reserved for core use.
* 2) Map 0x7F is reserved for core use.
* 3) Map 0xFF is reserved for core use.
* 4) Changing or removing any predefined maps may cause server instability.
*/
RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules );
RegisterMap( 1, 1, 1, 7168, 4096, 0, "Trammel", MapRules.TrammelRules );
RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.TrammelRules );
RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas", MapRules.TrammelRules );
RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.TrammelRules );
RegisterMap( 5, 5, 5, 1280, 4096, 1, "TerMur", MapRules.TrammelRules );
RegisterMap( 0x7F, 0x7F, 0x7F, Map.SectorSize, Map.SectorSize, 1, "Internal", MapRules.Internal );
/* Example of registering a custom map:
* RegisterMap( 32, 0, 0, 6144, 4096, 3, "Iceland", MapRules.FeluccaRules );
*
* Defined:
* RegisterMap( <index>, <mapID>, <fileIndex>, <width>, <height>, <season>, <name>, <rules> );
* - <index> : An unreserved unique index for this map
* - <mapID> : An identification number used in client communications. For any visible maps, this value must be from 0-5
* - <fileIndex> : A file identification number. For any visible maps, this value must be from 0-5
* - <width>, <height> : Size of the map (in tiles)
* - <season> : Season of the map. 0 = Spring, 1 = Summer, 2 = Fall, 3 = Winter, 4 = Desolation
* - <name> : Reference name for the map, used in props gump, get/set commands, region loading, etc
* - <rules> : Rules and restrictions associated with the map. See documentation for details
*/
TileMatrixPatch.Enabled = false; // OSI Client Patch 6.0.0.0
MultiComponentList.PostHSFormat = false; // OSI Client Patch 7.0.9.0
}
public static void RegisterMap( int mapIndex, int mapID, int fileIndex, int width, int height, int season, string name, MapRules rules )
{
Map newMap = new Map( mapID, mapIndex, fileIndex, width, height, season, name, rules );
Map.Maps[mapIndex] = newMap;
Map.AllMaps.Add( newMap );
}
}
}
кто то советовал удалить с DataPath эти строки:
if ( pathUO != null )
Core.DataDirectories.Add( pathUO );
if ( pathTD != null )
Core.DataDirectories.Add( pathTD );
if ( pathKR != null )
Core.DataDirectories.Add( pathKR );
if ( pathSA != null )
Core.DataDirectories.Add( pathSA );
if ( pathHS != null )
Core.DataDirectories.Add( pathHS );
if ( Core.DataDirectories.Count == 0 && !Core.Service )
{
Console.WriteLine( "Enter the Ultima Online directory:" );
Console.Write( "> " );
Core.DataDirectories.Add( Console.ReadLine() );
}
тоже не помогает, что я тут мог упустить менял только путь к игре и с true на false все больше ни чего не трогал.
Зайди в TileMatrix.cs, найди там эту строку:
https://github.com/runuo/runuo/blob/d038571b412188c2f4416f29846f11275c1e7bcb/Server/TileMatrix.cs#L172
В неё вставь Console.Writeline(mapPath);
И при загрузке сервера смотри откуда он файлы будет брать.
А те строки что тебя Soteric попросил удалить, пока не добавляй.
При этом скомпилируй весь сервер в студии сперва, сделав Build, а потом уже запускай RunUO.exe предварительно заменив его в корне из папки тем что только что собрал, он будет находится в bin/Release(если у тебя релиз билд, либо bin/Debug, если дебаг билд )
Потому что этот файл является частью ядра, нужно сперва его скомпилировать что-бы изменение вступило в силу.
Русская версия Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)