diff --git a/.hgtags b/.hgtags index e74d7ff4d..b2e9ddbcf 100644 --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,10 @@ a409552f83cb55a5c20f867fd7bcae1d0083d01a ryzomcore_0_8_0 0000000000000000000000000000000000000000 ryzomcore_0_8_0 0000000000000000000000000000000000000000 ryzomcore_0_8_0 4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore_0_8_0 +2e439cca8c3746df8ea64e1aab2d4d2ab9ca95d8 latest-default-graft +2e439cca8c3746df8ea64e1aab2d4d2ab9ca95d8 latest-default-graft +e4680cd1f1ce24747c4db73eeb4b107f6f6c45d4 latest-default-graft +e4680cd1f1ce24747c4db73eeb4b107f6f6c45d4 latest-default-graft +8162b598e9e233ce0886d3b8b41151f12a7bff01 latest-default-graft +8162b598e9e233ce0886d3b8b41151f12a7bff01 latest-default-graft +5f0b297fb908985504cef899469bfca9a9f9816c latest-default-graft diff --git a/code/CMakeModules/FindWindowsSDK.cmake b/code/CMakeModules/FindWindowsSDK.cmake index fd32d92b5..2e72af9e5 100644 --- a/code/CMakeModules/FindWindowsSDK.cmake +++ b/code/CMakeModules/FindWindowsSDK.cmake @@ -71,11 +71,14 @@ SET(WINSDKENV_DIR $ENV{WINSDK_DIR}) MACRO(FIND_WINSDK_VERSION_HEADERS) IF(WINSDK_DIR AND NOT WINSDK_VERSION) # Search version in headers - IF(EXISTS ${WINSDK_DIR}/include/Msi.h) - SET(_MSI_FILE ${WINSDK_DIR}/include/Msi.h) - ENDIF(EXISTS ${WINSDK_DIR}/include/Msi.h) + FIND_FILE(_MSI_FILE Msi.h + PATHS + ${WINSDK_DIR}/Include/um + ${WINSDK_DIR}/Include + ) IF(_MSI_FILE) + # Look for Windows SDK 8.0 FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN8") @@ -88,11 +91,11 @@ MACRO(FIND_WINSDK_VERSION_HEADERS) FILE(STRINGS ${_MSI_FILE} _CONTENT REGEX "^#ifndef NTDDI_WIN7") IF(_CONTENT) - IF(EXISTS ${WINSDK_DIR}/include/winsdkver.h) - SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/winsdkver.h) - ELSEIF(EXISTS ${WINSDK_DIR}/include/WinSDKVer.h) - SET(_WINSDKVER_FILE ${WINSDK_DIR}/include/WinSDKVer.h) - ENDIF(EXISTS ${WINSDK_DIR}/include/winsdkver.h) + FIND_FILE(_WINSDKVER_FILE winsdkver.h WinSDKVer.h + PATHS + ${WINSDK_DIR}/Include/um + ${WINSDK_DIR}/Include + ) IF(_WINSDKVER_FILE) # Load WinSDKVer.h content @@ -162,9 +165,13 @@ MACRO(USE_CURRENT_WINSDK) SET(WINSDK_VERSION_FULL "") # Use WINSDK environment variable - IF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h) - SET(WINSDK_DIR ${WINSDKENV_DIR}) - ENDIF(WINSDKENV_DIR AND EXISTS ${WINSDKENV_DIR}/include/Windows.h) + IF(WINSDKENV_DIR) + FIND_PATH(WINSDK_DIR Windows.h + HINTS + ${WINSDKENV_DIR}/Include/um + ${WINSDKENV_DIR}/Include + ) + ENDIF(WINSDKENV_DIR) # Use INCLUDE environment variable IF(NOT WINSDK_DIR AND WINSDKCURRENT_VERSION_INCLUDE) @@ -173,8 +180,8 @@ MACRO(USE_CURRENT_WINSDK) # Look for Windows.h because there are several paths IF(EXISTS ${_INCLUDE}/Windows.h) - STRING(REGEX REPLACE "/(include|INCLUDE|Include)" "" WINSDK_DIR ${_INCLUDE}) - MESSAGE(STATUS "Found Windows SDK environment variable in ${WINSDK_DIR}") + STRING(REGEX REPLACE "/(include|INCLUDE|Include)(.*)" "" WINSDK_DIR ${_INCLUDE}) + MESSAGE(STATUS "Found Windows SDK from include environment variable in ${WINSDK_DIR}") BREAK() ENDIF(EXISTS ${_INCLUDE}/Windows.h) ENDFOREACH(_INCLUDE) diff --git a/code/nel/include/nel/3d/stereo_display.h b/code/nel/include/nel/3d/stereo_display.h index 3b9c73b74..570a62739 100644 --- a/code/nel/include/nel/3d/stereo_display.h +++ b/code/nel/include/nel/3d/stereo_display.h @@ -60,6 +60,7 @@ public: { StereoDisplay, StereoHMD, + StereoNGHMD, }; enum TStereoDeviceLibrary diff --git a/code/nel/include/nel/3d/stereo_ng_hmd.h b/code/nel/include/nel/3d/stereo_ng_hmd.h new file mode 100644 index 000000000..1ab8ad144 --- /dev/null +++ b/code/nel/include/nel/3d/stereo_ng_hmd.h @@ -0,0 +1,62 @@ +/** + * \file stereo_ng_hmd.h + * \brief IStereoNGHMD + * \date 2014-04-01 10:53GMT + * \author Jan Boon (Kaetemi) + * IStereoNGHMD + */ + +/* + * Copyright (C) 2014 by authors + * + * This file is part of NL3D. + * NL3D is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * NL3D is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General + * Public License for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with NL3D. If not, see + * . + */ + +#ifndef NL3D_STEREO_NG_HMD_H +#define NL3D_STEREO_NG_HMD_H +#include + +// STL includes + +// NeL includes + +// Project includes +#include + +namespace NL3D { + +/** + * \brief IStereoNGHMD + * \date 2014-04-01 10:53GMT + * \author Jan Boon (Kaetemi) + * IStereoNGHMD + */ +class IStereoNGHMD : public IStereoHMD +{ +public: + IStereoNGHMD(); + virtual ~IStereoNGHMD(); + + /// Kill the player + virtual void killUser() const = 0; + +}; /* class IStereoNGHMD */ + +} /* namespace NL3D */ + +#endif /* #ifndef NL3D_STEREO_NG_HMD_H */ + +/* end of file */ diff --git a/code/nel/include/nel/gui/ctrl_base.h b/code/nel/include/nel/gui/ctrl_base.h index fe8d5ea60..28eeb2cd0 100644 --- a/code/nel/include/nel/gui/ctrl_base.h +++ b/code/nel/include/nel/gui/ctrl_base.h @@ -68,9 +68,7 @@ namespace NLGUI // special parse virtual bool parse(xmlNodePtr cur, CInterfaceGroup *parentGroup); - - /// Handle all events (implemented by derived classes) (return true to signal event handled) - virtual bool handleEvent (const NLGUI::CEventDescriptor &event); + bool handleEvent (const NLGUI::CEventDescriptor &event); virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; } diff --git a/code/nel/include/nel/gui/ctrl_text_button.h b/code/nel/include/nel/gui/ctrl_text_button.h index 2df1dee5d..183b6a65e 100644 --- a/code/nel/include/nel/gui/ctrl_text_button.h +++ b/code/nel/include/nel/gui/ctrl_text_button.h @@ -42,6 +42,7 @@ namespace NLGUI /// Constructor CCtrlTextButton(const TCtorParam ¶m); + ~CCtrlTextButton(); std::string getProperty( const std::string &name ) const; void setProperty( const std::string &name, const std::string &value ); @@ -123,6 +124,9 @@ namespace NLGUI REFLECT_LUA_METHOD("getViewText", luaGetViewText) REFLECT_EXPORT_END + void onRemoved(); + void onWidgetDeleted( CInterfaceElement *e ); + protected: enum {NumTexture= 3}; diff --git a/code/nel/include/nel/gui/editor_selection_watcher.h b/code/nel/include/nel/gui/editor_selection_watcher.h new file mode 100644 index 000000000..415f4f9db --- /dev/null +++ b/code/nel/include/nel/gui/editor_selection_watcher.h @@ -0,0 +1,30 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include + +namespace NLGUI +{ + /// Watches the currently selected GUI widget + class IEditorSelectionWatcher + { + public: + + /// Notifies the watcher about the change + virtual void selectionChanged( std::string &newSelection ) = 0; + }; +} + diff --git a/code/nel/include/nel/gui/interface_element.h b/code/nel/include/nel/gui/interface_element.h index 210c24b2e..764d165ef 100644 --- a/code/nel/include/nel/gui/interface_element.h +++ b/code/nel/include/nel/gui/interface_element.h @@ -70,6 +70,14 @@ namespace NLGUI { public: + /// Watches CInterfaceElement deletions + class IDeletionWatcher + { + public: + IDeletionWatcher(){} + virtual ~IDeletionWatcher(){} + virtual void onDeleted( const std::string &name ){} + }; enum EStrech { @@ -424,6 +432,8 @@ namespace NLGUI void drawHotSpot(THotSpot hs, NLMISC::CRGBA col); + void drawHighlight(); + // Returns 'true' if that element can be downcasted to a view virtual bool isView() const { return false; } @@ -473,6 +483,7 @@ namespace NLGUI bool isInGroup( CInterfaceGroup *group ); static void setEditorMode( bool b ){ editorMode = b; } + static bool getEditorMode(){ return editorMode; } void setEditorSelected( bool b ){ editorSelected = b; } bool isEditorSelected() const{ return editorSelected; } @@ -483,6 +494,19 @@ namespace NLGUI void setSerializable( bool b ){ serializable = b; } bool IsSerializable() const{ return serializable; } + /// Called when the widget is removed from it's parent group + virtual void onRemoved(){} + + /// Registers a deletion watcher + static void registerDeletionWatcher( IDeletionWatcher *watcher ); + + /// Unregisters a deletion watcher + static void unregisterDeletionWatcher( IDeletionWatcher *watcher ); + + /// Called when the widget is deleted, + /// so other widgets in the group can check if it belongs to them + virtual void onWidgetDeleted( CInterfaceElement *e ){} + protected: bool editorSelected; @@ -543,6 +567,11 @@ namespace NLGUI void parseSizeRef(const char *sizeRefStr, sint32 &sizeref, sint32 &sizeDivW, sint32 &sizeDivH); private: + /// Notifies the deletion watchers that this interface element is being deleted + void notifyDeletionWatchers(); + + static std::vector< IDeletionWatcher* > deletionWatchers; + //void snapSize(); bool serializable; diff --git a/code/nel/include/nel/gui/interface_group.h b/code/nel/include/nel/gui/interface_group.h index 61cdc2c9b..f72bc6f1f 100644 --- a/code/nel/include/nel/gui/interface_group.h +++ b/code/nel/include/nel/gui/interface_group.h @@ -322,6 +322,8 @@ namespace NLGUI // Return the current Depth, with no ZBias applied. float getDepthForZSort() const { return _DepthForZSort; } + void onWidgetDeleted( CInterfaceElement *e ); + protected: void makeNewClip (sint32 &oldClipX, sint32 &oldClipY, sint32 &oldClipW, sint32 &oldClipH); diff --git a/code/nel/include/nel/gui/interface_parser.h b/code/nel/include/nel/gui/interface_parser.h index eb602b8ca..2bf1df9a8 100644 --- a/code/nel/include/nel/gui/interface_parser.h +++ b/code/nel/include/nel/gui/interface_parser.h @@ -382,6 +382,7 @@ namespace NLGUI bool serializeProcs( xmlNodePtr parentNode ) const; bool serializePointerSettings( xmlNodePtr parentNode ) const; bool serializeKeySettings( xmlNodePtr parentNode ) const; + CViewBase* createClass( const std::string &name ); }; } diff --git a/code/nel/include/nel/gui/parser.h b/code/nel/include/nel/gui/parser.h index dc6d00767..db868f70d 100644 --- a/code/nel/include/nel/gui/parser.h +++ b/code/nel/include/nel/gui/parser.h @@ -27,6 +27,7 @@ namespace NLGUI { class CInterfaceElement; + class CViewBase; class CInterfaceGroup; class CInterfaceAnim; class CCtrlSheetSelection; @@ -86,6 +87,7 @@ namespace NLGUI virtual bool serializeProcs( xmlNodePtr parentNode ) const = 0; virtual bool serializePointerSettings( xmlNodePtr parentNode ) const = 0; virtual bool serializeKeySettings( xmlNodePtr parentNode ) const = 0; + virtual CViewBase* createClass( const std::string &name ) = 0; }; } diff --git a/code/nel/include/nel/gui/view_base.h b/code/nel/include/nel/gui/view_base.h index b7d2aceab..f64803720 100644 --- a/code/nel/include/nel/gui/view_base.h +++ b/code/nel/include/nel/gui/view_base.h @@ -25,6 +25,7 @@ namespace NLGUI { + class CEventDescriptor; class CViewBase : public CInterfaceElement { @@ -76,6 +77,9 @@ namespace NLGUI // special for mouse over : return true and fill the name of the cursor to display virtual bool getMouseOverShape(std::string &/* texName */, uint8 &/* rot */, NLMISC::CRGBA &/* col */) { return false; } + + /// Handle all events (implemented by derived classes) (return true to signal event handled) + virtual bool handleEvent (const NLGUI::CEventDescriptor &evnt); }; diff --git a/code/nel/include/nel/gui/widget_addition_watcher.h b/code/nel/include/nel/gui/widget_addition_watcher.h new file mode 100644 index 000000000..a2717e398 --- /dev/null +++ b/code/nel/include/nel/gui/widget_addition_watcher.h @@ -0,0 +1,32 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef WIDGET_ADD_WATCHER +#define WIDGET_ADD_WATCHER + +#include + +namespace NLGUI +{ + class IWidgetAdditionWatcher + { + public: + virtual void widgetAdded( const std::string &name ) = 0; + }; +} + +#endif + diff --git a/code/nel/include/nel/gui/widget_manager.h b/code/nel/include/nel/gui/widget_manager.h index 00723faea..5fd75ac8a 100644 --- a/code/nel/include/nel/gui/widget_manager.h +++ b/code/nel/include/nel/gui/widget_manager.h @@ -47,6 +47,8 @@ namespace NLGUI class CInterfaceOptions; class CInterfaceAnim; class CProcedure; + class IEditorSelectionWatcher; + class IWidgetAdditionWatcher; /** GUI Widget Manager @@ -341,6 +343,7 @@ namespace NLGUI /** * Capture */ + CViewBase *getCapturedView(){ return _CapturedView; } CCtrlBase *getCapturePointerLeft() { return _CapturePointerLeft; } CCtrlBase *getCapturePointerRight() { return _CapturePointerRight; } CCtrlBase *getCaptureKeyboard() { return _CaptureKeyboard; } @@ -484,7 +487,17 @@ namespace NLGUI IParser* getParser() const{ return parser; } + std::string& getCurrentEditorSelection(){ return currentEditorSelection; } void setCurrentEditorSelection( const std::string &name ); + void notifySelectionWatchers(); + void registerSelectionWatcher( IEditorSelectionWatcher *watcher ); + void unregisterSelectionWatcher( IEditorSelectionWatcher *watcher ); + + void notifyAdditionWatchers( const std::string &widgetName ); + void registerAdditionWatcher( IWidgetAdditionWatcher *watcher ); + void unregisterAdditionWatcher( IWidgetAdditionWatcher *watcher ); + + CInterfaceElement* addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName ); private: CWidgetManager(); @@ -511,6 +524,8 @@ namespace NLGUI NLMISC::CRefPtr _CapturePointerLeft; NLMISC::CRefPtr _CapturePointerRight; + NLMISC::CRefPtr< CViewBase > _CapturedView; + // What is under pointer std::vector< CViewBase* > _ViewsUnderPointer; std::vector< CCtrlBase* > _CtrlsUnderPointer; @@ -567,6 +582,9 @@ namespace NLGUI std::vector< INewScreenSizeHandler* > newScreenSizeHandlers; std::vector< IOnWidgetsDrawnHandler* > onWidgetsDrawnHandlers; + std::vector< IEditorSelectionWatcher* > selectionWatchers; + std::vector< IWidgetAdditionWatcher* > additionWatchers; + std::string currentEditorSelection; }; diff --git a/code/nel/src/3d/CMakeLists.txt b/code/nel/src/3d/CMakeLists.txt index fff343915..d614029f7 100644 --- a/code/nel/src/3d/CMakeLists.txt +++ b/code/nel/src/3d/CMakeLists.txt @@ -697,6 +697,8 @@ SOURCE_GROUP(Stereo FILES ../../include/nel/3d/stereo_display.h stereo_hmd.cpp ../../include/nel/3d/stereo_hmd.h + stereo_ng_hmd.cpp + ../../include/nel/3d/stereo_ng_hmd.h stereo_ovr.cpp stereo_ovr_fp.cpp ../../include/nel/3d/stereo_ovr.h diff --git a/code/nel/src/3d/mesh_multi_lod.cpp b/code/nel/src/3d/mesh_multi_lod.cpp index 2ddf0d2e0..e26632f6e 100644 --- a/code/nel/src/3d/mesh_multi_lod.cpp +++ b/code/nel/src/3d/mesh_multi_lod.cpp @@ -791,17 +791,20 @@ void CMeshMultiLod::compileCoarseMeshes() { slotRef.CoarseTriangles.resize(slotRef.CoarseNumTris * 3); TCoarseMeshIndexType *dstPtr= &slotRef.CoarseTriangles[0]; + uint totalTris = 0; for(uint i=0;igetNbRdrPass(0);i++) { const CIndexBuffer &pb= meshGeom->getRdrPassPrimitiveBlock(0, i); CIndexBufferRead ibaRead; pb.lock (ibaRead); uint numTris= pb.getNumIndexes()/3; + totalTris += numTris; if (pb.getFormat() == CIndexBuffer::Indices16) { if (sizeof(TCoarseMeshIndexType) == sizeof(uint16)) { memcpy(dstPtr, (uint16 *) ibaRead.getPtr(), numTris*3*sizeof(uint16)); + dstPtr+= numTris*3; } else { @@ -820,6 +823,7 @@ void CMeshMultiLod::compileCoarseMeshes() if (sizeof(TCoarseMeshIndexType) == sizeof(uint32)) { memcpy(dstPtr, (uint32 *) ibaRead.getPtr(), numTris*3*sizeof(uint32)); + dstPtr+= numTris*3; } else { @@ -836,8 +840,8 @@ void CMeshMultiLod::compileCoarseMeshes() } } } - dstPtr+= numTris*3; } + nlassert(totalTris == slotRef.CoarseNumTris); } } } diff --git a/code/nel/src/3d/stereo_ng_hmd.cpp b/code/nel/src/3d/stereo_ng_hmd.cpp new file mode 100644 index 000000000..1011b33e4 --- /dev/null +++ b/code/nel/src/3d/stereo_ng_hmd.cpp @@ -0,0 +1,55 @@ +/** + * \file stereo_hmd.cpp + * \brief IStereoNGHMD + * \date 2014-04-01 10:53GMT + * \author Jan Boon (Kaetemi) + * IStereoNGHMD + */ + +/* + * Copyright (C) 2014 by authors + * + * This file is part of NL3D. + * NL3D is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * NL3D is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General + * Public License for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with NL3D. If not, see + * . + */ + +#include +#include + +// STL includes + +// NeL includes +// #include + +// Project includes + +using namespace std; +// using namespace NLMISC; + +namespace NL3D { + +IStereoNGHMD::IStereoNGHMD() +{ + +} + +IStereoNGHMD::~IStereoNGHMD() +{ + +} + +} /* namespace NL3D */ + +/* end of file */ diff --git a/code/nel/src/gui/ctrl_base.cpp b/code/nel/src/gui/ctrl_base.cpp index 2cd289f90..f0a2c2f89 100644 --- a/code/nel/src/gui/ctrl_base.cpp +++ b/code/nel/src/gui/ctrl_base.cpp @@ -39,6 +39,9 @@ namespace NLGUI // *************************************************************************** bool CCtrlBase::handleEvent(const NLGUI::CEventDescriptor &event) { + if( CViewBase::handleEvent( event ) ) + return true; + if (event.getType() == NLGUI::CEventDescriptor::system) { NLGUI::CEventDescriptorSystem &eds = (NLGUI::CEventDescriptorSystem&)event; diff --git a/code/nel/src/gui/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp index cd4367f4e..4f118cd51 100644 --- a/code/nel/src/gui/ctrl_base_button.cpp +++ b/code/nel/src/gui/ctrl_base_button.cpp @@ -669,12 +669,6 @@ namespace NLGUI if (CWidgetManager::getInstance()->getCapturePointerLeft() != this) return false; - if( editorMode ) - { - CWidgetManager::getInstance()->setCurrentEditorSelection( getId() ); - return true; - } - if (_LeftDblClickHandled) // no effect on mouse up after double click has been handled { _LeftDblClickHandled = false; diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp index 3f30105cc..bc54003da 100644 --- a/code/nel/src/gui/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.cpp @@ -356,7 +356,7 @@ namespace NLGUI - if ( ( _Over && !editorMode ) || editorSelected ) + if ( ( _Over && !editorMode ) ) { if( !editorMode && (lastOver == false) && (_AHOnOver != NULL)) diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index ad0ba93aa..cdf006a51 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -62,6 +62,17 @@ namespace NLGUI _ForceTextOver = false; } + CCtrlTextButton::~CCtrlTextButton() + { + if( _ViewText != NULL ) + { + if( _Parent != NULL ) + _Parent->delView( _ViewText, true ); + delete _ViewText; + _ViewText = NULL; + } + } + std::string CCtrlTextButton::getProperty( const std::string &name ) const { std::string prop; @@ -113,7 +124,10 @@ namespace NLGUI else if( name == "hardtext" ) { - return _ViewText->getText().toString(); + if( _ViewText != NULL ) + return _ViewText->getText().toString(); + else + return std::string( "" ); } else if( name == "text_y" ) @@ -128,7 +142,10 @@ namespace NLGUI else if( name == "text_underlined" ) { - return toString( _ViewText->getUnderlined() ); + if( _ViewText != NULL ) + return toString( _ViewText->getUnderlined() ); + else + return std::string( "" ); } else if( name == "text_posref" ) @@ -220,6 +237,11 @@ namespace NLGUI _TextureIdNormal[ 0 ].setTexture( std::string( value + "_l.tga" ).c_str() ); _TextureIdNormal[ 1 ].setTexture( std::string( value + "_m.tga" ).c_str() ); _TextureIdNormal[ 2 ].setTexture( std::string( value + "_r.tga" ).c_str() ); + + CViewRenderer &rVR = *CViewRenderer::getInstance(); + rVR.getTextureSizeFromId(_TextureIdNormal[0], _BmpLeftW, _BmpH); + rVR.getTextureSizeFromId(_TextureIdNormal[1], _BmpMiddleW, _BmpH); + rVR.getTextureSizeFromId(_TextureIdNormal[2], _BmpRightW, _BmpH); return; } else @@ -269,7 +291,8 @@ namespace NLGUI else if( name == "hardtext" ) { - _ViewText->setText( value ); + if( _ViewText != NULL ) + _ViewText->setText( value ); return; } else @@ -292,8 +315,10 @@ namespace NLGUI if( name == "text_underlined" ) { bool b; - if( fromString( value, b ) ) - _ViewText->setUnderlined( b ); + if( _ViewText != NULL ) + if( fromString( value, b ) ) + _ViewText->setUnderlined( b ); + return; } else @@ -766,8 +791,7 @@ namespace NLGUI CCtrlBase *capturePointerLeft = CWidgetManager::getInstance()->getCapturePointerLeft(); // *** Draw Over - if( editorSelected || - ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) ) + if( ( !editorMode && _Over && (_OverWhenPushed || !(_Pushed || capturePointerLeft == this ) ) ) ) { if( !editorMode && (lastOver == false) && (_AHOnOver != NULL) ) @@ -803,32 +827,35 @@ namespace NLGUI } } // Setup ViewText color - if ( pTxId==_TextureIdNormal || editorMode ) + if( _ViewText != NULL ) { - if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A; - else viewTextColor= _TextColorNormal; - _ViewText->setColor(viewTextColor); - _ViewText->setShadowColor(_TextShadowColorNormal); - _ViewText->setModulateGlobalColor(_TextModulateGlobalColorNormal); + if ( pTxId==_TextureIdNormal || editorMode ) + { + if(_TextHeaderColor) viewTextColor.A= _TextColorNormal.A; + else viewTextColor= _TextColorNormal; + _ViewText->setColor(viewTextColor); + _ViewText->setShadowColor(_TextShadowColorNormal); + _ViewText->setModulateGlobalColor(_TextModulateGlobalColorNormal); + } + else if ( pTxId==_TextureIdPushed ) + { + if(_TextHeaderColor) viewTextColor.A= _TextColorPushed.A; + else viewTextColor= _TextColorPushed; + _ViewText->setColor(viewTextColor); + _ViewText->setShadowColor(_TextShadowColorPushed); + _ViewText->setModulateGlobalColor(_TextModulateGlobalColorPushed); + } + else if ( pTxId==_TextureIdOver ) + { + if(_TextHeaderColor) viewTextColor.A= _TextColorOver.A; + else viewTextColor= _TextColorOver; + _ViewText->setColor(viewTextColor); + _ViewText->setShadowColor(_TextShadowColorOver); + _ViewText->setModulateGlobalColor(_TextModulateGlobalColorOver); + } + if(getFrozen() && getFrozenHalfTone()) + _ViewText->setAlpha(_ViewText->getAlpha()>>2); } - else if ( pTxId==_TextureIdPushed ) - { - if(_TextHeaderColor) viewTextColor.A= _TextColorPushed.A; - else viewTextColor= _TextColorPushed; - _ViewText->setColor(viewTextColor); - _ViewText->setShadowColor(_TextShadowColorPushed); - _ViewText->setModulateGlobalColor(_TextModulateGlobalColorPushed); - } - else if ( pTxId==_TextureIdOver ) - { - if(_TextHeaderColor) viewTextColor.A= _TextColorOver.A; - else viewTextColor= _TextColorOver; - _ViewText->setColor(viewTextColor); - _ViewText->setShadowColor(_TextShadowColorOver); - _ViewText->setModulateGlobalColor(_TextModulateGlobalColorOver); - } - if(getFrozen() && getFrozenHalfTone()) - _ViewText->setAlpha(_ViewText->getAlpha()>>2); } @@ -864,6 +891,16 @@ namespace NLGUI { _Setuped= true; + if( _ViewText == NULL ) + { + CViewBase *v = CWidgetManager::getInstance()->getParser()->createClass( "text" ); + nlassert( v != NULL ); + _ViewText = dynamic_cast< CViewText* >( v ); + _ViewText->setId( _Id + "_text" ); + _ViewText->setText( ucstring( "text" ) ); + _ViewText->setSerializable( false ); + } + // setup the viewText and add to parent _ViewText->setParent (getParent()); _ViewText->setParentPos (this); @@ -960,6 +997,19 @@ namespace NLGUI } // *************************************************************************** + void CCtrlTextButton::onRemoved() + { + if( _ViewText != NULL ) + { + if( _Parent != NULL ) + _Parent->delView( _ViewText, true ); + } + } + void CCtrlTextButton::onWidgetDeleted( CInterfaceElement *e ) + { + if( e == _ViewText ) + _ViewText = NULL; + } } diff --git a/code/nel/src/gui/group_editbox.cpp b/code/nel/src/gui/group_editbox.cpp index 80540531b..751d9241b 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.cpp @@ -1417,7 +1417,8 @@ namespace NLGUI // ---------------------------------------------------------------------------- void CGroupEditBox::checkCoords() { - setupDisplayText(); + if( !editorMode ) + setupDisplayText(); CInterfaceGroup::checkCoords(); } @@ -1536,7 +1537,29 @@ namespace NLGUI _ViewText = dynamic_cast(CInterfaceGroup::getView("edit_text")); if(_ViewText == NULL) + { nlwarning("Interface: CGroupEditBox: text 'edit_text' missing or bad type"); + if( editorMode ) + { + nlwarning( "Trying to create a new 'edit_text' for %s", getId().c_str() ); + _ViewText = dynamic_cast< CViewText* >( CWidgetManager::getInstance()->getParser()->createClass( "text" ) ); + if( _ViewText != NULL ) + { + _ViewText->setParent( this ); + _ViewText->setIdRecurse( "edit_text" ); + _ViewText->setHardText( "sometext" ); + _ViewText->setPosRef( Hotspot_TL ); + _ViewText->setParentPosRef( Hotspot_TL ); + addView( _ViewText ); + + setH( _ViewText->getFontHeight() ); + setW( _ViewText->getFontWidth() * _ViewText->getText().size() ); + + } + else + nlwarning( "Failed to create new 'edit_text' for %s", getId().c_str() ); + } + } // For MultiLine editbox, clip the end space, else weird when edit space at end of line (nothing happens) if(_ViewText) diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index 2907df471..15f9cf812 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -34,6 +34,7 @@ using namespace NLMISC; namespace NLGUI { bool CInterfaceElement::editorMode = false; + std::vector< CInterfaceElement::IDeletionWatcher* > CInterfaceElement::deletionWatchers; // ------------------------------------------------------------------------------------------------ CInterfaceElement::~CInterfaceElement() @@ -46,6 +47,13 @@ namespace NLGUI } delete _Links; } + + if( editorMode ) + { + notifyDeletionWatchers(); + if( _Parent != NULL ) + _Parent->onWidgetDeleted( this ); + } } // ------------------------------------------------------------------------------------------------ @@ -1295,6 +1303,11 @@ namespace NLGUI } + void CInterfaceElement::drawHighlight() + { + CViewRenderer::getInstance()->drawWiredQuad( _XReal, _YReal, _WReal, _HReal ); + } + // *************************************************************************** void CInterfaceElement::invalidateContent() { @@ -1541,6 +1554,36 @@ namespace NLGUI } } + void CInterfaceElement::registerDeletionWatcher( IDeletionWatcher *watcher ) + { + std::vector< IDeletionWatcher* >::iterator itr + = std::find( deletionWatchers.begin(), deletionWatchers.end(), watcher ); + // Already registered + if( itr != deletionWatchers.end() ) + return; + deletionWatchers.push_back( watcher ); + } + + void CInterfaceElement::unregisterDeletionWatcher( IDeletionWatcher *watcher ) + { + std::vector< IDeletionWatcher* >::iterator itr + = std::find( deletionWatchers.begin(), deletionWatchers.end(), watcher ); + // Not registered + if( itr == deletionWatchers.end() ) + return; + deletionWatchers.erase( itr ); + } + + void CInterfaceElement::notifyDeletionWatchers() + { + std::vector< IDeletionWatcher* >::iterator itr = deletionWatchers.begin(); + while( itr != deletionWatchers.end() ) + { + (*itr)->onDeleted( _Id ); + ++itr; + } + } + CStringMapper* CStringShared::_UIStringMapper = NULL; diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index b2de26527..5fa83e1c5 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -143,12 +143,12 @@ namespace NLGUI // initStart = ryzomGetLocalTime (); clearGroups(); // nlinfo ("%d seconds for clearGroups '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); - // initStart = ryzomGetLocalTime (); - clearViews(); - // nlinfo ("%d seconds for clearViews '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); // initStart = ryzomGetLocalTime (); clearControls(); // nlinfo ("%d seconds for clearControls '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); + // initStart = ryzomGetLocalTime (); + clearViews(); + // nlinfo ("%d seconds for clearViews '%s'", (uint32)(ryzomGetLocalTime ()-initStart)/1000, _Id.c_str()); CWidgetManager::getInstance()->removeRefOnGroup (this); #ifdef AJM_DEBUG_TRACK_INTERFACE_GROUPS @@ -1086,9 +1086,11 @@ namespace NLGUI { if (_Views[i] == child) { - if (!dontDelete) delete _Views[i]; + CViewBase *v = _Views[i]; _Views.erase(_Views.begin()+i); delEltOrder (child); + child->onRemoved(); + if (!dontDelete) delete v; return true; } } @@ -1102,9 +1104,11 @@ namespace NLGUI { if (_Controls[i] == child) { - if (!dontDelete) delete _Controls[i]; + CCtrlBase *c = _Controls[i]; _Controls.erase(_Controls.begin()+i); delEltOrder (child); + child->onRemoved(); + if (!dontDelete) delete c; return true; } } @@ -1118,9 +1122,11 @@ namespace NLGUI { if (_ChildrenGroups[i] == child) { - if (!dontDelete) delete _ChildrenGroups[i]; + CInterfaceGroup *g = _ChildrenGroups[i]; _ChildrenGroups.erase(_ChildrenGroups.begin()+i); delEltOrder (child); + child->onRemoved(); + if (!dontDelete) delete g; return true; } } @@ -2471,4 +2477,16 @@ namespace NLGUI return "IMPLEMENT ME!"; } -} \ No newline at end of file + void CInterfaceGroup::onWidgetDeleted( CInterfaceElement *e ) + { + for( std::vector< CViewBase* >::iterator itr = _Views.begin(); itr != _Views.end(); ++itr ) + (*itr)->onWidgetDeleted( e ); + + for( std::vector< CCtrlBase* >::iterator itr = _Controls.begin(); itr != _Controls.end(); ++itr ) + (*itr)->onWidgetDeleted( e ); + + for( std::vector< CInterfaceGroup* >::iterator itr = _ChildrenGroups.begin(); itr != _ChildrenGroups.end(); ++itr ) + (*itr)->onWidgetDeleted( e ); + } +} + diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index 2bc1a70dd..3d7a1c849 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -3149,5 +3149,10 @@ namespace NLGUI return true; } + + CViewBase* CInterfaceParser::createClass( const std::string &name ) + { + return NLMISC_GET_FACTORY( CViewBase, std::string ).createObject( std::string( name ) , CViewBase::TCtorParam() ); + } } diff --git a/code/nel/src/gui/view_base.cpp b/code/nel/src/gui/view_base.cpp index a4c8f6643..05d958d3e 100644 --- a/code/nel/src/gui/view_base.cpp +++ b/code/nel/src/gui/view_base.cpp @@ -47,5 +47,23 @@ namespace NLGUI CInterfaceElement::visit(visitor); } + + bool CViewBase::handleEvent( const NLGUI::CEventDescriptor &evnt ) + { + if( evnt.getType() == NLGUI::CEventDescriptor::mouse ) + { + const NLGUI::CEventDescriptorMouse &eventDesc = ( const NLGUI::CEventDescriptorMouse& )evnt; + if( eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown ) + { + if( editorMode ) + { + CWidgetManager::getInstance()->setCurrentEditorSelection( getId() ); + return true; + } + } + } + return false; + } + } diff --git a/code/nel/src/gui/widget_manager.cpp b/code/nel/src/gui/widget_manager.cpp index ccfa14c63..16357d373 100644 --- a/code/nel/src/gui/widget_manager.cpp +++ b/code/nel/src/gui/widget_manager.cpp @@ -33,6 +33,8 @@ #include "nel/gui/proc.h" #include "nel/gui/interface_expr.h" #include "nel/gui/reflect_register.h" +#include "nel/gui/editor_selection_watcher.h" +#include "nel/gui/widget_addition_watcher.h" #include "nel/misc/events.h" namespace NLGUI @@ -1033,6 +1035,7 @@ namespace NLGUI _OldCaptureKeyboard = NULL; setCapturePointerLeft(NULL); setCapturePointerRight(NULL); + _CapturedView = NULL; resetColorProps(); resetAlphaRolloverSpeedProps(); @@ -2067,6 +2070,16 @@ namespace NLGUI getPointer()->draw (); } + if( CInterfaceElement::getEditorMode() ) + { + if( !currentEditorSelection.empty() ) + { + CInterfaceElement *e = getElementFromId( currentEditorSelection ); + if( e != NULL ) + e->drawHighlight(); + } + } + // flush layers CViewRenderer::getInstance()->flush(); @@ -2099,6 +2112,12 @@ namespace NLGUI getCapturePointerRight()->handleEvent( evnt ); setCapturePointerRight( NULL ); } + + if( _CapturedView != NULL ) + { + _CapturedView->handleEvent( evnt ); + _CapturedView = NULL; + } } } @@ -2262,6 +2281,9 @@ namespace NLGUI getCapturePointerLeft() != getCapturePointerRight() ) handled|= getCapturePointerRight()->handleEvent(evnt); + if( _CapturedView != NULL ) + _CapturedView->handleEvent( evnt ); + CInterfaceGroup *ptr = getWindowUnder (eventDesc.getX(), eventDesc.getY()); setCurrentWindowUnder( ptr ); @@ -2339,6 +2361,8 @@ namespace NLGUI } } + bool captured = false; + // must not capture a new element if a sheet is currentlty being dragged. // This may happen when alt-tab has been used => the sheet is dragged but the left button is up if (!CCtrlDraggable::getDraggedSheet()) @@ -2356,9 +2380,25 @@ namespace NLGUI { nMaxDepth = d; setCapturePointerLeft( ctrl ); + captured = true; } } } + + if( CInterfaceElement::getEditorMode() && !captured ) + { + for( sint32 i = _ViewsUnderPointer.size()-1; i >= 0; i-- ) + { + CViewBase *v = _ViewsUnderPointer[i]; + if( ( v != NULL ) && v->isInGroup( pNewCurrentWnd ) ) + { + _CapturedView = v; + captured = true; + break; + } + } + } + notifyElementCaptured( getCapturePointerLeft() ); if (clickedOutModalWindow && !clickedOutModalWindow->OnPostClickOut.empty()) { @@ -2366,13 +2406,16 @@ namespace NLGUI } } //if found - if ( getCapturePointerLeft() != NULL) + if ( captured ) { // consider clicking on a control implies handling of the event. handled= true; // handle the capture - getCapturePointerLeft()->handleEvent(evnt); + if( getCapturePointerLeft() != NULL ) + getCapturePointerLeft()->handleEvent(evnt); + else + _CapturedView->handleEvent( evnt ); } } @@ -2601,6 +2644,8 @@ namespace NLGUI // *************************************************************************** void CWidgetManager::setCapturePointerLeft(CCtrlBase *c) { + _CapturedView = NULL; + // additionally, abort any dragging if( CCtrlDraggable::getDraggedSheet() != NULL ) CCtrlDraggable::getDraggedSheet()->abortDragging(); @@ -3179,8 +3224,114 @@ namespace NLGUI prev->setEditorSelected( false ); } e->setEditorSelected( true ); - currentEditorSelection = name; } + else + if( !name.empty() ) + return; + + currentEditorSelection = name; + notifySelectionWatchers(); + } + + void CWidgetManager::notifySelectionWatchers() + { + std::vector< IEditorSelectionWatcher* >::iterator itr = selectionWatchers.begin(); + while( itr != selectionWatchers.end() ) + { + (*itr)->selectionChanged( currentEditorSelection ); + ++itr; + } + } + + void CWidgetManager::registerSelectionWatcher( IEditorSelectionWatcher *watcher ) + { + std::vector< IEditorSelectionWatcher* >::iterator itr = + std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher ); + + // We already have this watcher + if( itr != selectionWatchers.end() ) + return; + + selectionWatchers.push_back( watcher ); + } + + void CWidgetManager::unregisterSelectionWatcher( IEditorSelectionWatcher *watcher ) + { + std::vector< IEditorSelectionWatcher* >::iterator itr = + std::find( selectionWatchers.begin(), selectionWatchers.end(), watcher ); + + // We don't have this watcher + if( itr == selectionWatchers.end() ) + return; + + selectionWatchers.erase( itr ); + } + + void CWidgetManager::notifyAdditionWatchers( const std::string &widgetName ) + { + std::vector< IWidgetAdditionWatcher* >::const_iterator itr = additionWatchers.begin(); + while( itr != additionWatchers.end() ) + { + (*itr)->widgetAdded( widgetName ); + ++itr; + } + } + + void CWidgetManager::registerAdditionWatcher( IWidgetAdditionWatcher *watcher ) + { + std::vector< IWidgetAdditionWatcher* >::const_iterator itr + = std::find( additionWatchers.begin(), additionWatchers.end(), watcher ); + // already exists + if( itr != additionWatchers.end() ) + return; + + additionWatchers.push_back( watcher ); + } + + void CWidgetManager::unregisterAdditionWatcher( IWidgetAdditionWatcher *watcher ) + { + std::vector< IWidgetAdditionWatcher* >::iterator itr + = std::find( additionWatchers.begin(), additionWatchers.end(), watcher ); + // doesn't exist + if( itr == additionWatchers.end() ) + return; + + additionWatchers.erase( itr ); + } + + CInterfaceElement* CWidgetManager::addWidgetToGroup( std::string &group, std::string &widgetClass, std::string &widgetName ) + { + // Check if this group exists + CInterfaceElement *e = getElementFromId( group ); + if( e == NULL ) + return NULL; + CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( e ); + if( g == NULL ) + return NULL; + + // Check if an element already exists with that name + if( g->getElement( widgetName ) != NULL ) + return NULL; + + // Create and add the new widget + CViewBase *v = getParser()->createClass( widgetClass ); + if( v == NULL ) + return NULL; + + v->setId( std::string( g->getId() + ":" + widgetName ) ); + v->setParent( g ); + + if( v->isGroup() ) + g->addGroup( dynamic_cast< CInterfaceGroup* >( v ) ); + else + if( v->isCtrl() ) + g->addCtrl( dynamic_cast< CCtrlBase* >( v ) ); + else + g->addView( v ); + + notifyAdditionWatchers( v->getId() ); + + return v; } diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index d91193759..a1b1c7de8 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -31,10 +31,10 @@ #include "nel/misc/mutex.h" #include "nel/misc/report.h" #include "nel/misc/system_utils.h" +#include "nel/misc/variable.h" #include "nel/misc/debug.h" - #ifdef NL_OS_WINDOWS // these defines is for IsDebuggerPresent(). it'll not compile on windows 95 // just comment this and the IsDebuggerPresent to compile on windows 95 @@ -57,6 +57,8 @@ using namespace std; namespace NLMISC { +CVariable StdDisplayerColor("nel", "StdDisplayerColor", "Enable colors in std displayer", true, 0, true); + static const char *LogTypeToString[][8] = { { "", "ERR", "WRN", "INF", "DBG", "STT", "AST", "UKN" }, { "", "Error", "Warning", "Information", "Debug", "Statistic", "Assert", "Unknown" }, @@ -139,9 +141,20 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess bool needSpace = false; //stringstream ss; string str; +#ifdef NL_OS_UNIX + bool colorSet = false; +#endif if (args.LogType != CLog::LOG_NO) { +#ifdef NL_OS_UNIX + if (StdDisplayerColor.get()) + { + if (args.LogType == CLog::LOG_ERROR || args.LogType == CLog::LOG_ASSERT) { str += "\e[0;30m\e[41m"; colorSet = true; } // black text, red background + else if (args.LogType == CLog::LOG_WARNING) { str += "\e[0;91m"; colorSet = true; } // bright red text + else if (args.LogType == CLog::LOG_DEBUG) { str += "\e[0;34m"; colorSet = true; } // blue text + } +#endif //ss << logTypeToString(args.LogType); str += logTypeToString(args.LogType); needSpace = true; @@ -218,6 +231,13 @@ void CStdDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess } #endif // NL_OS_WINDOWS +#ifdef NL_OS_UNIX + if (colorSet) + { + str += "\e[0m"; + } +#endif + // Printf ? if (consoleMode) { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt index 17172c488..5a20ba46c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt @@ -57,15 +57,15 @@ ADD_DEFINITIONS(-DCORE_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${ IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt index f7bb49daf..7e5c0e409 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt @@ -40,6 +40,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_disp_sheet_id) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_disp_sheet_id.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt index 4b24a0363..27e8698df 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt @@ -38,6 +38,19 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_example) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_example.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt index 9f705e604..40a8dcbfe 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt @@ -44,9 +44,24 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_georges_editor) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_georges_editor ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index a9083613e..fd1283db8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -28,6 +28,9 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR nelgui_widget.h new_property_widget.h new_widget_widget.h + add_widget_widget.h + editor_selection_watcher.h + editor_message_processor.h ) SET(OVQT_PLUGIN_GUI_EDITOR_UIS @@ -42,6 +45,7 @@ SET(OVQT_PLUGIN_GUI_EDITOR_UIS project_window.ui new_property_widget.ui new_widget_widget.ui + add_widget_widget.ui ) SET(QT_USE_QTGUI TRUE) @@ -82,4 +86,18 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_gui_editor) ADD_DEFINITIONS(-DGUI_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_gui_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp new file mode 100644 index 000000000..98604bcb1 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp @@ -0,0 +1,77 @@ +#include "add_widget_widget.h" +#include "widget_info_tree.h" +#include +#include +#include + +namespace GUIEditor +{ + + AddWidgetWidget::AddWidgetWidget( QWidget *parent ) : + QWidget( parent ) + { + setupUi( this ); + setupConnections(); + } + + AddWidgetWidget::~AddWidgetWidget() + { + } + + void AddWidgetWidget::setCurrentGroup( const QString &g ) + { + groupEdit->setText( g ); + } + + void AddWidgetWidget::setupWidgetInfo( const CWidgetInfoTree *tree ) + { + std::vector< std::string > names; + tree->getNames( names, false ); + + widgetCB->clear(); + + std::sort( names.begin(), names.end() ); + + std::vector< std::string >::const_iterator itr = names.begin(); + while( itr != names.end() ) + { + widgetCB->addItem( QString( itr->c_str() ) ); + ++itr; + } + + } + + void AddWidgetWidget::setupConnections() + { + connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( close() ) ); + connect( addButton, SIGNAL( clicked( bool ) ), this, SLOT( onAddClicked() ) ); + } + + void AddWidgetWidget::onAddClicked() + { + if( groupEdit->text().isEmpty() ) + { + QMessageBox::warning( NULL, + tr( "WARNING" ), + tr( "You need to be adding the new widget into a group!" ), + QMessageBox::Ok ); + + return; + } + + if( nameEdit->text().isEmpty() ) + { + QMessageBox::warning( NULL, + tr( "WARNING" ), + tr( "You need to specify a name for your new widget!" ), + QMessageBox::Ok ); + + return; + } + + close(); + + Q_EMIT adding( groupEdit->text(), widgetCB->currentText(), nameEdit->text() ); + } +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h new file mode 100644 index 000000000..0bf807f3b --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h @@ -0,0 +1,32 @@ +#ifndef ADD_WIDGET_WIDGET_H +#define ADD_WIDGET_WIDGET_H + +#include "ui_add_widget_widget.h" + +namespace GUIEditor +{ + class CWidgetInfoTree; + + class AddWidgetWidget : public QWidget, public Ui::AddWidgetWidget + { + Q_OBJECT + public: + AddWidgetWidget( QWidget *parent = NULL ); + ~AddWidgetWidget(); + + void setCurrentGroup( const QString &g ); + void setupWidgetInfo( const CWidgetInfoTree *tree ); + + private: + void setupConnections(); + + private Q_SLOTS: + void onAddClicked(); + + Q_SIGNALS: + void adding( const QString &parentGroup, const QString &widgetType, const QString &name ); + }; + +} + +#endif diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui new file mode 100644 index 000000000..58a1890f4 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui @@ -0,0 +1,79 @@ + + + AddWidgetWidget + + + Qt::ApplicationModal + + + + 0 + 0 + 318 + 132 + + + + Add new widget + + + + + + + + Group + + + + + + + + + + true + + + + + + + Widget + + + + + + + + + + Name + + + + + + + + + + + + Add + + + + + + + Cancel + + + + + + + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp new file mode 100644 index 000000000..691dbdead --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -0,0 +1,134 @@ +// Object Viewer Qt GUI Editor plugin +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include +#include "editor_message_processor.h" + +#include "nel/gui/interface_group.h" +#include "nel/gui/widget_manager.h" +#include "widget_info_tree.h" + +namespace GUIEditor +{ + void CEditorMessageProcessor::onDelete() + { + std::string selection = CWidgetManager::getInstance()->getCurrentEditorSelection(); + if( selection.empty() ) + return; + + QMessageBox::StandardButton r = + QMessageBox::question( NULL, + tr( "Deleting widget" ), + tr( "Are you sure you want to delete %1?" ).arg( selection.c_str() ), + QMessageBox::Yes | QMessageBox::No ); + if( r != QMessageBox::Yes ) + return; + + CInterfaceElement *e = + CWidgetManager::getInstance()->getElementFromId( selection ); + if( e == NULL ) + return; + + CInterfaceElement *p = e->getParent(); + if( p == NULL ) + return; + + CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p ); + if( g == NULL ) + return; + + if( g->delElement( e ) ) + { + CWidgetManager::getInstance()->setCurrentEditorSelection( "" ); + } + } + + void CEditorMessageProcessor::onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ) + { + CWidgetInfoTreeNode *node = tree->findNodeByName( std::string( widgetType.toUtf8() ) ); + // No such widget + if( node == NULL ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget! No such widget type!" ), + QMessageBox::Ok + ); + + return; + } + + // No class name defined + std::string className = node->getInfo().className; + if( className.empty() ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget! Missing classname!" ), + QMessageBox::Ok + ); + + return; + } + + std::string pgName = std::string( parentGroup.toUtf8() ); + std::string wName = std::string( name.toUtf8() ); + + CInterfaceElement *e = + CWidgetManager::getInstance()->addWidgetToGroup( + pgName, + className, + wName + ); + + // Failed to add widget + if( e == NULL ) + { + QMessageBox::critical( + NULL, + tr( "Error" ), + tr( "Error adding the new widget!" ), + QMessageBox::Ok + ); + + return; + } + + // Setting the defaults will override the Id too + std::string id = e->getId(); + + // Set up the defaults + std::vector< SPropEntry >::const_iterator itr = node->getInfo().props.begin(); + while( itr != node->getInfo().props.end() ) + { + e->setProperty( itr->propName, itr->propDefault ); + ++itr; + } + + // Restore the Id + e->setId( id ); + // Make the widget aligned to the top left corner + e->setParentPosRef( Hotspot_TL ); + e->setPosRef( Hotspot_TL ); + + // Apply the new settings + e->setActive( false ); + e->setActive( true ); + } +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h new file mode 100644 index 000000000..5c19a03c2 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h @@ -0,0 +1,46 @@ +// Object Viewer Qt GUI Editor plugin +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include + +namespace GUIEditor +{ + class CWidgetInfoTree; + + /// Processes the GUI Editor's editor messages like delete, new, etc... + class CEditorMessageProcessor : public QObject + { + Q_OBJECT + public: + CEditorMessageProcessor( QObject *parent = NULL ) : + QObject( parent ) + { + tree = NULL; + } + + ~CEditorMessageProcessor(){} + + void setTree( CWidgetInfoTree *tree ){ this->tree = tree; } + + public Q_SLOTS: + void onDelete(); + void onAdd( const QString &parentGroup, const QString &widgetType, const QString &name ); + + private: + CWidgetInfoTree *tree; + }; +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp new file mode 100644 index 000000000..ee3a079ad --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp @@ -0,0 +1,26 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "editor_selection_watcher.h" + +namespace GUIEditor +{ + void CEditorSelectionWatcher::selectionChanged( std::string &newSelection ) + { + Q_EMIT sgnSelectionChanged( newSelection ); + } +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h new file mode 100644 index 000000000..61218c0cd --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h @@ -0,0 +1,36 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "nel/gui/editor_selection_watcher.h" +#include + +namespace GUIEditor +{ + /// Watches the Editor selection, and emits a signal when it changes + class CEditorSelectionWatcher : public QObject, public NLGUI::IEditorSelectionWatcher + { + Q_OBJECT + + public: + CEditorSelectionWatcher() : QObject( NULL ){} + + void selectionChanged( std::string &newSelection ); + + Q_SIGNALS: + void sgnSelectionChanged( std::string &id ); + }; +} + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index 5a0aff4de..341338d8d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -41,6 +41,9 @@ #include "project_file_serializer.h" #include "project_window.h" #include "nelgui_widget.h" +#include "editor_selection_watcher.h" +#include "editor_message_processor.h" +#include "add_widget_widget.h" namespace GUIEditor { @@ -53,11 +56,13 @@ namespace GUIEditor QMainWindow(parent) { m_ui.setupUi(this); + messageProcessor = new CEditorMessageProcessor; m_undoStack = new QUndoStack(this); widgetProps = new CWidgetProperties; linkList = new LinkList; procList = new ProcList; projectWindow = new ProjectWindow; + addWidgetWidget = new AddWidgetWidget; connect( projectWindow, SIGNAL( projectFilesChanged() ), this, SLOT( onProjectFilesChanged() ) ); viewPort = new NelGUIWidget; setCentralWidget( viewPort ); @@ -73,6 +78,8 @@ namespace GUIEditor parser.setWidgetInfoTree( widgetInfoTree ); parser.parseGUIWidgets(); widgetProps->setupWidgetInfo( widgetInfoTree ); + addWidgetWidget->setupWidgetInfo( widgetInfoTree ); + messageProcessor->setTree( widgetInfoTree ); QDockWidget *dock = new QDockWidget( "Widget Hierarchy", this ); dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea ); @@ -91,17 +98,23 @@ namespace GUIEditor viewPort->init(); - connect( viewPort, SIGNAL( guiLoadComplete() ), hierarchyView, SLOT( onGUILoaded() ) ); - connect( viewPort, SIGNAL( guiLoadComplete() ), procList, SLOT( onGUILoaded() ) ); - connect( viewPort, SIGNAL( guiLoadComplete() ), linkList, SLOT( onGUILoaded() ) ); - connect( hierarchyView, SIGNAL( selectionChanged( std::string& ) ), - &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); + connect( viewPort, SIGNAL( guiLoadComplete() ), this, SLOT( onGUILoaded() ) ); + connect( widgetProps, SIGNAL( treeChanged() ), this, SLOT( onTreeChanged() ) ); + connect( + addWidgetWidget, + SIGNAL( adding( const QString&, const QString&, const QString& ) ), + messageProcessor, + SLOT( onAdd( const QString&, const QString&, const QString& ) ) + ); } GUIEditorWindow::~GUIEditorWindow() { writeSettings(); + delete messageProcessor; + messageProcessor = NULL; + delete widgetProps; widgetProps = NULL; @@ -117,6 +130,9 @@ namespace GUIEditor delete viewPort; viewPort = NULL; + delete addWidgetWidget; + addWidgetWidget = NULL; + // no deletion needed for these, since dockwidget owns them hierarchyView = NULL; propBrowser = NULL; @@ -262,6 +278,11 @@ namespace GUIEditor if( reply != QMessageBox::Yes ) return false; + + CEditorSelectionWatcher *w = viewPort->getWatcher(); + disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) ); + disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); + projectFiles.clearAll(); projectWindow->clear(); hierarchyView->clearHierarchy(); @@ -291,6 +312,30 @@ namespace GUIEditor setCursor( Qt::ArrowCursor ); } + void GUIEditorWindow::onGUILoaded() + { + hierarchyView->onGUILoaded(); + procList->onGUILoaded(); + linkList->onGUILoaded(); + + CEditorSelectionWatcher *w = viewPort->getWatcher(); + connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) ); + connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); + } + + void GUIEditorWindow::onAddWidgetClicked() + { + QString g; + hierarchyView->getCurrentGroup( g ); + + addWidgetWidget->setCurrentGroup( g ); + addWidgetWidget->show(); + } + + void GUIEditorWindow::onTreeChanged() + { + addWidgetWidget->setupWidgetInfo( widgetInfoTree ); + } void GUIEditorWindow::createMenus() { @@ -299,6 +344,7 @@ namespace GUIEditor QAction *saveAction = mm->action( Core::Constants::SAVE ); QAction *saveAsAction = mm->action( Core::Constants::SAVE_AS ); QAction *closeAction = mm->action( Core::Constants::CLOSE ); + QAction *delAction = mm->action( Core::Constants::DEL ); //if( newAction != NULL ) // newAction->setEnabled( true ); @@ -308,6 +354,11 @@ namespace GUIEditor saveAsAction->setEnabled( true ); if( closeAction != NULL ) closeAction->setEnabled( true ); + if( delAction != NULL ) + { + delAction->setEnabled( true ); + connect( delAction, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onDelete() ) ); + } QMenu *menu = mm->menu( Core::Constants::M_TOOLS ); if( menu != NULL ) @@ -329,6 +380,10 @@ namespace GUIEditor a = new QAction( "Project Window", this ); connect( a, SIGNAL( triggered( bool ) ), projectWindow, SLOT( show() ) ); m->addAction( a ); + + a = new QAction( "Add Widget", this ); + connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onAddWidgetClicked() ) ); + m->addAction( a ); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h index d4327d3d9..e1a8b8b2d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h @@ -36,6 +36,8 @@ namespace GUIEditor class ProjectWindow; class NelGUIWidget; class CWidgetInfoTree; + class CEditorMessageProcessor; + class AddWidgetWidget; class GUIEditorWindow: public QMainWindow { @@ -58,6 +60,9 @@ public Q_SLOTS: private Q_SLOTS: void onProjectFilesChanged(); + void onGUILoaded(); + void onAddWidgetClicked(); + void onTreeChanged(); private: void createMenus(); @@ -76,8 +81,9 @@ private: ProcList *procList; ProjectWindow *projectWindow; NelGUIWidget *viewPort; - CWidgetInfoTree *widgetInfoTree; + CEditorMessageProcessor *messageProcessor; + AddWidgetWidget *addWidgetWidget; CPropBrowserCtrl browserCtrl; QString currentProject; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp index 85525e428..d86d31269 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp @@ -27,6 +27,7 @@ #include #include #include +#include "editor_selection_watcher.h" namespace GUIEditor { @@ -37,6 +38,7 @@ namespace GUIEditor { timerID = 0; guiLoaded = false; + watcher = NULL; } NelGUIWidget::~NelGUIWidget() @@ -70,6 +72,8 @@ namespace GUIEditor NLGUI::CViewRenderer::getInstance()->init(); CWidgetManager::getInstance()->getParser()->setEditorMode( true ); + + watcher = new CEditorSelectionWatcher(); } bool NelGUIWidget::parse( SProjectFiles &files ) @@ -106,6 +110,8 @@ namespace GUIEditor guiLoaded = true; Q_EMIT guiLoadComplete(); + CWidgetManager::getInstance()->registerSelectionWatcher( watcher ); + return true; } @@ -115,6 +121,7 @@ namespace GUIEditor if( timerID != 0 ) killTimer( timerID ); timerID = 0; + CWidgetManager::getInstance()->unregisterSelectionWatcher( watcher ); CWidgetManager::getInstance()->reset(); CWidgetManager::getInstance()->getParser()->removeAll(); CViewRenderer::getInstance()->reset(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h index 5a45cc351..34c510507 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h @@ -23,6 +23,8 @@ namespace GUIEditor { + class CEditorSelectionWatcher; + /// Qt viewport for the Nel GUI library class NelGUIWidget : public Nel3DWidget { @@ -35,6 +37,7 @@ namespace GUIEditor bool parse( SProjectFiles &files ); void draw(); void reset(); + CEditorSelectionWatcher* getWatcher(){ return watcher; } Q_SIGNALS: void guiLoadComplete(); @@ -49,6 +52,7 @@ Q_SIGNALS: private: int timerID; bool guiLoaded; + CEditorSelectionWatcher *watcher; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp index 1612ea803..82330bfaf 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -78,7 +78,12 @@ namespace GUIEditor CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( id ); if( e == NULL ) + { + connect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ), + this, SLOT( onPropertyChanged( QtProperty* ) ) ); + return; + } currentElement = id; @@ -106,6 +111,12 @@ namespace GUIEditor if( e == NULL ) return; e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() ); + + + // Make sure the changes are applied + bool active = e->getActive(); + e->setActive( !active ); + e->setActive( active ); } void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp index 9c3a74fd7..24208f4a3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp @@ -18,6 +18,7 @@ #include "widget_hierarchy.h" #include "nel/gui/interface_group.h" #include "nel/gui/widget_manager.h" +#include "nel/gui/widget_addition_watcher.h" namespace { @@ -56,6 +57,45 @@ namespace name = s.toUtf8().constData(); return name; } + + class CWidgetDeletionWatcher : public CInterfaceElement::IDeletionWatcher + { + public: + CWidgetDeletionWatcher(){ h = NULL; } + + ~CWidgetDeletionWatcher(){} + + void onDeleted( const std::string &id ){ + if( h != NULL ) + h->onWidgetDeleted( id ); + } + + void setWidgetHierarchy( GUIEditor::WidgetHierarchy *h ){ this->h = h; } + + private: + GUIEditor::WidgetHierarchy *h; + }; + + class CWidgetAdditionWatcher : public IWidgetAdditionWatcher + { + public: + CWidgetAdditionWatcher(){ h = NULL; } + ~CWidgetAdditionWatcher(){} + + void widgetAdded( const std::string &name ) + { + if( h != NULL ) + h->onWidgetAdded( name ); + } + + void setWidgetHierarchy( GUIEditor::WidgetHierarchy *h ){ this->h = h; } + + private: + GUIEditor::WidgetHierarchy *h; + }; + + CWidgetDeletionWatcher deletionWatcher; + CWidgetAdditionWatcher additionWatcher; } namespace GUIEditor @@ -66,6 +106,8 @@ namespace GUIEditor setupUi( this ); connect( widgetHT, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( onItemDblClicked( QTreeWidgetItem* ) ) ); + deletionWatcher.setWidgetHierarchy( this ); + additionWatcher.setWidgetHierarchy( this ); } WidgetHierarchy::~WidgetHierarchy() @@ -74,12 +116,17 @@ namespace GUIEditor void WidgetHierarchy::clearHierarchy() { + CInterfaceElement::unregisterDeletionWatcher( &deletionWatcher ); + CWidgetManager::getInstance()->unregisterAdditionWatcher( &additionWatcher ); widgetHT->clear(); + widgetHierarchyMap.clear(); } void WidgetHierarchy::buildHierarchy( std::string &masterGroup ) { clearHierarchy(); + CInterfaceElement::registerDeletionWatcher( &deletionWatcher ); + CWidgetManager::getInstance()->registerAdditionWatcher( &additionWatcher ); CInterfaceGroup *mg = CWidgetManager::getInstance()->getMasterGroupFromId( masterGroup ); if( mg != NULL ) @@ -87,6 +134,7 @@ namespace GUIEditor QTreeWidgetItem *item = new QTreeWidgetItem( static_cast(NULL) ); item->setText( 0, "ui" ); widgetHT->addTopLevelItem( item ); + widgetHierarchyMap[ "ui" ] = item; buildHierarchy( item, mg ); } @@ -96,7 +144,9 @@ namespace GUIEditor { // First add ourselves QTreeWidgetItem *item = new QTreeWidgetItem( parent ); + item->setText( 0, makeNodeName( group->getId() ).c_str() ); + widgetHierarchyMap[ group->getId() ] = item; // Then add recursively our subgroups const std::vector< CInterfaceGroup* > &groups = group->getGroups(); @@ -113,6 +163,7 @@ namespace GUIEditor { QTreeWidgetItem *subItem = new QTreeWidgetItem( item ); subItem->setText( 0, makeNodeName( (*citr)->getId() ).c_str() ); + widgetHierarchyMap[ (*citr)->getId() ] = subItem; } // Add our views @@ -122,14 +173,134 @@ namespace GUIEditor { QTreeWidgetItem *subItem = new QTreeWidgetItem( item ); subItem->setText( 0, makeNodeName( (*vitr)->getId() ).c_str() ); + widgetHierarchyMap[ (*vitr)->getId() ] = subItem; } } + void WidgetHierarchy::onWidgetDeleted( const std::string &id ) + { + std::map< std::string, QTreeWidgetItem* >::iterator itr + = widgetHierarchyMap.find( id ); + if( itr == widgetHierarchyMap.end() ) + return; + + if( widgetHT->currentItem() == itr->second ) + { + QTreeWidgetItem *item = itr->second; + QTreeWidgetItem *p = item; + + // Deselect item + item->setSelected( false ); + widgetHT->setCurrentItem( NULL ); + + // Collapse the tree + while( p != NULL ) + { + p->setExpanded( false ); + p = p->parent(); + } + + currentSelection = ""; + } + + itr->second->setSelected( false ); + + delete itr->second; + itr->second = NULL; + widgetHierarchyMap.erase( itr ); + } + + void WidgetHierarchy::onWidgetAdded( const std::string &id ) + { + // Get the parent's name + std::string::size_type p = id.find_last_of( ':' ); + if( p == std::string::npos ) + return; + std::string parentId = id.substr( 0, p ); + + // Do we have the parent in the hierarchy? + std::map< std::string, QTreeWidgetItem* >::iterator itr + = widgetHierarchyMap.find( parentId ); + if( itr == widgetHierarchyMap.end() ) + return; + + // Add the new widget to the hierarchy + QTreeWidgetItem *parent = itr->second; + QTreeWidgetItem *item = new QTreeWidgetItem( parent ); + item->setText( 0, makeNodeName( id ).c_str() ); + widgetHierarchyMap[ id ] = item; + } + + void WidgetHierarchy::getCurrentGroup( QString &g ) + { + std::string s = CWidgetManager::getInstance()->getCurrentEditorSelection(); + if( s.empty() ) + { + g = ""; + return; + } + + NLGUI::CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( s ); + if( e == NULL ) + { + g = ""; + return; + } + + if( e->isGroup() ) + { + g = e->getId().c_str(); + return; + } + + NLGUI::CInterfaceGroup *p = e->getParent(); + if( p == NULL ) + { + g = ""; + return; + } + + g = p->getId().c_str(); + } + void WidgetHierarchy::onGUILoaded() { if( masterGroup.empty() ) return; buildHierarchy( masterGroup ); + currentSelection.clear(); + } + + void WidgetHierarchy::onSelectionChanged( std::string &newSelection ) + { + if( newSelection == currentSelection ) + return; + + if( newSelection.empty() ) + return; + + std::map< std::string, QTreeWidgetItem* >::iterator itr = + widgetHierarchyMap.find( newSelection ); + if( itr == widgetHierarchyMap.end() ) + return; + + // deselect current item + if( widgetHT->currentItem() != NULL ) + widgetHT->currentItem()->setSelected( false ); + + // expand the tree items, so that we can see the selected item + QTreeWidgetItem *item = itr->second; + QTreeWidgetItem *currItem = item; + while( currItem != NULL ) + { + currItem->setExpanded( true ); + currItem = currItem->parent(); + } + + // select the current item + item->setSelected( true ); + widgetHT->setCurrentItem( item ); + currentSelection = newSelection; } void WidgetHierarchy::onItemDblClicked( QTreeWidgetItem *item ) @@ -138,9 +309,7 @@ namespace GUIEditor return; std::string n = item->text( 0 ).toUtf8().constData(); - std::string selection = makeFullName( item, n ); - CWidgetManager::getInstance()->setCurrentEditorSelection( selection ); - - Q_EMIT selectionChanged( selection ); + currentSelection = makeFullName( item, n ); + CWidgetManager::getInstance()->setCurrentEditorSelection( currentSelection ); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h index 493fd2a08..4641c8ce8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h @@ -18,6 +18,8 @@ #define WIDGET_HA_H #include "ui_widget_hierarchy.h" +#include +#include namespace NLGUI { @@ -40,11 +42,17 @@ namespace GUIEditor void clearHierarchy(); void buildHierarchy( std::string &masterGroup ); + void onWidgetDeleted( const std::string &id ); + void onWidgetAdded( const std::string &id ); + + void getCurrentGroup( QString &g ); + private: void buildHierarchy( QTreeWidgetItem *parent, NLGUI::CInterfaceGroup *group ); public Q_SLOTS: void onGUILoaded(); + void onSelectionChanged( std::string &newSelection ); private Q_SLOTS: void onItemDblClicked( QTreeWidgetItem *item ); @@ -52,9 +60,7 @@ namespace GUIEditor private: std::string currentSelection; std::string masterGroup; - - Q_SIGNALS: - void selectionChanged( std::string &id ); + std::map< std::string, QTreeWidgetItem* > widgetHierarchyMap; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h index 7a33ef056..2f7396071 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h @@ -53,6 +53,7 @@ namespace GUIEditor { std::string name; std::string GUIName; + std::string className; std::string ancestor; std::string description; bool isAbstract; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp index 4c2339c40..cf7acca1a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp @@ -63,6 +63,7 @@ namespace GUIEditor f << "\t" << std::endl; f << "\t\t" << info.name << "" << std::endl; f << "\t\t" << info.GUIName << "" << std::endl; + f << "\t\t" << info.className << "" << std::endl; f << "\t\t" << info.ancestor << "" << std::endl; f << "\t\t" << info.description << "" << std::endl; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h index 25ad7bb40..5e717923c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h @@ -93,11 +93,11 @@ namespace GUIEditor } /// Get the node names and put them into the vector - void getNames( std::vector< std::string > &v ) const + void getNames( std::vector< std::string > &v, bool includeAbstract = true ) const { if( root == NULL ) return; - root->getNames( v ); + root->getNames( v, includeAbstract ); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h index 81adfe06c..0de9e6977 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h @@ -215,11 +215,13 @@ namespace GUIEditor } /// Get the node names and put them into the vector - void getNames( std::vector< std::string > &v ) const + void getNames( std::vector< std::string > &v, bool includeAbstract = true ) const { - v.push_back( info.name ); + if( !info.isAbstract || ( info.isAbstract && includeAbstract ) ) + v.push_back( info.name ); + for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr ) - ( *itr )->getNames( v ); + ( *itr )->getNames( v, includeAbstract ); } /// Accepts a visitor to itself and to the children nodes diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp index 0a9337e6c..69d556975 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp @@ -84,6 +84,7 @@ namespace GUIEditor{ return; tree->removeNode( widgetName.toUtf8().constData() ); + Q_EMIT treeChanged(); widgetPropTree->clear(); buildWidgetList(); } @@ -156,6 +157,7 @@ namespace GUIEditor{ void CWidgetProperties::onWidgetAdded() { buildWidgetList(); + Q_EMIT treeChanged(); } void CWidgetProperties::buildWidgetList() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h index b14bf2f72..44e535b0f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h @@ -74,6 +74,9 @@ namespace GUIEditor CWidgetInfoTree *tree; NewPropertyWidget *newPropertyWidget; NewWidgetWidget *newWidgetWidget; + + Q_SIGNALS: + void treeChanged(); }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp index b1e693751..e0f346fc9 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp @@ -131,6 +131,9 @@ namespace GUIEditor if( key == "guiname" ) info.GUIName = value.toUtf8().constData(); else + if( key == "classname" ) + info.className = value.toUtf8().constData(); + else if( key == "ancestor" ) info.ancestor = value.toUtf8().constData(); else diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml index 722d1b241..42e2bdef1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml @@ -11,7 +11,7 @@ button_type string - toggle_button + push_button pushed diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml index 12b82e7f6..fb2514e7c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml @@ -2,6 +2,7 @@ CtrlButton CCtrlButton + button CtrlBaseButton false @@ -11,17 +12,17 @@ tx_normal string - + log_but_r.tga tx_pushed string - + log_but_r.tga tx_over string - + log_but_over_r.tga scale diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml index ea2ba6171..6ac05fbcc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml @@ -2,6 +2,7 @@ CtrlColPick CCtrlColPick + colpick CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml index 1ad970f31..a5c8dae1e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml @@ -2,6 +2,7 @@ CtrlScroll CCtrlScroll + scroll CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml index 1195432d1..cacc45ccb 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml @@ -2,6 +2,7 @@ CtrlTextButton CCtrlTextButton + text_button CtrlBaseButton false @@ -11,27 +12,27 @@ tx_normal string - + but tx_pushed string - + but tx_over string - + but_over hardtext string - + text wmargin int - 0 + 20 wmin @@ -151,7 +152,7 @@ line_maxw int - 0 + 200 multi_line_space diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml index 624ded887..63be51b5e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml @@ -2,6 +2,7 @@ DBGroupSelectNumber CDBGroupSelectNumber + select_number InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml index 33250a27c..c7f2e488c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml @@ -2,6 +2,7 @@ DBViewBar CDBViewBar + bar ViewBitmap false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml index fbb74ad3b..9b12a637a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml @@ -2,6 +2,7 @@ DBViewBar3 CDBViewBar3 + bar3 ViewBitmap false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml index 0d9aca44a..8a2a28831 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml @@ -2,6 +2,7 @@ DBViewDigit CDBViewDigit + digit CtrlBase false @@ -11,7 +12,7 @@ value string - + 0 numdigit diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml index c1861df61..95a43025e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml @@ -2,6 +2,7 @@ DBViewNumber CDBViewNumber + text_number ViewText false @@ -11,7 +12,7 @@ value string - + 0 positive diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml index c24379c96..1b812bccf 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml @@ -2,6 +2,7 @@ DBViewQuantity CDBViewQuantity + text_quantity ViewText false @@ -11,17 +12,17 @@ value string - + 0 valuemax string - + 100 emptytext string - + empty text diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml index ad167520d..bdbf9931a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml @@ -2,6 +2,7 @@ GroupContainer CGroupContainer + container InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml index 31ca205c7..603af6c04 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml @@ -2,6 +2,7 @@ GroupEditBox CGroupEditBox + edit_box InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml index fe2235c04..b76fe4cd4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml @@ -2,6 +2,7 @@ GroupHTML CGroupHTML + html GroupScrollText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml index cc96fd742..bcb517c66 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml @@ -2,6 +2,7 @@ GroupHeader CGroupHeader + header GroupList false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml index e7db36de6..1858cd5b3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml @@ -2,6 +2,7 @@ GroupList CGroupList + list InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml index ac57b5c4d..4739f0352 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml @@ -2,6 +2,7 @@ GroupMenu CGroupMenu + menu GroupModal false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml index 034e3025e..afc5005c8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml @@ -2,6 +2,7 @@ GroupModal CGroupModal + modal GroupFrame false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml index 95719398d..8cefb8df2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml @@ -2,6 +2,7 @@ GroupScrollText CGroupScrollText + scroll_text InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml index df148a0a3..69db79466 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml @@ -2,6 +2,7 @@ GroupTab CGroupTab + tab InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml index 8e9b8cffe..9c2240adc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml @@ -2,6 +2,7 @@ GroupTable CGroupTable + table InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml index 8e075ac53..6bd10ad9f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml @@ -2,6 +2,7 @@ GroupTree CGroupTree + tree InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml index b9e99d336..c9a8c1546 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml @@ -2,6 +2,7 @@ InterfaceGroup CInterfaceGroup + interface_group CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml index 62d67cc0a..51590ee33 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml @@ -2,6 +2,7 @@ InterfaceGroupWheel CInterfaceGroupWheel + group_wheel InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml index 9da967b5a..8b931f78b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml @@ -2,6 +2,7 @@ ViewBitmap CViewBitmap + bitmap CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml index 0b55f6932..190143be5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml @@ -2,6 +2,7 @@ ViewBitmapCombo CViewBitmapCombo + bitmap_combo CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml index 378854df5..9490a1eee 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml @@ -2,6 +2,7 @@ ViewText CViewText + text InterfaceElement false @@ -46,7 +47,7 @@ line_maxw int - 0 + 100 multi_line_space @@ -101,7 +102,7 @@ hardtext string - + some text hardtext_format diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml index cabd081f0..c5749ca9c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml @@ -2,6 +2,7 @@ ViewTextFormated CViewTextFormated + text_formated ViewText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml index 52e010ec6..b3edc86ab 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml @@ -2,6 +2,7 @@ ViewTextID CViewTextID + text_id ViewText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml index af8dd54eb..3ac6c7962 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml @@ -2,6 +2,7 @@ ViewTextIDFormated CViewTextIDFormated + text_id_formated ViewTextID false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt index 68970066d..129f672c5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt @@ -55,5 +55,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_landscape_editor) ADD_DEFINITIONS(-DLANDSCAPE_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) -#INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) + + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt index 1e0511a1c..4cee3da24 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt @@ -36,6 +36,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_log) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_log.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt index 03f1a6a2f..1dcbebfa8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt @@ -46,6 +46,21 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_mission_compiler) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_mission_compiler.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt index 0ebc8a0b1..b550e8ea0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt @@ -196,6 +196,21 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_object_viewer ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) -INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_object_viewer.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt index 52965a3d4..34f237757 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt @@ -29,6 +29,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_sheet_builder) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_sheet_builder.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt index a7de55dfb..1d96ebc77 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt @@ -48,6 +48,19 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_translation_manager) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_translation_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt index 144d0a652..150cc4c4f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt @@ -65,6 +65,19 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_world_editor) ADD_DEFINITIONS(-DWORLD_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_world_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt index e9023c4b9..729658ab4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt @@ -42,6 +42,20 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_zone_painter) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_zone_painter.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp index fbca1f037..46d88757b 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_export.cpp @@ -142,7 +142,7 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time) { bool tempBRet = bRet; bRet = false; - // delete pShape; // FIXME: there is a delete bug with CMeshMultiLod exported from max!!! + delete pShape; bRet = tempBRet; } catch (...) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp index 27ba7b796..155bbe5b5 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp @@ -99,7 +99,7 @@ bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime) return false; if( deleteIt ) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); return true; } @@ -305,7 +305,7 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime) this->rSoftShadowConeLength = (float)atof(sTmp.c_str()); if( deleteIt ) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); } // *********************************************************************************************** diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp index ecc9e8127..0a01a9fb8 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp @@ -135,7 +135,7 @@ CCollisionMeshBuild* CExportNel::createCollisionMeshBuild(std::vector & // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp index 4df66b224..8249eda39 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_flare.cpp @@ -41,8 +41,10 @@ IShape* CExportNel::buildFlare(INode& node, TimeValue time) CExportNel::getValueByNameUsingParamBlock2(node, "PersistenceParam", (ParamType2)TYPE_FLOAT, &persistence, 0); fshape->setPersistence(persistence); // retrieve spacing of the flare - CExportNel::getValueByNameUsingParamBlock2(node, "Spacing", (ParamType2)TYPE_FLOAT, &spacing, 0); - fshape->setFlareSpacing(spacing); + bool hasSpacing = CExportNel::getValueByNameUsingParamBlock2(node, "Spacing", (ParamType2)TYPE_FLOAT, &spacing, 0) + || CExportNel::getValueByNameUsingParamBlock2(node, "spacing", (ParamType2)TYPE_FLOAT, &spacing, 0); + if (hasSpacing) fshape->setFlareSpacing(spacing); + else nlwarning("FAILED CFlareShape Spacing"); // retrieve use of radial attenuation CExportNel::getValueByNameUsingParamBlock2(node, "Attenuable", (ParamType2) TYPE_BOOL, &attenuable, 0); if (attenuable) diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp index f1cfaa85d..3a497419b 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_light.cpp @@ -238,7 +238,7 @@ void CExportNel::getLights (std::vector& vectLight, TimeValue time, INod // Delete the GenLight if we should... if (deleteIt) - maxLight->MaybeAutoDelete(); + maxLight->DeleteThis(); } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp index 2d45e14ef..7feca2009 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_lod_character.cpp @@ -179,7 +179,7 @@ bool CExportNel::buildLodCharacter (NL3D::CLodCharacterShapeBuild& lodBuild, IN // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp index b3e632547..afe64907b 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_material.cpp @@ -17,6 +17,7 @@ #include "stdafx.h" #include "export_nel.h" #include "../tile_utility/tile_utility.h" +#include "nel/misc/path.h" #include "nel/3d/texture_file.h" #include "nel/3d/texture_multi_file.h" #include "nel/3d/texture_cube.h" @@ -1139,9 +1140,9 @@ int CExportNel::getVertMapChannel (Texmap& texmap, Matrix3& channelMatrix, TimeV } // get the absolute or relative path from a texture filename -static std::string ConvertTexFileName(const char *src, bool _AbsolutePath) +static std::string ConvertTexFileName(const std::string &path, bool _AbsolutePath) { - // File name, maxlen 256 under windows + /*// File name, maxlen 256 under windows char sFileName[512]; strcpy (sFileName, src); @@ -1156,7 +1157,15 @@ static std::string ConvertTexFileName(const char *src, bool _AbsolutePath) // Make the final path _makepath (sFileName, NULL, NULL, sName, sExt); } - return std::string(sFileName); + return std::string(sFileName);*/ + if (_AbsolutePath) + { + return path; + } + else + { + return NLMISC::CFile::getFilename(path); + } } // Build a NeL texture corresponding with a max Texmap. @@ -1243,7 +1252,7 @@ ITexture* CExportNel::buildATexture (Texmap& texmap, CMaterialDesc &remap3dsTexC if (l == 1 && !fileName[0].empty()) { srcTex = new CTextureFile; - static_cast(srcTex)->setFileName (ConvertTexFileName(fileName[0].c_str(), _AbsolutePath)); + static_cast(srcTex)->setFileName (ConvertTexFileName(fileName[0], _AbsolutePath)); } else { @@ -1253,7 +1262,8 @@ ITexture* CExportNel::buildATexture (Texmap& texmap, CMaterialDesc &remap3dsTexC if (!fileName[k].empty()) { /// set the name of the texture after converting it - static_cast(srcTex)->setFileName(k, ConvertTexFileName(fileName[k].c_str(), _AbsolutePath).c_str()); + std::string convertMultiTex = ConvertTexFileName(fileName[k], _AbsolutePath); + static_cast(srcTex)->setFileName(k, convertMultiTex.c_str()); } } } @@ -1261,7 +1271,8 @@ ITexture* CExportNel::buildATexture (Texmap& texmap, CMaterialDesc &remap3dsTexC else // standard texture { srcTex = new CTextureFile; - static_cast(srcTex)->setFileName (ConvertTexFileName(pBitmap->GetMapName(), _AbsolutePath)); + std::string mapName = pBitmap->GetMapName(); + static_cast(srcTex)->setFileName (ConvertTexFileName(mapName, _AbsolutePath)); } // 2) Use this texture 'as it', or duplicate it to create the faces of a cube map @@ -1361,7 +1372,7 @@ NL3D::CTextureCube *CExportNel::buildTextureCubeFromReflectRefract(Texmap &texma CTextureFile *pT = new CTextureFile(); // Set the file name - pT->setFileName(ConvertTexFileName(names[i].c_str(), _AbsolutePath)); + pT->setFileName(ConvertTexFileName(names[i], _AbsolutePath)); // Set the texture pTextureCube->setTexture(tfNewOrder[i], pT); diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp index afde40770..bd48be1ea 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh.cpp @@ -110,7 +110,7 @@ CMesh::CMeshBuild* CExportNel::createMeshBuild(INode& node, TimeValue tvTime, CM // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -449,7 +449,7 @@ NL3D::IShape *CExportNel::buildShape (INode& node, TimeValue time, const TInodeP // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -1406,7 +1406,7 @@ IMeshGeom *CExportNel::buildMeshGeom (INode& node, TimeValue time, const TInodeP // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -2058,7 +2058,7 @@ NL3D::IShape *CExportNel::buildWaterShape(INode& node, TimeValue time) // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; nlinfo("WaterShape : build succesful"); return ws; @@ -2100,11 +2100,8 @@ bool CExportNel::buildMeshAABBox(INode &node, NLMISC::CAABBox &dest, TimeValue t dest.setMinMax(nelMin, nelMax); // if (deleteIt) - { -#ifdef NL_DONT_FIND_MAX_CRASH - tri->MaybeAutoDelete(); -#endif // NL_DEBUG - } + tri->DeleteThis(); + tri = NULL; return true; } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp index fdcfea8da..899c28a28 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_mesh_interface.cpp @@ -180,7 +180,7 @@ bool CMeshInterface::buildFromMaxMesh(INode &node, TimeValue tvTime) } // if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; return true; } @@ -362,7 +362,7 @@ static void AddNodeToQuadGrid(const NLMISC::CAABBox &delimiter, TNodeFaceQG &des nldebug("%d faces where added", numFaceAdded); // if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; } } @@ -495,7 +495,7 @@ static bool SelectVerticesInMeshFromInterfaces(const std::vector if (obj != tri) { // not a mesh object, so do nothing - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; return false; } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index 44f51fc75..738e6b724 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp @@ -409,7 +409,7 @@ bool getValueByNameUsingParamBlock2Internal (Animatable& node, const char* sName } else { - nldebug("Invalid type specified for pblock2 value with name '%s', given type '%u', found '%u'", + nlwarning("Invalid type specified for pblock2 value with name '%s', given type '%u', found '%u'", sName, (uint32)type, (uint32)paramType); } } @@ -448,7 +448,7 @@ bool CExportNel::getValueByNameUsingParamBlock2 (Animatable& node, const char* s } else { - // nlwarning ("Can't found ParamBlock named %s", sName); + // nlwarning ("FAILED Can't find ParamBlock named '%s'", sName); return false; } } @@ -1272,7 +1272,7 @@ void CExportNel::buildCamera(NL3D::CCameraInfo &cameraInfo, INode& node, TimeVal cameraInfo.Fov = genCamera->GetFOV(time); if (deleteIt) - genCamera->MaybeAutoDelete(); + genCamera->DeleteThis(); genCamera = NULL; } } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp index 41741f86d..f8dce3ac6 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_skinning.cpp @@ -1446,7 +1446,7 @@ bool CExportNel::mirrorPhysiqueSelection(INode &node, TimeValue tvTime, const st // Delete the triObject if we should... if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); tri = NULL; // ok! diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp index af6cbcdac..a39388786 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_vegetable.cpp @@ -154,7 +154,7 @@ bool CExportNel::buildVegetableShape (NL3D::CVegetableShape& skeletonShape, INo } if (deleteIt) - tri->MaybeAutoDelete(); + tri->DeleteThis(); } } } diff --git a/code/nel/tools/build_gamedata/0_setup.py b/code/nel/tools/build_gamedata/0_setup.py index 63c9c4f6f..1e1824b2c 100644 --- a/code/nel/tools/build_gamedata/0_setup.py +++ b/code/nel/tools/build_gamedata/0_setup.py @@ -86,31 +86,31 @@ if not args.noconf: try: ExportBuildDirectory except NameError: - ExportBuildDirectory = "W:/export" + ExportBuildDirectory = "T:/export" try: InstallDirectory except NameError: - InstallDirectory = "W:/install" + InstallDirectory = "T:/install" try: ClientDevDirectory except NameError: - ClientDevDirectory = "W:/client_dev" + ClientDevDirectory = "T:/client_dev" try: ClientPatchDirectory except NameError: - ClientPatchDirectory = "W:/client_patch" + ClientPatchDirectory = "T:/client_patch" try: ClientInstallDirectory except NameError: - ClientInstallDirectory = "W:/client_install" + ClientInstallDirectory = "T:/client_install" try: ShardInstallDirectory except NameError: - ShardInstallDirectory = "W:/shard" + ShardInstallDirectory = "T:/shard" try: WorldEditInstallDirectory except NameError: - WorldEditInstallDirectory = "W:/worldedit" + WorldEditInstallDirectory = "T:/worldedit" try: LeveldesignDirectory except NameError: @@ -134,7 +134,7 @@ if not args.noconf: try: DataShardDirectory except NameError: - DataShardDirectory = "R:/code/ryzom/common/data_shard" + DataShardDirectory = "R:/code/ryzom/server/data_shard" try: DataCommonDirectory except NameError: @@ -159,6 +159,26 @@ if not args.noconf: WindowsExeDllCfgDirectories except NameError: WindowsExeDllCfgDirectories = [ 'C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/redist/x86', 'D:/libraries/external/bin', 'R:/build/dev/bin/Release', 'R:/code/ryzom/client', 'R:/code/nel/lib', 'R:/code/ryzom/bin', 'R:/code/ryzom/tools/client/client_config/bin' ] + try: + LinuxServiceExecutableDirectory + except NameError: + LinuxServiceExecutableDirectory = "S:/devls_x64/bin" + try: + LinuxClientExecutableDirectory + except NameError: + LinuxClientExecutableDirectory = "S:/devl_x64/bin" + try: + PatchmanCfgAdminDirectory + except NameError: + PatchmanCfgAdminDirectory = "R:/code/ryzom/server/patchman_cfg/admin_install" + try: + PatchmanCfgDefaultDirectory + except NameError: + PatchmanCfgDefaultDirectory = "R:/code/ryzom/server/patchman_cfg/default" + try: + PatchmanBridgeServerDirectory + except NameError: + PatchmanBridgeServerDirectory = "T:/bridge_server" try: MaxAvailable except NameError: @@ -171,7 +191,11 @@ if not args.noconf: MaxUserDirectory except NameError: import os - MaxUserDirectory = os.path.normpath(os.environ["LOCALAPPDATA"] + "/Autodesk/3dsMax/2010 - 32bit/enu") + try: + MaxUserDirectory = os.path.normpath(os.environ["LOCALAPPDATA"] + "/Autodesk/3dsMax/2010 - 32bit/enu") + except KeyError: + MaxAvailable = 0 + MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu" try: MaxExecutable except NameError: @@ -188,37 +212,42 @@ if not args.noconf: printLog(log, "Use -- if you need to insert an empty value.") printLog(log, "") BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality))) - ToolDirectories[0] = askVar(log, "Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") - ToolDirectories[1] = askVar(log, "Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") + ToolDirectories[0] = askVar(log, "[IN] Primary Tool Directory", ToolDirectories[0]).replace("\\", "/") + ToolDirectories[1] = askVar(log, "[IN] Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/") ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix) - ScriptDirectory = askVar(log, "Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") - WorkspaceDirectory = askVar(log, "Workspace Directory", WorkspaceDirectory).replace("\\", "/") - DatabaseDirectory = askVar(log, "Database Directory", DatabaseDirectory).replace("\\", "/") - ExportBuildDirectory = askVar(log, "Export Build Directory", ExportBuildDirectory).replace("\\", "/") - InstallDirectory = askVar(log, "Install Directory", InstallDirectory).replace("\\", "/") - ClientDevDirectory = askVar(log, "Client Dev Directory", ClientDevDirectory).replace("\\", "/") - ClientPatchDirectory = askVar(log, "Client Patch Directory", ClientPatchDirectory).replace("\\", "/") - ClientInstallDirectory = askVar(log, "Client Install Directory", ClientInstallDirectory).replace("\\", "/") - ShardInstallDirectory = askVar(log, "Shard Data Install Directory", ShardInstallDirectory).replace("\\", "/") - WorldEditInstallDirectory = askVar(log, "World Edit Data Install Directory", WorldEditInstallDirectory).replace("\\", "/") - LeveldesignDirectory = askVar(log, "Leveldesign Directory", LeveldesignDirectory).replace("\\", "/") - LeveldesignDfnDirectory = askVar(log, "Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/") - LeveldesignWorldDirectory = askVar(log, "Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") - PrimitivesDirectory = askVar(log, "Primitives Directory", PrimitivesDirectory).replace("\\", "/") - GamedevDirectory = askVar(log, "Gamedev Directory", GamedevDirectory).replace("\\", "/") - DataShardDirectory = askVar(log, "Data Shard Directory", DataShardDirectory).replace("\\", "/") - DataCommonDirectory = askVar(log, "Data Common Directory", DataCommonDirectory).replace("\\", "/") - TranslationDirectory = askVar(log, "Translation Directory", TranslationDirectory).replace("\\", "/") - LeveldesignDataShardDirectory = askVar(log, "Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") - LeveldesignDataCommonDirectory = askVar(log, "Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") - WorldEditorFilesDirectory = askVar(log, "World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") - WindowsExeDllCfgDirectories[0] = askVar(log, "Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") - WindowsExeDllCfgDirectories[1] = askVar(log, "Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") - WindowsExeDllCfgDirectories[2] = askVar(log, "Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") - WindowsExeDllCfgDirectories[3] = askVar(log, "Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") - WindowsExeDllCfgDirectories[4] = askVar(log, "Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") - WindowsExeDllCfgDirectories[5] = askVar(log, "Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") - WindowsExeDllCfgDirectories[6] = askVar(log, "Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") + ScriptDirectory = askVar(log, "[IN] Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/") + WorkspaceDirectory = askVar(log, "[IN] Workspace Directory", WorkspaceDirectory).replace("\\", "/") + DatabaseDirectory = askVar(log, "[IN] Database Directory", DatabaseDirectory).replace("\\", "/") + ExportBuildDirectory = askVar(log, "[OUT] Export Build Directory", ExportBuildDirectory).replace("\\", "/") + InstallDirectory = askVar(log, "[OUT] Install Directory", InstallDirectory).replace("\\", "/") + ClientDevDirectory = askVar(log, "[OUT] Client Dev Directory", ClientDevDirectory).replace("\\", "/") + ClientPatchDirectory = askVar(log, "[OUT] Client Patch Directory", ClientPatchDirectory).replace("\\", "/") + ClientInstallDirectory = askVar(log, "[OUT] Client Install Directory", ClientInstallDirectory).replace("\\", "/") + ShardInstallDirectory = askVar(log, "[OUT] Shard Data Install Directory", ShardInstallDirectory).replace("\\", "/") + WorldEditInstallDirectory = askVar(log, "[OUT] World Edit Data Install Directory", WorldEditInstallDirectory).replace("\\", "/") + LeveldesignDirectory = askVar(log, "[IN] Leveldesign Directory", LeveldesignDirectory).replace("\\", "/") + LeveldesignDfnDirectory = askVar(log, "[IN] Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/") + LeveldesignWorldDirectory = askVar(log, "[IN] Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/") + PrimitivesDirectory = askVar(log, "[IN] Primitives Directory", PrimitivesDirectory).replace("\\", "/") + GamedevDirectory = askVar(log, "[IN] Gamedev Directory", GamedevDirectory).replace("\\", "/") + DataShardDirectory = askVar(log, "[IN] Data Shard Directory", DataShardDirectory).replace("\\", "/") + DataCommonDirectory = askVar(log, "[IN] Data Common Directory", DataCommonDirectory).replace("\\", "/") + TranslationDirectory = askVar(log, "[IN] Translation Directory", TranslationDirectory).replace("\\", "/") + LeveldesignDataShardDirectory = askVar(log, "[IN] Leveldesign Data Shard Directory", LeveldesignDataShardDirectory).replace("\\", "/") + LeveldesignDataCommonDirectory = askVar(log, "[IN] Leveldesign Data Common Directory", LeveldesignDataCommonDirectory).replace("\\", "/") + WorldEditorFilesDirectory = askVar(log, "[IN] World Editor Files Directory", WorldEditorFilesDirectory).replace("\\", "/") + WindowsExeDllCfgDirectories[0] = askVar(log, "[IN] Primary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[0]).replace("\\", "/") + WindowsExeDllCfgDirectories[1] = askVar(log, "[IN] Secondary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[1]).replace("\\", "/") + WindowsExeDllCfgDirectories[2] = askVar(log, "[IN] Tertiary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[2]).replace("\\", "/") + WindowsExeDllCfgDirectories[3] = askVar(log, "[IN] Quaternary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[3]).replace("\\", "/") + WindowsExeDllCfgDirectories[4] = askVar(log, "[IN] Quinary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[4]).replace("\\", "/") + WindowsExeDllCfgDirectories[5] = askVar(log, "[IN] Senary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[5]).replace("\\", "/") + WindowsExeDllCfgDirectories[6] = askVar(log, "[IN] Septenary Windows exe/dll/cfg Directory", WindowsExeDllCfgDirectories[6]).replace("\\", "/") + LinuxServiceExecutableDirectory = askVar(log, "[IN] Linux Service Executable Directory", LinuxServiceExecutableDirectory).replace("\\", "/") + LinuxClientExecutableDirectory = askVar(log, "[IN] Linux Client Executable Directory", LinuxClientExecutableDirectory).replace("\\", "/") + PatchmanCfgAdminDirectory = askVar(log, "[IN] Patchman Cfg Admin Directory", PatchmanCfgAdminDirectory).replace("\\", "/") + PatchmanCfgDefaultDirectory = askVar(log, "[IN] Patchman Cfg Default Directory", PatchmanCfgDefaultDirectory).replace("\\", "/") + PatchmanBridgeServerDirectory = askVar(log, "[OUT] Patchman Bridge Server Patch Directory", PatchmanBridgeServerDirectory).replace("\\", "/") MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable))) if MaxAvailable: MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/") @@ -299,6 +328,11 @@ if not args.noconf: sf.write("DataCommonDirectory = \"" + str(DataCommonDirectory) + "\"\n") sf.write("DataShardDirectory = \"" + str(DataShardDirectory) + "\"\n") sf.write("WindowsExeDllCfgDirectories = " + str(WindowsExeDllCfgDirectories) + "\n") + sf.write("LinuxServiceExecutableDirectory = \"" + str(LinuxServiceExecutableDirectory) + "\"\n") + sf.write("LinuxClientExecutableDirectory = \"" + str(LinuxClientExecutableDirectory) + "\"\n") + sf.write("PatchmanCfgAdminDirectory = \"" + str(PatchmanCfgAdminDirectory) + "\"\n") + sf.write("PatchmanCfgDefaultDirectory = \"" + str(PatchmanCfgDefaultDirectory) + "\"\n") + sf.write("PatchmanBridgeServerDirectory = \"" + str(PatchmanBridgeServerDirectory) + "\"\n") sf.write("\n") sf.write("# 3dsMax directives\n") sf.write("MaxAvailable = " + str(MaxAvailable) + "\n") diff --git a/code/nel/tools/build_gamedata/4_worldedit_data.py b/code/nel/tools/build_gamedata/a1_worldedit_data.py similarity index 100% rename from code/nel/tools/build_gamedata/4_worldedit_data.py rename to code/nel/tools/build_gamedata/a1_worldedit_data.py diff --git a/code/nel/tools/build_gamedata/all.bat b/code/nel/tools/build_gamedata/all.bat deleted file mode 100644 index 3c236aabe..000000000 --- a/code/nel/tools/build_gamedata/all.bat +++ /dev/null @@ -1,19 +0,0 @@ -TITLE 1_export.py -1_export.py -TITLE 2_build.py -2_build.py -TITLE 3_install.py -3_install.py -TITLE 4_worldedit_data.py -4_worldedit_data.py -TITLE 5_client_dev.py -5_client_dev.py -TITLE 6_client_patch.py -6_client_patch.py -bo -TITLE 7_client_install.py -7_client_install.py -TITLE 8_shard_data.py -8_shard_data.py -PAUSE - - diff --git a/code/nel/tools/build_gamedata/all_dev.bat b/code/nel/tools/build_gamedata/all_dev.bat new file mode 100644 index 000000000..c9c13eba3 --- /dev/null +++ b/code/nel/tools/build_gamedata/all_dev.bat @@ -0,0 +1,13 @@ +title Ryzom Core: 1_export.py +1_export.py +title Ryzom Core: 2_build.py +2_build.py +title Ryzom Core: 3_install.py +3_install.py +title Ryzom Core: a1_worldedit_data.py +a1_worldedit_data.py +title Ryzom Core: b1_client_dev.py +b1_client_dev.py +title Ryzom Core: b2_shard_data.py +b2_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/5_client_dev.py b/code/nel/tools/build_gamedata/b1_client_dev.py similarity index 94% rename from code/nel/tools/build_gamedata/5_client_dev.py rename to code/nel/tools/build_gamedata/b1_client_dev.py index b1a47251d..9553ed6df 100644 --- a/code/nel/tools/build_gamedata/5_client_dev.py +++ b/code/nel/tools/build_gamedata/b1_client_dev.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# \file 5_client_dev.py +# \file b1_client_dev.py # \brief Install to client dev # \date 2009-02-18 16:19GMT # \author Jan Boon (Kaetemi) @@ -69,7 +69,7 @@ for category in InstallClientData: printLog(log, "") log.close() -if os.path.isfile("5_client_dev.log"): - os.remove("5_client_dev.log") +if os.path.isfile("b1_client_dev.log"): + os.remove("b1_client_dev.log") shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_dev.log") -shutil.move("log.log", "5_client_dev.log") +shutil.move("log.log", "b1_client_dev.log") diff --git a/code/nel/tools/build_gamedata/b2_shard_data.py b/code/nel/tools/build_gamedata/b2_shard_data.py new file mode 100644 index 000000000..2843769e9 --- /dev/null +++ b/code/nel/tools/build_gamedata/b2_shard_data.py @@ -0,0 +1,93 @@ +#!/usr/bin/python +# +# \file b2_shard_data.py +# \brief Install shard data +# \date 2009-02-18 16:19GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Install shard data +# +# NeL - MMORPG Framework +# Copyright (C) 2010 Winch Gate Property Limited +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Install shard data") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +for dir in InstallShardDataDirectories: + printLog(log, "SHARD PACKAGE " + dir) + mkPath(log, ShardInstallDirectory + "/" + dir) + printLog(log, "FROM " + dir) + mkPath(log, InstallDirectory + "/" + dir) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + dir) +for package in InstallShardDataFiles: + dstDir = package[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, package[1]) +for multiDir in InstallShardDataMultiDirectories: + dstDir = multiDir[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + for srcDir in multiDir[1]: + printLog(log, "FROM " + srcDir) + mkPath(log, InstallDirectory + "/" + srcDir) + mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) + copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) +for multiDir in InstallShardDataPrimitivesDirectories: + dstDir = multiDir[0] + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + for srcDir in multiDir[1]: + printLog(log, "FROM PRIMITIVES " + srcDir) + mkPath(log, PrimitivesDirectory + "/" + srcDir) + mkPath(log, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) + copyFilesNoTreeIfNeeded(log, PrimitivesDirectory + "/" + srcDir, ShardInstallDirectory + "/" + dstDir + "/" + srcDir) +for execDir in InstallShardDataExecutables: + dstDir = execDir[0] + mkPath(log, LinuxServiceExecutableDirectory) + mkPath(log, PatchmanCfgDefaultDirectory) + mkPath(log, InstallDirectory) + mkPath(log, ShardInstallDirectory + "/" + dstDir) + printLog(log, "SHARD PACKAGE " + dstDir) + copyFileIfNeeded(log, LinuxServiceExecutableDirectory + "/" + execDir[1][1], ShardInstallDirectory + "/" + dstDir + "/" + execDir[1][0]) + copyFileListNoTreeIfNeeded(log, PatchmanCfgDefaultDirectory, ShardInstallDirectory + "/" + dstDir, execDir[2]) + copyFileListNoTreeIfNeeded(log, InstallDirectory, ShardInstallDirectory + "/" + dstDir, execDir[3]) +printLog(log, "") + +log.close() +if os.path.isfile("b2_shard_data.log"): + os.remove("b2_shard_data.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_data.log") +shutil.move("log.log", "b2_shard_data.log") diff --git a/code/nel/tools/build_gamedata/c1_shard_patch.py b/code/nel/tools/build_gamedata/c1_shard_patch.py new file mode 100644 index 000000000..a67613f67 --- /dev/null +++ b/code/nel/tools/build_gamedata/c1_shard_patch.py @@ -0,0 +1,109 @@ +#!/usr/bin/python +# +# \file c1_shard_patch.py +# \brief Create a new patch for the patchman bridge +# \date 2014-02-20 00:27GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Create a new patch for the patchman bridge +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util, tarfile +sys.path.append("configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from tools import * + +sys.path.append(WorkspaceDirectory) +from projects import * + +# Log error +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Create a new patch for the patchman bridge") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# List the directories that will be used +archiveDirectories = [ ] +for dir in InstallShardDataDirectories: + if not dir in archiveDirectories: + archiveDirectories += [ dir ] +for package in InstallShardDataFiles: + dstDir = package[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for multiDir in InstallShardDataMultiDirectories: + dstDir = multiDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for multiDir in InstallShardDataPrimitivesDirectories: + dstDir = multiDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] +for execDir in InstallShardDataExecutables: + dstDir = execDir[0] + if not dstDir in archiveDirectories: + archiveDirectories += [ dstDir ] + +printLog(log, ">>> Archive new admin_install.tgz <<<") +mkPath(log, PatchmanBridgeServerDirectory) +adminInstallTgz = PatchmanBridgeServerDirectory + "/admin_install.tgz" +patchmanExecutable = LinuxServiceExecutableDirectory + "/ryzom_patchman_service" +if needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/bin", adminInstallTgz) or needUpdateDirNoSubdirFile(log, PatchmanCfgAdminDirectory + "/patchman", adminInstallTgz) or needUpdate(log, patchmanExecutable, adminInstallTgz): + printLog(log, "WRITE " + adminInstallTgz) + if os.path.isfile(adminInstallTgz): + os.remove(adminInstallTgz) + tar = tarfile.open(adminInstallTgz, "w:gz") + tar.add(PatchmanCfgAdminDirectory + "/bin", arcname = "bin") + tar.add(PatchmanCfgAdminDirectory + "/patchman", arcname = "patchman") + tar.add(patchmanExecutable, arcname = "patchman/ryzom_patchman_service") + tar.close() +else: + printLog(log, "SKIP " + adminInstallTgz) +printLog(log, "") + +printLog(log, ">>> Create new version <<<") +newVersion = 1 +vstr = str(newVersion).zfill(6) +vpath = PatchmanBridgeServerDirectory + "/" + vstr +while os.path.exists(vpath): + newVersion = newVersion + 1 + vstr = str(newVersion).zfill(6) + vpath = PatchmanBridgeServerDirectory + "/" + vstr +mkPath(log, vpath) +for dir in archiveDirectories: + mkPath(log, ShardInstallDirectory + "/" + dir) + tgzPath = vpath + "/" + dir + ".tgz" + printLog(log, "WRITE " + tgzPath) + tar = tarfile.open(tgzPath, "w:gz") + tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) + tar.close() +printLog(log, "") + +log.close() +if os.path.isfile("c1_shard_patch.log"): + os.remove("c1_shard_patch.log") +shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_patch.log") +shutil.move("log.log", "c1_shard_patch.log") diff --git a/code/nel/tools/build_gamedata/configuration/tools.py b/code/nel/tools/build_gamedata/configuration/tools.py index ae205db43..f9cc54964 100644 --- a/code/nel/tools/build_gamedata/configuration/tools.py +++ b/code/nel/tools/build_gamedata/configuration/tools.py @@ -85,6 +85,7 @@ IgElevationTool = "ig_elevation" IgAddTool = "ig_add" BuildClodBankTool = "build_clod_bank" SheetsPackerTool = "sheets_packer" +SheetsPackerShardTool = "sheets_packer_shard" BnpMakeTool = "bnp_make" AiBuildWmapTool = "ai_build_wmap" TgaCutTool = "tga_cut" diff --git a/code/nel/tools/build_gamedata/6_client_patch.py b/code/nel/tools/build_gamedata/d1_client_patch.py similarity index 97% rename from code/nel/tools/build_gamedata/6_client_patch.py rename to code/nel/tools/build_gamedata/d1_client_patch.py index be84379ae..861ea8bd0 100644 --- a/code/nel/tools/build_gamedata/6_client_patch.py +++ b/code/nel/tools/build_gamedata/d1_client_patch.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# \file 6_client_patch.py +# \file d1_client_patch.py # \brief Install to client patch # \date 2009-02-18 16:19GMT # \author Jan Boon (Kaetemi) @@ -151,7 +151,7 @@ else: log.close() -if os.path.isfile("6_client_patch.log"): - os.remove("6_client_patch.log") +if os.path.isfile("d1_client_patch.log"): + os.remove("d1_client_patch.log") shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_patch.log") -shutil.move("log.log", "6_client_patch.log") +shutil.move("log.log", "d1_client_patch.log") diff --git a/code/nel/tools/build_gamedata/7_client_install.py b/code/nel/tools/build_gamedata/d2_client_install.py similarity index 94% rename from code/nel/tools/build_gamedata/7_client_install.py rename to code/nel/tools/build_gamedata/d2_client_install.py index 2bad7fcd2..26fc4f5c5 100644 --- a/code/nel/tools/build_gamedata/7_client_install.py +++ b/code/nel/tools/build_gamedata/d2_client_install.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# \file 7_client_install.py +# \file d2_client_install.py # \brief Install to client install # \date 2009-02-18 16:19GMT # \author Jan Boon (Kaetemi) @@ -77,7 +77,7 @@ for category in InstallClientData: printLog(log, "") log.close() -if os.path.isfile("7_client_install.log"): - os.remove("7_client_install.log") +if os.path.isfile("d2_client_install.log"): + os.remove("d2_client_install.log") shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_client_install.log") -shutil.move("log.log", "7_client_install.log") +shutil.move("log.log", "d2_client_install.log") diff --git a/code/nel/tools/build_gamedata/executables_dev.bat b/code/nel/tools/build_gamedata/executables_dev.bat new file mode 100644 index 000000000..d693b49e0 --- /dev/null +++ b/code/nel/tools/build_gamedata/executables_dev.bat @@ -0,0 +1,7 @@ +title Ryzom Core: 3_install.py (EXECUTABLES) +3_install.py -ipj common/gamedev common/exedll common/cfg +title Ryzom Core: b1_client_dev.py +b1_client_dev.py +title Ryzom Core: b2_shard_data.py +b2_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/install_client_dev.py b/code/nel/tools/build_gamedata/install_client_dev.py deleted file mode 100644 index 0d444cfdb..000000000 --- a/code/nel/tools/build_gamedata/install_client_dev.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python -# -# \file export_build_install.py -# \brief Run all processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all processes -# -# NeL - MMORPG Framework -# Copyright (C) 2010 Winch Gate Property Limited -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import shutil, subprocess - -subprocess.call([ "python", "3_install.py" ]) -subprocess.call([ "python", "5_client_dev.py" ]) - diff --git a/code/nel/tools/build_gamedata/install_data_shard.py b/code/nel/tools/build_gamedata/install_data_shard.py deleted file mode 100644 index 620d90faa..000000000 --- a/code/nel/tools/build_gamedata/install_data_shard.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python -# -# \file export_build_install.py -# \brief Run all processes -# \date 2009-02-18 15:28GMT -# \author Jan Boon (Kaetemi) -# Python port of game data build pipeline. -# Run all processes -# -# NeL - MMORPG Framework -# Copyright (C) 2010 Winch Gate Property Limited -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -import shutil, subprocess - -subprocess.call([ "python", "3_install.py" ]) -subprocess.call([ "python", "8_shard_data.py" ]) - diff --git a/code/nel/tools/build_gamedata/interface_dev.bat b/code/nel/tools/build_gamedata/interface_dev.bat index 1c5fa04eb..6f54f220e 100644 --- a/code/nel/tools/build_gamedata/interface_dev.bat +++ b/code/nel/tools/build_gamedata/interface_dev.bat @@ -1,4 +1,9 @@ +title Ryzom Core: 1_export.py (INTERFACE) 1_export.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame +title Ryzom Core: 2_build.py (INTERFACE) 2_build.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame +title Ryzom Core: 3_install.py (INTERFACE) 3_install.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame -5_client_dev.py +title Ryzom Core: b1_client_dev.py +b1_client_dev.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/leveldesign_dev.bat b/code/nel/tools/build_gamedata/leveldesign_dev.bat index 930ff2339..1692cc155 100644 --- a/code/nel/tools/build_gamedata/leveldesign_dev.bat +++ b/code/nel/tools/build_gamedata/leveldesign_dev.bat @@ -1,5 +1,11 @@ -1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg -2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg -3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg -5_client_dev.py -8_shard_data.py +title Ryzom Core: 1_export.py (LEVELDESIGN) +1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 2_build.py (LEVELDESIGN) +2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 3_install.py (LEVELDESIGN) +3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: b1_client_dev.py (LEVELDESIGN) +b1_client_dev.py +title Ryzom Core: b2_shard_data.py (LEVELDESIGN) +b2_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py b/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py index a2932ccb1..b29914913 100644 --- a/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py +++ b/code/nel/tools/build_gamedata/processes/sheet_id/2_build.py @@ -54,7 +54,7 @@ if MakeSheetId == "": else: mkPath(log, LeveldesignDirectory) mkPath(log, LeveldesignWorldDirectory) - subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "mirror_sheets" ]) + subprocess.call([ MakeSheetId, "-o" + LeveldesignDirectory + "/game_elem/sheet_id.bin", LeveldesignDirectory + "/game_elem", LeveldesignDirectory + "/game_element", LeveldesignWorldDirectory, DataShardDirectory + "/mirror_sheets" ]) # FIXME: Hardcoded path mirror_sheets printLog(log, "") log.close() diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py b/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py new file mode 100644 index 000000000..bc3024f3b --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/0_setup.py @@ -0,0 +1,67 @@ +#!/usr/bin/python +# +# \file 0_setup.py +# \brief Setup sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Setup shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Setup shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Setup source directories +printLog(log, ">>> Setup source directories <<<") +mkPath(log, LeveldesignDirectory) +mkPath(log, LeveldesignDfnDirectory) +mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) +mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets + +# Setup export directories +printLog(log, ">>> Setup export directories <<<") + +# Setup build directories +printLog(log, ">>> Setup build directories <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) + +# Setup client directories +printLog(log, ">>> Setup client directories <<<") +mkPath(log, InstallDirectory + "/" + SheetsShardInstallDirectory) + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py b/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py new file mode 100644 index 000000000..650e0307d --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/1_export.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# +# \file 1_export.py +# \brief Export sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Export shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Export shard sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py b/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py new file mode 100644 index 000000000..c66de2b28 --- /dev/null +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/2_build.py @@ -0,0 +1,67 @@ +#!/usr/bin/python +# +# \file 2_build.py +# \brief Build sheets +# \date 2014-02-19 22:39GMT +# \author Jan Boon (Kaetemi) +# Python port of game data build pipeline. +# Build shard sheets +# +# NeL - MMORPG Framework +# Copyright (C) 2010-2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../../configuration") + +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") +from scripts import * +from buildsite import * +from process import * +from tools import * +from directories import * + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Build sheets") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + +# Find tools +SheetsPackerShard = findTool(log, ToolDirectories, SheetsPackerShardTool, ToolSuffix) +printLog(log, "") + +# For each sheets directory +printLog(log, ">>> Build shard sheets <<<") +if SheetsPackerShard == "": + toolLogFail(log, SheetsPackerShardTool, ToolSuffix) +else: + mkPath(log, LeveldesignDirectory) + mkPath(log, LeveldesignDfnDirectory) + mkPath(log, ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory) + mkPath(log, DataShardDirectory + "/mirror_sheets") # FIXME: Hardcoded path mirror_sheets + mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) + # sheets_packer_shard + subprocess.call([ SheetsPackerShard, LeveldesignDirectory, LeveldesignDfnDirectory, DataShardDirectory + "/mirror_sheets", ExportBuildDirectory + "/" + VisualSlotTabBuildDirectory, ExportBuildDirectory + "/" + SheetsShardBuildDirectory ]) +printLog(log, "") + +log.close() + + +# end of file diff --git a/code/nel/tools/build_gamedata/8_shard_data.py b/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py similarity index 51% rename from code/nel/tools/build_gamedata/8_shard_data.py rename to code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py index 8ab628875..ba7e1a8a8 100644 --- a/code/nel/tools/build_gamedata/8_shard_data.py +++ b/code/nel/tools/build_gamedata/processes/sheets_shard/3_install.py @@ -1,14 +1,14 @@ #!/usr/bin/python # -# \file 8_shard_data.py -# \brief Install shard data -# \date 2009-02-18 16:19GMT +# \file 3_install.py +# \brief Install sheets +# \date 2014-02-19 22:39GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. -# Install shard data +# Install shard sheets # # NeL - MMORPG Framework -# Copyright (C) 2010 Winch Gate Property Limited +# Copyright (C) 2010-2014 by authors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -25,40 +25,33 @@ # import time, sys, os, shutil, subprocess, distutils.dir_util -sys.path.append("configuration") +sys.path.append("../../configuration") if os.path.isfile("log.log"): os.remove("log.log") log = open("log.log", "w") from scripts import * from buildsite import * +from process import * from tools import * +from directories import * -sys.path.append(WorkspaceDirectory) -from projects import * - -# Log error printLog(log, "") printLog(log, "-------") -printLog(log, "--- Install shard data") +printLog(log, "--- Install shard sheets") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") -for dir in InstallShardDataDirectories: - printLog(log, "SHARD DIRECTORY " + dir) - mkPath(log, InstallDirectory + "/" + dir) - mkPath(log, ShardInstallDirectory + "/" + dir) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + dir) -for dir in InstallShardDataCollisionsDirectories: - printLog(log, "SHARD COLLISIONS " + dir) - mkPath(log, InstallDirectory + "/" + dir) - mkPath(log, ShardInstallDirectory + "/" + InstallShardDataCollisionsDirectory + "/" + dir) - copyFilesNoTreeIfNeeded(log, InstallDirectory + "/" + dir, ShardInstallDirectory + "/" + InstallShardDataCollisionsDirectory + "/" + dir) -printLog(log, "") +installPath = InstallDirectory + "/" + SheetsShardInstallDirectory +mkPath(log, installPath) +printLog(log, ">>> Install sheets <<<") +mkPath(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + SheetsShardBuildDirectory, installPath, ".packed_sheets") + +printLog(log, "") log.close() -if os.path.isfile("8_shard_data.log"): - os.remove("8_shard_data.log") -shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_shard_install.log") -shutil.move("log.log", "8_shard_data.log") + + +# end of file diff --git a/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py b/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py new file mode 100644 index 000000000..9eafba1a6 --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e1_clean_string_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean string diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_string_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e1_clean_string_diff.log"): + os.remove("e1_clean_string_diff.log") +shutil.copy("log.log", "e1_clean_string_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e1_clean_string_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py b/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py new file mode 100644 index 000000000..a98c7b27c --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e2_clean_words_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean words diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_words_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e2_clean_words_diff.log"): + os.remove("e2_clean_words_diff.log") +shutil.copy("log.log", "e2_clean_words_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e2_clean_words_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py b/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py new file mode 100644 index 000000000..337ac6e99 --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e3_clean_clause_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean clause diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_clause_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e3_clean_clause_diff.log"): + os.remove("e3_clean_clause_diff.log") +shutil.copy("log.log", "e3_clean_clause_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e3_clean_clause_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py b/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py new file mode 100644 index 000000000..8f08d73ea --- /dev/null +++ b/code/nel/tools/build_gamedata/translation/e4_clean_phrase_diff.py @@ -0,0 +1,54 @@ +#!/usr/bin/python +# +# \author Lukasz Kolasa (Maczuga) +# +# NeL - MMORPG Framework +# Copyright (C) 2014 by authors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import time, sys, os, shutil, subprocess, distutils.dir_util +sys.path.append("../configuration") +from scripts import * +from buildsite import * +from tools import * +os.chdir(TranslationDirectory) +if os.path.isfile("log.log"): + os.remove("log.log") +log = open("log.log", "w") + +printLog(log, "") +printLog(log, "-------") +printLog(log, "--- Clean phrase diff") +printLog(log, "-------") +printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) +printLog(log, "") + + +TranslationTools = findTool(log, ToolDirectories, TranslationToolsTool, ToolSuffix) +try: + subprocess.call([ TranslationTools, "clean_phrase_diff" ]) +except Exception, e: + printLog(log, "<" + processName + "> " + str(e)) +printLog(log, "") + + +log.close() +if os.path.isfile("e4_clean_phrase_diff.log"): + os.remove("e4_clean_phrase_diff.log") +shutil.copy("log.log", "e4_clean_phrase_diff_" + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + ".log") +shutil.move("log.log", "e4_clean_phrase_diff.log") + +raw_input("PRESS ANY KEY TO EXIT") diff --git a/code/nel/tools/build_gamedata/translation/make_merge_all.py b/code/nel/tools/build_gamedata/translation/make_merge_all.py index f6ea582a3..f4dbd95fb 100644 --- a/code/nel/tools/build_gamedata/translation/make_merge_all.py +++ b/code/nel/tools/build_gamedata/translation/make_merge_all.py @@ -47,6 +47,10 @@ try: subprocess.call([ TranslationTools, "merge_words_diff" ]) subprocess.call([ TranslationTools, "make_string_diff" ]) subprocess.call([ TranslationTools, "merge_string_diff" ]) + subprocess.call([ TranslationTools, "clean_string_diff" ]) + subprocess.call([ TranslationTools, "clean_words_diff" ]) + subprocess.call([ TranslationTools, "clean_clause_diff" ]) + subprocess.call([ TranslationTools, "clean_phrase_diff" ]) subprocess.call([ TranslationTools, "make_worksheet_diff", "bot_names.txt" ]) subprocess.call([ TranslationTools, "merge_worksheet_diff", "bot_names.txt" ]) except Exception, e: diff --git a/code/nel/tools/build_gamedata/translation/make_merge_wk.py b/code/nel/tools/build_gamedata/translation/make_merge_wk.py index 2352a8490..4442232ab 100644 --- a/code/nel/tools/build_gamedata/translation/make_merge_wk.py +++ b/code/nel/tools/build_gamedata/translation/make_merge_wk.py @@ -31,7 +31,7 @@ log = open("log.log", "w") printLog(log, "") printLog(log, "-------") -printLog(log, "--- Make and merge work") +printLog(log, "--- Make, merge and clean work") printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") @@ -72,10 +72,19 @@ except Exception, e: printLog(log, ">>> Mark diffs as translated <<<") diffFiles = os.listdir("diff") for diffFile in diffFiles: - if "_wk_diff_" in diffFile: + if "wk_diff_" in diffFile: printLog(log, "DIFF " + "diff/" + diffFile) subprocess.call([ TranslationTools, "crop_lines", "diff/" + diffFile, "3" ]) +#printLog(log, ">>> Clean diff <<<") +#try: +# subprocess.call([ TranslationTools, "clean_string_diff" ]) +# subprocess.call([ TranslationTools, "clean_phrase_diff" ]) +# subprocess.call([ TranslationTools, "clean_clause_diff" ]) +# subprocess.call([ TranslationTools, "clean_words_diff" ]) +#except Exception, e: +# printLog(log, "<" + processName + "> " + str(e)) +#printLog(log, "") printLog(log, ">>> Merge diff <<<") try: diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 8d5f7cfb9..bb837b03b 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -1712,10 +1712,7 @@ void CClientConfig::setValues() } // Initialize the camera distance (after camera dist max) - if (!ClientCfg.FPV) - { - View.cameraDistance(ClientCfg.CameraDistance); - } + View.setCameraDistanceMaxForPlayer(); // draw in client light? if(ClientCfg.Light) diff --git a/code/ryzom/client/src/global.cpp b/code/ryzom/client/src/global.cpp index c965db43f..29db04f5e 100644 --- a/code/ryzom/client/src/global.cpp +++ b/code/ryzom/client/src/global.cpp @@ -28,6 +28,7 @@ using namespace NLMISC; NL3D::UDriver *Driver = 0; // The main 3D Driver NL3D::IStereoDisplay *StereoDisplay = NULL; // Stereo display NL3D::IStereoHMD *StereoHMD = NULL; // Head mount display +NL3D::IStereoNGHMD *StereoNGHMD = NULL; // HMD with player death support CSoundManager *SoundMngr = 0; // the sound manager NL3D::UMaterial GenericMat; // Generic Material NL3D::UTextContext *TextContext = 0; // Context for all the text in the client. @@ -68,6 +69,8 @@ bool PermanentlyBanned = false; bool IgnoreEntityDbUpdates = false; bool FreeTrial = false; +bool NoLogout = false; + std::vector > VRDeviceCache; diff --git a/code/ryzom/client/src/global.h b/code/ryzom/client/src/global.h index 5879eeaec..f22f786d6 100644 --- a/code/ryzom/client/src/global.h +++ b/code/ryzom/client/src/global.h @@ -42,6 +42,7 @@ namespace NL3D class UWaterEnvMap; class IStereoDisplay; class IStereoHMD; + class IStereoNGHMD; } class CEntityAnimationManager; @@ -81,6 +82,7 @@ const float ExtraZoneLoadingVision = 100.f; extern NL3D::UDriver *Driver; // The main 3D Driver extern NL3D::IStereoDisplay *StereoDisplay; // Stereo display extern NL3D::IStereoHMD *StereoHMD; // Head mount display +extern NL3D::IStereoNGHMD *StereoNGHMD; // HMD with player death support extern CSoundManager *SoundMngr; // the sound manager extern NL3D::UMaterial GenericMat; // Generic Material extern NL3D::UTextContext *TextContext; // Context for all the text in the client. @@ -128,6 +130,8 @@ extern std::string Cookie, FSAddr; extern std::string RingMainURL; extern bool FreeTrial; +extern bool NoLogout; + void resetTextContext (const char *font, bool resetInterfaceManager); #endif // CL_GLOBAL_H diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index d603be4a3..d0a64b0a4 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -40,6 +40,7 @@ #include "nel/3d/u_text_context.h" #include "nel/3d/u_shape_bank.h" #include "nel/3d/stereo_hmd.h" +#include "nel/3d/stereo_ng_hmd.h" // Net. #include "nel/net/email.h" // Ligo. @@ -639,10 +640,15 @@ void initStereoDisplayDevice() StereoDisplay = IStereoDisplay::createDevice(*deviceInfo); if (StereoDisplay) { - if (deviceInfo->Class == CStereoDeviceInfo::StereoHMD) + if (deviceInfo->Class == CStereoDeviceInfo::StereoHMD + || deviceInfo->Class == CStereoDeviceInfo::StereoNGHMD) { nlinfo("VR [C]: Stereo display device is a HMD"); StereoHMD = static_cast(StereoDisplay); + if (deviceInfo->Class == CStereoDeviceInfo::StereoNGHMD) + { + StereoNGHMD = static_cast(StereoDisplay); + } } if (Driver) // VR_DRIVER { diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 8a70e10fd..df2cb0376 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1089,6 +1089,7 @@ void CInterfaceManager::configureQuitDialogBox() // Show Launch Editor if not in editor mode CInterfaceElement *eltCancel = quitDlg->getElement(quitDialogStr+":cancel"); CInterfaceElement *eltEdit = quitDlg->getElement(quitDialogStr+":launch_editor"); + if (eltEdit) { if (UserRoleInSession != R2::TUserRole::ur_editor && !sessionOwner) @@ -1159,6 +1160,18 @@ void CInterfaceManager::configureQuitDialogBox() eltQuitNow->setActive(false); } } + + if (NoLogout) + { + eltEdit->setY(0); + eltEdit->setActive(false); + eltQuit->setY(0); + eltQuit->setActive(false); + eltQuitNow->setY(0); + eltQuitNow->setActive(false); + eltRet->setY(0); + eltRet->setActive(false); + } } // Make all controls have the same size diff --git a/code/ryzom/client/src/motion/modes/death_mode.cpp b/code/ryzom/client/src/motion/modes/death_mode.cpp index cd987b635..4e39f394f 100644 --- a/code/ryzom/client/src/motion/modes/death_mode.cpp +++ b/code/ryzom/client/src/motion/modes/death_mode.cpp @@ -21,6 +21,9 @@ // INCLUDES // ////////////// #include "stdpch.h" + +#include "nel/3d/stereo_ng_hmd.h" + // Client. #include "../../input.h" #include "../user_controls.h" @@ -28,6 +31,7 @@ #include "../../view.h" #include "../../interface_v3/interface_manager.h" #include "../../entities.h" +#include "global.h" /////////// @@ -61,6 +65,9 @@ void CUserControls::deathModeStart() _InternalView = false; // Show/hide all or parts of the user body (after _InternaView is set). UserEntity->updateVisualDisplay(); + // Kill the player + if (StereoNGHMD) + StereoNGHMD->killUser(); }// deathModeStart // //----------------------------------------------- diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 1eedc16c5..487e05358 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -3555,6 +3555,13 @@ void impulseSetNpcIconTimer(NLMISC::CBitMemStream &impulse) CNPCIconCache::getInstance().setMissionGiverTimer(delay); } +void impulseEventDisableLogoutButton(NLMISC::CBitMemStream &impulse) +{ + NoLogout = true; + CInterfaceManager *im = CInterfaceManager::getInstance(); + im->configureQuitDialogBox(); +} + //----------------------------------------------- // initializeNetwork : //----------------------------------------------- @@ -3704,6 +3711,8 @@ void initializeNetwork() GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_DESC", impulseSetNpcIconDesc ); GenericMsgHeaderMngr.setCallback( "NPC_ICON:SVR_EVENT_MIS_AVL", impulseServerEventForMissionAvailability ); GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_TIMER", impulseSetNpcIconTimer ); + + GenericMsgHeaderMngr.setCallback( "EVENT:DISABLE_LOGOUT_BUTTON", impulseEventDisableLogoutButton ); } diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index b40d68b35..cdf5dbcb5 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -36,6 +36,7 @@ #include "nel/3d/u_visual_collision_manager.h" #include "nel/3d/u_shape_bank.h" #include "nel/3d/stereo_hmd.h" +#include "nel/3d/stereo_ng_hmd.h" // Client #include "global.h" #include "release.h" @@ -516,9 +517,13 @@ void releaseStereoDisplayDevice() { if (StereoDisplay) { + if (NoLogout && StereoNGHMD) + StereoNGHMD->killUser(); + delete StereoDisplay; StereoDisplay = NULL; StereoHMD = NULL; + StereoNGHMD = NULL; } IStereoDisplay::releaseAllLibraries(); } diff --git a/code/ryzom/common/data_common/msg.xml b/code/ryzom/common/data_common/msg.xml index 3fa75650e..9ae6fab16 100644 --- a/code/ryzom/common/data_common/msg.xml +++ b/code/ryzom/common/data_common/msg.xml @@ -1111,8 +1111,8 @@ sendto="EGS" format="u32 u32 uc" description="set the cursom of the item in inventory $inventory in slot $slot to $text" /> - + - + @@ -128,7 +128,7 @@ @@ -147,7 +147,7 @@ - + @@ -159,7 +159,7 @@ - + @@ -175,7 +175,7 @@ - + @@ -2513,10 +2513,10 @@ --> - + - + @@ -2720,10 +2720,10 @@ --> - + - + @@ -2761,10 +2761,10 @@ --> - + - + @@ -2802,10 +2802,10 @@ --> - + - + @@ -2828,10 +2828,10 @@ - + - + @@ -2869,7 +2869,7 @@ - + @@ -2888,7 +2888,7 @@ - + @@ -2907,7 +2907,7 @@ - + @@ -2924,7 +2924,7 @@ - + @@ -3662,7 +3662,7 @@ - + @@ -3751,7 +3751,7 @@ - + @@ -3765,7 +3765,7 @@ - + @@ -3866,7 +3866,7 @@ --> - + @@ -3991,7 +3991,7 @@ --> - + - + - + @@ -4052,7 +4052,7 @@ --> - + @@ -4098,7 +4098,7 @@ - + @@ -4493,7 +4493,7 @@ --> - + @@ -4635,7 +4635,7 @@ - + @@ -4670,7 +4670,7 @@ - + @@ -4704,7 +4704,7 @@ --> - + @@ -4738,7 +4738,7 @@ --> - + diff --git a/code/ryzom/common/src/game_share/mirror.cpp b/code/ryzom/common/src/game_share/mirror.cpp index cdf353143..ff0ed0b2c 100644 --- a/code/ryzom/common/src/game_share/mirror.cpp +++ b/code/ryzom/common/src/game_share/mirror.cpp @@ -2315,7 +2315,17 @@ void CMirror::init( std::vector& dataSetsToLoad, CUnifiedNetwork::getInstance()->addCallbackArray( MirrorCbArray, NB_MIRROR_CALLBACKS ); // Load the sheets of the datasets - loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", _SDataSetSheets ); + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm("dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", _SDataSetSheets, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if (_SDataSetSheets.empty()) + { + loadForm("dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", _SDataSetSheets, true); + } // Set the tag nlassert( (tag >= AllTag) && (tag != ExcludedTag) ); diff --git a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp index 5ce57fced..dbd4fc0ad 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.cpp @@ -42,9 +42,22 @@ std::map< NLMISC::CSheetId, CStaticLightCycle > CTimeDateSeasonManager::_StaticL void CTimeDateSeasonManager::init( uint32 /* startDay */, float /* startTime */) { // load light cycle sheet - string lightCycleFile = IService::getInstance()->WriteFilesDirectory; - lightCycleFile = lightCycleFile + string("light_cycles.packed_sheets"); - loadForm( "light_cycle", lightCycleFile, _StaticLightCyclesHours ); + packSheets(IService::getInstance()->WriteFilesDirectory); +} + +void CTimeDateSeasonManager::packSheets(const std::string &writeDirectory) +{ + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if ( _StaticLightCyclesHours.empty() ) + { + loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours, true); + } } diff --git a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h index 1a0bd32bc..62b988ad7 100644 --- a/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h +++ b/code/ryzom/common/src/game_share/time_weather_season/time_date_season_manager.h @@ -36,6 +36,7 @@ class CTimeDateSeasonManager public: // init RyzomTime, date, weather static void init( uint32 startDay = RYZOM_START_DAY, float startTime = RYZOM_START_HOUR ); + static void packSheets(const std::string &writeDirectory); // tick update => update ryzom time static void tickUpdate(); diff --git a/code/ryzom/server/data_shard/client_commands_privileges.txt b/code/ryzom/server/data_shard/egs/client_commands_privileges.txt similarity index 100% rename from code/ryzom/server/data_shard/client_commands_privileges.txt rename to code/ryzom/server/data_shard/egs/client_commands_privileges.txt diff --git a/code/ryzom/server/data_shard/egs/shop_category.cfg b/code/ryzom/server/data_shard/egs/shop_category.cfg new file mode 100644 index 000000000..0986b0687 --- /dev/null +++ b/code/ryzom/server/data_shard/egs/shop_category.cfg @@ -0,0 +1,468 @@ +// shop category +ShopCategory = { + "no_bot_chat", + + "missions", + "guild_creator", + "characteristics_seller", + + "harvest_action", + "craft_action", + "magic_action", + "fight_action", + + // Limited to 20 differents level + "LEVEL", + "L1", + "L10", + "L20", + "L50", + "L100", + "L150", + "L200", + "L250", + "L300", + "END_LEVEL", + + // Quality of item, 5 quality from 'A' to 'E' + "QUALITY", + "Q20", // energy de 0 à 20 + "Q35", // energy de 21 à 35 + "Q50", // energy de 36 à 50 + "Q65", // energy de 51 à 65 + "Q80", // energy de 66 à 80 (et plus) + "END_QUALITY", + + // LEVEL must be defined before items + "ITEM_CATEGORY", + "DAGGER", + "SWORD", + "MACE", + "AXE", + "SPEAR", + "STAFF", + "TWO_HAND_SWORD", + "TWO_HAND_AXE", + "PIKE", + "TWO_HAND_MACE", + "AUTOLAUCH", + "BOWRIFLE", + "LAUNCHER", + "PISTOL", + "BOWPISTOL", + "RIFLE", + "AUTOLAUNCH_AMMO", + "BOWRIFLE_AMMO", + "LAUNCHER_AMMO", + "PISTOL_AMMO", + "BOWPISTOL_AMMO", + "RIFLE_AMMO", + "SHIELD", + "BUCKLER", + "LIGHT_BOOTS", + "LIGHT_GLOVES", + "LIGHT_PANTS", + "LIGHT_SLEEVES", + "LIGHT_VEST", + "MEDIUM_BOOTS", + "MEDIUM_GLOVES", + "MEDIUM_PANTS", + "MEDIUM_SLEEVES", + "MEDIUM_VEST", + "HEAVY_BOOTS", + "HEAVY_GLOVES", + "HEAVY_PANTS", + "HEAVY_SLEEVES", + "HEAVY_VEST", + "HEAVY_HELMET", + "ANKLET", + "BRACELET", + "DIADEM", + "EARING", + "PENDANT", + "RING", + "SHEARS", + "ArmorTool", + "AmmoTool", + "MeleeWeaponTool", + "RangeWeaponTool", + "JewelryTool", + "ToolMaker", + "MEKTOUB_PACKER_TICKET", + "MEKTOUB_MOUNT_TICKET", + "MAGICIAN_STAFF", + "HAIR_MALE", + "HAIRCOLOR_MALE", + "TATOO_MALE", + "HAIR_FEMALE", + "HAIRCOLOR_FEMALE", + "TATOO_FEMALE", + "FOOD", + "SERVICE_STABLE", + "JOB_ELEMENT", + + + + "END_ITEM_CATEGORY", + + "RM_ITEM_PART", + "MPL", //A (Blade) + "MPH", //B MpH (Hammer) + "MPP", //C MpP (Point) + "MPM", //D MpM (Shaft) + "MPG", //E MpG (Grip) + "MPC", //F MpC (Counterweight) + "MPGA", //G MpGA (Trigger) + "MPPE", //H MpPE (Firing pin) + "MPCA", //I MpCA (Barrel) + "MPE", //J MpE (Explosive) + "MPEN", //K MpEN (Ammo jacket) + "MPPR", //L MpPR (Ammo bullet) + "MPCR", //M MpCR (Armor shell) + "MPRI", //N MpRI (Armor interior coating) + "MPRE", //O MpRE (Armor interieur stuffing) + "MPAT", //P MpAT (Armor clip) + "MPSU", //Q MpSU (Jewel stone support) + "MPED", //R MpED (Jewel stone) + "MPBT", //S MpBT (Blacksmith tool) + "MPPES", //T MpPES (Pestle tool) + "MPSH", //U MpSH (Sharpener tool) + "MPTK", //V MpTK (Tunneling Knife) + "MPJH", //W MpJH (Jewelry hammer) + "MPCF", //X MpCF (Campfire) + "MPVE", //Y MpVE (Clothes) + "MPMF", //Z MpMF (Magic Focus) + "END_RM_ITEM_PART", + + "TELEPORT", + "KAMI_TP", + "KARAVAN_TP", + "END_TELEPORT", + + "ECOSYSTEM", + "CommonEcosystem", + "Desert", + "Forest", + "Lacustre", + "Jungle", + "Goo", + "PrimaryRoot", + "END_ECOSYSTEM", + + "ORIGIN", + "Common", + "Fyros", + "Matis", + "Tryker", + "Zorai", + "Karavan", + "Tribe", + "Refugee", + "END_ORIGIN", + + "TOOLS_TYPE", + "CRAFTING_TOOL", + "HARVEST_TOOL", + "TAMING_TOOL", + "TRAINING_TOOL", + "END_TOOLS_TYPE", + + "SHOP_TYPE", + "STATIC_SHOP", // Sell NPC Items + "DYNAMIC_SHOP", // Sell Player character Items + "STATIC_DYNAMIC_SHOP", // Sell NPC & Player character Items + "END_SHOP_TYPE", +}; + +// friendly versions of shop names +ShopNameAliases= +{ + "MOUNT: unknown for this time", + + //definition of item group aliases + //armor groups + "LARMOR: LIGHT_BOOTS: LIGHT_GLOVES: LIGHT_PANTS: LIGHT_SLEEVES: LIGHT_VEST", + "MARMOR: MEDIUM_BOOTS: MEDIUM_GLOVES: MEDIUM_PANTS: MEDIUM_SLEEVES: MEDIUM_VEST", + "HARMOR: HEAVY_BOOTS: HEAVY_GLOVES: HEAVY_PANTS: HEAVY_SLEEVES: HEAVY_VEST: HEAVY_HELMET", + "LARMORSHIELD: LIGHT_BOOTS: LIGHT_GLOVES: LIGHT_PANTS: LIGHT_SLEEVES: LIGHT_VEST: BUCKLER", + "MARMORSHIELD: MEDIUM_BOOTS: MEDIUM_GLOVES: MEDIUM_PANTS: MEDIUM_SLEEVES: MEDIUM_VEST: BUCKLER: SHIELD", + "HARMORSHIELD: HEAVY_BOOTS: HEAVY_GLOVES: HEAVY_PANTS: HEAVY_SLEEVES: HEAVY_VEST: HEAVY_HELMET: BUCKLER: SHIELD", + + //weapon groups + "SHIELDS: SHIELD: BUCKLER", + "MELEE_WEAPON: DAGGER: SWORD: MACE: AXE: SPEAR: STAFF: TWO_HAND_SWORD: TWO_HAND_AXE: PIKE: TWO_HAND_MACE: MAGICIAN_STAFF:", + "MELEE: SHIELDS: MELEE_WEAPON", + "MELEE_WEAPON_1H: DAGGER: SWORD: MACE: AXE: SPEAR: STAFF", + "MELEE_WEAPON_2H: TWO_HAND_SWORD: TWO_HAND_AXE: PIKE: TWO_HAND_MACE: MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_MATIS: DAGGER: SWORD: SPEAR : MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_ZORAI: DAGGER: STAFF: MACE : MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_FYROS: DAGGER: AXE: MACE : MAGICIAN_STAFF", + "NEWBIELAND_WEAPON_TRYKER: DAGGER: STAFF: SWORD : MAGICIAN_STAFF", + "MELEE_WEAPON_NEWBIELAND_ALL: DAGGER: SWORD: MACE: AXE", //NEW newbieland + "MELEE_WEAPON_2H_NEWBIELAND_ALL: TWO_HAND_SWORD: TWO_HAND_AXE: PIKE: TWO_HAND_MACE: MAGICIAN_STAFF", //NEW Newbieland + "AMMO: BOWRIFLE_AMMO: PISTOL_AMMO: BOWPISTOL_AMMO: RIFLE_AMMO: AUTOLAUNCH_AMMO: LAUNCHER_AMMO", + "RANGE_WEAPON: BOWRIFLE: PISTOL: BOWPISTOL: RIFLE: AUTOLAUCH: LAUNCHER", + "RANGE: RANGE_WEAPON: AMMO", + "RANGE_BOW: RANGE_WEAPON: AMMO", + "RANGE_PISTOLRIFLE: RANGE_WEAPON: AMMO", + + //tool groups + "CRAFTING_TOOL: ArmorTool: AmmoTool: MeleeWeaponTool: RangeWeaponTool: JewelryTool: ToolMaker", + "HARVEST_TOOL: SHEARS", + "TOOL: CRAFTING_TOOL: HARVEST_TOOL", + "TOOLS_NOOB : ArmorTool: AmmoTool: MeleeWeaponTool: RangeWeaponTool: JewelryTool : HARVEST_TOOL", //NEW Newbieland + + //cosmetic groups + "HAIRDRESSING_MALE: HAIR_MALE: HAIRCOLOR_MALE", + "HAIRDRESSING_FEMALE: HAIR_FEMALE: HAIRCOLOR_FEMALE", + + + //jewel group + "JEWEL: ANKLET: BRACELET: DIADEM: EARING: PENDANT: RING", + //end of definition of item group aliases + + //definition of quality alias + "QUALITY_A: Q20", + "QUALITY_B: Q35", + "QUALITY_C: Q50", + "QUALITY_D: Q65", + "QUALITY_E: Q80", + + //definition of level level aliases + //newbieland + "REFUGEE_LEVEL: L1: QUALITY_A", + "NEWBIELAND_LEVEL: L10: L20: L50: QUALITY_A", + "RM_NEWBIELAND_LEVEL: L10: L20: L50: QUALITY_A", //only for raw material + + + //villages + "VILLAGE_LOW_LEVEL: L10: L20: L50: L100: L150: QUALITY_A", + "VILLAGE_MED_LEVEL: L10: L20: L50: L100: L150: L200: QUALITY_A", + "VILLAGE_HIGH_LEVEL: L10: L20: L50: L100: L150: L200: L250: L300: QUALITY_A", + "VILLAGE_LEVEL: L10: L20: L50: QUALITY_A", + "RM_VILLAGE_LEVEL: L10: L20: L50: QUALITY_A", //only for raw material + "RM_VILLAGE_HIGH_LEVEL: L10: L20: L50: L100: L150: L200: L250: L300: QUALITY_A", //only for raw material + + //town + "TOWN_LOW_LEVEL: L10: L20: L50: QUALITY_A", + "TOWN_HIGH_LEVEL: L10: L20: L50: L100: QUALITY_A", + "RM_TOWN_LEVEL: L10: L20: L50: L100: L150: QUALITY_A", //only for raw material + + //tribe + "TRIBE_LEVEL: L10: L20: L50: L100: L150: L200: L250: L300: QUALITY_A", + + //end of definition of level aliases + + //definition of regional aliases + //armor + "MATIS_LARMOR: Matis: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "MATIS_MARMOR: Matis: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "MATIS_HARMOR: Matis: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + + "TRYKER_LARMOR: Tryker: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "TRYKER_MARMOR: Tryker: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "TRYKER_HARMOR: Tryker: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + + "ZORAI_LARMOR: Zorai: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "ZORAI_MARMOR: Zorai: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "ZORAI_HARMOR: Zorai: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + "FYROS_LARMOR: Fyros: LARMORSHIELD: STATIC_DYNAMIC_SHOP", + "FYROS_MARMOR: Fyros: MARMORSHIELD: STATIC_DYNAMIC_SHOP", + "FYROS_HARMOR: Fyros: HARMORSHIELD: STATIC_DYNAMIC_SHOP", + + "NEWBIELAND_LARMOR_MATIS: NEWBIELAND_LEVEL: Matis: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_ZORAI: NEWBIELAND_LEVEL: Zorai: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_FYROS: NEWBIELAND_LEVEL: Fyros: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_TRYKER: NEWBIELAND_LEVEL: Tryker: LARMORSHIELD: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_MARMOR: NEWBIELAND_LEVEL: MARMORSHIELD: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_HARMOR: NEWBIELAND_LEVEL: HARMORSHIELD: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_LARMOR_ALL : NEWBIELAND_LEVEL: LARMOR: DYNAMIC_SHOP", //NEW newbieland + "NEWBIELAND_MARMOR_ALL : NEWBIELAND_LEVEL: MARMOR: DYNAMIC_SHOP", //NEW newbieland + + //weapon + "MATIS_MELEE: Common : Matis: MELEE: STATIC_DYNAMIC_SHOP", + "FYROS_MELEE: Common : Fyros: MELEE: STATIC_DYNAMIC_SHOP", + "ZORAI_MELEE: Common : Zorai: MELEE: STATIC_DYNAMIC_SHOP", + "TRYKER_MELEE: Common : Tryker: MELEE: STATIC_DYNAMIC_SHOP", + "MATIS_MELEE_WEAPON_1H: Common : Matis : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "FYROS_MELEE_WEAPON_1H: Common : Fyros : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "ZORAI_MELEE_WEAPON_1H: Common : Zorai : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "TRYKER_MELEE_WEAPON_1H: Common : Tryker : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", + "MATIS_MELEE_WEAPON_2H: Common : Matis : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "FYROS_MELEE_WEAPON_2H: Common : Fyros : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "ZORAI_MELEE_WEAPON_2H: Common : Zorai : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "TRYKER_MELEE_WEAPON_2H: Common : Tryker : MELEE_WEAPON_2H: STATIC_DYNAMIC_SHOP", + "MATIS_NEWBIELAND_WEAPON_MATIS: NEWBIELAND_LEVEL: Common : Matis : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "FYROS_NEWBIELAND_WEAPON_FYROS: NEWBIELAND_LEVEL: Common : Fyros : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "ZORAI_NEWBIELAND_WEAPON_ZORAI: NEWBIELAND_LEVEL: Common : Zorai : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "TRYKER_NEWBIELAND_WEAPON_TRYKER: NEWBIELAND_LEVEL: Common : Tryker : MELEE_WEAPON_1H: STATIC_DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_MELEE_WEAPON_2H: NEWBIELAND_LEVEL: MELEE_WEAPON_2H: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_RANGE_WEAPON: NEWBIELAND_LEVEL: RANGE: DYNAMIC_SHOP", //only for newbieland + "NEWBIELAND_WEAPON_ALL: NEWBIELAND_LEVEL: MELEE_WEAPON_NEWBIELAND_ALL: STATIC_DYNAMIC_SHOP", //NEW newbieland + "MELEE_WEAPON_2H_NEWBIELAND: NEWBIELAND_LEVEL: MELEE_WEAPON_2H_NEWBIELAND_ALL: DYNAMIC_SHOP", //NEW newbieland + + + "MATIS_RANGE: Common : Matis : RANGE: STATIC_DYNAMIC_SHOP", + "FYROS_RANGE: Common : Fyros : RANGE: STATIC_DYNAMIC_SHOP", + "ZORAI_RANGE: Common : Zorai : RANGE: STATIC_DYNAMIC_SHOP", + "TRYKER_RANGE: Common : Tryker : RANGE: STATIC_DYNAMIC_SHOP", + "MATIS_RANGE_BOW: Common : Matis : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "FYROS_RANGE_BOW: Common : Fyros : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "ZORAI_RANGE_BOW: Common : Zorai : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "TRYKER_RANGE_BOW: Common : Tryker : RANGE_BOW: STATIC_DYNAMIC_SHOP", + "MATIS_RANGE_PISTOLRIFLE: Common : Matis : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + "FYROS_RANGE_PISTOLRIFLE: Common : Fyros : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + "ZORAI_RANGE_PISTOLRIFLE: Common : Zorai : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + "TRYKER_RANGE_PISTOLRIFLE: Common : Tryker : RANGE_PISTOLRIFLE: STATIC_DYNAMIC_SHOP", + + //tool + "COMMON_TOOL: Common : TOOL: STATIC_DYNAMIC_SHOP", + "NEWBIELAND_TOOL : Common : TOOLS_NOOB: STATIC_DYNAMIC_SHOP", // NEW Newbieland + + //job elements + "COMMON_JOB: Common : JOB_ELEMENT: STATIC_DYNAMIC_SHOP", + + //jewel + "MATIS_JEWEL: Matis: JEWEL: DYNAMIC_SHOP", + "TRYKER_JEWEL: Tryker: JEWEL: DYNAMIC_SHOP", + "ZORAI_JEWEL: Zorai: JEWEL: DYNAMIC_SHOP", + "FYROS_JEWEL: Fyros: JEWEL: DYNAMIC_SHOP", + "MATIS_NEWBIELAND_JEWEL:MATIS_JEWEL:NEWBIELAND_LEVEL", + "TRYKER_NEWBIELAND_JEWEL:TRYKER_JEWEL:NEWBIELAND_LEVEL", + "ZORAI_NEWBIELAND_JEWEL:ZORAI_JEWEL:NEWBIELAND_LEVEL", + "FYROS_NEWBIELAND_JEWEL:FYROS_JEWEL:NEWBIELAND_LEVEL", + "NEWBIELAND_JEWEL_ALL: NEWBIELAND_LEVEL: JEWEL: DYNAMIC_SHOP", //NEW Newbieland + + //cosmetic + "MATIS_HAIRDRESSING_MALE: Matis: HAIRDRESSING_MALE: STATIC_SHOP", + "MATIS_HAIRDRESSING_FEMALE: Matis: HAIRDRESSING_FEMALE: STATIC_SHOP", + "MATIS_TATOO_MALE: Matis: TATOO_MALE: STATIC_SHOP", + "MATIS_TATOO_FEMALE: Matis: TATOO_FEMALE: STATIC_SHOP", + "TRYKER_HAIRDRESSING_MALE: Tryker: HAIRDRESSING_MALE: STATIC_SHOP", + "TRYKER_HAIRDRESSING_FEMALE: Tryker: HAIRDRESSING_FEMALE: STATIC_SHOP", + "TRYKER_TATOO_MALE: Tryker: TATOO_MALE: STATIC_SHOP", + "TRYKER_TATOO_FEMALE: Tryker: TATOO_FEMALE: STATIC_SHOP", + "ZORAI_HAIRDRESSING_MALE: Zorai: HAIRDRESSING_MALE: STATIC_SHOP", + "ZORAI_HAIRDRESSING_FEMALE: Zorai: HAIRDRESSING_FEMALE: STATIC_SHOP", + "ZORAI_TATOO_MALE: Zorai: TATOO_MALE: STATIC_SHOP", + "ZORAI_TATOO_FEMALE: Zorai: TATOO_FEMALE: STATIC_SHOP", + "FYROS_HAIRDRESSING_MALE: Fyros: HAIRDRESSING_MALE: STATIC_SHOP", + "FYROS_HAIRDRESSING_FEMALE: Fyros: HAIRDRESSING_FEMALE: STATIC_SHOP", + "FYROS_TATOO_MALE: Fyros: TATOO_MALE: STATIC_SHOP", + "FYROS_TATOO_FEMALE: Fyros: TATOO_FEMALE: STATIC_SHOP", + + + + // Item part per item family + "RM_ITEM_PART_MELEE: MPL: MPH: MPP: MPM: MPG: MPC: MPMF: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_RANGE: MPGA: MPPE: MPCA: MPM: MPE: MPEN: MPPR: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_ARMOR: MPCR: MPRI: MPRE: MPAT: MPVE: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_JEWEL: MPSU: MPED: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_MAGIC_FOCUS: MPMF: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_CLOTH: MPVE: STATIC_DYNAMIC_SHOP", + "RM_ITEM_PART_TOOLS: MPBT: MPPES: MPSH: MPTK: MPJH: MPCF: STATIC_DYNAMIC_SHOP", + + // Item part per craftgroup + "RM_CRAFTGROUP_AC: MPL: MPP", + "RM_CRAFTGROUP_BF: MPH: MPC", + "RM_CRAFTGROUP_RZ: MPED: MPMF", + "RM_CRAFTGROUP_IM: MPCA: MPCR", + "RM_CRAFTGROUP_HP: MPPE: MPAT", + "RM_CRAFTGROUP_DL: MPM: MPPR", + "RM_CRAFTGROUP_GQ: MPGA: MPSU", + "RM_CRAFTGROUP_EY: MPG: MPVE", + "RM_CRAFTGROUP_KN: MPEN: MPRI", + "RM_CRAFTGROUP_JO: MPE: MPRE", + + // All Item parts sold by merchants + "RM_ITEM_PART_SOLD: MPL: MPP: MPH: MPC: MPED: MPMF: MPCA: MPCR: MPPE: MPAT: MPM: MPPR: MPGA: MPSU: MPG: MPVE: MPEN: MPRI: MPE: MPRE: STATIC_DYNAMIC_SHOP", + + + //forest ecosystem + "RM_FOREST_0: Forest: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_FOREST_1: Forest: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_FOREST_2: Forest: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_FOREST_3: Forest: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_FOREST_4: Forest: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_FOREST_5: Forest: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_FOREST_6: Forest: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //jungle ecosystem + "RM_JUNGLE_0: Jungle: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_1: Jungle: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_2: Jungle: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_3: Jungle: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_4: Jungle: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_5: Jungle: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_JUNGLE_6: Jungle: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //desert ecosystem + "RM_DESERT_0: Desert: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_DESERT_1: Desert: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_DESERT_2: Desert: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_DESERT_3: Desert: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_DESERT_4: Desert: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_DESERT_5: Desert: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_DESERT_6: Desert: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //lake ecosystem + "RM_LAKE_0: Lacustre: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_LAKE_1: Lacustre: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_LAKE_2: Lacustre: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_LAKE_3: Lacustre: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_LAKE_4: Lacustre: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_LAKE_5: Lacustre: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_LAKE_6: Lacustre: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //goo ecosystem + "RM_GOO_0: Goo: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_GOO_1: Goo: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_GOO_2: Goo: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_GOO_3: Goo: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_GOO_4: Goo: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_GOO_5: Goo: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_GOO_6: Goo: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //primary root ecosystem + "RM_PRIMROOT_0: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_MELEE: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_1: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_RANGE: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_2: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_ARMOR: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_3: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_JEWEL: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_4: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_MAGIC_FOCUS: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_5: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_CLOTH: STATIC_DYNAMIC_SHOP", + "RM_PRIMROOT_6: PrimaryRoot: CommonEcosystem: RM_ITEM_PART_TOOLS: STATIC_DYNAMIC_SHOP", //not used in craft at this time + + //Stable boys items: + "STABLE_BOY_MATIS: Common: Matis: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + "STABLE_BOY_ZORAI: Common: Zorai: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + "STABLE_BOY_FYROS: Common: Fyros: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + "STABLE_BOY_TRYKER: Common: Tryker: SERVICE_STABLE: FOOD: MEKTOUB_PACKER_TICKET: MEKTOUB_MOUNT_TICKET: STATIC_DYNAMIC_SHOP", + + //end of definition of regional aliases + + + "KAMI_TP_FOREST: KAMI_TP: Forest", + "KAMI_TP_JUNGLE: KAMI_TP: Jungle", + "KARAVAN_TP_FOREST: KARAVAN_TP: Forest", + "KARAVAN_TP_JUNGLE: KARAVAN_TP: Jungle", + + "FYROS_HARVEST_ACTION: Common : Fyros: harvest_action", + "FYROS_CRAFT_ACTION: Common : Fyros: craft_action", + "FYROS_MAGIC_ACTION: Common : Fyros: magic_action", + "FYROS_FIGHT_ACTION: Common : Fyros: fight_action", + + "MATIS_HARVEST_ACTION: Common : Matis: harvest_action", + "MATIS_CRAFT_ACTION: Common : Matis: craft_action", + "MATIS_MAGIC_ACTION: Common : Matis: magic_action", + "MATIS_FIGHT_ACTION: Common : Matis: fight_action", + + "TRYKER_HARVEST_ACTION: Common: Tryker: harvest_action", + "TRYKER_CRAFT_ACTION: Common :Tryker: craft_action", + "TRYKER_MAGIC_ACTION: Common :Tryker: magic_action", + "TRYKER_FIGHT_ACTION: Common :Tryker: fight_action", + + "ZORAI_HARVEST_ACTION: Common : Zorai: harvest_action", + "ZORAI_CRAFT_ACTION: Common :Zorai: craft_action", + "ZORAI_MAGIC_ACTION: Common :Zorai: magic_action", + "ZORAI_FIGHT_ACTION: Common :Zorai: fight_action", +}; diff --git a/code/ryzom/server/data_shard/mirror_sheets/fame.dataset b/code/ryzom/server/data_shard/mirror_sheets/fame.dataset new file mode 100644 index 000000000..d24691d63 --- /dev/null +++ b/code/ryzom/server/data_shard/mirror_sheets/fame.dataset @@ -0,0 +1,741 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Fri Dec 12 14:17:11 2003 (saffray) .entity types[1] = 13 +Fri Dec 12 14:17:11 2003 (saffray) .entity types[2] = 14 + diff --git a/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset new file mode 100644 index 000000000..f88263c27 --- /dev/null +++ b/code/ryzom/server/data_shard/mirror_sheets/fe_temp.dataset @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/ryzom/server/data_shard/mirror_sheets/pet.dataset b/code/ryzom/server/data_shard/mirror_sheets/pet.dataset new file mode 100644 index 000000000..238a38dbd --- /dev/null +++ b/code/ryzom/server/data_shard/mirror_sheets/pet.dataset @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/ryzom/server/data_shard/single.property_array b/code/ryzom/server/data_shard/single.property_array deleted file mode 100644 index 194f6eecb..000000000 --- a/code/ryzom/server/data_shard/single.property_array +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fri Jan 24 14:13:14 2003 (saffray) formName Resized = 19 -Fri Jan 24 14:17:14 2003 (saffray) formName Deleted = - diff --git a/code/ryzom/server/patchman_cfg/README.md b/code/ryzom/server/patchman_cfg/README.md new file mode 100644 index 000000000..632ea7473 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/README.md @@ -0,0 +1,16 @@ + +shard_ctrl_definitions.txt: Contains all macros for various shard services and shard configurations. + +shard_ctrl_mini01.txt: Example configuration for a development domain with a single mainland and a single ring shard running on one machine. + +terminal_mini01: Contains the terminal to control the patch managers of the mini01 domain. To deploy the shard configuration, install the patchman services on all services, run the terminal and hit Deploy. You may need to hit Deploy a second time if it gives an error. To install the patch version 1, run 'terminal.install mini01 1', this can be done while a previous version is still running. To launch the new version, stop the shard, then run 'terminal.launch mini01 1', this will swap the live version with the next version, and launch the shard immediately. + +shard_ctrl_std01.txt: Example configuration for a full blown domain with multiple shards. + +terminal_std01: Contains the terminal to control the patch managers of the mini01 domain. + +default: Contains base configuration files of the services containing per-service non-domain non-shard specific values. + +cfg: Contains base configuration files with domain and shard type specific values. + +admin_install: Contains the scripts to launch the patch manager and the shard. This directory is built into admin_install.tgz by the build pipeline. Subdirectory patchman requires addition of the ryzom_patchman_service executable on the server, the build pipeline adds this file into the tgz archive automatically, do not add it manually. The patchman_service_local.cfg file must be installed manually per server to contain the hostname of the server. The contents of the admin_install.tgz must be installed manually to the server the first time a server is deployed. The working directory is assumed to be /srv/core, which will contain /srv/core/bin and /srv/core/patchman. The configurations under patchman must be modified to match your own domains. Launch /srv/core/bin/startup to launch the patchman services. Run '/srv/core/bin/admin stop' to stop the patchman services. There is one bridge server, which is tied to one domain, but is used by the other domains as well. The bridge server has a folder /srv/core/bridge_server, which is generated by the build pipeline when creating a new server patch. \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/admin b/code/ryzom/server/patchman_cfg/admin_install/bin/admin new file mode 100644 index 000000000..c7cfa2fb6 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/admin @@ -0,0 +1,129 @@ +#!/bin/sh + +CMD=$* + +if [ "$CMD" = "" ] +then + + echo + echo Screen sessions currently running: + screen -list + echo + echo "Commands:" + echo " 'start' to start the admin" + echo " 'stop' to stop the admin" + echo " 'join' to join the admin's screen session" + echo " 'share' to join the admin if session is shared mode" + echo + printf "Enter a command: " + read CMD +fi + +if [ "$CMD" = "stop" ] +then + for s in $(screen -list | grep "\.admin.*" | awk '{ print $1 }'); do screen -drR $s -X quit; done +fi + +if [ "$CMD" = "start" ] +then + # force the ulimit just in case (so that we can generate cores) + ulimit -c unlimited + + # stop any admin sessions that were already up + for s in $(screen -list | grep "\.admin.*" | awk '{ print $1 }'); do screen -drR $s -X quit; done + + # start the main admin session + screen -d -m -S admin -c /srv/core/bin/admin.screen.rc + + # decide which hostname to use... + HOSTNAME=$(hostname) + if [ $(grep $HOSTNAME /srv/core/patchman/special_patchman_list | wc -w) = 0 ] + then + HOSTNAME=$(hostname -s) + fi + + # if this machine has associated special admin functins then start the appropriate admin sessions + echo Looking for sessions for host: $HOSTNAME + for ROLE in $(grep $HOSTNAME /srv/core/patchman/special_patchman_list | awk '{ print $1 }') + do + ROLE_DIR=/srv/core/$ROLE + SRC_CFG_FILE=/srv/core/patchman/patchman_service.$ROLE.cfg + + # make sure the cfg file exists for the patchman we're to launch + if [ -e $SRC_CFG_FILE ] + then + # preliminary setup prior to launching special admin patchman + CFG_FILE=$ROLE_DIR/patchman_service.cfg + SCREEN_NAME=admin_$ROLE + mkdir -p $ROLE_DIR + cp -v $SRC_CFG_FILE $CFG_FILE + + # wait 2 seconds before launching the next admin to reduce system conflict + sleep 2 + + # start the next patchman in its own screen session + pushd $ROLE_DIR > /dev/null + echo STARTING $SCREEN_NAME \($ROLE\) + screen -d -m -S $SCREEN_NAME /bin/sh /srv/core/patchman/loop_special_patchman.sh /srv/core/patchman/ryzom_patchman_service -L. -C. + popd > /dev/null + + else + # the patchman\'s cfg couln\'t be found so complain and ignore + echo FILE NOT FOUND: $SRC_CFG_FILE + fi + done + + + # try launching the screen sessions that correspond to the machine type that we have... + + # get the domain list + cd /srv/core/patchman/ + if [ $(grep $(hostname) auto_start_domain_list |wc -l) -gt 0 ] + then + DOMAIN_LIST=$(grep $(hostname) auto_start_domain_list | cut -d\ -f2-) + elif [ $(grep $(hostname -s) auto_start_domain_list |wc -l) -gt 0 ] + then + DOMAIN_LIST=$(grep $(hostname -s) auto_start_domain_list | cut -d\ -f2-) + elif [ $(grep $(hostname -d) auto_start_domain_list |wc -l) -gt 0 ] + then + DOMAIN_LIST=$(grep $(hostname -d) auto_start_domain_list | cut -d\ -f2-) + else + echo "There are no domains to be autostarted here" + DOMAIN_LIST=none + fi + + # if we have a domain list for this machine then deal with it... + if [ "$DOMAIN_LIST" != none ] + then + # iterate over the domain list... + for f in $DOMAIN_LIST + do + # see if we're setup to run this domain + if [ -e /srv/core/${f}.screen.rc ] && [ -e /srv/core/bin/${f} ] + then + # see whether the domain is alredy running + if [ $( screen -list | grep \( | cut -f2 | cut -d. -f2| grep \^$f\$ | wc -l) == 0 ] + then + # the domain isn't running yet so start it + echo '****' starting domain: $f '****' + /srv/core/bin/$f batchstart + else + echo '****' Domain is already running: $f '****' + fi + else + echo skipping domain: $f + fi + done + fi +fi + +if [ "$CMD" = "join" ] +then + screen -r -S admin +fi + +if [ "$CMD" = "share" ] +then + screen -r -x -S admin +fi + diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/admin.screen.rc b/code/ryzom/server/patchman_cfg/admin_install/bin/admin.screen.rc new file mode 100644 index 000000000..9438c1fde --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/admin.screen.rc @@ -0,0 +1,19 @@ + +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off + +# patchman +chdir "/srv/core/patchman/" +screen -t patchman /bin/sh ./loop_patchman.sh + diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/ps_services b/code/ryzom/server/patchman_cfg/admin_install/bin/ps_services new file mode 100644 index 000000000..7f084cbc3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/ps_services @@ -0,0 +1,7 @@ + +if [ -z $1 ] +then + ps -edf | grep _service | grep -v grep +else + ps -edf | grep _service | grep -v grep | grep $* +fi diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/run_forever b/code/ryzom/server/patchman_cfg/admin_install/bin/run_forever new file mode 100644 index 000000000..c6f14b074 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/run_forever @@ -0,0 +1,30 @@ +#!/bin/sh + +while true +do + +if [ "$2" == "" ] +then + echo + echo USAGE: $0 sleep_time command_line + echo + echo example: + echo $0 3 echo hello world + echo waits 3 seconds then displays 'hello world' repeatedly, asking player to hit enter between each line + echo + break +fi + +sleep $1 +shift +CMD=$* + +while [ "$CMD" != "" ] +do + eval $CMD + echo "press enter" + read toto +done + +break +done \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/ryzom_domain_screen_wrapper.sh b/code/ryzom/server/patchman_cfg/admin_install/bin/ryzom_domain_screen_wrapper.sh new file mode 100644 index 000000000..bf264eb69 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/ryzom_domain_screen_wrapper.sh @@ -0,0 +1,88 @@ +#!/bin/sh + +CMD=$1 +DOMAIN=$(pwd|sed s%/srv/core/%%) + +if [ "$CMD" = "" ] +then + + echo + echo Screen sessions currently running: + screen -list + echo + echo "Commands:" + echo " 'start' to start the shard" + echo " 'stop' to stop the ${DOMAIN}" + echo " 'join' to join the ${DOMAIN}'s screen session" + echo " 'share' to join the screen session in shared mode" + echo " 'state' to view state information for the ${DOMAIN}" + echo + printf "Enter a command: " + read CMD +fi + +if [ "$CMD" = "stop" ] +then + if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] + then + echo Cannot stop domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list + else + screen -d -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') -X quit> /dev/null + rm -v */*.state + rm -v */*launch_ctrl ./global.launch_ctrl + fi +fi + +STARTARGS= +if [ "$CMD" = "batchstart" ] +then + STARTARGS='-d -m' + CMD='start' +fi + +if [ "$CMD" = "start" ] +then + ulimit -c unlimited + screen -wipe > /dev/null + if [ $( screen -list | grep \\\.${DOMAIN} | wc -w ) != 0 ] + then + echo Cannot start domain \'${DOMAIN}\' because this domain is already started + screen -list | grep $DOMAIN + else + screen $STARTARGS -S ${DOMAIN} -c /srv/core/${DOMAIN}.screen.rc + fi +fi + +if [ "$CMD" = "join" ] +then + if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] + then + echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list + else + screen -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') + fi +fi + +if [ "$CMD" = "share" ] +then + if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ] + then + echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running + screen -list + else + screen -r -x $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') + fi +fi + +if [ "$CMD" = "state" ] +then + echo State of domain ${DOMAIN}: + if [ $(echo */*.state) = "*/*.state" ] + then + echo - No state files found + else + grep RUNNING *state + fi +fi diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/shard b/code/ryzom/server/patchman_cfg/admin_install/bin/shard new file mode 100644 index 000000000..eba12a75e --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/shard @@ -0,0 +1,4 @@ +#!/bin/sh + +cd /srv/core/mini01 +/bin/sh /srv/core/bin/ryzom_domain_screen_wrapper.sh $* diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/startup b/code/ryzom/server/patchman_cfg/admin_install/bin/startup new file mode 100644 index 000000000..16bf59fd3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/startup @@ -0,0 +1,11 @@ +#!/bin/sh + +cd /srv/core +rm */*.state */*/*.launch_ctrl */*/*.state +/bin/bash /srv/core/bin/admin start + +# special case for the "ep1.std01.ryzomcore.org" machine - start the admin tool graph sync script +if [ $(hostname) = "ep1.std01.ryzomcore.org" ] + then + nohup /bin/sh /srv/core/bin/sync_rrd_graphs.sh & +fi diff --git a/code/ryzom/server/patchman_cfg/admin_install/bin/sync_rrd_graphs.sh b/code/ryzom/server/patchman_cfg/admin_install/bin/sync_rrd_graphs.sh new file mode 100644 index 000000000..b23fc285b --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/bin/sync_rrd_graphs.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +echo Launched: $(date) +while true +do + # retrieve ATS files from ATS admin tool machine + rsync -t ep1.std01.ryzomcore.org:ats/graph_datas/* /srv/core/mini01/rrd_graphs/ + + # deal with live files - duplicate files that correspond to unique services to aid with graphing of su & co + cd /srv/core/std01/rrd_graphs/ + for f in $(ls *rrd | awk '/^[^_]*\./'); do cp $f $(cut -d. -f1)_unifier.$(cut -d. -f2-); done + rsync -t /srv/core/std01/rrd_graphs/* csr:std01_rrd_graphs/ + + # deal with test files files - see comment regarding live files above + cd /srv/core/mini01/rrd_graphs/ + for f in $(ls *rrd | awk '/^[^_]*\./'); do cp $f $(echo $f|cut -d. -f1)_unifier.$(echo $f|cut -d. -f2-); done + rsync -t /srv/core/mini01/rrd_graphs/* csr:mini01_rrd_graphs/ + + # display a groovy message + echo Finished rsync: $(date) + sleep 60 +done diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.mini01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.mini01.cfg new file mode 100644 index 000000000..bc7be84e9 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.mini01.cfg @@ -0,0 +1,99 @@ +// I'm the AES, I'll not connect to myself! +DontUseAES = 1; +// I don't need a connection to a naming service +DontUseNS = 1; +DontLog = 1; + +AESAliasName= "aes"; + +// +DontUseStdIn = 0; + +// Adress ofthe admin service (default port is 49996) +ASHost = "ep1.mini01.ryzomcore.org"; + +// Config for AES +AESPort = "46712"; +AESHost = "localhost"; +ASPort = "46711"; + + +// in second, -1 for not restarting +RestartDelay = 60; + +// how many second before aborting the request if not finished +RequestTimeout = 5; + +// log path for advanced log report +LogPath = "/."; + +// setup for deployment environment with external configuration system responsible for launching apps and +// for configuring AES services +DontLaunchServicesDirectly = 1; +UseExplicitAESRegistration = 1; +KillServicesOnDisconnect = 1; + +// If the update loop is too slow, a thread will produce an assertion. +// By default, the value is set to 10 minutes. +// Set to 0 for no assertion. +UpdateAssertionThreadTimeout = 0; + +DefaultMaxExpectedBlockSize = 200000000; // 200 M ! +DefaultMaxSentBlockSize = 200000000; // 200 M ! + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + +NegFiltersDebug = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF" }; +NegFiltersInfo = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "CF", " ping", " pong" }; +NegFiltersWarning = { "CT_LRC" }; + +#include "./aes_alias_name.cfg" + +StartCommands= +{ + // Create a gateway module + "moduleManager.createModule StandardGateway gw", + // add a layer 5 transport + "gw.transportAdd L5Transport l5", + // open the transport + "gw.transportCmd l5(open)", + + /// Create default connection with admin executor service + // Create a gateway module + "moduleManager.createModule StandardGateway gw_aes", + // create the admin executor service module + "moduleManager.createModule AdminExecutorServiceClient aes_client", + "aes_client.plug gw_aes", + + // create a layer 3 client to connect to aes gateway + "gw_aes.transportAdd L3Client aes_l3c", + "gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")", + + + // create the admin executor service module + "moduleManager.createModule AdminExecutorService aes", + + // create a gateway to connect to as + "moduleManager.createModule StandardGateway asc_gw", + // create a layer 3 client + "asc_gw.transportAdd L3Client l3c", + "asc_gw.transportCmd l3c(connect addr="+ASHost+":"+ASPort+")", + + // create a gateway for services to connect + "moduleManager.createModule StandardGateway aes_gw", + // create a layer 3 server + "aes_gw.transportAdd L3Server l3s", + "aes_gw.transportOptions l3s(PeerInvisible)", + "aes_gw.transportCmd l3s(open port="+AESPort+")", + + // plug the as + "aes.plug asc_gw", + "aes.plug aes_gw", + +}; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.std01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.std01.cfg new file mode 100644 index 000000000..7bfb80b27 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/admin_executor_service_default.std01.cfg @@ -0,0 +1,99 @@ +// I'm the AES, I'll not connect to myself! +DontUseAES = 1; +// I don't need a connection to a naming service +DontUseNS = 1; +DontLog = 1; + +AESAliasName= "aes"; + +// +DontUseStdIn = 0; + +// Adress ofthe admin service (default port is 49996) +ASHost = "ep1.std01.ryzomcore.org"; + +// Config for AES +AESPort = "46702"; +AESHost = "localhost"; +ASPort = "46701"; + + +// in second, -1 for not restarting +RestartDelay = 60; + +// how many second before aborting the request if not finished +RequestTimeout = 5; + +// log path for advanced log report +LogPath = "/."; + +// setup for deployment environment with external configuration system responsible for launching apps and +// for configuring AES services +DontLaunchServicesDirectly = 1; +UseExplicitAESRegistration = 1; +KillServicesOnDisconnect = 1; + +// If the update loop is too slow, a thread will produce an assertion. +// By default, the value is set to 10 minutes. +// Set to 0 for no assertion. +UpdateAssertionThreadTimeout = 0; + +DefaultMaxExpectedBlockSize = 200000000; // 200 M ! +DefaultMaxSentBlockSize = 200000000; // 200 M ! + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + +NegFiltersDebug = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF" }; +NegFiltersInfo = { "REQUEST", "GRAPH", "ADMIN", "NET", "ADMIN", "MIRROR", "NC", "CF", " ping", " pong" }; +NegFiltersWarning = { "CT_LRC" }; + +#include "./aes_alias_name.cfg" + +StartCommands= +{ + // Create a gateway module + "moduleManager.createModule StandardGateway gw", + // add a layer 5 transport + "gw.transportAdd L5Transport l5", + // open the transport + "gw.transportCmd l5(open)", + + /// Create default connection with admin executor service + // Create a gateway module + "moduleManager.createModule StandardGateway gw_aes", + // create the admin executor service module + "moduleManager.createModule AdminExecutorServiceClient aes_client", + "aes_client.plug gw_aes", + + // create a layer 3 client to connect to aes gateway + "gw_aes.transportAdd L3Client aes_l3c", + "gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")", + + + // create the admin executor service module + "moduleManager.createModule AdminExecutorService aes", + + // create a gateway to connect to as + "moduleManager.createModule StandardGateway asc_gw", + // create a layer 3 client + "asc_gw.transportAdd L3Client l3c", + "asc_gw.transportCmd l3c(connect addr="+ASHost+":"+ASPort+")", + + // create a gateway for services to connect + "moduleManager.createModule StandardGateway aes_gw", + // create a layer 3 server + "aes_gw.transportAdd L3Server l3s", + "aes_gw.transportOptions l3s(PeerInvisible)", + "aes_gw.transportCmd l3s(open port="+AESPort+")", + + // plug the as + "aes.plug asc_gw", + "aes.plug aes_gw", + +}; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/dont_keep_cores b/code/ryzom/server/patchman_cfg/admin_install/patchman/dont_keep_cores new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/dont_keep_cores @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_aes.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_aes.sh new file mode 100644 index 000000000..27279677c --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_aes.sh @@ -0,0 +1,18 @@ +#!/bin/sh - + +DOMAIN=$(pwd |sed "s%/srv/core/%%") + +while(true) +do + echo AESAliasName= \"aes_$(hostname -s)\"\; > ./aes_alias_name.cfg + + if [ $(grep "AESPort[ \t]*=" */*cfg | grep -v debug | sed "s/.*=[ \t]*//" | sort -u | wc -l) != 1 ] ; then echo - FIXME: services don\'t agree on AESPort ; read ; fi + echo AESPort=$(grep "AESPort[ \t]*=" */*cfg| grep -v debug | sed "s/.*=[ \t]*//" | sort -u) >> ./aes_alias_name.cfg + + if [ $(grep "ASPort[ \t]*=" */*cfg | grep -v debug | sed "s/.*=[ \t]*//" | sort -u | wc -l) != 1 ] ; then echo - FIXME: services don\'t agree on ASPort ; read ; fi + echo ASPort=$(grep "ASPort[ \t]*=" */*cfg| grep -v debug | sed "s/.*=[ \t]*//" | sort -u) >> ./aes_alias_name.cfg + + ./live/service_ryzom_admin_service/ryzom_admin_service -A. -C. -L. --nobreak --fulladminname=admin_executor_service --shortadminname=AES + sleep 2 +done + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh new file mode 100644 index 000000000..73b151c43 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman.sh @@ -0,0 +1,55 @@ +#!/bin/sh + +while true +do + cd /srv/core/ + if [ -e /srv/core/admin_install.tgz ] + then + tar xvzf admin_install.tgz + chmod 775 bin/admin 2> /dev/null + chmod 775 bin/ps_services 2> /dev/null + chmod 775 bin/run_forever 2> /dev/null + chmod 775 bin/shard 2> /dev/null + chmod 775 bin/startup 2> /dev/null + chmod 775 bin/*.sh 2> /dev/null + chmod 775 patchman/*_service 2> /dev/null + chmod 775 patchman/*.sh 2> /dev/null + fi + + cd /srv/core/patchman/ + if [ $(grep $(hostname) patchman_list |wc -l) -gt 0 ] + then + export SERVER_TYPE=$(grep $(hostname) patchman_list | awk '{ print $1 }') + elif [ $(grep $(hostname -s) patchman_list |wc -l) -gt 0 ] + then + export SERVER_TYPE=$(grep $(hostname -s) patchman_list | awk '{ print $1 }') + elif [ $(grep $(hostname -d) patchman_list |wc -l) -gt 0 ] + then + export SERVER_TYPE=$(grep $(hostname -d) patchman_list | awk '{ print $1 }') + else + export SERVER_TYPE=default + echo "ERROR: Neither \'hostname\' \($(hostname)\) nor \'hostname -s\' \($(hostname -s)\) nor \'hostname -d\' \($(hostname -d)\) found in $(pwd)/patchman_list" + fi + CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg + + if [ ! -e $CFGFILENAME ] + then + echo ERROR: Failed to locate the following file: $CFGFILENAME + echo using default files + export SERVER_TYPE=default + CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg + + if [ ! -e $CFGFILENAME ] + then + echo ERROR: Failed to locate the following DEFAULT file: $CFGFILENAME + echo "press enter" + read toto + exit + fi + fi + + echo ssh keys file: $KEYSFILENAME + echo cfg file: $CFGFILENAME + + /bin/sh loop_patchman_once.sh +done diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman_once.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman_once.sh new file mode 100644 index 000000000..0dd697aa4 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_patchman_once.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +CFGFILENAME=patchman_service.${SERVER_TYPE}.cfg +echo cfg file: $CFGFILENAME + +AESCFGFILENAME=admin_executor_service_default.${SERVER_TYPE}.cfg +echo aes cfg file: $AESCFGFILENAME + +cd /srv/core/patchman +if [ -e $CFGFILENAME ] + then + + # setup the config file for the patchman + echo Using configuration file: $CFGFILENAME + cp $CFGFILENAME patchman_service.cfg + + # setup the config file for the admin executor service + echo Using aes configuration file: $AESCFGFILENAME + if [ -e $AESCFGFILENAME ] ; then cp $AESCFGFILENAME admin_executor_service_default.cfg ; fi + + # start the patchman service + echo Launching patchman... + ./ryzom_patchman_service -C. -L. + + sleep 2 + if [ -e core* ] + then + if [ -e dont_keep_cores ] + then + rm core* + fi + fi + +else + echo ERROR: Failed to locate config file: $CFGFILENAME + echo trying again in a few seconds... + sleep 10 +fi +cd - diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_special_patchman.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_special_patchman.sh new file mode 100644 index 000000000..af1f5b599 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/loop_special_patchman.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +if [ "$1" == "" ] +then + echo + echo USAGE: $0 command_line + echo + echo example: + echo $0 echo hello world + echo displays 'hello world' repeatedly, delaying 3 seconds between repeats + echo + exit +fi + +while true +do + sleep 3 + eval $* +done diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh new file mode 100644 index 000000000..fbaca4ac4 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/make_next_live.sh @@ -0,0 +1,110 @@ +#! /bin/sh - + +# note: this script should be run from a domain directory such as /srv/core/std01 or /srv/core/mini01 +DOMAIN=$(pwd |sed 's/\/srv\/core\///') +if [ "patchman" = "$DOMAIN" ]; then DOMAIN= ; fi +if [ "bin" = "$DOMAIN" ]; then DOMAIN= ; fi +if [ "$DOMAIN" != $(echo $DOMAIN|sed 's/\///g') ]; then DOMAIN= ; fi +if [ _"${DOMAIN}"_ = __ ] +then + echo This is not a valid directory for running this script + exit +fi + +# tell the aes to shut everybody down +printf "0" > ./global.launch_ctrl + +# before entering the 'Waiting for Services' loop, get rid of the ras/ras.state file because the ras doesn't stop properly otherwise +if [ -f ras/ras.state ] +then + rm ras/ras.state +fi + +# while there are still services running, wait +while [ $(grep -i RUNNING . */*.state|wc -l) != 0 ] +do + echo $DOMAIN: Waiting for $(grep -i RUNNING . */*.state|wc -l) Services to stop + sleep 2 +done + +# stop the screen for the shard (if there is one) +screen -drR -S $DOMAIN -X quit> /dev/null +sleep 1 + +# rename any old core files +for COREFILE in */core* +do + mv $COREFILE $(echo $COREFILE|sed "s%/.*%%")/v$(cat live/version)_$(echo $COREFILE|sed "s%.*/%%") +done + +# rename any old log files +for LOGFILE in */log*.log +do + mv $LOGFILE $(echo $LOGFILE|sed "s%/.*%%")/v$(cat live/version)_$(echo $LOGFILE|sed "s%.*/%%") +done + +# swap the live and next directories +rm -r old_live/* 2> /dev/null +echo next=$(cat next/version) live=$(cat live/version) +mv live old_live +echo next=$(cat next/version) old_live=$(cat old_live/version) +mv next live +echo old_live=$(cat old_live/version) live=$(cat live/version) +mv old_live next +echo next=$(cat next/version) live=$(cat live/version) + +# restore any old log files in case of return to previous version +for LOGFILE in */v$(cat live/version)_log*.log +do + mv $LOGFILE $(echo $LOGFILE|sed "s%/.*%%")/$(echo $LOGFILE|sed "s%.*/.*_%%") +done + +# make the ryzom services executable +chmod 775 live/service_*/*_service 2> /dev/null +chmod 775 live/service_*/*_server 2> /dev/null + +# make directory for rrd_graphs +mkdir -p rrd_graphs + +# special case to deal with www files that need a local cfg file to be properly setup +if [ -e ./live/data_www/config.php ] + then + echo \./live/data_www/config.php + echo >>./live/data_www/config.php + echo \$USERS_DIR = \'$(pwd)/www\'\; >>./live/data_www/config.php + echo \$TEMPLATE_DIR = \'./template\'\; >>./live/data_www/config.php + echo >>./live/data_www/config.php + echo \?\> >>./live/data_www/config.php + mkdir -p $(pwd)/save_shard/www +fi + +# remove any launch ctrl files that are floating about +rm -v */*.*launch_ctrl *.*launch_ctrl 2> /dev/null + +# initialise the state files for the new services to "xxxxx" and remove directories that are no longer of interest +for D in $(ls */log.log | sed "s%/.*%%" | sort -u) +do + if [ $(grep \"$D\" admin_executor_service.cfg | wc -l) == 1 ] + then + printf "xxxxx" > $D/$D.state + else + mkdir -p old + mv $D old/ + fi +done + +# tell the aes to launch everybody... +printf "1" > ./global.launch_ctrl + +# create a script for accessing the screen for this shard +SCRIPT_FILE=/srv/core/bin/${DOMAIN} +echo "#!/bin/sh" > $SCRIPT_FILE +echo "cd "$(pwd) >> $SCRIPT_FILE +echo '/bin/sh /srv/core/bin/ryzom_domain_screen_wrapper.sh $*' >> $SCRIPT_FILE +chmod +x $SCRIPT_FILE + +# launch the screen again now that were all done (aes will launch everybody when he comes online) +cp /srv/core/$DOMAIN/${DOMAIN}.screen.rc /srv/core/${DOMAIN}.screen.rc +#screen -S $DOMAIN -d -m -c /srv/core/${DOMAIN}.screen.rc +$SCRIPT_FILE batchstart + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list new file mode 100644 index 000000000..e90230704 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_list @@ -0,0 +1,23 @@ +// default values for different sites + +mini01 ep1.mini01.ryzomcore.org +std01 ep1.std01.ryzomcore.org +std01 su1.std01.ryzomcore.org +std01 pd1.std01.ryzomcore.org +std01 pd2.std01.ryzomcore.org +std01 pd3.std01.ryzomcore.org +std01 pd4.std01.ryzomcore.org +std01 mla1.std01.ryzomcore.org +std01 mla2.std01.ryzomcore.org +std01 mla3.std01.ryzomcore.org +std01 mla4.std01.ryzomcore.org +std01 mla5.std01.ryzomcore.org +std01 mlb1.std01.ryzomcore.org +std01 mlb2.std01.ryzomcore.org +std01 mlb3.std01.ryzomcore.org +std01 mlb4.std01.ryzomcore.org +std01 mlb5.std01.ryzomcore.org +std01 rra1.std01.ryzomcore.org +std01 rra2.std01.ryzomcore.org +std01 rrb1.std01.ryzomcore.org +std01 rrb2.std01.ryzomcore.org diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.default.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.default.cfg new file mode 100644 index 000000000..981654046 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.default.cfg @@ -0,0 +1,37 @@ + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + +StartCommands = +{ + //------------------------------------------------------------------------------ + // Setup Bridge Gateway (for retrieving files) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway bridge_gw", + "bridge_gw.transportAdd L3Client l3client", + "bridge_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44749)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44752)", + + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug spm_gw", + "pam.plug bridge_gw", +}; + +SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh"; +DeploymentRootDirectory="/srv/core/patchman/"; +MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh"; +SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh"; +InstallArchiveDirectory="/srv/core/"; +InstallArchiveFileName="admin_install.tgz"; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01.cfg new file mode 100644 index 000000000..41c283b63 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01.cfg @@ -0,0 +1,45 @@ + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + +StartCommands = +{ + //------------------------------------------------------------------------------ + // Setup Bridge Gateway (for retrieving files) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway bridge_gw", + "bridge_gw.transportAdd L3Client l3client", + "bridge_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44749)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44751)", + + + //------------------------------------------------------------------------------ + // Setup patch applier + + // setup an 'spa' module for applying patches as required + "moduleManager.createModule ServerPatchApplier spa path=/srv/core host=" + SPAHost, + "spa.plug bridge_gw", + "spa.plug spm_gw", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug spm_gw", + "pam.plug bridge_gw", +}; + +SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh"; +DeploymentRootDirectory="/srv/core/patchman/"; +MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh"; +SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh"; +InstallArchiveDirectory="/srv/core/"; +InstallArchiveFileName="admin_install.tgz"; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_bridge.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_bridge.cfg new file mode 100644 index 000000000..32166d6bf --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_bridge.cfg @@ -0,0 +1,65 @@ +// ***************************************************************************** +// *** Setup for the mini01 entry point Machine +// ***************************************************************************** + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ +}; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup the mini01 hub + + // Create a gateway modul on layer 3 transport and open it + "moduleManager.createModule StandardGateway hub_mini01", + "hub_mini01.transportAdd L3Server l3server", + "hub_mini01.transportCmd l3server(open port=44749)", + + + //------------------------------------------------------------------------------ + // Setup the bridge hub + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway hub_bridge", + "hub_bridge.transportAdd L3Server l3server", + "hub_bridge.transportCmd l3server(open port=44745)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44751)", + + + //------------------------------------------------------------------------------ + // Setup mini01 Bridge module + + // setup a bridge module to relay files from internal to mini01 networks andd plug it in + "moduleManager.createModule ServerPatchBridge bridge path=/srv/core/bridge_server/", + "bridge.plug hub_mini01", + "bridge.plug hub_bridge", + "bridge.plug spm_gw", + + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug hub_mini01", + "pam.plug spm_gw", +}; + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_spm.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_spm.cfg new file mode 100644 index 000000000..8e6923a2b --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.mini01_spm.cfg @@ -0,0 +1,41 @@ +// ***************************************************************************** +// *** Setup for the mini01 entry point Machine +// ***************************************************************************** + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ +}; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup the mini01 spm hub + + "moduleManager.createModule StandardGateway hub", + "hub.transportAdd L3Server l3server", + "hub.transportCmd l3server(open port=44751)", + + + //------------------------------------------------------------------------------ + // Setup manager module for mini01 version numbers etc and plug it in + + "moduleManager.createModule ServerPatchManager spm_mini01 name=spm_mini01", + "spm_mini01.plug hub", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug hub", +}; + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01.cfg new file mode 100644 index 000000000..e8c2d5787 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01.cfg @@ -0,0 +1,45 @@ + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + +StartCommands = +{ + //------------------------------------------------------------------------------ + // Setup Bridge Gateway (for retrieving files) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway bridge_gw", + "bridge_gw.transportAdd L3Client l3client", + "bridge_gw.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44749)", + + + //------------------------------------------------------------------------------ + // Setup Manager Gateway (for deployment commands) + + // Create a gateway module on layer 3 transport and open it + "moduleManager.createModule StandardGateway spm_gw", + "spm_gw.transportAdd L3Client l3client", + "spm_gw.transportCmd l3client(connect addr=ep1.std01.ryzomcore.org:44752)", + + + //------------------------------------------------------------------------------ + // Setup patch applier + + // setup an 'spa' module for applying patches as required + "moduleManager.createModule ServerPatchApplier spa path=/srv/core host=" + SPAHost, + "spa.plug bridge_gw", + "spa.plug spm_gw", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug spm_gw", + "pam.plug bridge_gw", +}; + +SpaPreCmdLineText="/bin/sh /srv/core/patchman/service_launcher.sh"; +DeploymentRootDirectory="/srv/core/patchman/"; +MakeInstalledVersionLiveCmdLine="/bin/sh /srv/core/patchman/make_next_live.sh"; +SpaLaunchAESCmdLine="/bin/sh /srv/core/patchman/loop_aes.sh"; +InstallArchiveDirectory="/srv/core/"; +InstallArchiveFileName="admin_install.tgz"; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01_spm.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01_spm.cfg new file mode 100644 index 000000000..79d259e4e --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service.std01_spm.cfg @@ -0,0 +1,41 @@ +// ***************************************************************************** +// *** Setup for the std01 entry point Machine +// ***************************************************************************** + +#include "/srv/core/patchman/patchman_service_base_linux.cfg" +#include "/srv/core/patchman_service_local.cfg" + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ +}; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup the std01 spm hub + + "moduleManager.createModule StandardGateway hub", + "hub.transportAdd L3Server l3server", + "hub.transportCmd l3server(open port=44752)", + + + //------------------------------------------------------------------------------ + // Setup manager module for std01 version numbers etc and plug it in + + "moduleManager.createModule ServerPatchManager spm_std01 name=spm_std01", + "spm_std01.plug hub", + + //------------------------------------------------------------------------------ + // Setup the PAM module + "moduleManager.createModule PatchmanAdminModule pam", + "pam.plug hub", +}; + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base.cfg new file mode 100644 index 000000000..082dcd6eb --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base.cfg @@ -0,0 +1,17 @@ +//-------------------------------------------------------------------------------- +// Stuff common to all patchman services +DontUseAES = 1; +DontUseTS = 1; +DontUseNS = 1; +UpdateAssertionThreadTimeout = 0; + +//-------------------------------------------------------------------------------- +// Common Filters + +// where to save specific shard data (ie: player backup) +NegFiltersDebug = { "NET", "VERBOSE", "GUSREP" }; +NegFiltersInfo = { "LNET" }; +NegFiltersWarning = { "LNETL", "CT_LRC", "VAR:" }; + +FileReceiverDataBlockSize = 1000000; +FileReceiverMaxMessageCount = 10; diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base_linux.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base_linux.cfg new file mode 100644 index 000000000..8aea88a5f --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/patchman_service_base_linux.cfg @@ -0,0 +1,17 @@ +//-------------------------------------------------------------------------------- +// Stuff for Linux (as opposed to Windows) + +#include "patchman_service_base.cfg" + +// For windows boxes we dissable out stdin thread +DontUseStdIn = 0; + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/screen.rc.default b/code/ryzom/server/patchman_cfg/admin_install/patchman/screen.rc.default new file mode 100644 index 000000000..ac2202aab --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/screen.rc.default @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off + +screen -t aes /bin/sh /srv/core/patchman/loop_aes.sh + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/service_launcher.sh b/code/ryzom/server/patchman_cfg/admin_install/patchman/service_launcher.sh new file mode 100644 index 000000000..091892af7 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/service_launcher.sh @@ -0,0 +1,97 @@ +#!/bin/sh + +# the object is to make a launcher script that works with a command file to determine when to launch the application that it is responsible for + +DOMAIN=$(pwd |sed "s%/srv/core/%%" | sed "s%/.*%%") +NAME_BASE=$(pwd | sed 's/\/srv\/core\///' | sed 's/^.*\///') + +#if [ _$DOMAIN == _pre_live ] +# then + CTRL_FILE=${NAME_BASE}.launch_ctrl + NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl +#elif [ _$DOMAIN == _pre_pre_live ] +# then +# CTRL_FILE=${NAME_BASE}.launch_ctrl +# NEXT_CTRL_FILE=${NAME_BASE}.deferred_launch_ctrl +#else +# CTRL_FILE=${NAME_BASE}_immediate.launch_ctrl +# NEXT_CTRL_FILE=${NAME_BASE}_waiting.launch_ctrl +#fi +STATE_FILE=${NAME_BASE}.state +START_COUNTER_FILE=${NAME_BASE}.start_count +CTRL_CMDLINE=$* + +echo +echo --------------------------------------------------------------------------------- +echo Starting service launcher +echo --------------------------------------------------------------------------------- +printf "%-16s = " CMDLINE ; echo $CTRL_CMDLINE +printf "%-16s = " CTRL_FILE ; echo $CTRL_FILE +printf "%-16s = " NEXT_CTRL_FILE ; echo $NEXT_CTRL_FILE +printf "%-16s = " STATE_FILE ; echo $STATE_FILE +echo --------------------------------------------------------------------------------- +echo + +# reinit the start counter +echo 0 > $START_COUNTER_FILE +START_COUNTER=0 + +echo Press ENTER to launch program +while true +do + + # see if the conditions are right to launch the app + if [ -e $CTRL_FILE ] + then + + # a control file exists so read it's contents + CTRL_COMMAND=_$(cat $CTRL_FILE)_ + + # do we have a 'launch' command? + if [ $CTRL_COMMAND = _LAUNCH_ ] + then + + # update the start counter + START_COUNTER=$(( $START_COUNTER + 1 )) + echo $START_COUNTER > $START_COUNTER_FILE + + # big nasty hack to deal with the special cases of ryzom_naming_service and ryzom_admin_service who have badly names cfg files + for f in ryzom_*cfg + do + cp $f $(echo $f | sed "s/ryzom_//") + done + + # we have a launch command so prepare, launch, wait for exit and do the housekeeping + echo ----------------------------------------------------------------------- + echo Launching ... + echo + printf RUNNING > $STATE_FILE + + $CTRL_CMDLINE + + echo ----------------------------------------------------------------------- + printf STOPPED > $STATE_FILE + + # consume (remove) the control file to allow start once + rm $CTRL_FILE + + echo Press ENTER to relaunch + fi + fi + + # either we haven't launched the app yet or we have launched and it has exitted + if [ -e $NEXT_CTRL_FILE ] + then + # we have some kind of relaunch directive lined up so deal with it + mv $NEXT_CTRL_FILE $CTRL_FILE + else + # give the terminal user a chance to press enter to provoke a re-launch + HOLD=`sh -ic '{ read a; echo "ENTER" 1>&3; kill 0; } | { sleep 2; kill 0; }' 3>&1 2>/dev/null` + if [ _${HOLD}_ != _HOLD_ ] + then + printf LAUNCH > $CTRL_FILE + fi + fi + +done + diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list b/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list new file mode 100644 index 000000000..b42636e55 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman/special_patchman_list @@ -0,0 +1,10 @@ + +// mini01 - mini manager + +mini01_spm ep1.mini01.ryzomcore.org +mini01_bridge ep1.mini01.ryzomcore.org + + +// std01 - std manager + +std01_spm ep1.std01.ryzomcore.org diff --git a/code/ryzom/server/patchman_cfg/admin_install/patchman_service_local.cfg b/code/ryzom/server/patchman_cfg/admin_install/patchman_service_local.cfg new file mode 100644 index 000000000..45f2afe3f --- /dev/null +++ b/code/ryzom/server/patchman_cfg/admin_install/patchman_service_local.cfg @@ -0,0 +1 @@ +SPAHost = "ep1.mini01.ryzomcore.org"; diff --git a/code/ryzom/server/patchman_cfg/cfg/00_base.cfg b/code/ryzom/server/patchman_cfg/cfg/00_base.cfg new file mode 100644 index 000000000..5dba5a53b --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/00_base.cfg @@ -0,0 +1,125 @@ +// Configure module gateway for layer 5 module comm +StartCommands += +{ + // Create a gateway module + "moduleManager.createModule StandardGateway gw", + // add a layer 5 transport + "gw.transportAdd L5Transport l5", + // open the transport + "gw.transportCmd l5(open)", + + /// Create default connection with admin executor service + // Create a gateway module + "moduleManager.createModule StandardGateway gw_aes", + // create the admin executor service module + "moduleManager.createModule AdminExecutorServiceClient aes_client", + "aes_client.plug gw_aes", + + // create a layer 3 client to connect to aes gateway + "gw_aes.transportAdd L3Client aes_l3c", + "gw_aes.transportCmd aes_l3c(connect addr="+AESHost+":"+AESPort+")", +}; + +/// A list of vars to graph for any service +GraphVars = +{ + "ProcessUsedMemory", "60000", // every minute +}; + + +/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) + * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" + * Only log analyser must have the $shard parameter to find all shards root directory + */ +PDRootDirectory = ""; + +// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log +PDEnableLog = 1; + +// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log +PDEnableStringLog = 0; + +// Number of seconds between 2 logs to file +PDLogUpdate = 10; + +// MySGL wrapper strict mode - controls use of asserts if SQL requests fail +MSWStrictMode=0; + +// This is the mapping for logical continent to physical one +ContinentNameTranslator = +{ + "matis_newbie", "matis", + "zorai_newbie", "zorai", + "terre", "terre_oubliee", + "sources", "sources_interdites" +}; + +NegFiltersDebug = { "ZZZZZZZZZZZ" }; +NegFiltersInfo = { "ZZZZZZZZZZZ" }; +NegFiltersWarning = { "ZZZZZZZZZZZ" }; +//NegFiltersDebug = { "NET", "ADMIN", "MIRROR", "NC", "PATH" }; +//NegFiltersInfo = { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; +// NegFiltersWarning = { "CT_LRC", "AnimalSpawned" }; + +// Block the system in the tick service that provokes stalls when overloaded +WaitForBSThreshold=0; + +// Only produce log*.log files and not *.log +DontLog=1; + +IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; + +// If the update loop is too slow, a thread will produce an assertion. +// By default, the value is set to 10 minutes. +// Set to 0 for no assertion. +UpdateAssertionThreadTimeout = 6000000; + +DefaultMaxExpectedBlockSize = 200000000; // 200 M ! +DefaultMaxSentBlockSize = 200000000; // 200 M ! + +// MS Packet size limit in bytes, PER DATASET (warning: depending on the weights, limits per property may be very small) +MaxOutBandwidth = 100000000; + +// how to sleep between 2 network updates +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + +// The privileges needed to access any ring session +PrivilegeForSessionAccess = ":DEV:SGM:GM:SG:"; + +// The max number of ring points (aka ring access) for each ecosystem +MaxRingPoints = "A1:D7:F7:J8:L6:R13"; + +// Level limit for newb scenarios +FreeTrialSkillLimit=21; + +// Level limit for newb scenarios +DefaultInterShardExchangeLevelCap=0; + +// Configuration for DSS +MaxNpcs = 300; +MaxStaticObjects = 200; + +// the following variable must be defined but should be empty - it's presence is used to change the behaviour +// of the packed sheet reader +GeorgePaths = { "" }; + +// Disable nel net verbose logging +VerboseNETTC = 0; +VerboseLNETL0 = 0; +VerboseLNETL1 = 0; +VerboseLNETL2 = 0; +VerboseLNETL3 = 0; +VerboseLNETL4 = 0; +VerboseLNETL5 = 0; +VerboseLNETL6 = 0; + +// Disable ryzom verbose logging +VerboseMIRROR = 0; +VerboseRingRPLog = 0; +VerboseCDBGroup = 0; + diff --git a/code/ryzom/server/patchman_cfg/cfg/01_domain_mini01.cfg b/code/ryzom/server/patchman_cfg/cfg/01_domain_mini01.cfg new file mode 100644 index 000000000..3a07c8612 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/01_domain_mini01.cfg @@ -0,0 +1,80 @@ +// What to do with characters coming from another mainland shard? +// 0: teleport to the stored session id +// 1: let the character play anyway, but leave the stored session id unchanged +// 2: assign the stored session id with FixedSessionId and let play +AllowCharsFromAllSessions = 0; + +// Use Shard Unifier or not +DontUseSU = 0; + +// the domain's set of useful addresses +LSHost = SUHost; +RSMHost = SUHost; + +// MFS config +WebSrvUsersDirectory = ""; +HoFHDTDirectory = "/srv/core/www/hof/hdt"; + +// BS Specifics -------------------------------------------------------------------------- +// BS - set to 1 if a BS is not part of a naming service group (then BS not disclosed +// to other services by the Layer 5, i.e. the services sending requests to BS have +// to know its/their address(es) by another mean) +BSDontUseNS = 1; +// BS - set the host of the naming service where the BS register +BSNSHost = "localhost"; +UseBS = 1; +XMLSave = 0; + +// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot +SaveFilesDirectory = ""; + +// where to save generic shard data (ie: packed_sheet) +WriteFilesDirectory = "r2_shard/data_shard"; + +// Will SaveFilesDirectory will be converted to a full path? +ConvertSaveFilesDirectoryToFullPath = 0; + +// BS - Root directory where data are backuped to +IncrementalBackupDirectory = "../incremental_backup"; + +// IOS - Directory to store ios.string_cache file +StringManagerCacheDirectory = "../data_shard_local"; + +// IOS - Directory to log chat into +LogChatDirectory = "../data_shard_local"; + +// MFS - Directories +WebRootDirectory = "../www"; + +// Root directory where data from shards are stored into +SaveShardRoot = "../save_shard/"; + +// SU Specifics -------------------------------------------------------------------------- +// SU - set to 1 if SU didn't use a naming service +SUDontUseNS = 1; +// SU - host for the NS used by SU +SUNSHost = "localhost"; +// SU - listen address of the SU service (for L5 connections) +SUAddress = SUHost+":"+SUPort; +// SU - nel and ring database names +DBNelName = "nel"; +DBRingName = "ring_mini01"; +// Nel DB user +DBNelUser = "su_agent"; +// Ring DB user +DBRingUser = "su_agent"; +// SU - password to access to the nel database with DBNelUseruser (default is no password) +DBNelPass = "p4ssw0rd"; +// SU - password to access to the ring database with DBRingUser (default is no password) +DBRingPass = "p4ssw0rd"; + +// WS Specifics -------------------------------------------------------------------------- +// WS - use or not the legacy WelcomeService from nel ns (only for backward compatibility during transition to ring) +DontUseLSService = 1; + +// Global config -------------------------------------------------------------------------- +// set to 0 if you want to use the admin system +DontUseAES = 1; + +// Dissable generation / display of nldebug messages +DissableNLDebug = 1; diff --git a/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg b/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg new file mode 100644 index 000000000..f40ffdd97 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/01_domain_std01.cfg @@ -0,0 +1,80 @@ +// What to do with characters coming from another mainland shard? +// 0: teleport to the stored session id +// 1: let the character play anyway, but leave the stored session id unchanged +// 2: assign the stored session id with FixedSessionId and let play +AllowCharsFromAllSessions = 0; + +// Use Shard Unifier or not +DontUseSU = 0; + +// the domain's set of useful addresses +LSHost = SUHost; +RSMHost = SUHost; + +// MFS config +WebSrvUsersDirectory = ""; +HoFHDTDirectory = "/srv/core/www/hof/hdt"; + +// BS Specifics -------------------------------------------------------------------------- +// BS - set to 1 if a BS is not part of a naming service group (then BS not disclosed +// to other services by the Layer 5, i.e. the services sending requests to BS have +// to know its/their address(es) by another mean) +BSDontUseNS = 1; +// BS - set the host of the naming service where the BS register +BSNSHost = "localhost"; +UseBS = 1; +XMLSave = 0; + +// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot +SaveFilesDirectory = ""; + +// where to save generic shard data (ie: packed_sheet) +WriteFilesDirectory = "r2_shard/data_shard"; + +// Will SaveFilesDirectory will be converted to a full path? +ConvertSaveFilesDirectoryToFullPath = 0; + +// BS - Root directory where data are backuped to +IncrementalBackupDirectory = "../incremental_backup"; + +// IOS - Directory to store ios.string_cache file +StringManagerCacheDirectory = "../data_shard_local"; + +// IOS - Directory to log chat into +LogChatDirectory = "../data_shard_local"; + +// MFS - Directories +WebRootDirectory = "../www"; + +// Root directory where data from shards are stored into +SaveShardRoot = "../save_shard/"; + +// SU Specifics -------------------------------------------------------------------------- +// SU - set to 1 if SU didn't use a naming service +SUDontUseNS = 1; +// SU - host for the NS used by SU +SUNSHost = "localhost"; +// SU - listen address of the SU service (for L5 connections) +SUAddress = SUHost+":"+SUPort; +// SU - nel and ring database names +DBNelName = "nel"; +DBRingName = "ring_std01"; +// Nel DB user +DBNelUser = "su_agent"; +// Ring DB user +DBRingUser = "su_agent"; +// SU - password to access to the nel database with DBNelUseruser (default is no password) +DBNelPass = "p4ssw0rd"; +// SU - password to access to the ring database with DBRingUser (default is no password) +DBRingPass = "p4ssw0rd"; + +// WS Specifics -------------------------------------------------------------------------- +// WS - use or not the legacy WelcomeService from nel ns (only for backward compatibility during transition to ring) +DontUseLSService = 1; + +// Global config -------------------------------------------------------------------------- +// set to 0 if you want to use the admin system +DontUseAES = 1; + +// Dissable generation / display of nldebug messages +DissableNLDebug = 1; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_mainland.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_mainland.cfg new file mode 100644 index 000000000..88cd8e2b3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_mainland.cfg @@ -0,0 +1,50 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 1000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 0; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = ShardId; + +// Mirror limits +DatasetSizefe_temp = 300000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard opration, more than one allocate more bandwidth +BandwidthRatio = 1; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5; +NbForageSourcesLimit = 1000; +NbToxicCloudsLimit = 200; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 50000; +NbNpcLimit = 20000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "indoors", "4", // NB : this is for uninstanciated indoors building. + "newbieland", "20" +}; + +// define the primitives configuration used. +UsedPrimitives = +{ + "newbieland_all", +// "newbieland", +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_ring.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_ring.cfg new file mode 100644 index 000000000..ffa3ad2fb --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_ring.cfg @@ -0,0 +1,51 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 1000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 1; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = 0; + +// Mirror limits +DatasetSizefe_temp = 200000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard operation, more than one allocate more bandwidth +BandwidthRatio = 2; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5; +NbForageSourcesLimit = 100; +NbToxicCloudsLimit = 20; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 5000; +NbNpcLimit = 35000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "r2_desert", "10000", + "r2_forest", "10001", + "r2_jungle", "10002", + "r2_lakes", "10003", + "r2_roots", "10004", +}; + +// define the primitives configuration used. +UsedPrimitives = +{ +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_unifier.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_unifier.cfg new file mode 100644 index 000000000..1141fa198 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_mini_unifier.cfg @@ -0,0 +1 @@ +// This cfg file defines stuff that's common to all mini unifier shards diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_mainland.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_mainland.cfg new file mode 100644 index 000000000..832ac4452 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_mainland.cfg @@ -0,0 +1,50 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 5000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 0; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = ShardId; + +// Mirror limits +DatasetSizefe_temp = 600000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard opration, more than one allocate more bandwidth +BandwidthRatio = 1; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5000; +NbForageSourcesLimit = 10000; +NbToxicCloudsLimit = 5000; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 50000; +NbNpcLimit = 20000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "indoors", "4", // NB : this is for uninstanciated indoors building. + "newbieland", "20" +}; + +// define the primitives configuration used. +UsedPrimitives = +{ + "newbieland_all", +// "newbieland", +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_ring.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_ring.cfg new file mode 100644 index 000000000..777944200 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_ring.cfg @@ -0,0 +1,51 @@ +// Player limits (AIS, EGS, WS, FS) +NbPlayersLimit = 5000; +NbGuildLimit = 15000; +PlayerLimit = NbPlayersLimit; +ClientLimit = 1000; + +// Set this shard as a ring (1) or mainland (0) shard (main behavior switch) +IsRingShard = 1; + +// Set a mainland SessionId. +// Live: Must be 0 for ring shards, non-zero (usually ShardId) for mainland shards +// Dev: Can be non-zero to initially connect a client to a ring shard +NoWSShardId = ShardId; +FixedSessionId = 0; + +// Mirror limits +DatasetSizefe_temp = 600000; +DatasetSizefame = 26000; + +// FS Specifics -------------------------------------------------------------------------- +// Client bandwidth ratio, set to 1 for standard operation, more than one allocate more bandwidth +BandwidthRatio = 2; + +// EGS Specifics -------------------------------------------------------------------------- +// Entity Limits (EGS) +NbObjectsLimit = 2000; +NbNpcSpawnedByEGSLimit = 5000; +NbForageSourcesLimit = 10000; +NbToxicCloudsLimit = 5000; + +// AIS Specifics -------------------------------------------------------------------------- +// Entity Limits (AIS) +NbPetLimit = NbPlayersLimit*4; +NbFaunaLimit = 50000; +NbNpcLimit = 50000; +NbFxLimit = 500; + +// This is the list of continent to use with their unique instance number +UsedContinents = +{ + "r2_desert", "10000", + "r2_forest", "10001", + "r2_jungle", "10002", + "r2_lakes", "10003", + "r2_roots", "10004", +}; + +// define the primitives configuration used. +UsedPrimitives = +{ +}; diff --git a/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_unifier.cfg b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_unifier.cfg new file mode 100644 index 000000000..444c0ed2e --- /dev/null +++ b/code/ryzom/server/patchman_cfg/cfg/02_shard_type_std_unifier.cfg @@ -0,0 +1 @@ +// This cfg file defines stuff that's common to all standard unifier shards diff --git a/code/ryzom/server/patchman_cfg/default/ai_service.cfg b/code/ryzom/server/patchman_cfg/default/ai_service.cfg new file mode 100644 index 000000000..72b278cc0 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/ai_service.cfg @@ -0,0 +1,353 @@ + +// a list of system command that run at server startup. +SystemCmd = {}; + + +//NegFiltersDebug += { "LNET", "HNET", "FEVIS"}; +//NegFiltersInfo += { "LNET", "HNET", "VISION_DELTA", "FEIMPE", "FEVIS" }; +// NegFiltersWarning += { "LNET", "FEHACK", "FERECV"}; +// NegFiltersWarning += { "positional", "faction", "pet" }; + +////////////////////////////////////////////////////////////////////////////// +//- Basic (specific) heal profile parameters --------------------------------- +// Downtime for normal heal (on other bots of the group) +HealSpecificDowntime = 100; +// Downtime for self heal +HealSpecificDowntimeSelf = 100; +////////////////////////////////////////////////////////////////////////////// + +// Disable caching of ligo primitive in binary files +CachePrims = 0; +CachePrimsLog = 0; + +// do not log the corrected position. +LogAcceptablePos = 0; +// do not log group creation failure +LogGroupCreationFailure = 0; +// do not log aliad tree owner construstion. +LogAliasTreeOwner = 0; +// do not log outpost info +LogOutpostDebug = 0; +// Speed factor, for debug purpose only. Don't set to high speed factor ! +SpeedFactor = 1; +// Speep up the timer triggering. Set a value between 1 (normal) and INT_MAX. +TimerSpeedUp = 1; + +// Default timer for wander behavior +DefaultWanderMinTimer = 50; // 5s +DefaultWanderMaxTimer = 100; // 10s + +// Fame and guard behavior +// Fame value under witch the guard attack the player in sigth +FameForGuardAttack = -450000; +// The minimum of fame for guard to help the player +FameForGuardHelp = -200000; + +// The default aggro distance for NPC +DefaultNpcAggroDist = 15; +// The default escort range for escort behavior +DefaultEscortRange = 10; + +////////////////////////////////////////////////////////////////////////////// +// Aggro // +////////////////////////////////////////////////////////////////////////////// +AggroReturnDistCheck = 15.0; +AggroReturnDistCheckFauna = 15.0; +AggroReturnDistCheckNpc = 1.5; +AggroD1Radius = 250.0; +AggroD2Radius = 150.0; +AggroPrimaryGroupDist = 0.0; +AggroPrimaryGroupCoef = 0.0; +AggroSecondaryGroupDist = 0.0; +AggroSecondaryGroupCoef = 0.0; +AggroPropagationRadius = 60.0; + +BotRepopFx = ""; + +// GROUP KEYWORDS +// used mainly in event handlers to determine to which groups events apply +KeywordsGroupNpc = { + + "patrol", // a group of bots who guard a patrol route or point + "convoy", // a group with pack animals who follow roads from place to place + "with_players", // a group who may travel with players +}; + +// BOT KEYWORDS +// used mainly in npc_state_profile to determine which ai profiles to assign to which bots +KeywordsBotNpc = { + + "team_leader", // a bot who leads the way in front of their team (and acts as leader + // in discussion with players) + "animal_leader", // a bot who leads pack animals + "guard", // a bot who is a guard of some sort (eg karavan guard) + "emissary", // eg karavan emissary + "preacher", // eg kami preacher + "guardian", // typically kami guardians + "vip", // someone who has an escort of players or NPCs (assumed to be harmless) +}; + +// STATE KEYWORDS +// used mainly in event handlers to determine to which state events apply +// eg: when a player goes link dead if the team that this player is escorting +// is in a dangerous area the team may enter a 'protect ourselves and wait for +// players' punctual state +KeywordsStateNpc = { + + "safe", // eg the gathering point at town entrance + "dangerous", // eg a route through the wilds +}; + +ColourNames = +{ + "red : 0", + "beige : 1", + "green : 2", + "turquoise : 3", + "blue : 4", + "violet : 5", + "white : 6", + "black : 7", + + "redHair: 0", + "blackHair: 1", +}; + + +StartCommandsWhenMirrorReady = { +}; + +//--------------------------------------------------------- +// commands for multi IA configuration +// For multi IA config, use the -m command line switch folowed +// by a semicolon separated list of command block to run. +// ex : +// -mCommon:Matis:Post +// will execute the folowing command blocks in order : +// * StartCommandsWhenMirrorReadyCommon +// * StartCommandsWhenMirrorReadyMatis +// * StartCommandsWhenMirrorReadyPost +//--------------------------------------------------------- +// common commands before loading continents +StartCommandsWhenMirrorReadyCommon = +{ + "RandomPosMaxRetry 6400", + "fightRangeRange 4 60", + "LogOutpostDebug 1", + "grpHistoryRecordLog", + + "verboseAIProfiles", + "verboseAliasNodeTreeParserLog", + "verboseCombatLog", + "verboseFaunaMgrLog", + "verboseFaunaParseLog", + "verboseNPCBotProfiles", + "verboseNPCMgrLog", + "verboseNPCParserLog", + "verboseNpcDescriptionMsgLog", + "verbosePrimitiveParserLog", +// "verboseSwitchMultipleChangesOfAProperty", +}; + + +// commands for indoors continent +StartCommandsWhenMirrorReadyIndoors = +{ + "loadContinent indoors", + "createStaticAIInstance indoors", + "loadMapsFromCommon indoors_all", +}; + +// commands for Matis continent +StartCommandsWhenMirrorReadyMatis = +{ + "loadContinent matis", + "createStaticAIInstance matis", + "loadMapsFromCommon matis_all", +}; + +// commands for Matis newbie continent +StartCommandsWhenMirrorReadyMatisNewbie = +{ + "loadContinent matis", + "createStaticAIInstance matis_newbie", + "loadMapsFromCommon matis_newbie_all", +}; + +// commands for Zorai continent +StartCommandsWhenMirrorReadyZorai = +{ + "loadContinent zorai", + "createStaticAIInstance zorai", + "loadMapsFromCommon zorai_all", +}; + +// commands for Zorai newbie continent +StartCommandsWhenMirrorReadyZoraiNewbie = +{ + "loadContinent zorai", + "createStaticAIInstance zorai_newbie", + "loadMapsFromCommon zorai_newbie_all", +}; + +// commands for Fyros continent +StartCommandsWhenMirrorReadyFyros = +{ + "loadContinent fyros", + "createStaticAIInstance fyros", + "loadMapsFromCommon fyros_all", +}; + +// commands for Fyros newbie continent +StartCommandsWhenMirrorReadyFyrosNewbie = +{ + "loadContinent fyros_newbie", + "createStaticAIInstance fyros_newbie", + "loadMapsFromCommon fyros_newbie_all", +}; + +// commands for Tryker continent +StartCommandsWhenMirrorReadyTryker = +{ + "loadContinent tryker", + "createStaticAIInstance tryker", + "loadMapsFromCommon tryker_all", +}; + +// commands for Tryker newbie continent +StartCommandsWhenMirrorReadyTrykerNewbie = +{ + "loadContinent tryker_newbie", + "createStaticAIInstance tryker_newbie", + "loadMapsFromCommon tryker_newbie_all", +}; + +// commands for bagne continents +StartCommandsWhenMirrorReadyBagne = +{ + "loadContinent bagne", + "createStaticAIInstance bagne", + "loadMapsFromCommon bagne_all", +}; + +StartCommandsWhenMirrorReadyNexus = +{ + "loadContinent nexus", + "createStaticAIInstance nexus", + "loadMapsFromCommon nexus_all", +}; + +StartCommandsWhenMirrorReadyRouteGouffre = +{ + "loadContinent route_gouffre", + "createStaticAIInstance route_gouffre", + "loadMapsFromCommon route_gouffre_all", +}; + +StartCommandsWhenMirrorReadySources = +{ + "loadContinent sources_interdites", + "createStaticAIInstance sources", + "loadMapsFromCommon sources_all", +}; + +StartCommandsWhenMirrorReadyTerre = +{ + "loadContinent terre_oubliee", + "createStaticAIInstance terre", + "loadMapsFromCommon terre_all", +}; + +// commands for Fyros Island continent +StartCommandsWhenMirrorReadyFyrosIsland = +{ + "loadContinent fyros_island", + "createStaticAIInstance fyros_island", + "loadMapsFromCommon fyros_island_all", +}; + +// commands for Zorai Island continent +StartCommandsWhenMirrorReadyZoraiIsland = +{ + "loadContinent zorai_island", + "createStaticAIInstance zorai_island", + "loadMapsFromCommon zorai_island_all", +}; + +// commands for Tryker Island continent +StartCommandsWhenMirrorReadyTrykerIsland = +{ + "loadContinent tryker_island", + "createStaticAIInstance tryker_island", + "loadMapsFromCommon tryker_island_all", +}; + +// commands for Matis island continent +StartCommandsWhenMirrorReadyMatisIsland = +{ + "loadContinent matis_island", + "createStaticAIInstance matis_island", + "loadMapsFromCommon matis_island_all", +}; + +// commands for Newbieland continent +StartCommandsWhenMirrorReadyNewbieland = +{ + "loadContinent newbieland", + "createStaticAIInstance newbieland", + "loadMapsFromCommon newbieland_all", +}; + +// commands for Kitiniere continent +StartCommandsWhenMirrorReadyKitiniere = +{ + "loadContinent kitiniere", + "createStaticAIInstance kitiniere", + "loadMapsFromCommon kitiniere_all", +}; + +// commands for post continents loading +StartCommandsWhenMirrorReadyPost = +{ + "spawnInstances", + "updateAI", + "updateAI", +}; + + +// commands for Ring continents +StartCommandsWhenMirrorReadyRing = +{ + "loadContinent r2_desert", + "createDynamicAIInstance 10000", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_forest", + "createDynamicAIInstance 10001", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_lakes", + "createDynamicAIInstance 10003", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_jungle", + "createDynamicAIInstance 10002", + "loadPrimitiveFile dummy.primitive", + + "loadContinent r2_roots", + "createDynamicAIInstance 10004", + "loadPrimitiveFile dummy.primitive", + +// "spawnInstances", + "updateAI", + "updateAI", + + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a shard AIS Module + "moduleManager.createModule AisControl ais", + // Connect AIS + "ais.plug gw" +}; + diff --git a/code/ryzom/server/patchman_cfg/default/backup_service.cfg b/code/ryzom/server/patchman_cfg/default/backup_service.cfg new file mode 100644 index 000000000..a0e6b33e1 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/backup_service.cfg @@ -0,0 +1,9 @@ + +DontUseNS = BSDontUseNS; +NSHost = BSNSHost; + +// template path from SaveShardRoot to find character saves +SaveTemplatePath = "$shard/characters/account_$userid_$charid$ext"; + +// character saves possible extension list +SaveExtList = "_pdr.bin _pdr.xml .bin"; diff --git a/code/ryzom/server/sheet_pack_cfg/entities_game_service.cfg b/code/ryzom/server/patchman_cfg/default/entities_game_service.cfg similarity index 57% rename from code/ryzom/server/sheet_pack_cfg/entities_game_service.cfg rename to code/ryzom/server/patchman_cfg/default/entities_game_service.cfg index 765eb289b..67a587ffd 100644 --- a/code/ryzom/server/sheet_pack_cfg/entities_game_service.cfg +++ b/code/ryzom/server/patchman_cfg/default/entities_game_service.cfg @@ -1,132 +1,140 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES = 1; -DontUseNS=1; -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; +#ifndef DONT_USE_LGS_SLAVE -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - - -Paths = +StartCommands += { - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // add a layer 3 server transport for slave logger service + "lgs_gw.transportAdd L3Client slaveL3c", + // open the transport + "lgs_gw.transportCmd slaveL3c(connect addr="+SlaveLGSHost+":"+L3SlaveLGSPort+")", + + // Create a shard unifier client module + "moduleManager.createModule ShardUnifierClient suc", + // Create a client commands forwader module + "moduleManager.createModule ClientCommandForwader ccf", + + // Create a characer control module + "moduleManager.createModule CharacterControl cc", + + // Create a guild unifier module + "moduleManager.createModule GuildUnifier gu", + + //Create a shard unifier name mapper + "moduleManager.createModule CharNameMapperClient cnmc", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + + "suc.plug gw", + "ccf.plug gw", + "cc.plug gw", + "gu.plug glob_gw", + "cnmc.plug gw", + "lsc.plug lgs_gw", + +// "addNegativeFilterDebug LNETL", +// "addNegativeFilterDebug FG:", }; -PathsNoRecurse = +#endif + +#ifdef DONT_USE_LGS_SLAVE + +StartCommands += { - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // Create a shard unifier client module + "moduleManager.createModule ShardUnifierClient suc", + // Create a client commands forwader module + "moduleManager.createModule ClientCommandForwader ccf", + + // Create a characer control module + "moduleManager.createModule CharacterControl cc", + + // Create a guild unifier module + "moduleManager.createModule GuildUnifier gu", + + //Create a shard unifier name mapper + "moduleManager.createModule CharNameMapperClient cnmc", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + + "suc.plug gw", + "ccf.plug gw", + "cc.plug gw", + "gu.plug glob_gw", + "cnmc.plug gw", + "lsc.plug lgs_gw", + +// "addNegativeFilterDebug LNETL", +// "addNegativeFilterDebug FG:", }; -GeorgePaths = +#endif + +/// A list of vars to graph for EGS +GraphVars += { - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" + "TotalNbItemForSale", "60000", // every minutes + "NbPlayers", "60000", // every minutes }; -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/entities_game_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS", "CDB", "FAME" , "PDR:apply", "PDR:store" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate", "Register EId" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; -// link the common configuration file //min fraction of the total damage done on a creature that a group/player must do to be attributed a kill KillAttribMinFactor = 0.3; //max bulk the player can transport * 1000 (*1000 to avoid float operations) MaxPlayerBulk = 300000; + //max weight in grammes a player can have on him if his strength is 0 BaseMaxCarriedWeight = 300000; // base bulk of player room BasePlayerRoomBulk = 2000000; -// if true, every player that was saved with an invalid position will be corrected the next times he logs in. +// if true, every player that was saved with an invalid position will be corrected the next time he logs in. CorrectInvalidPlayerPositions = 1; // Create Character Start skills value @@ -181,22 +189,31 @@ SpawnedDeadMektoubDelay = 2592000; // 10 ticks per second * 60 for minutes * 60 //************************************************************************************************************* SkillProgressionFactor = 1.0; -SkillFightValueLimiter = 250; //skill value temporary limited for beta -SkillMagicValueLimiter = 250; //skill value temporary limited for beta -SkillCraftValueLimiter = 250; //skill value temporary limited for beta -SkillHarvestValueLimiter = 250; //skill value temporary limited for beta +SkillFightValueLimiter = 250; +SkillMagicValueLimiter = 250; +SkillCraftValueLimiter = 250; +SkillHarvestValueLimiter = 250; NBMeanCraftRawMaterials = 1; //Mean of raw material used for craft an item, it's used for scale xp win when crafting an item with effective raw material used // when in a team value of each member above one for XP division among team members XPTeamMemberDivisorValue = 0.5; + // distance max for an action to be taken into account when in a team MaxDistanceForXpGain = 110; + // Max XP gain by any one player on any creature (each team member can gain up to this value) MaxXPGainPerPlayer = 30.0; + +//************************************************************************************************************* +// Characteristics parameters +//************************************************************************************************************* //characteristic brick progression step CharacteristicBrickStep = 5; +// Maximum value for characteristics (260 because characters begin with 10) +MaxCharacteristicValue = 260; + //************************************************************************************************************* // Magic parameters @@ -206,17 +223,17 @@ RechargeMoneyFactor = 1.0; CristalMoneyFactor = 1.0; // int in ticks for following values -NoLinkSurvivalAddTime = 100; -NoLinkTimeFear = 100; -NoLinkTimeSleep = 100; -NoLinkTimeStun = 100; -NoLinkTimeRoot = 100; -NoLinkTimeSnare = 100; -NoLinkTimeSlow = 100; -NoLinkTimeBlind = 100; -NoLinkTimeMadness = 100; -NoLinkTimeDot = 100; -PostCastLatency = 100; // in ticks +NoLinkSurvivalAddTime = 50; +NoLinkTimeFear = 10; +NoLinkTimeSleep = 30; +NoLinkTimeStun = 15; +NoLinkTimeRoot = 30; +NoLinkTimeSnare = 30; +NoLinkTimeSlow = 30; +NoLinkTimeBlind = 20; +NoLinkTimeMadness = 35; +NoLinkTimeDot = 20; +PostCastLatency = 10; // in ticks TickFrequencyCompassUpdate = 32; @@ -233,14 +250,14 @@ UpdatePeriodDot = 40; DefaultUpdatePeriod = 40; // bonus on resist for each received spell -ResistIncreaseFear = 10; -ResistIncreaseSleep = 10; -ResistIncreaseStun = 10; -ResistIncreaseRoot = 10; -ResistIncreaseSnare = 10; -ResistIncreaseSlow = 10; -ResistIncreaseBlind = 10; -ResistIncreaseMadness = 10; +ResistIncreaseFear = 6; +ResistIncreaseSleep = 4; +ResistIncreaseStun = 8; +ResistIncreaseRoot = 4; +ResistIncreaseSnare = 3; +ResistIncreaseSlow = 4; +ResistIncreaseBlind = 7; +ResistIncreaseMadness = 5; ResistIncreaseAcid = 0; ResistIncreaseCold = 0; @@ -286,23 +303,23 @@ RifleAmmoDurability = 100.0; HarpoonAmmoDurability = 100.0; // armor and shield ShieldDurability = 100.0; -BucklerDurability = 100.0; +BucklerDurability = 150.0; LightBootsDurability = 100.0; LightGlovesDurability = 100.0; LightPantsDurability = 100.0; LightSleevesDurability = 100.0; LightVestDurability = 100.0; -MediumBootsDurability = 100.0; -MediumGlovesDurability = 100.0; -MediumPantsDurability = 100.0; -MediumSleevesDurability = 100.0; -MediumVestDurability = 100.0; -HeavyBootsDurability = 100.0; -HeavyGlovesDurability = 100.0; -HeavyPantsDurability = 100.0; -HeavySleevesDurability = 100.0; -HeavyVestDurability = 100.0; -HeavyHelmetDurability = 100.0; +MediumBootsDurability = 150.0; +MediumGlovesDurability = 150.0; +MediumPantsDurability = 150.0; +MediumSleevesDurability = 150.0; +MediumVestDurability = 150.0; +HeavyBootsDurability = 200.0; +HeavyGlovesDurability = 200.0; +HeavyPantsDurability = 200.0; +HeavySleevesDurability = 200.0; +HeavyVestDurability = 200.0; +HeavyHelmetDurability = 200.0; // jewel AnkletDurability = 100.0; BraceletDurability = 100.0; @@ -322,63 +339,63 @@ ToolCraftingToolDurability = 100.0; //////////// // WEIGHT // (Max is *2) // melee weapons -DaggerWeight = 1.0; // Dg Type (Pierce) -SwordWeight = 1.0; // 1H Type -MaceWeight = 1.0; // 1H Type -AxeWeight = 1.0; // 1H Type -SpearWeight = 1.0; // 1H Type (pierce) +DaggerWeight = 3.5; // Dg Type (Pierce) +SwordWeight = 4.0; // 1H Type +MaceWeight = 4.0; // 1H Type +AxeWeight = 4.0; // 1H Type +SpearWeight = 4.0; // 1H Type (pierce) StaffWeight = 1.0; // 1H Type -MagicianStaffWeight = 1.0; // 2H type -TwoHandSwordWeight = 1.0; // 2H Type -TwoHandAxeWeight = 1.0; // 2H Type -PikeWeight = 1.0; // 2H Type (pierce) -TwoHandMaceWeight = 1.0; // 2H Type +MagicianStaffWeight = 2.0; // 2H type +TwoHandSwordWeight = 6.0; // 2H Type +TwoHandAxeWeight = 6.0; // 2H Type +PikeWeight = 6.0; // 2H Type (pierce) +TwoHandMaceWeight = 6.0; // 2H Type // range weapon -PistolWeight = 1.0; -BowpistolWeight = 1.0; -RifleWeight = 1.0; -BowrifleWeight = 1.0; -AutolauchWeight = 1.0; -LauncherWeight = 1.0; -HarpoonWeight = 1.0; +PistolWeight = 1.5; +BowpistolWeight = 1.5; +RifleWeight = 2.0; +BowrifleWeight = 2.0; +AutolauchWeight = 8.0; +LauncherWeight = 8.0; +HarpoonWeight = 2.0; // ammo -PistolAmmoWeight = 1.0; -BowpistolAmmoWeight = 1.0; -RifleAmmoWeight = 1.0; -BowrifleAmmoWeight = 1.0; -AutolaunchAmmoWeight = 1.0; -LauncherAmmoWeight = 1.0; -HarpoonAmmoWeight = 1.0; +PistolAmmoWeight = 0.2; +BowpistolAmmoWeight = 0.2; +RifleAmmoWeight = 0.2; +BowrifleAmmoWeight = 0.2; +AutolaunchAmmoWeight = 4.8; +LauncherAmmoWeight = 10.0; +HarpoonAmmoWeight = 0.2; GrenadeAmmoWeight = 1.0; // armor and shield -ShieldWeight = 1.0; -BucklerWeight = 1.0; +ShieldWeight = 3.0; +BucklerWeight = 1.5; // Light LightBootsWeight = 1.0; LightGlovesWeight = 1.0; -LightPantsWeight = 1.0; +LightPantsWeight = 2.5; LightSleevesWeight = 1.0; -LightVestWeight = 1.0; +LightVestWeight = 2.5; // Medium -MediumBootsWeight = 1.0; -MediumGlovesWeight = 1.0; -MediumPantsWeight = 1.0; -MediumSleevesWeight = 1.0; -MediumVestWeight = 1.0; +MediumBootsWeight = 2.0; +MediumGlovesWeight = 2.0; +MediumPantsWeight = 5.0; +MediumSleevesWeight = 2.0; +MediumVestWeight = 5.0; // Heavy -HeavyBootsWeight = 1.0; -HeavyGlovesWeight = 1.0; -HeavyPantsWeight = 1.0; -HeavySleevesWeight = 1.0; -HeavyVestWeight = 1.0; -HeavyHelmetWeight = 1.0; +HeavyBootsWeight = 4.0; +HeavyGlovesWeight = 4.0; +HeavyPantsWeight = 10.0; +HeavySleevesWeight = 4.0; +HeavyVestWeight = 10.0; +HeavyHelmetWeight = 4.0; // jewel -AnkletWeight = 1.0; -BraceletWeight = 1.0; -DiademWeight = 1.0; -EaringWeight = 1.0; -PendantWeight = 1.0; -RingWeight = 1.0; +AnkletWeight = 0.1; +BraceletWeight = 0.1; +DiademWeight = 0.1; +EaringWeight = 0.1; +PendantWeight = 0.1; +RingWeight = 0.1; ////////////// // SAP LOAD // // MIN @@ -439,74 +456,74 @@ PendantSapLoad = 0.0; RingSapLoad = 0.0; // MAX // melee weapons -DaggerSapLoadMax = 1000.0; -SwordSapLoadMax = 1000.0; -MaceSapLoadMax = 1000.0; -AxeSapLoadMax = 1000.0; -SpearSapLoadMax = 1000.0; -StaffSapLoadMax = 1000.0; -MagicianStaffSapLoadMax = 1000.0; -TwoHandSwordSapLoadMax = 1000.0; -TwoHandAxeSapLoadMax = 1000.0; -PikeSapLoadMax = 1000.0; -TwoHandMaceSapLoadMax = 1000.0; +DaggerSapLoadMax = 2500.0; +SwordSapLoadMax = 2500.0; +MaceSapLoadMax = 2500.0; +AxeSapLoadMax = 2500.0; +SpearSapLoadMax = 2500.0; +StaffSapLoadMax = 7000.0; +MagicianStaffSapLoadMax = 2500.0; +TwoHandSwordSapLoadMax = 2500.0; +TwoHandAxeSapLoadMax = 2500.0; +PikeSapLoadMax = 2500.0; +TwoHandMaceSapLoadMax = 2500.0; // range weapon -AutolauchSapLoadMax = 1000.0; -BowrifleSapLoadMax = 1000.0; -LauncherSapLoadMax = 1000.0; -PistolSapLoadMax = 1000.0; -BowpistolSapLoadMax = 1000.0; -RifleSapLoadMax = 1000.0; -HarpoonSapLoadMax = 1000.0; +AutolauchSapLoadMax = 2500.0; +BowrifleSapLoadMax = 2500.0; +LauncherSapLoadMax = 2500.0; +PistolSapLoadMax = 2500.0; +BowpistolSapLoadMax = 2500.0; +RifleSapLoadMax = 2500.0; +HarpoonSapLoadMax = 2500.0; // ammo -AutolaunchAmmoSapLoadMax = 1000.0; -BowrifleAmmoSapLoadMax = 1000.0; -GrenadeAmmoSapLoadMax = 1000.0; -LauncherAmmoSapLoadMax = 1000.0; -PistolAmmoSapLoadMax = 1000.0; -BowpistolAmmoSapLoadMax = 1000.0; -RifleAmmoSapLoadMax = 1000.0; -HarpoonAmmoSapLoadMax = 1000.0; +AutolaunchAmmoSapLoadMax = 2500.0; +BowrifleAmmoSapLoadMax = 2500.0; +GrenadeAmmoSapLoadMax = 2500.0; +LauncherAmmoSapLoadMax = 2500.0; +PistolAmmoSapLoadMax = 2500.0; +BowpistolAmmoSapLoadMax = 2500.0; +RifleAmmoSapLoadMax = 2500.0; +HarpoonAmmoSapLoadMax = 2500.0; // armor and shield -ShieldSapLoadMax = 1000.0; -BucklerSapLoadMax = 1000.0; -LightBootsSapLoadMax = 1000.0; -LightGlovesSapLoadMax = 1000.0; -LightPantsSapLoadMax = 1000.0; -LightSleevesSapLoadMax = 1000.0; -LightVestSapLoadMax = 1000.0; -MediumBootsSapLoadMax = 1000.0; -MediumGlovesSapLoadMax = 1000.0; -MediumPantsSapLoadMax = 1000.0; -MediumSleevesSapLoadMax = 1000.0; -MediumVestSapLoadMax = 1000.0; -HeavyBootsSapLoadMax = 1000.0; -HeavyGlovesSapLoadMax = 1000.0; -HeavyPantsSapLoadMax = 1000.0; -HeavySleevesSapLoadMax = 1000.0; -HeavyVestSapLoadMax = 1000.0; -HeavyHelmetSapLoadMax = 1000.0; +ShieldSapLoadMax = 2500.0; +BucklerSapLoadMax = 2500.0; +LightBootsSapLoadMax = 2500.0; +LightGlovesSapLoadMax = 2500.0; +LightPantsSapLoadMax = 2500.0; +LightSleevesSapLoadMax = 2500.0; +LightVestSapLoadMax = 2500.0; +MediumBootsSapLoadMax = 2500.0; +MediumGlovesSapLoadMax = 2500.0; +MediumPantsSapLoadMax = 2500.0; +MediumSleevesSapLoadMax = 2500.0; +MediumVestSapLoadMax = 2500.0; +HeavyBootsSapLoadMax = 2500.0; +HeavyGlovesSapLoadMax = 2500.0; +HeavyPantsSapLoadMax = 2500.0; +HeavySleevesSapLoadMax = 2500.0; +HeavyVestSapLoadMax = 2500.0; +HeavyHelmetSapLoadMax = 2500.0; // jewel -AnkletSapLoadMax = 1000.0; -BraceletSapLoadMax = 1000.0; -DiademSapLoadMax = 1000.0; -EaringSapLoadMax = 1000.0; -PendantSapLoadMax = 1000.0; -RingSapLoadMax = 1000.0; +AnkletSapLoadMax = 2500.0; +BraceletSapLoadMax = 2500.0; +DiademSapLoadMax = 2500.0; +EaringSapLoadMax = 2500.0; +PendantSapLoadMax = 2500.0; +RingSapLoadMax = 2500.0; //////////// // DAMAGE Min // melee weapons -DaggerDmg = 1.0; // Dg Type (Pierce) -StaffDmg = 1.0; // 1H Type -SwordDmg = 1.0; // 1H Type -MaceDmg = 1.0; // 1H Type -AxeDmg = 1.0; // 1H Type -SpearDmg = 1.0; // 1H Type (pierce) -TwoHandSwordDmg = 1.0; // 2H Type -TwoHandAxeDmg = 1.0; // 2H Type -PikeDmg = 1.0; // 2H Type (pierce) -TwoHandMaceDmg = 1.0; // 2H Type -MagicianStaffDmg = 1.0; // 2H Type +DaggerDmg = 0.250; // Dg Type (Pierce) +StaffDmg = 0.250; // 1H Type +SwordDmg = 0.666; // 1H Type +MaceDmg = 0.800; // 1H Type +AxeDmg = 0.800; // 1H Type +SpearDmg = 0.550; // 1H Type (pierce) +TwoHandSwordDmg = 1.000; // 2H Type +TwoHandAxeDmg = 1.200; // 2H Type +PikeDmg = 0.800; // 2H Type (pierce) +TwoHandMaceDmg = 1.200; // 2H Type +MagicianStaffDmg = 0.350; // 2H Type // range weapon (modifier) PistolDmg = 0.0; BowpistolDmg = 0.0; @@ -516,27 +533,27 @@ AutolauchDmg = 0.0; LauncherDmg = 0.0; HarpoonDmg = 0.0; // ammo -PistolAmmoDmg = 1.0; -BowpistolAmmoDmg = 1.0; -RifleAmmoDmg = 1.0; -BowrifleAmmoDmg = 1.0; -AutolaunchAmmoDmg = 1.0; -LauncherAmmoDmg = 1.0; +PistolAmmoDmg = 0.625; +BowpistolAmmoDmg = 0.625; +RifleAmmoDmg = 0.833; +BowrifleAmmoDmg = 0.833; +AutolaunchAmmoDmg = 2.0; +LauncherAmmoDmg = 3.0; HarpoonAmmoDmg = 1.0; GrenadeAmmoDmg = 1.0; // DAMAGE Max // melee weapons -DaggerDmgMax = 1.0; // Dg Type (Pierce) -StaffDmgMax = 1.0; // 1H Type -SwordDmgMax = 1.0; // 1H Type -MaceDmgMax = 1.0; // 1H Type -AxeDmgMax = 1.0; // 1H Type -SpearDmgMax = 1.0; // 1H Type (pierce) -TwoHandSwordDmgMax = 1.0; // 2H Type -TwoHandAxeDmgMax = 1.0; // 2H Type -PikeDmgMax = 1.0; // 2H Type (pierce) -TwoHandMaceDmgMax = 1.0; // 2H Type -MagicianStaffDmgMax = 1.0; +DaggerDmgMax = 0.500; // Dg Type (Pierce) +StaffDmgMax = 0.500; // 1H Type +SwordDmgMax = 1.333; // 1H Type +MaceDmgMax = 1.600; // 1H Type +AxeDmgMax = 1.600; // 1H Type +SpearDmgMax = 1.100; // 1H Type (pierce) +TwoHandSwordDmgMax = 2.000; // 2H Type +TwoHandAxeDmgMax = 2.400; // 2H Type +PikeDmgMax = 1.600; // 2H Type (pierce) +TwoHandMaceDmgMax = 2.400; // 2H Type +MagicianStaffDmgMax = 0.350; // range weapon (modifier) AutolauchDmgMax = 0.0; BowrifleDmgMax = 0.0; @@ -546,37 +563,37 @@ BowpistolDmgMax = 0.0; RifleDmgMax = 0.0; HarpoonDmgMax = 0.0; // ammo -PistolAmmoDmgMax = 1.0; -BowpistolAmmoDmgMax = 1.0; -RifleAmmoDmgMax = 1.0; -BowrifleAmmoDmgMax = 1.0; -AutolaunchAmmoDmgMax = 1.0; -LauncherAmmoDmgMax = 1.0; -HarpoonAmmoDmgMax = 1.0; -GrenadeAmmoDmgMax = 1.0; +PistolAmmoDmgMax = 1.25; +BowpistolAmmoDmgMax = 1.25; +RifleAmmoDmgMax = 1.666; +BowrifleAmmoDmgMax = 1.666; +AutolaunchAmmoDmgMax = 4.0; +LauncherAmmoDmgMax = 6.0; +HarpoonAmmoDmgMax = 2.0; +GrenadeAmmoDmgMax = 2.0; ////////////// // HIT RATE // Hits for 10 sec // melee weapons -DaggerHitRate = 1.0; // Dg Type (Pierce) -StaffHitRate = 1.0; // 1H Type (blunt) -SwordHitRate = 1.0; // 1H Type -MaceHitRate = 1.0; // 1H Type -AxeHitRate = 1.0; // 1H Type -SpearHitRate = 1.0; // 1H Type (pierce) -TwoHandSwordHitRate = 1.0; // 2H Type -TwoHandAxeHitRate = 1.0; // 2H Type -PikeHitRate = 1.0; // 2H Type (pierce) -TwoHandMaceHitRate = 1.0; // 2H Type -MagicianStaffHitRate = 1.0; // +DaggerHitRate = 5.0; // Dg Type (Pierce) +StaffHitRate = 3.333; // 1H Type (blunt) +SwordHitRate = 3.333; // 1H Type +MaceHitRate = 3.030; // 1H Type +AxeHitRate = 3.030; // 1H Type +SpearHitRate = 3.700; // 1H Type (pierce) +TwoHandSwordHitRate = 2.500; // 2H Type +TwoHandAxeHitRate = 2.272; // 2H Type +PikeHitRate = 2.777; // 2H Type (pierce) +TwoHandMaceHitRate = 2.272; // 2H Type +MagicianStaffHitRate = 2.5; // // range weapon -PistolHitRate = 1.0; -BowpistolHitRate = 1.0; -RifleHitRate = 1.0; -BowrifleHitRate = 1.0; +PistolHitRate = 2.5; +BowpistolHitRate = 2.5; +RifleHitRate = 2.0; +BowrifleHitRate = 2.0; AutolauchHitRate = 1.0; LauncherHitRate = 1.0; -HarpoonHitRate = 1.0; +HarpoonHitRate = 2.0; // ammo (modifier) AutolaunchAmmoHitRate = 0.0; BowrifleAmmoHitRate = 0.0; @@ -591,24 +608,24 @@ HarpoonAmmoHitRate = 0.0; // Maximum hit rate ( after crafted item parameters applications ) // melee weapons DaggerHitRateMax = 10.0; -StaffHitRateMax = 10.0; // 1H Type (blunt) -SwordHitRateMax = 10.0; -MaceHitRateMax = 10.0; -AxeHitRateMax = 10.0; -SpearHitRateMax = 10.0; -TwoHandSwordHitRateMax = 10.0; -TwoHandAxeHitRateMax = 10.0; -PikeHitRateMax = 10.0; -TwoHandMaceHitRateMax = 10.0; -MagicianStaffHitRateMax = 10.0; +StaffHitRateMax = 6.666; // 1H Type (blunt) +SwordHitRateMax = 6.666; +MaceHitRateMax = 6.060; +AxeHitRateMax = 6.060; +SpearHitRateMax = 7.400; +TwoHandSwordHitRateMax = 5.0; +TwoHandAxeHitRateMax = 4.545; +PikeHitRateMax = 5.555; +TwoHandMaceHitRateMax = 4.545; +MagicianStaffHitRateMax = 2.5; // range weapon -PistolHitRateMax = 1.0; -BowpistolHitRateMax = 1.0; -RifleHitRateMax = 1.0; -BowrifleHitRateMax = 1.0; -AutolauchHitRateMax = 1.0; -LauncherHitRateMax = 1.0; -HarpoonHitRateMax = 1.0; +PistolHitRateMax = 5.0; +BowpistolHitRateMax = 5.0; +RifleHitRateMax = 4.0; +BowrifleHitRateMax = 4.0; +AutolauchHitRateMax = 2.0; +LauncherHitRateMax = 2.0; +HarpoonHitRateMax = 4.0; // ammo AutolaunchAmmoHitRateMax = 0.0; BowrifleAmmoHitRateMax = 0.0; @@ -623,13 +640,13 @@ HarpoonAmmoHitRateMax = 0.0; /////////// // Range // for ammo, range weapon (modifier) (max = *2) // range weapon -AutolauchRange = 10000.0; // Gat -BowrifleRange = 10000.0; -LauncherRange = 10000.0; // Rocket Launcher -PistolRange = 10000.0; -BowpistolRange = 10000.0; -RifleRange = 10000.0; -HarpoonRange = 10000.0; +AutolauchRange = 25000.0; // Gat +BowrifleRange = 20000.0; +LauncherRange = 30000.0; // Rocket Launcher +PistolRange = 15000.0; +BowpistolRange = 15000.0; +RifleRange = 20000.0; +HarpoonRange = 15000.0; // ammo AutolaunchAmmoRange = 0.0; BowrifleAmmoRange = 0.0; @@ -643,236 +660,236 @@ HarpoonAmmoRange = 0.0; // DODGE MODIFIER // not for ammo and jewel, but for armor too // melee weapons & armor DaggerDodgeMinModifier = 0.0; -DaggerDodgeMaxModifier = 0.0; -SwordDodgeMinModifier = 0.0; -SwordDodgeMaxModifier = 0.0; -MaceDodgeMinModifier = 0.0; -MaceDodgeMaxModifier = 0.0; -AxeDodgeMinModifier = 0.0; -AxeDodgeMaxModifier = 0.0; -SpearDodgeMinModifier = 0.0; -SpearDodgeMaxModifier = 0.0; -StaffDodgeMinModifier = 0.0; -StaffDodgeMaxModifier = 0.0; -TwoHandSwordDodgeMinModifier = 0.0; +DaggerDodgeMaxModifier = 20.0; +SwordDodgeMinModifier = -10.0; +SwordDodgeMaxModifier = 10.0; +MaceDodgeMinModifier = -10.0; +MaceDodgeMaxModifier = 10.0; +AxeDodgeMinModifier = -10.0; +AxeDodgeMaxModifier = 10.0; +SpearDodgeMinModifier = -5.0; +SpearDodgeMaxModifier = 15.0; +StaffDodgeMinModifier = -10.0; +StaffDodgeMaxModifier = 10.0; +TwoHandSwordDodgeMinModifier = -20.0; TwoHandSwordDodgeMaxModifier = 0.0; -TwoHandAxeDodgeMinModifier = 0.0; +TwoHandAxeDodgeMinModifier = -20.0; TwoHandAxeDodgeMaxModifier = 0.0; -PikeDodgeMinModifier = 0.0; +PikeDodgeMinModifier = -20.0; PikeDodgeMaxModifier = 0.0; -TwoHandMaceDodgeMinModifier = 0.0; +TwoHandMaceDodgeMinModifier = -20.0; TwoHandMaceDodgeMaxModifier = 0.0; MagicianStaffDodgeMinModifier = 0.0; MagicianStaffDodgeMaxModifier = 0.0; // range weapon -AutolauchDodgeMinModifier = 0.0; -AutolauchDodgeMaxModifier = 0.0; -BowrifleDodgeMinModifier = 0.0; -BowrifleDodgeMaxModifier = 0.0; -LauncherDodgeMinModifier = 0.0; +AutolauchDodgeMinModifier = -15.0; +AutolauchDodgeMaxModifier = 5.0; +BowrifleDodgeMinModifier = -10.0; +BowrifleDodgeMaxModifier = 10.0; +LauncherDodgeMinModifier = -20.0; LauncherDodgeMaxModifier = 0.0; PistolDodgeMinModifier = 0.0; -PistolDodgeMaxModifier = 0.0; -BowpistolDodgeMinModifier = 0.0; -BowpistolDodgeMaxModifier = 0.0; -RifleDodgeMinModifier = 0.0; +PistolDodgeMaxModifier = 20.0; +BowpistolDodgeMinModifier = -5.0; +BowpistolDodgeMaxModifier = 15.0; +RifleDodgeMinModifier = -20.0; RifleDodgeMaxModifier = 0.0; HarpoonDodgeMinModifier = 0.0; HarpoonDodgeMaxModifier = 0.0; // armor and shield -ShieldDodgeMinModifier = 0.0; +ShieldDodgeMinModifier = -10.0; ShieldDodgeMaxModifier = 0.0; BucklerDodgeMinModifier = 0.0; -BucklerDodgeMaxModifier = 0.0; -LightBootsDodgeMinModifier = 0.0; -LightBootsDodgeMaxModifier = 0.0; -LightGlovesDodgeMinModifier = 0.0; -LightGlovesDodgeMaxModifier = 0.0; -LightPantsDodgeMinModifier = 0.0; -LightPantsDodgeMaxModifier = 0.0; -LightSleevesDodgeMinModifier = 0.0; -LightSleevesDodgeMaxModifier = 0.0; -LightVestDodgeMinModifier = 0.0; -LightVestDodgeMaxModifier = 0.0; -MediumBootsDodgeMinModifier = 0.0; -MediumBootsDodgeMaxModifier = 0.0; -MediumGlovesDodgeMinModifier = 0.0; -MediumGlovesDodgeMaxModifier = 0.0; -MediumPantsDodgeMinModifier = 0.0; -MediumPantsDodgeMaxModifier = 0.0; -MediumSleevesDodgeMinModifier = 0.0; -MediumSleevesDodgeMaxModifier = 0.0; -MediumVestDodgeMinModifier = 0.0; -MediumVestDodgeMaxModifier = 0.0; -HeavyBootsDodgeMinModifier = 0.0; +BucklerDodgeMaxModifier = 20.0; +LightBootsDodgeMinModifier = 1.0; +LightBootsDodgeMaxModifier = 2.0; +LightGlovesDodgeMinModifier = 1.0; +LightGlovesDodgeMaxModifier = 2.0; +LightPantsDodgeMinModifier = 1.0; +LightPantsDodgeMaxModifier = 2.0; +LightSleevesDodgeMinModifier = 1.0; +LightSleevesDodgeMaxModifier = 2.0; +LightVestDodgeMinModifier = 1.0; +LightVestDodgeMaxModifier = 2.0; +MediumBootsDodgeMinModifier = -2.0; +MediumBootsDodgeMaxModifier = 1.0; +MediumGlovesDodgeMinModifier = -2.0; +MediumGlovesDodgeMaxModifier = 1.0; +MediumPantsDodgeMinModifier = -2.0; +MediumPantsDodgeMaxModifier = 1.0; +MediumSleevesDodgeMinModifier = -2.0; +MediumSleevesDodgeMaxModifier = 1.0; +MediumVestDodgeMinModifier = -2.0; +MediumVestDodgeMaxModifier = 1.0; +HeavyBootsDodgeMinModifier = -4.0; HeavyBootsDodgeMaxModifier = 0.0; -HeavyGlovesDodgeMinModifier = 0.0; +HeavyGlovesDodgeMinModifier = -4.0; HeavyGlovesDodgeMaxModifier = 0.0; -HeavyPantsDodgeMinModifier = 0.0; +HeavyPantsDodgeMinModifier = -4.0; HeavyPantsDodgeMaxModifier = 0.0; -HeavySleevesDodgeMinModifier = 0.0; +HeavySleevesDodgeMinModifier = -4.0; HeavySleevesDodgeMaxModifier = 0.0; -HeavyVestDodgeMinModifier = 0.0; +HeavyVestDodgeMinModifier = -4.0; HeavyVestDodgeMaxModifier = 0.0; -HeavyHelmetDodgeMinModifier = 0.0; +HeavyHelmetDodgeMinModifier = -4.0; HeavyHelmetDodgeMaxModifier = 0.0; //////////////////// // PARRY MODIFIER // not for ammo and jewel, but for armor too // melee weapons -DaggerParryMinModifier = 0.0; +DaggerParryMinModifier = -20.0; DaggerParryMaxModifier = 0.0; -SwordParryMinModifier = 0.0; -SwordParryMaxModifier = 0.0; -MaceParryMinModifier = 0.0; -MaceParryMaxModifier = 0.0; -AxeParryMinModifier = 0.0; -AxeParryMaxModifier = 0.0; -SpearParryMinModifier = 0.0; +SwordParryMinModifier = -10.0; +SwordParryMaxModifier = 10.0; +MaceParryMinModifier = -15.0; +MaceParryMaxModifier = 5.0; +AxeParryMinModifier = -15.0; +AxeParryMaxModifier = 5.0; +SpearParryMinModifier = -20.0; SpearParryMaxModifier = 0.0; StaffParryMinModifier = 0.0; -StaffParryMaxModifier = 0.0; +StaffParryMaxModifier = 20.0; TwoHandSwordParryMinModifier = 0.0; -TwoHandSwordParryMaxModifier = 0.0; -TwoHandAxeParryMinModifier = 0.0; -TwoHandAxeParryMaxModifier = 0.0; -PikeParryMinModifier = 0.0; -PikeParryMaxModifier = 0.0; -TwoHandMaceParryMinModifier = 0.0; -TwoHandMaceParryMaxModifier = 0.0; +TwoHandSwordParryMaxModifier = 20.0; +TwoHandAxeParryMinModifier = -10.0; +TwoHandAxeParryMaxModifier = 10.0; +PikeParryMinModifier = -10.0; +PikeParryMaxModifier = 10.0; +TwoHandMaceParryMinModifier = -10.0; +TwoHandMaceParryMaxModifier = 10.0; MagicianStaffParryMinModifier = 0.0; MagicianStaffParryMaxModifier = 0.0; // range weapon AutolauchParryMinModifier = 0.0; -AutolauchParryMaxModifier = 0.0; -BowrifleParryMinModifier = 0.0; -BowrifleParryMaxModifier = 0.0; +AutolauchParryMaxModifier = 20.0; +BowrifleParryMinModifier = -10.0; +BowrifleParryMaxModifier = 10.0; LauncherParryMinModifier = 0.0; -LauncherParryMaxModifier = 0.0; -PistolParryMinModifier = 0.0; +LauncherParryMaxModifier = 20.0; +PistolParryMinModifier = -20.0; PistolParryMaxModifier = 0.0; -BowpistolParryMinModifier = 0.0; -BowpistolParryMaxModifier = 0.0; +BowpistolParryMinModifier = -5.0; +BowpistolParryMaxModifier = 15.0; RifleParryMinModifier = 0.0; -RifleParryMaxModifier = 0.0; +RifleParryMaxModifier = 20.0; HarpoonParryMinModifier = 0.0; HarpoonParryMaxModifier = 0.0; // armor and shield -ShieldParryMinModifier = 0.0; -ShieldParryMaxModifier = 0.0; +ShieldParryMinModifier = 10.0; +ShieldParryMaxModifier = 30.0; BucklerParryMinModifier = 0.0; -BucklerParryMaxModifier = 0.0; -LightBootsParryMinModifier = 0.0; -LightBootsParryMaxModifier = 0.0; -LightGlovesParryMinModifier = 0.0; -LightGlovesParryMaxModifier = 0.0; -LightPantsParryMinModifier = 0.0; -LightPantsParryMaxModifier = 0.0; -LightSleevesParryMinModifier = 0.0; -LightSleevesParryMaxModifier = 0.0; -LightVestParryMinModifier = 0.0; -LightVestParryMaxModifier = 0.0; -MediumBootsParryMinModifier = 0.0; -MediumBootsParryMaxModifier = 0.0; -MediumGlovesParryMinModifier = 0.0; -MediumGlovesParryMaxModifier = 0.0; -MediumPantsParryMinModifier = 0.0; -MediumPantsParryMaxModifier = 0.0; -MediumSleevesParryMinModifier = 0.0; -MediumSleevesParryMaxModifier = 0.0; -MediumVestParryMinModifier = 0.0; -MediumVestParryMaxModifier = 0.0; -HeavyBootsParryMinModifier = 0.0; -HeavyBootsParryMaxModifier = 0.0; -HeavyGlovesParryMinModifier = 0.0; -HeavyGlovesParryMaxModifier = 0.0; -HeavyPantsParryMinModifier = 0.0; -HeavyPantsParryMaxModifier = 0.0; -HeavySleevesParryMinModifier = 0.0; -HeavySleevesParryMaxModifier = 0.0; -HeavyVestParryMinModifier = 0.0; -HeavyVestParryMaxModifier = 0.0; -HeavyHelmetParryMinModifier = 0.0; -HeavyHelmetParryMaxModifier = 0.0; +BucklerParryMaxModifier = 20.0; +LightBootsParryMinModifier = -1.0; +LightBootsParryMaxModifier = 1.0; +LightGlovesParryMinModifier = -1.0; +LightGlovesParryMaxModifier = 1.0; +LightPantsParryMinModifier = -1.0; +LightPantsParryMaxModifier = 1.0; +LightSleevesParryMinModifier = -1.0; +LightSleevesParryMaxModifier = 1.0; +LightVestParryMinModifier = -1.0; +LightVestParryMaxModifier = 1.0; +MediumBootsParryMinModifier = -1.0; +MediumBootsParryMaxModifier = 2.0; +MediumGlovesParryMinModifier = -1.0; +MediumGlovesParryMaxModifier = 2.0; +MediumPantsParryMinModifier = -1.0; +MediumPantsParryMaxModifier = 2.0; +MediumSleevesParryMinModifier = -1.0; +MediumSleevesParryMaxModifier = 2.0; +MediumVestParryMinModifier = -1.0; +MediumVestParryMaxModifier = 2.0; +HeavyBootsParryMinModifier = -1.0; +HeavyBootsParryMaxModifier = 3.0; +HeavyGlovesParryMinModifier = -1.0; +HeavyGlovesParryMaxModifier = 3.0; +HeavyPantsParryMinModifier = -1.0; +HeavyPantsParryMaxModifier = 3.0; +HeavySleevesParryMinModifier = -1.0; +HeavySleevesParryMaxModifier = 3.0; +HeavyVestParryMinModifier = -1.0; +HeavyVestParryMaxModifier = 3.0; +HeavyHelmetParryMinModifier = -1.0; +HeavyHelmetParryMaxModifier = 3.0; ////////////////////////////// // ADVERSARY DODGE MODIFIER // not for ammo, jewel and armor // melee weapons DaggerAdversaryDodgeMinModifier = 0.0; -DaggerAdversaryDodgeMaxModifier = 0.0; -SwordAdversaryDodgeMinModifier = 0.0; -SwordAdversaryDodgeMaxModifier = 0.0; -MaceAdversaryDodgeMinModifier = 0.0; -MaceAdversaryDodgeMaxModifier = 0.0; -AxeAdversaryDodgeMinModifier = 0.0; -AxeAdversaryDodgeMaxModifier = 0.0; -SpearAdversaryDodgeMinModifier = 0.0; -SpearAdversaryDodgeMaxModifier = 0.0; +DaggerAdversaryDodgeMaxModifier = -20.0; +SwordAdversaryDodgeMinModifier = 5.0; +SwordAdversaryDodgeMaxModifier = -15.0; +MaceAdversaryDodgeMinModifier = 5.0; +MaceAdversaryDodgeMaxModifier = -15.0; +AxeAdversaryDodgeMinModifier = 5.0; +AxeAdversaryDodgeMaxModifier = -15.0; +SpearAdversaryDodgeMinModifier = 15.0; +SpearAdversaryDodgeMaxModifier = -5.0; StaffAdversaryDodgeMinModifier = 0.0; -StaffAdversaryDodgeMaxModifier = 0.0; -TwoHandSwordAdversaryDodgeMinModifier = 0.0; -TwoHandSwordAdversaryDodgeMaxModifier = 0.0; -TwoHandAxeAdversaryDodgeMinModifier = 0.0; -TwoHandAxeAdversaryDodgeMaxModifier = 0.0; -PikeAdversaryDodgeMinModifier = 0.0; -PikeAdversaryDodgeMaxModifier = 0.0; -TwoHandMaceAdversaryDodgeMinModifier = 0.0; -TwoHandMaceAdversaryDodgeMaxModifier = 0.0; +StaffAdversaryDodgeMaxModifier = -20.0; +TwoHandSwordAdversaryDodgeMinModifier = 30.0; +TwoHandSwordAdversaryDodgeMaxModifier = 15.0; +TwoHandAxeAdversaryDodgeMinModifier = 30.0; +TwoHandAxeAdversaryDodgeMaxModifier = 15.0; +PikeAdversaryDodgeMinModifier = 30.0; +PikeAdversaryDodgeMaxModifier = 15.0; +TwoHandMaceAdversaryDodgeMinModifier = 30.0; +TwoHandMaceAdversaryDodgeMaxModifier = 15.0; MagicianStaffAdversaryDodgeMinModifier = 0.0; MagicianStaffAdversaryDodgeMaxModifier = 0.0; // range weapon -AutolauchAdversaryDodgeMinModifier = 0.0; -AutolauchAdversaryDodgeMaxModifier = 0.0; +AutolauchAdversaryDodgeMinModifier = 30.0; +AutolauchAdversaryDodgeMaxModifier = 15.0; BowrifleAdversaryDodgeMinModifier = 0.0; -BowrifleAdversaryDodgeMaxModifier = 0.0; -LauncherAdversaryDodgeMinModifier = 0.0; -LauncherAdversaryDodgeMaxModifier = 0.0; +BowrifleAdversaryDodgeMaxModifier = -20.0; +LauncherAdversaryDodgeMinModifier = 30.0; +LauncherAdversaryDodgeMaxModifier = 20.0; PistolAdversaryDodgeMinModifier = 0.0; -PistolAdversaryDodgeMaxModifier = 0.0; +PistolAdversaryDodgeMaxModifier = -15.0; BowpistolAdversaryDodgeMinModifier = 0.0; -BowpistolAdversaryDodgeMaxModifier = 0.0; +BowpistolAdversaryDodgeMaxModifier = -15.0; RifleAdversaryDodgeMinModifier = 0.0; -RifleAdversaryDodgeMaxModifier = 0.0; +RifleAdversaryDodgeMaxModifier = -20.0; HarpoonAdversaryDodgeMinModifier = 0.0; HarpoonAdversaryDodgeMaxModifier = 0.0; ////////////////////////////// // ADVERSARY PARRY MODIFIER // not for ammo, jewel and armor // melee weapons -DaggerAdversaryParryMinModifier = 0.0; +DaggerAdversaryParryMinModifier = 20.0; DaggerAdversaryParryMaxModifier = 0.0; -SwordAdversaryParryMinModifier = 0.0; -SwordAdversaryParryMaxModifier = 0.0; -MaceAdversaryParryMinModifier = 0.0; -MaceAdversaryParryMaxModifier = 0.0; -AxeAdversaryParryMinModifier = 0.0; -AxeAdversaryParryMaxModifier = 0.0; -SpearAdversaryParryMinModifier = 0.0; -SpearAdversaryParryMaxModifier = 0.0; -StaffAdversaryParryMinModifier = 0.0; -StaffAdversaryParryMaxModifier = 0.0; +SwordAdversaryParryMinModifier = 10.0; +SwordAdversaryParryMaxModifier = -10.0; +MaceAdversaryParryMinModifier = 15.0; +MaceAdversaryParryMaxModifier = -5.0; +AxeAdversaryParryMinModifier = 15.0; +AxeAdversaryParryMaxModifier = -5.0; +SpearAdversaryParryMinModifier = 5.0; +SpearAdversaryParryMaxModifier = -5.0; +StaffAdversaryParryMinModifier = -5.0; +StaffAdversaryParryMaxModifier = -15.0; TwoHandSwordAdversaryParryMinModifier = 0.0; -TwoHandSwordAdversaryParryMaxModifier = 0.0; +TwoHandSwordAdversaryParryMaxModifier = -30.0; TwoHandAxeAdversaryParryMinModifier = 0.0; -TwoHandAxeAdversaryParryMaxModifier = 0.0; +TwoHandAxeAdversaryParryMaxModifier = -20.0; PikeAdversaryParryMinModifier = 0.0; -PikeAdversaryParryMaxModifier = 0.0; +PikeAdversaryParryMaxModifier = -20.0; TwoHandMaceAdversaryParryMinModifier = 0.0; -TwoHandMaceAdversaryParryMaxModifier = 0.0; +TwoHandMaceAdversaryParryMaxModifier = -20.0; MagicianStaffAdversaryParryMinModifier = 0.0; MagicianStaffAdversaryParryMaxModifier = 0.0; // range weapon -AutolauchAdversaryParryMinModifier = 0.0; -AutolauchAdversaryParryMaxModifier = 0.0; +AutolauchAdversaryParryMinModifier = 10.0; +AutolauchAdversaryParryMaxModifier = -10.0; BowrifleAdversaryParryMinModifier = 0.0; -BowrifleAdversaryParryMaxModifier = 0.0; -LauncherAdversaryParryMinModifier = 0.0; +BowrifleAdversaryParryMaxModifier = -20.0; +LauncherAdversaryParryMinModifier = 20.0; LauncherAdversaryParryMaxModifier = 0.0; PistolAdversaryParryMinModifier = 0.0; -PistolAdversaryParryMaxModifier = 0.0; +PistolAdversaryParryMaxModifier = -20.0; BowpistolAdversaryParryMinModifier = 0.0; -BowpistolAdversaryParryMaxModifier = 0.0; +BowpistolAdversaryParryMaxModifier = -20.0; RifleAdversaryParryMinModifier = 0.0; -RifleAdversaryParryMaxModifier = 0.0; +RifleAdversaryParryMaxModifier = -20.0; HarpoonAdversaryParryMinModifier = 0.0; -HarpoonAdversaryParryMaxModifier = 0.0; +HarpoonAdversaryParryMaxModifier = -20.0; ////////////////////////////// // Cast Modifiers // for melee weapons @@ -884,7 +901,7 @@ AxeElementalCastingTimeFactor = 0.0; MaceElementalCastingTimeFactor = 0.0; SpearElementalCastingTimeFactor = 0.0; StaffElementalCastingTimeFactor = 0.0; -MagicianStaffElementalCastingTimeFactor = 0.0; +MagicianStaffElementalCastingTimeFactor = 0.2; TwoHandAxeElementalCastingTimeFactor = 0.0; TwoHandSwordElementalCastingTimeFactor = 0.0; PikeElementalCastingTimeFactor = 0.0; @@ -962,7 +979,7 @@ AxeOffensiveAfflictionPowerFactor = 0.0; MaceOffensiveAfflictionPowerFactor = 0.0; SpearOffensiveAfflictionPowerFactor = 0.0; StaffOffensiveAfflictionPowerFactor = 0.0; -MagicianStaffOffensiveAfflictionPowerFactor = 0.0; +MagicianStaffOffensiveAfflictionPowerFactor = 0.2; TwoHandAxeOffensiveAfflictionPowerFactor = 0.0; TwoHandSwordOffensiveAfflictionPowerFactor = 0.0; PikeOffensiveAfflictionPowerFactor = 0.0; @@ -988,7 +1005,7 @@ AxeHealCastingTimeFactor = 0.0; MaceHealCastingTimeFactor = 0.0; SpearHealCastingTimeFactor = 0.0; StaffHealCastingTimeFactor = 0.0; -MagicianStaffHealCastingTimeFactor = 0.0; +MagicianStaffHealCastingTimeFactor = 0.2; TwoHandAxeHealCastingTimeFactor = 0.0; TwoHandSwordHealCastingTimeFactor = 0.0; PikeHealCastingTimeFactor = 0.0; @@ -1014,7 +1031,7 @@ AxeHealPowerFactor = 0.0; MaceHealPowerFactor = 0.0; SpearHealPowerFactor = 0.0; StaffHealPowerFactor = 0.0; -MagicianStaffHealPowerFactor = 0.0; +MagicianStaffHealPowerFactor = 0.2; TwoHandAxeHealPowerFactor = 0.0; TwoHandSwordHealPowerFactor = 0.0; PikeHealPowerFactor = 0.0; @@ -1040,7 +1057,7 @@ AxeDefensiveAfflictionCastingTimeFactor = 0.0; MaceDefensiveAfflictionCastingTimeFactor = 0.0; SpearDefensiveAfflictionCastingTimeFactor = 0.0; StaffDefensiveAfflictionCastingTimeFactor = 0.0; -MagicianStaffDefensiveAfflictionCastingTimeFactor = 0.0; +MagicianStaffDefensiveAfflictionCastingTimeFactor = 0.2; TwoHandAxeDefensiveAfflictionCastingTimeFactor = 0.0; TwoHandSwordDefensiveAfflictionCastingTimeFactor = 0.0; PikeDefensiveAfflictionCastingTimeFactor = 0.0; @@ -1066,7 +1083,7 @@ AxeDefensiveAfflictionPowerFactor = 0.0; MaceDefensiveAfflictionPowerFactor = 0.0; SpearDefensiveAfflictionPowerFactor = 0.0; StaffDefensiveAfflictionPowerFactor = 0.0; -MagicianStaffDefensiveAfflictionPowerFactor = 0.0; +MagicianStaffDefensiveAfflictionPowerFactor = 0.2; TwoHandAxeDefensiveAfflictionPowerFactor = 0.0; TwoHandSwordDefensiveAfflictionPowerFactor = 0.0; PikeDefensiveAfflictionPowerFactor = 0.0; @@ -1090,142 +1107,142 @@ TwoHandMaceDefensiveAfflictionPowerFactorMax = 1.0; // PROTECTION FACTOR // // armor and shield // Min -BucklerProtectionFactor = 0.10; -ShieldProtectionFactor = 0.10; -LightBootsProtectionFactor = 0.10; -LightGlovesProtectionFactor = 0.10; -LightPantsProtectionFactor = 0.10; -LightSleevesProtectionFactor = 0.10; -LightVestProtectionFactor = 0.10; -MediumBootsProtectionFactor = 0.10; -MediumGlovesProtectionFactor = 0.10; -MediumPantsProtectionFactor = 0.10; -MediumSleevesProtectionFactor = 0.10; -MediumVestProtectionFactor = 0.10; -HeavyBootsProtectionFactor = 0.10; -HeavyGlovesProtectionFactor = 0.10; -HeavyPantsProtectionFactor = 0.10; -HeavySleevesProtectionFactor = 0.10; -HeavyVestProtectionFactor = 0.10; -HeavyHelmetProtectionFactor = 0.10; +BucklerProtectionFactor = 0.08; +ShieldProtectionFactor = 0.16; +LightBootsProtectionFactor = 0.05; +LightGlovesProtectionFactor = 0.05; +LightPantsProtectionFactor = 0.05; +LightSleevesProtectionFactor = 0.05; +LightVestProtectionFactor = 0.05; +MediumBootsProtectionFactor = 0.20; +MediumGlovesProtectionFactor = 0.20; +MediumPantsProtectionFactor = 0.20; +MediumSleevesProtectionFactor = 0.20; +MediumVestProtectionFactor = 0.20; +HeavyBootsProtectionFactor = 0.40; +HeavyGlovesProtectionFactor = 0.40; +HeavyPantsProtectionFactor = 0.40; +HeavySleevesProtectionFactor = 0.40; +HeavyVestProtectionFactor = 0.40; +HeavyHelmetProtectionFactor = 0.40; // Max -BucklerProtectionFactorMax = 0.10; -ShieldProtectionFactorMax = 0.10; -LightBootsProtectionFactorMax = 0.10; -LightGlovesProtectionFactorMax = 0.10; -LightPantsProtectionFactorMax = 0.10; -LightSleevesProtectionFactorMax = 0.10; -LightVestProtectionFactorMax = 0.10; -MediumBootsProtectionFactorMax = 0.10; -MediumGlovesProtectionFactorMax = 0.10; -MediumPantsProtectionFactorMax = 0.10; -MediumSleevesProtectionFactorMax = 0.10; -MediumVestProtectionFactorMax = 0.10; -HeavyBootsProtectionFactorMax = 0.10; -HeavyGlovesProtectionFactorMax = 0.10; -HeavyPantsProtectionFactorMax = 0.10; -HeavySleevesProtectionFactorMax = 0.10; -HeavyVestProtectionFactorMax = 0.10; -HeavyHelmetProtectionFactorMax = 0.10; +BucklerProtectionFactorMax = 0.12; +ShieldProtectionFactorMax = 0.24; +LightBootsProtectionFactorMax = 0.25; +LightGlovesProtectionFactorMax = 0.25; +LightPantsProtectionFactorMax = 0.25; +LightSleevesProtectionFactorMax = 0.25; +LightVestProtectionFactorMax = 0.25; +MediumBootsProtectionFactorMax = 0.40; +MediumGlovesProtectionFactorMax = 0.40; +MediumPantsProtectionFactorMax = 0.40; +MediumSleevesProtectionFactorMax = 0.40; +MediumVestProtectionFactorMax = 0.40; +HeavyBootsProtectionFactorMax = 0.60; +HeavyGlovesProtectionFactorMax = 0.60; +HeavyPantsProtectionFactorMax = 0.60; +HeavySleevesProtectionFactorMax = 0.60; +HeavyVestProtectionFactorMax = 0.60; +HeavyHelmetProtectionFactorMax = 0.60; ///////////////////////////// // MAX SLASHING PROTECTION // value to multiply with the item level. // armor and shield -BucklerMaxSlashingProtection = 0.10; -ShieldMaxSlashingProtection = 0.10; -LightBootsMaxSlashingProtection = 0.10; -LightGlovesMaxSlashingProtection = 0.10; -LightPantsMaxSlashingProtection = 0.10; -LightSleevesMaxSlashingProtection = 0.10; -LightVestMaxSlashingProtection = 0.10; -MediumBootsMaxSlashingProtection = 0.10; -MediumGlovesMaxSlashingProtection = 0.10; -MediumPantsMaxSlashingProtection = 0.10; -MediumSleevesMaxSlashingProtection = 0.10; -MediumVestMaxSlashingProtection = 0.10; -HeavyBootsMaxSlashingProtection = 0.10; -HeavyGlovesMaxSlashingProtection = 0.10; -HeavyPantsMaxSlashingProtection = 0.10; -HeavySleevesMaxSlashingProtection = 0.10; -HeavyVestMaxSlashingProtection = 0.33; -HeavyHelmetMaxSlashingProtection = 0.33; +BucklerMaxSlashingProtection = 0.24; +ShieldMaxSlashingProtection = 0.48; +LightBootsMaxSlashingProtection = 0.56; +LightGlovesMaxSlashingProtection = 0.56; +LightPantsMaxSlashingProtection = 0.56; +LightSleevesMaxSlashingProtection = 0.56; +LightVestMaxSlashingProtection = 0.56; +MediumBootsMaxSlashingProtection = 0.89; +MediumGlovesMaxSlashingProtection = 0.89; +MediumPantsMaxSlashingProtection = 0.89; +MediumSleevesMaxSlashingProtection = 0.89; +MediumVestMaxSlashingProtection = 0.89; +HeavyBootsMaxSlashingProtection = 1.33; +HeavyGlovesMaxSlashingProtection = 1.33; +HeavyPantsMaxSlashingProtection = 1.33; +HeavySleevesMaxSlashingProtection = 1.33; +HeavyVestMaxSlashingProtection = 1.33; +HeavyHelmetMaxSlashingProtection = 1.33; ////////////////////////// // MAX BLUNT PROTECTION // // armor and shield -BucklerMaxBluntProtection = 0.10; -ShieldMaxBluntProtection = 0.10; -LightBootsMaxBluntProtection = 0.10; -LightGlovesMaxBluntProtection = 0.10; -LightPantsMaxBluntProtection = 0.10; -LightSleevesMaxBluntProtection = 0.10; -LightVestMaxBluntProtection = 0.10; -MediumBootsMaxBluntProtection = 0.10; -MediumGlovesMaxBluntProtection = 0.10; -MediumPantsMaxBluntProtection = 0.10; -MediumSleevesMaxBluntProtection = 0.10; -MediumVestMaxBluntProtection = 0.10; -HeavyBootsMaxBluntProtection = 0.10; -HeavyGlovesMaxBluntProtection = 0.10; -HeavyPantsMaxBluntProtection = 0.10; -HeavySleevesMaxBluntProtection = 0.10; -HeavyVestMaxBluntProtection = 0.10; -HeavyHelmetMaxBluntProtection = 0.10; +BucklerMaxBluntProtection = 0.24; +ShieldMaxBluntProtection = 0.48; +LightBootsMaxBluntProtection = 0.56; +LightGlovesMaxBluntProtection = 0.56; +LightPantsMaxBluntProtection = 0.56; +LightSleevesMaxBluntProtection = 0.56; +LightVestMaxBluntProtection = 0.56; +MediumBootsMaxBluntProtection = 0.89; +MediumGlovesMaxBluntProtection = 0.89; +MediumPantsMaxBluntProtection = 0.89; +MediumSleevesMaxBluntProtection = 0.89; +MediumVestMaxBluntProtection = 0.89; +HeavyBootsMaxBluntProtection = 1.33; +HeavyGlovesMaxBluntProtection = 1.33; +HeavyPantsMaxBluntProtection = 1.33; +HeavySleevesMaxBluntProtection = 1.33; +HeavyVestMaxBluntProtection = 1.33; +HeavyHelmetMaxBluntProtection = 1.33; ///////////////////////////// // MAX PIERCING PROTECTION // // armor and shield -BucklerMaxPiercingProtection = 0.10; -ShieldMaxPiercingProtection = 0.10; -LightBootsMaxPiercingProtection = 0.10; -LightGlovesMaxPiercingProtection = 0.10; -LightPantsMaxPiercingProtection = 0.10; -LightSleevesMaxPiercingProtection = 0.10; -LightVestMaxPiercingProtection = 0.10; -MediumBootsMaxPiercingProtection = 0.10; -MediumGlovesMaxPiercingProtection = 0.10; -MediumPantsMaxPiercingProtection = 0.10; -MediumSleevesMaxPiercingProtection = 0.10; -MediumVestMaxPiercingProtection = 0.10; -HeavyBootsMaxPiercingProtection = 0.10; -HeavyGlovesMaxPiercingProtection = 0.10; -HeavyPantsMaxPiercingProtection = 0.10; -HeavySleevesMaxPiercingProtection = 0.10; -HeavyVestMaxPiercingProtection = 0.10; -HeavyHelmetMaxPiercingProtection = 0.10; +BucklerMaxPiercingProtection = 0.24; +ShieldMaxPiercingProtection = 0.48; +LightBootsMaxPiercingProtection = 0.56; +LightGlovesMaxPiercingProtection = 0.56; +LightPantsMaxPiercingProtection = 0.56; +LightSleevesMaxPiercingProtection = 0.56; +LightVestMaxPiercingProtection = 0.56; +MediumBootsMaxPiercingProtection = 0.89; +MediumGlovesMaxPiercingProtection = 0.89; +MediumPantsMaxPiercingProtection = 0.89; +MediumSleevesMaxPiercingProtection = 0.89; +MediumVestMaxPiercingProtection = 0.89; +HeavyBootsMaxPiercingProtection = 1.33; +HeavyGlovesMaxPiercingProtection = 1.33; +HeavyPantsMaxPiercingProtection = 1.33; +HeavySleevesMaxPiercingProtection = 1.33; +HeavyVestMaxPiercingProtection = 1.33; +HeavyHelmetMaxPiercingProtection = 1.33; ////////////////////////////// // JEWEL PROTECTION -AcidJewelProtection = 0.01001; // de 0 à 1.0 (1.0 = 100% de protection) -ColdJewelProtection = 0.01001; -FireJewelProtection = 0.01001; -RotJewelProtection = 0.01001; -ShockWaveJewelProtection = 0.01001; -PoisonJewelProtection = 0.01001; -ElectricityJewelProtection = 0.01001; +AcidJewelProtection = 0.08001; // de 0 à 1.0 (1.0 = 100% de protection) +ColdJewelProtection = 0.08001; +FireJewelProtection = 0.08001; +RotJewelProtection = 0.08001; +ShockWaveJewelProtection = 0.08001; +PoisonJewelProtection = 0.08001; +ElectricityJewelProtection = 0.08001; -MaxMagicProtection = 10; // Maximum protection can be gived by jewelry (clamp value), de 0 à 100 (pourcentage) +MaxMagicProtection = 70; // Maximum protection can be gived by jewelry (clamp value), de 0 à 100 (pourcentage) HominBaseProtection = 10; // Homin base protection in generic magic damage type -HominRacialProtection = 10; // Homin base protection in racial magic damage type -MaxAbsorptionFactor = 10; // Factor used for compute maximum absorption gived by all jewel (100 = 1.0 factor (100%)) (Max absorbtion = sum(equipped jewels recommandeds) * factor) +HominRacialProtection = 20; // Homin base protection in racial magic damage type +MaxAbsorptionFactor = 50; // Factor used for compute maximum absorption gived by all jewel (100 = 1.0 factor (100%)) (Max absorbtion = sum(equiped jewels recommandeds) * factor) ////////////////////////////// // JEWEL RESISTANCE -DesertResistance = 1; // In skill points bonus -ForestResistance = 1; -LacustreResistance = 1; -JungleResistance = 1; -PrimaryRootResistance = 1; +DesertResistance = 8; // In skill points bonus +ForestResistance = 8; +LacustreResistance = 8; +JungleResistance = 8; +PrimaryRootResistance = 8; HominRacialResistance = 10;// Homin racial magic resistance to magic racial spell type -MaxMagicResistanceBonus = 10;// clamp value of resistance bonus resistance after all bonus/malus applied +MaxMagicResistanceBonus = 50;// clamp value of resistance bonus resistance after all bonus/malus applied EcosystemResistancePenalty = 10;// ecosystem resistance penalty value //************************************************************************************************************* // regen speed parameters //************************************************************************************************************* -RegenDivisor = 1.0; -RegenReposFactor = 1.0; -RegenOffset = 1.0; +RegenDivisor = 12.5; +RegenReposFactor = 2.0; +RegenOffset = 0.6; //************************************************************************************************************* // weapon damage table config //************************************************************************************************************* -MinDamage = 10; +MinDamage = 27; DamageStep = 1; ExponentialPower = 1; SmoothingFactor = 0; @@ -1233,7 +1250,7 @@ SmoothingFactor = 0; //************************************************************************************************************* // hand to hand combat config //************************************************************************************************************* -HandToHandDamageFactor = 0.10; +HandToHandDamageFactor = 0.35; HandToHandLatency = 25; // 25 ticks = 2.5s //************************************************************************************************************* @@ -1241,30 +1258,30 @@ HandToHandLatency = 25; // 25 ticks = 2.5s //************************************************************************************************************* BotDamageFactor = 1; // factor applied on npc and creature damage // special effects when hit to localisation -HitChestStaLossFactor = 0.1; -HitHeadStunDuration = 1; -HitArmsSlowDuration = 1; -HitArmsSlowFactor = 10; -HitLegsSlowDuration = 1; -HitLegsSlowFactor = -10; -HitHandsDebuffDuration = 1; -HitHandsDebuffValue = -10; -HitFeetDebuffDuration = 1; -HitFeetDebuffValue = -10; +HitChestStaLossFactor = 0.5; +HitHeadStunDuration = 2; +HitArmsSlowDuration = 8; +HitArmsSlowFactor = 30; +HitLegsSlowDuration = 8; +HitLegsSlowFactor = -20; +HitHandsDebuffDuration = 8; +HitHandsDebuffValue = -20; +HitFeetDebuffDuration = 8; +HitFeetDebuffValue = -20; NbOpponentsBeforeMalus = 1; -ModPerSupernumeraryOpponent = -1; +ModPerSupernumeraryOpponent = -5; MinTwoWeaponsLatency = 10; -ShieldingRadius = 1; -CombatFlagLifetime = 10; // (in ticks) used for openings +ShieldingRadius = 5; +CombatFlagLifetime = 50; // (in ticks) used for openings DodgeFactorForMagicSkills = 1.0; -DodgeFactorForForageSkills = 1.0; +DodgeFactorForForageSkills = 0.5; MagicResistFactorForCombatSkills = 1.0; MagicResistFactorForMagicSkills = 1.0; -MagicResistFactorForForageSkills = 1.0; -MagicResistSkillDelta = -10; +MagicResistFactorForForageSkills = 0.5; +MagicResistSkillDelta = -25; //************************************************************************************************************* // Price parameters ( price formula is ItemPriceCoeff2 * x2 + ItemPriceCoeff1 * x + ItemPriceCoeff0 ) @@ -1272,15 +1289,15 @@ MagicResistSkillDelta = -10; // polynom coeff of degree 0 in the price formula ItemPriceCoeff0 = 100.0; // polynom coeff of degree 1 in the price formula -ItemPriceCoeff1 = 0.1; +ItemPriceCoeff1 = 0.6; // polynom coeff of degree 2 in the price formula -ItemPriceCoeff2 = 0.01; +ItemPriceCoeff2 = 0.02; // factor to apply on non raw maetrial items to compute their price -ItemPriceFactor = 1.0; +ItemPriceFactor = 2.0; // factor to apply on animal price to get the price a user can buy them -AnimalSellFactor = 0.1; +AnimalSellFactor = 0.5; // factor to apply on teleport price to get the price a user can buy them -TeleportSellFactor = 0.1; +TeleportSellFactor = 0.5; // this factor is applied to all faction point prices GlobalFactionPointPriceFactor = 1.0; @@ -1315,12 +1332,12 @@ WearMalusCraftFactor = 0.1; // now we base wear factor for weapons on the ration (WeaponLatency / ReferenceWeaponLatencyForWear) // MUST be > 0 -ReferenceWeaponLatencyForWear = 10; +ReferenceWeaponLatencyForWear = 20; -CraftingToolWearPerAction = 0.01; -ForageToolWearPerAction = 0.01; +CraftingToolWearPerAction = 0.2; +ForageToolWearPerAction = 0.2; ArmorWearPerAction = 0.01; -ShieldWearPerAction = 0.01; +ShieldWearPerAction = 0.05; JewelryWearPerAction = 0.01; // melee weapons @@ -1346,22 +1363,24 @@ RifleWearPerAction = 0.01; //************************************************************************************************************* // Fame Variables //************************************************************************************************************* -// Fame memory interpolation periode -FameMemoryInterpolation = 1220000; -// Fame trend reset delay -FameTrendResetDelay = 10000; +// Fame memory interpolation periode (default to 5 days) +FameMemoryInterpolation = 4320000; +// Fame trend reset delay (default to 30 mn) +FameTrendResetDelay = 18000; // Point of fame lost with the faction of a killed bot -FameByKill = -1000; +FameByKill = -5000; // Minimum Fame To Buy a Guild Building MinFameToBuyGuildBuilding = 0; // Minimum Fame To Buy a Player Building MinFameToBuyPlayerBuilding = 0; // maximum price variation ( in absolute value ) that can be due to fame -MaxFamePriceVariation = 0.1; +MaxFamePriceVariation = 0.3; // Maximum fame value taken in account in trade -MaxFameToTrade = 100000; +MaxFameToTrade = 600000; // Minimum fame value taken in account in trade, under this value, the merchant refuse to sell -MinFameToTrade = -100000; +MinFameToTrade = -200000; +// Minimum of positive or negtative fame for PVP +PVPFameRequired = 25; //************************************************************************************************************* // Guild Variables @@ -1380,7 +1399,7 @@ MaxAppliedChargeCount = 3; //************************************************************************************************************* // Animals //************************************************************************************************************* -AnimalHungerFactor = 0.01; +AnimalHungerFactor = 0.026042; AnimalStopFollowingDistance = 100; AllowAnimalInventoryAccessFromAnyStable = 0; @@ -1406,9 +1425,9 @@ PVPActionTimer = 6000; // 10 mn Timer for be able to play in PVE with neutral o TotemBuildTime = 6000; TotemRebuildWait = 72000; -ResPawnPVPInSameRegionForbiden = 1; // 1 is player character can't respawn in same region of there death in faction PvP. +ResPawnPVPInSameRegionForbiden = 0; // 1 is player character can't respawn in same region of there death in faction PvP. -BuildSpireActive = 1; +BuildSpireActive = 0; // max distance from PvP combat to gain PvP points (faction and HoF points) from team PvP kills (in meters) @@ -1467,33 +1486,6 @@ OutpostRangeForCancelOnReset = 60*60*3; // 3 hours GuildMaxOutpostCount = 10; //************************************************************************************************************* -DisplayedVariables += -{ - "NbPlayers", - "Creatures", - "", - "RyzomDate", - "RyzomTime", - "PeopleAutorized", - "CareerAutorized", - "", - "NbEntitiesInPhraseManager", - "", - "@Characters|displayPlayers", - "@Creatures|displayCreatures" -}; - -Paths += -{ - "../common/data_leveldesign/leveldesign/World" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/game_element/xp_table", - "../common/data_leveldesign/leveldesign/game_element/emotes" -}; - MonoMissionTimout = 144000; VerboseMissions = 0; MissionLogFile = "egs_missions.log"; @@ -1532,12 +1524,22 @@ TriggerZoneTypes = { "place","region" }; // PeopleAutorized 1:fyros 2:matis 4:tryker 8:zorai + +StartCommandsWhenMirrorReady = +{ + "PeopleAutorized 255", +}; + // set the world instance activity verbosity VerboseWorldInstance = 0; // set the shop category parser verbosity VerboseShopParsing = 0; +//NegFiltersDebug += { "CDB", "FAME" , "PDR:apply", "PDR:store", "BSIF" }; +//NegFiltersInfo += { "Register EId" }; +//NegFiltersWarning += { }; + // Checking coherency between saved players and CEntityIdTranslator map, may be slow, so put to 0 if you want CheckEntityIdTranslatorCoherency = 0; @@ -1545,87 +1547,79 @@ CheckEntityIdTranslatorCoherency = 0; // Filename that contains the list of invalid entity names InvalidEntityNamesFilename = "invalid_entity_names.txt"; -BSHost = "192.168.1.199"; -UseBS = 1; - -// the client uri that the client must enter to get the forum *with* final slash -// ie: http://compilo/websrv/ -WebSrvHost = "http://213.208.119.191/"; - -ForageKamiAngerThreshold1 = 10000; +ForageKamiAngerThreshold1 = 9900; ForageKamiAngerThreshold2 = 10000; -ForageKamiAngerDecreasePerHour = 900.0; -ForageKamiAngerPunishDamage = 5000; +ForageKamiAngerDecreasePerHour = 830.0; +ForageKamiAngerPunishDamage = 6000; ForageValidateSourcesSpawnPos = 1; AutoSpawnForageSourcePeriodOverride = 0; ForageKamiAngerOverride = 0; ForageSiteStock = 100; ForageSiteNbUpdatesToLive = 10; -ForageSiteRadius = 10.0; +ForageSiteRadius = 9.0; ForageExtractionTimeMinGC = 230.0; ForageExtractionTimeSlopeGC = 2.0; ForageQuantityBaseRate = 0; -ForageQuantityBrick1 = 0.5; -ForageQuantityBrick2 = 0.5; -ForageQuantityBrick3 = 0.5; -ForageQuantityBrick4 = 0.5; -ForageQuantityBrick5 = 0.5; -ForageQuantityBrick6 = 0.5; -ForageQuantityBrick7 = 0.5; -ForageQuantityBrick8 = 0.5; -ForageQuantityBrick9 = 0.5; -ForageQuantityBrick10 = 0.5; -ForageQuantityBrick11 = 0.5; -ForageQuantityBrick12 = 0.5; +ForageQuantityBrick1 = 0.34; //0.3; +ForageQuantityBrick2 = 0.386; // 0.32; +ForageQuantityBrick3 = 0.432; // 0.34 +ForageQuantityBrick4 = 0.478; // 0.36; +ForageQuantityBrick5 = 0.524; // 0.38; +ForageQuantityBrick6 = 0.57; // 0.4; +ForageQuantityBrick7 = 0.34; // 0.3; +ForageQuantityBrick8 = 0.386; // 0.32; +ForageQuantityBrick9 = 0.432; // 0.34; +ForageQuantityBrick10 = 0.478; // 0.36; +ForageQuantityBrick11 = 0.524; // 0.38; +ForageQuantityBrick12 = 0.57; // 0.4; ForageQuantitySlowFactor = 0.5; -ForageQualitySlowFactor = 1.50; -ForageQualitySlowFactorQualityLevelRatio = 0.1; -ForageQualitySlowFactorDeltaLevelRatio = 0.1; -ForageQualitySlowFactorMatSpecRatio = 0.1; -ForageQualityCeilingFactor = 1.0; +ForageQualitySlowFactor = 1.69; +ForageQualitySlowFactorQualityLevelRatio = 0.01; +ForageQualitySlowFactorDeltaLevelRatio = 0.08; +ForageQualitySlowFactorMatSpecRatio = 0.8; +ForageQualityCeilingFactor = 1.1; ForageQualityCeilingClamp = 1; ForageQuantityImpactFactor = 20.0; ForageQualityImpactFactor = 1.5; -ForageExtractionAbsorptionMatSpecFactor = 5.0; -ForageExtractionAbsorptionMatSpecMax = 1.0; -ForageExtractionCareMatSpecFactor = 1.0; -ForageExtractionAbsorptionEcoSpecFactor = 5.0; -ForageExtractionAbsorptionEcoSpecMax = 1.0; -ForageExtractionCareEcoSpecFactor = 1.0; +ForageExtractionAbsorptionMatSpecFactor = 4.0; +ForageExtractionAbsorptionMatSpecMax = 0.8; +ForageExtractionCareMatSpecFactor = 1.2; +ForageExtractionAbsorptionEcoSpecFactor = 3.0; +ForageExtractionAbsorptionEcoSpecMax = 0.8; +ForageExtractionCareEcoSpecFactor = 1.1; ForageExtractionNaturalDDeltaPerTick = 0.1; ForageExtractionNaturalEDeltaPerTick = 0.1; -ForageCareFactor = 5.0; +ForageCareFactor = 4.0; ForageCareBeginZone = 5.0; -ForageHPRatioPerSourceLifeImpact = 0.005; -ForageExplosionDamage = 5000.0; -ToxicCloudDamage = 500.0; +ForageHPRatioPerSourceLifeImpact = 0.003937; +ForageExplosionDamage = 3000.0; +ToxicCloudDamage = 600.0; ForageCareSpeed = 0.05; -ForageKamiOfferingSpeed = 0.01; +ForageKamiOfferingSpeed = 0.02; ForageDebug = 0; ForageSourceSpawnDelay = 50; ForageFocusRatioOfLocateDeposit = 10; ForageFocusAutoRegenRatio = 1.0; -ForageReduceDamageTimeWindow = 50; -ForageExtractionXPFactor = 10.0; -ForageQuantityXPDeltaLevelBonusRate = 1.0; -ForageProspectionXPBonusRatio = 0.1; +ForageReduceDamageTimeWindow = 30; +ForageExtractionXPFactor = 9.0; +ForageQuantityXPDeltaLevelBonusRate = 2.0; +ForageProspectionXPBonusRatio = 0.2; ForageExtractionNbParticipantsXPBonusRatio = 0.1; ForageExtractionNastyEventXPMalusRatio = 0.1; -QuarteringQuantityAverageForCraftHerbivore = 2.0; +QuarteringQuantityAverageForCraftHerbivore = 2.5; QuarteringQuantityAverageForCraftCarnivore = 5.0; QuarteringQuantityAverageForMissions = 1.0; QuarteringQuantityAverageForBoss5 = 10; -QuarteringQuantityAverageForBoss7 = 50; -QuarteringQuantityForInvasion5 = 50; -QuarteringQuantityForInvasion7 = 100; +QuarteringQuantityAverageForBoss7 = 60; +QuarteringQuantityForInvasion5 = 40; +QuarteringQuantityForInvasion7 = 80; + +VerboseQuartering = 0; LootMoneyAmountPerXPLevel = 10.0; -XMLSave = 0; - - // Shutdown handling // Time to shutdown server in minutes @@ -1637,23 +1631,10 @@ BroadcastShutdownMessageRate = 30; // Time to shutdown to close access to welcome service, in seconds CloseShardAccessAt = 300; - // Persistent Logging DatabaseId = 0; -// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableLog = 1; - -// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableStringLog = 0; - -// Number of seconds between 2 logs to file -PDLogUpdate = 10; - -// Log directory (with/without final slash), pd_logs is added to the path. If value is empty, default is SaveFilesDirectory -PDLogSaveDirectory = ""; - // delay during character stay in game after disconnection TimeBeforeDisconnection = 300; @@ -1674,11 +1655,10 @@ TeleportWithMektoubPriv = ":GM:SGM:DEV:"; // Privilege that forbid action execution NoActionAllowedPriv = ":OBSERVER"; // Privilege that bypass value and score checking -NoValueCheckingPriv = ":GM:SGM:DEV:"; +NoValueCheckingPriv = ":GM:SGM:DEV:EM:EG:"; // Privilege that prevent being disconnected in case of shard closing for technical problem NoForceDisconnectPriv = ":GM:SGM:DEV:"; - // File used to save position flags PositionFlagsFile = "position_flags.xml"; @@ -1702,66 +1682,66 @@ DisablePVPChallenge = 1; // Fame Variables // All values are multiplied by 6000 compared to values displayed on the client. -FameMinToDeclare = 100000; -FameWarningLevel = 10000; +FameMinToDeclare = 180000; +FameWarningLevel = 30000; FameMinToRemain = 0; -FameMinToTrade = -100000; -FameMinToKOS = -100000; -FameMaxDefault = 100000; -FameAbsoluteMin = -100000; -FameAbsoluteMax = 100000; +FameMinToTrade = -180000; +FameMinToKOS = -300000; +FameMaxDefault = 600000; +FameAbsoluteMin = -600000; +FameAbsoluteMax = 600000; -FameStartFyrosvFyros = 100000; -FameStartFyrosvMatis = -100000; -FameStartFyrosvTryker = -10000; -FameStartFyrosvZorai = 10000; -FameStartMatisvFyros = -100000; -FameStartMatisvMatis = 100000; -FameStartMatisvTryker = 10000; -FameStartMatisvZorai = -10000; -FameStartTrykervFyros = -10000; -FameStartTrykervMatis = 10000; -FameStartTrykervTryker = 100000; -FameStartTrykervZorai = -100000; -FameStartZoraivFyros = 10000; -FameStartZoraivMatis = -10000; -FameStartZoraivTryker = -100000; -FameStartZoraivZorai = 100000; -FameStartFyrosvKami = 10000; -FameStartFyrosvKaravan = -10000; -FameStartMatisvKami = -100000; -FameStartMatisvKaravan = 100000; -FameStartTrykervKami = -10000; -FameStartTrykervKaravan = 10000; -FameStartZoraivKami = 100000; -FameStartZoraivKaravan = -100000; +FameStartFyrosvFyros = 120000; +FameStartFyrosvMatis = -120000; +FameStartFyrosvTryker = -60000; +FameStartFyrosvZorai = 60000; +FameStartMatisvFyros = -120000; +FameStartMatisvMatis = 120000; +FameStartMatisvTryker = 60000; +FameStartMatisvZorai = -60000; +FameStartTrykervFyros = -60000; +FameStartTrykervMatis = 60000; +FameStartTrykervTryker = 120000; +FameStartTrykervZorai = -120000; +FameStartZoraivFyros = 60000; +FameStartZoraivMatis = -60000; +FameStartZoraivTryker = -120000; +FameStartZoraivZorai = 120000; +FameStartFyrosvKami = 60000; +FameStartFyrosvKaravan = -60000; +FameStartMatisvKami = -120000; +FameStartMatisvKaravan = 120000; +FameStartTrykervKami = -60000; +FameStartTrykervKaravan = 60000; +FameStartZoraivKami = 120000; +FameStartZoraivKaravan = -120000; -FameMaxNeutralvFyros = 100000; -FameMaxNeutralvMatis = 100000; -FameMaxNeutralvTryker = 100000; -FameMaxNeutralvZorai = 100000; -FameMaxFyrosvFyros = 100000; +FameMaxNeutralvFyros = 300000; +FameMaxNeutralvMatis = 300000; +FameMaxNeutralvTryker = 300000; +FameMaxNeutralvZorai = 300000; +FameMaxFyrosvFyros = 600000; FameMaxFyrosvMatis = 0; -FameMaxFyrosvTryker = 100000; -FameMaxFyrosvZorai = 100000; +FameMaxFyrosvTryker = 150000; +FameMaxFyrosvZorai = 450000; FameMaxMatisvFyros = 0; -FameMaxMatisvMatis = 100000; -FameMaxMatisvTryker = 100000; -FameMaxMatisvZorai = 100000; -FameMaxTrykervFyros = 100000; -FameMaxTrykervMatis = 100000; -FameMaxTrykervTryker = 100000; +FameMaxMatisvMatis = 600000; +FameMaxMatisvTryker = 450000; +FameMaxMatisvZorai = 150000; +FameMaxTrykervFyros = 150000; +FameMaxTrykervMatis = 450000; +FameMaxTrykervTryker = 600000; FameMaxTrykervZorai = 0; -FameMaxZoraivFyros = 100000; -FameMaxZoraivMatis = 100000; +FameMaxZoraivFyros = 450000; +FameMaxZoraivMatis = 150000; FameMaxZoraivTryker = 0000; -FameMaxZoraivZorai = 100000; -FameMaxNeutralvKami = 100000; -FameMaxNeutralvKaravan = 100000; -FameMaxKamivKami = 100000; -FameMaxKamivKaravan = -100000; -FameMaxKaravanvKami = -100000; -FameMaxKaravanvKaravan = 100000; +FameMaxZoraivZorai = 600000; +FameMaxNeutralvKami = 300000; +FameMaxNeutralvKaravan = 300000; +FameMaxKamivKami = 600000; +FameMaxKamivKaravan = -300000; +FameMaxKaravanvKami = -300000; +FameMaxKaravanvKaravan = 600000; // Log switches, turns nlinfo on/off NameManagerLogEnabled = 1; @@ -1782,9 +1762,6 @@ DailyShutdownBroadcastMessage = "The shard will be shut down in 1 minute"; DailyShutdownCounterMinutes = 1; CheckShutdownPeriodGC = 50; -// Connection towards Mail/Forum service -MFSHost = "192.168.1.191"; - PlayerChannelHistoricSize = 50; FlushSendingQueuesOnExit = 1; @@ -1795,9 +1772,5 @@ StatDBSavePeriod = 20; // New Newbieland UseNewNewbieLandStartingPoint= 1; -// Mainlands shard configuration -Mainlands = { -"200", "Aniro", "(FR)", "fr", -"201", "Leanon", "(DE)", "de", -"202", "Arispotle", "(UK)", "en", -}; + +FreeTrialSkillLimit = 125; diff --git a/code/ryzom/server/patchman_cfg/default/frontend_service.cfg b/code/ryzom/server/patchman_cfg/default/frontend_service.cfg new file mode 100644 index 000000000..3a1a0c349 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/frontend_service.cfg @@ -0,0 +1,106 @@ + +// Configure module gateway for front end operation +StartCommands += +{ + // Add a security plugin (will add player info on player module proxy) + "gw.securityCreate FESecurity", + // create a front end service transport + "gw.transportAdd FEServer fes", + // set the transport option (need PeerInvisible and Firewalled) + "gw.transportOptions fes(PeerInvisible Firewalled)", + // open the transport + "gw.transportCmd fes(open)", +}; + + +// UDP port for client communication +//FrontendPort = 47851; + +ListenAddress = FSListenHost+":"+FSUDPPort; + +// Maximum size that can be read from a client message +DatagramLength = 10000; + +// Time-out before removing a client when it does not send any more data +ClientTimeOut = 600000; // 10 min + +// Time-out before removing a limbo client when it does not send any more data +LimboTimeOut = 60000; // 1 min + +// Maximum bytes per game cycle sent to all clients (currently not used/implemented) +TotalBandwidth = 536870911; // <512 MB : max value for 32 bit bitsize ! + +// Maximum bytes per game cycle sent to a client, including all headers +ClientBandwidth = 332 * BandwidthRatio; // 332 <=> 13 kbit/s at 5 Hz; 202 <=> 16 kbit/s at 10 Hz + +// Maximum bytes for impulsion channels per datagram sent to a client +ImpulsionByteSize0 = 20 * BandwidthRatio; +ImpulsionByteSize1 = 200 * BandwidthRatio; +ImpulsionByteSize2 = 200 * BandwidthRatio; +NbMinimalVisualBytes = 50; + +// Distance/delta ratio that triggers the sending of a position +DistanceDeltaRatioForPos = 100; + +// Number of game cycles per front-end cycle +GameCycleRatio = 1; +// Execution period of distance calculation +CalcDistanceExecutionPeriod = 8; +// Execution period of position prioritization +PositionPrioExecutionPeriod = 2; +// Execution period of orientation prioritization +OrientationPrioExecutionPeriod = 8; +// Execution period of discreet properties prioritization +DiscreetPrioExecutionPeriod = 2; + +SortPrioExecutionPeriod = 1; + +// Display or not the "FE" nlinfos +DisplayInfo = 1; + +// Prioritizer mode (currently the only mode is 1 for DistanceDelta) +PriorityMode = 1; + +// Strategy for selecting pairs to prioritize (Power2WithCeiling=0, Scoring=1) +SelectionStrategy = 1; + +// Minimum number of pairs to select for prioritization +MinNbPairsToSelect = 2000; + +// Index of client to monitor, or 0 for no monitoring +ClientMonitor = 0; + +// Allow or not beeping +AllowBeep = 1; + +//NegFiltersDebug += { "FESEND", "FERECV", "FETIME", "FEMMAN", "TICK", "TOCK" }; +//NegFiltersInfo += { "FESEND", "FERECV", "FETIME", "FEMMAN", "FESTATS" }; + +Lag = 0; // The lag on the simulated network (used by simlag) +PacketLoss = 0; // percentage of lost packet (used by simlag) +PacketDuplication = 0; // percentage of duplicated packet (used by simlag) +PacketDisordering = 0; // percentage of disordered packet (used by simlag) (Lag must be >100 to use disordering) + +// ---------------------------------------- +// Frontend/Patch mode settings + +// If 1, the frontend server is used in Patch/Frontend mode (0 = only frontend mode, old behaviour) +UseWebPatchServer = 1; + +// If 0, the frontend service is in Patch mode at startup, and it won't accept clients unless WS tells it to do so. +AcceptClientsAtStartup = 1; + +// Patch URL footer. PatchURL will look like 'http://223.254.124.23:43435/patch' +PatchingURLFooter = ":80/patch"; + +// System command to be executed when FS tries to start Web Patch server (ideally at FS startup) +StartWebServerSysCommand = ""; + +// System command to be executed when FS tries to stop Web Patch server (ideally when FS turns to frontend mode) +StopWebServerSysCommand = ""; + +// Use Thread for sending +UseSendThread = 1; + +// Unidirectional Mirror mode (FS part) +ExpediteTOCK = 1; diff --git a/code/ryzom/server/patchman_cfg/default/gpm_service.cfg b/code/ryzom/server/patchman_cfg/default/gpm_service.cfg new file mode 100644 index 000000000..adac6e59d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/gpm_service.cfg @@ -0,0 +1,7 @@ + +CheckPlayerSpeed = 0; +SecuritySpeedFactor = 1.5; + +LoadPacsPrims = 0; +LoadPacsCol = 1; + diff --git a/code/ryzom/server/patchman_cfg/default/input_output_service.cfg b/code/ryzom/server/patchman_cfg/default/input_output_service.cfg new file mode 100644 index 000000000..bbed48699 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/input_output_service.cfg @@ -0,0 +1,119 @@ + +#ifndef DONT_USE_LGS_SLAVE + +StartCommands += +{ + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // add a layer 3 server transport for slave logger service + "lgs_gw.transportAdd L3Client slaveL3c", + // open the transport + "lgs_gw.transportCmd slaveL3c(connect addr="+SlaveLGSHost+":"+L3SlaveLGSPort+")", + + // Create a chat unifier client + "moduleManager.createModule ChatUnifierClient cuc", + + // and plug it on the gateway to reach the SU ChatUnifierServer + "cuc.plug glob_gw", + "cuc.plug gw", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + "lsc.plug lgs_gw", +}; + +#endif + +#ifdef DONT_USE_LGS_SLAVE + +StartCommands += +{ + // L5 connect to the shard unifier + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", + + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Client l3c", + // open the transport + "glob_gw.transportCmd l3c(connect addr="+SUHost+":"+SUGlobalPort+")", + + // Create a gateway for logger service connection + "moduleManager.createModule StandardGateway lgs_gw", + + // add a layer 3 server transport for master logger service + "lgs_gw.transportAdd L3Client masterL3c", + // open the transport + "lgs_gw.transportCmd masterL3c(connect addr="+MasterLGSHost+":"+L3MasterLGSPort+")", + + // Create a chat unifier client + "moduleManager.createModule ChatUnifierClient cuc", + // and plug it on the gateway to reach the SU ChatUnifierServer + "cuc.plug glob_gw", + "cuc.plug gw", + + // Create the logger service client module + "moduleManager.createModule LoggerServiceClient lsc", + "lsc.plug lgs_gw", + +}; + +#endif + +DisableMonotonicClock = 1; + +// a list of system command that can be run with "sysCmd" service command. +SystemCmd = {}; + +// IOS don't use work directory by default +ReadTranslationWork = 0; + +// Global shard bot name translation file. You sould overide this +// in input_output_service.cfg to specialize the file +// depending on the shard main language. +BotNameTranslationFile = "bot_names.txt"; + +// Global shard event faction translation file. You sould override this +// in input_output_service.cfg to specialize the file +// depending on the shard main language. +EventFactionTranslationFile = "event_factions.txt"; + +// Activate/deactivate debugging of missing paremeter replacement +DebugReplacementParameter = 1; + +// Id of database for PDS Chat Logging +DatabaseId = 1; + +// Default verbose debug flags: +//----------------------------- + +// Log bot name translation from 'BotNameTranslationFile' +VerboseNameTranslation = 1; +// Log chat management operation +VerboseChatManagement = 1; +// Log chat event +VerboseChat = 1; +// Log string manager message +VerboseStringManager = 1; +// Log the string manager parsing message +VerboseStringManagerParser = 0; diff --git a/code/ryzom/server/patchman_cfg/default/logger_service.cfg b/code/ryzom/server/patchman_cfg/default/logger_service.cfg new file mode 100644 index 000000000..588b9ecc3 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/logger_service.cfg @@ -0,0 +1,89 @@ + + +LogQueryLanguageHelp = +{ + "Log Query Language Quick Reference", + "----------------------------------", + "", + "A query is constitued of a series of predicates combined by 'or' and 'and' logical operator.", + "Each predicate is applied on each log, then the result combined to obtain a list of 'selected' log.", + "", + "General query format :", + "", + " (options) predicate (logicalCombiner predicate)*", + "", + "options format :", + " option*", + "", + " Available option :", + " - 'full_context' : extract all the log that are in the context of a ", + " selected log", + " - 'output_prefix=' : set a prefix for the result file of the query", + "", + "logicalCombiner format :", + " Supported logical combiner are 'or' and 'and'.", + " The 'and' combiner have the hightest priority over 'or'.", + " You can also manually force the priority of combiner by", + " grouping predicate with parenthesis.", + " e.g : '(' predicate1 'or' predicate2 ')' 'and' predicate3'", + " In this case, the 'or' between predicate1 and predicate2 is avaluated ", + " before the 'and' with predicated3", + "", + "Predicate format :", + " ", + "", + "ParamName format :", + " Any parameter name that exist in a log. Any log that use this param name will", + " be tested againts the predicate.", + " e.g : userId", + "", + "", + "ParamType format:", + " You can test a predicate against any parameter of a given type, whatever it's name.", + " '{' typeName '}'", + " The available type names are :", + " uint32, uint64, sint32, float, string, entityId, itemId, sheetId.", + " Clearly, the entityId, itemId and sheetId are the most interesting.", + "", + "Operator format :", + " All classicle operators are available:", + " '<', '<=', '>', '>=', '=' (or '=='), '!=' and 'like'.", + " The 'like' operator try to find the constant as a substring of the parameter.", + "", + "Constant format :", + " Right part of a predicate are always constant.", + " You can write constant of different type :", + " uint32 : any decimal or hexacimal (prefixed with '0x')", + " sint32 : any decimal prefixed with the minus sign '-'", + " string : any list of characters surrounded by double quote", + " entityId : an entity id as formated by NeL '(0x1234:12:34:56)'", + " sheeId : any characters that can be considered as a sheet name (e.g 'foo.sitem')", + " itemId : an item id as printed by the ryzom tool : '[123:0x123456:1234]'", + "", + "", + "Special param name :", + " There are threee hardcoded parameter name :", + " 'LogName', 'LogDate' and 'ShardId'.", + "", + " 'LogName' is used to build query based on the name of the log instead of", + " on the value of the parameters. e.g : 'LogName = '''Item_Create''' will select", + " all logs of item creation.", + "", + " 'LogDate' is used to restrict the scope of the query on a limited time frame.", + " LogDate accept date of the following format :", + " - literal date : YYYY-MM-DD", + " - literal date and time: YYYY-MM-DD HH:MM", + " - literal date and time: YYYY-MM-DD HH:MM:SS", + " - yesterday : 'yesterday'", + " - some time ago : secs|mins|hours|days|weeks|months|years", + "", + " e.g : 'LogDate > yesterday' -> any log from yesterday to now", + " 'LogDate > 2 days' -> any log from 2 days ago to now", + " 'LogDate < 3 weeks' -> any log older than 3 weeks", + "", + " 'ShardId' is used to select log from a specific shard. You must", + " give a numeric shard id as predicate parameter. ", + "", + "", + "", +}; \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/default/mail_forum_service.cfg b/code/ryzom/server/patchman_cfg/default/mail_forum_service.cfg new file mode 100644 index 000000000..644e3e76c --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/mail_forum_service.cfg @@ -0,0 +1,15 @@ + +DontUseNS = 1; + +// Set if Hall of Fame generator is disabled +HoFDisableGenerator = 0; + +// Directory where HDT files are parsed (in WebRootDirectory) +HoFParsedDirectory = "hof"; + +// HoF generator update period in milliseconds +HoFGeneratorUpdatePeriod = 5000; + +// HoF generator directory update period in seconds +HoFGeneratorDirUpdatePeriod = 60; + diff --git a/code/ryzom/server/patchman_cfg/default/mirror_service.cfg b/code/ryzom/server/patchman_cfg/default/mirror_service.cfg new file mode 100644 index 000000000..66850360d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/mirror_service.cfg @@ -0,0 +1,6 @@ + +// Linux only +DestroyGhostSegments = 1; + +//NegFiltersDebug += { "MSG:" }; + diff --git a/code/ryzom/server/patchman_cfg/default/naming_service.cfg b/code/ryzom/server/patchman_cfg/default/naming_service.cfg new file mode 100644 index 000000000..28405823d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/naming_service.cfg @@ -0,0 +1,6 @@ + +SId = 1; +DontUseNS = 1; + +UniqueOnShardServices = {}; // { "EGS", "GPMS", "IOS", "TICKS", "WS", "AIS", "DSS" }; +UniqueByMachineServices = {}; // { "MS" }; diff --git a/code/ryzom/server/patchman_cfg/default/ryzom_as.cfg b/code/ryzom/server/patchman_cfg/default/ryzom_as.cfg new file mode 100644 index 000000000..2755403b7 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/ryzom_as.cfg @@ -0,0 +1,25 @@ +DontUseNS = 1; + +RRDToolPath = "rrdtool"; +RRDVarPath = "../graph_datas"; + +// Variables required to be defined by other cfgs +//AESHost="localhost"; +//ASWebPort="46700"; +//ASPort="46701"; + +StartCommands += +{ + // create the admin service module and open the web interface + "moduleManager.createModule AdminService as webPort="+ASWebPort, + + // create a gateway for aes to connect + "moduleManager.createModule StandardGateway as_gw", + // create a layer 3 server + "as_gw.transportAdd L3Server l3s", + "as_gw.transportOptions l3s(PeerInvisible)", + "as_gw.transportCmd l3s(open port="+ASPort+")", + + // plug the as + "as.plug as_gw", +}; \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/default/shard_unifier_service.cfg b/code/ryzom/server/patchman_cfg/default/shard_unifier_service.cfg new file mode 100644 index 000000000..9a28ac706 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/shard_unifier_service.cfg @@ -0,0 +1,37 @@ + +NSHost = SUNSHost; +DontUseNS = SUDontUseNS; + +// SU - listen address of the SU service (for L5 connections) +SUAddress = SUHost+":"+SUPort; + +StartCommands += +{ + // Create a gateway for global interconnection + // modules from different shard are visible to each other if they connect to + // this gateway. SU Local module have no interest to be plugged here. + "moduleManager.createModule StandardGateway glob_gw", + // add a layer 3 server transport + "glob_gw.transportAdd L3Server l3s", + // open the transport + "glob_gw.transportCmd l3s(open port="+SUGlobalPort+")", + // Create a session manager module + "moduleManager.createModule RingSessionManager rsm web(port=49999) ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")", + "rsm.plug gw", + // Create a login service module + "moduleManager.createModule LoginService ls ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") web(port=49998) nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")", + "ls.plug gw", + // Create a character synchronization module + "moduleManager.createModule CharacterSynchronisation cs fake_edit_char ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")", + "cs.plug gw", + // Create entity locator module + "moduleManager.createModule EntityLocator el ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") nel_db(host="+DBHost+" user="+DBNelUser+" password="+DBNelPass+" base="+DBNelName+")", + "el.plug gw", + // Create a mail forum notifier forwarder + "moduleManager.createModule MailForumNotifierFwd mfnfwd ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+") web(port=49897)", + "mfnfwd.plug gw", + // Create a chat unifier server module + "moduleManager.createModule ChatUnifierServer cus ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")", + "cus.plug gw", +}; + diff --git a/code/ryzom/server/patchman_cfg/default/tick_service.cfg b/code/ryzom/server/patchman_cfg/default/tick_service.cfg new file mode 100644 index 000000000..25eafb8fd --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/tick_service.cfg @@ -0,0 +1,10 @@ + +/// A list of vars to graph for TS +GraphVars += +{ + "TotalSpeedLoop", "60000", // low rez, every minutes + "TotalSpeedLoop", "0", // high rez, every tick +}; + + +//NegFiltersDebug = { "DELTA_", "DEFAULT_CB", }; diff --git a/code/ryzom/server/patchman_cfg/default/welcome_service.cfg b/code/ryzom/server/patchman_cfg/default/welcome_service.cfg new file mode 100644 index 000000000..ce7b47fd0 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/default/welcome_service.cfg @@ -0,0 +1,37 @@ + +// short name of the frontend service +FrontendServiceName = "FS"; + +// in ring architecture, we no more use the legacy LS +DontUseLS = 1; + +// if any of this services is not connected, the WS is closed. +ExpectedServices = { "FS", "MS", "EGS", "GPMS", "IOS", "TICKS" }; + +// Access level to shard +// 0: only dev +// 1: dev + privileged users (see also OpenGroups variable) +// 2: open for all +ShardOpen = 2; + +// File that contains the ShardOpen value (used to override ShardOpen value through AES' command createFile) +// For instance, ShardOpen default value is 0, then AES creates a file to set ShardOpen to 2. If WS crashes, +// ShardOpen is still set to 2 when it relaunches... +// ShardOpenStateFile = "/tmp/shard_open_state"; + +// Privileged Groups +OpenGroups = ":GM:SGM:G:SG:GUEST:"; + +UsePatchMode = 0; + +// create welcome service module +StartCommands += +{ + // create the service + "moduleManager.createModule WelcomeService ws", + // plug it in the gateway + "ws.plug gw", + + // add the SU service + "unifiedNetwork.addService ShardUnifier ( address="+SUAddress+" sendId external autoRetry )", +}; diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt new file mode 100644 index 000000000..87bd0ce4d --- /dev/null +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_definitions.txt @@ -0,0 +1,705 @@ +//----------------------------------------------------------------------------- +// Common Definitions +//----------------------------------------------------------------------------- + +// --------------------------------- +// shard types & exe sets + +// mini ring ----------------------- + +define exe_set_mini_ring + use raes + use ms_mini_ring + use ais_ring + use egs_ring + use dss_ring + use gpms_ring + use ios_ring + use rns_ring + use fes_solo + use ts_std + use rws_std + cfg NSHost="localhost"; + +// mini mainland ------------------- + +define exe_set_mini_mainland + use raes + use ms_mini_mainland + use ais_newbyland + use egs_mainland + use gpms_mainland + use ios_mainland + use rns_mainland + use fes_solo + use ts_std + use rws_std + cfg NSHost="localhost"; + + +// full ring ----------------------- + +define exe_set_std_ring_be + use raes + use ms_std_ring + use ais_ring + use egs_ring + use dss_ring + use gpms_ring + use ios_ring + use rns_ring + use ts_std + use rws_std + +define exe_set_std_ring_fe + use raes + use ms_std_ring + use fes_std_pair01 + use fes_std_pair02 + + +// full mainland ------------------- + +define exe_set_std_mainland_fe + use raes + use ms_std_mainland + use exe_set_std_mainland_fe_basics + +define exe_set_std_mainland_fe_basics + use fes_std_pair01 + use fes_std_pair02 + +define exe_set_std_mainland_be01 + use raes + use ms_std_mainland + use exe_set_std_mainland_be01_basics + +define exe_set_std_mainland_be01_basics + use egs_mainland + use gpms_mainland + use ios_mainland + use rns_mainland + use ts_std + use rws_std + +define exe_set_std_mainland_be02 + use raes + use ms_std_mainland +// use exe_set_std_mainland_be02_basics + +define exe_set_std_mainland_be02_basics +// use ais_fyros +// use ais_zorai +// use ais_roots + +define exe_set_std_mainland_be03 + use raes + use ms_std_mainland + use exe_set_std_mainland_be03_basics + +define exe_set_std_mainland_be03_basics +// use ais_matis +// use ais_tryker + use ais_newbyland + +// unifier and co ------------------ + +define exe_set_mini_unifier + use raes + use su_mini + +define exe_set_std_unifier + use raes + use su_std + use mfs_std + +define exe_set_std_backup_master + use raes + use bms_master + use pdss + +define exe_set_std_backup_slave + use raes + use bms_slave + use pdss + +define exe_set_std_lgs_master + use lgs_master + +define exe_set_std_lgs_slave + use lgs_slave + + +// --------------------------------- +// standard data packs + +define common + cfg DontLog = 1; + data cfg +// data scripts + +define shard_common + use common + data data_common + data data_game_share + data data_leveldesign + + +// --------------------------------- +// executables + +// ais ----------------------------- + +define ais + use shard_common + cfg #include "../live/service_ai_service/ai_service.cfg" + cfg WriteFilesDirectory= "../live/service_ai_service/"; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + +define ais_ring + name ais + cmdLine ai_service -C. -L. --nobreak --writepid -mCommon:Ring + use ais + data data_r2_desert + data data_r2_forest + data data_r2_jungle + data data_r2_lakes + data data_r2_roots + +define ais_mainland + use ais + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + + +define ais_mini_mainland + name ais + cmdLine ai_service -C. -L. --nobreak --writepid -mCommon:Indoors:Newbieland:Post + use ais_mainland + +define ais_newbyland + name ais_newbyland + cmdLine ai_service -C. -L. --nobreak --writepid -mCommon:Indoors:Newbieland:Post + use ais + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + + +// bms ----------------------------- + +define bms + use common + data data_leveldesign +// cmdLine backup_module_service +// cfg #include "../live/cfg/backup_module_service.cfg" + cfg #include "../live/service_backup_service/backup_service.cfg" +// cfg #include "../live/cfg/backup_service.cfg" + cfg WriteFilesDirectory= "../live/service_backup_service/"; + +define bms_master + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49990 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49990; + cfgAfter L3ListeningPort = 49950; + cfgAfter WebPort = 49970; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard/"; + +define bms_master2 + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49994 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49994; + cfgAfter L3ListeningPort = 49954; + cfgAfter WebPort = 49974; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard/"; + +define bms_slave + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49991 + cfg #include "../live/cfg/backup_module_service_slave.cfg" + cfgAfter ListeningPort = 49991; + cfgAfter L3ListeningPort = 49951; + cfgAfter WebPort = 49971; + cfgAfter BSReadState = 0; + cfgAfter SaveShardRoot = "../save_shard/"; + +define bms_pd_master + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49992 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49992; + cfgAfter L3ListeningPort = 49952; + cfgAfter WebPort = 49972; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard_pd/"; + +define bms_pd_slave + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49993 + cfg #include "../live/cfg/backup_module_service_slave.cfg" + cfgAfter ListeningPort = 49993; + cfgAfter L3ListeningPort = 49953; + cfgAfter WebPort = 49973; + cfgAfter BSReadState = 0; + cfgAfter SaveShardRoot = "../save_shard_pd/"; + +define backup_lgs + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49994 + //cfg #include "../live/cfg/backup_module_service_master.cfg" + cfgAfter ListeningPort = 49994; + cfgAfter L3ListeningPort = 49995; + cfgAfter WebPort = 49972; + cfgAfter BSReadState = 1; + cfgAfter SaveShardRoot = "../save_shard_lgs/"; + cfgAfter UseTempFile = 0; + +// lgs ----------------------------- +define lgs + use common + data data_leveldesign + + cmdLine logger_service -C. -L. --nobreak --writepid + cfg #include "../live/cfg/logger_service.cfg" + + cfg LogQueryResultFile = "log_query_result.txt"; + cfg SaveFilesDirectory = "save_shard/"; + cfg BSHost = LGSBSHost+":"+LGSBSPort; + cfg L3BSPort = LGSBSPort; + cfg DontUseNS = 1; + + cfgAfter StartCommands += + cfgAfter { + cfgAfter "moduleManager.createModule LoggerService ls", + cfgAfter "moduleManager.createModule StandardGateway lgs_gw", + cfgAfter "ls.plug lgs_gw", + cfgAfter "lgs_gw.transportAdd L3Server l3s", + cfgAfter "lgs_gw.transportOptions l3s(PeerInvisible)", + cfgAfter "lgs_gw.transportCmd l3s(open port="+ LGSL3Port +")", + cfgAfter }; + cfgAfter SaveShardRoot = "../save_shard_lgs/"; + cfgAfter SaveFilesDirectory = "../save_shard_lgs/"; + +define lgs_master + use lgs + cfg LGSL3Port = L3MasterLGSPort; + + +define lgs_slave + use lgs + cfg LGSL3Port = L3SlaveLGSPort; + + +// dss ----------------------------- + +define dss + use shard_common + cmdLine dynamic_scenario_service -C. -L. --nobreak --writepid + cfg #include "../live/service_dynamic_scenario_service/dynamic_scenario_service.cfg" + cfg WriteFilesDirectory="../live/service_dynamic_scenario_service/"; + +//define dss_mainland +// use dss +// cfg #include "../live/cfg/dynamic_scenario_service_mainland.cfg" + +define dss_ring + use dss + cfg #include "../live/cfg/dynamic_scenario_service_ring.cfg" + + +// egs ----------------------------- + +define egs + use shard_common + cmdLine entities_game_service -C. -L. --nobreak --writepid + data data_language + cfg #include "../live/service_entities_game_service/entities_game_service.cfg" + cfg PathsNoRecurse= {"."}; + cfg WriteFilesDirectory="../live/service_entities_game_service/"; + cfg NeverAggroPriv = ":OBSERVER:G:SG:GM:SGM:EM:"; + cfg AlwaysInvisiblePriv = ":OBSERVER:EM:"; + cfg TimeBeforeDisconnection = 300; + cfg + cfgAfter StartCommands += { + cfgAfter "moduleManager.createModule AnimSessionManager asm", + cfgAfter "asm.plug gw", + cfgAfter }; + cfgAfter GraphVars += { "NbPlayers", "60000" }; + cfgAfter GraphVars += { "CharacterLoadPerTick", "0" }; + cfgAfter GraphVars += { "CharacterLoadPerTick", "60000" }; + cfgAfter GraphVars += { "CharacterSavePerTick", "0" }; + cfgAfter GraphVars += { "CharacterSavePerTick", "60000" }; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + cfgAfter RingRPXPRequiredPerAction=700; + cfgAfter RingRPXPRequiredPerTimeSlice=700; + + +define egs_mainland + use egs + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + //cfg #include "../live/cfg/entities_game_service_mainland.cfg" + cfgAfter MaxXPGainPerPlayer = 30.0; + cfgAfter DeathXPFactor = 0.1; + cfgAfter CachePrims = 1; + cfgAfter CorrectInvalidPlayerPositions = 1; + +define egs_ring + use egs + data data_mainland_common_primitives + data data_newbieland_primitives + data data_newbieland + data data_indoors + cfg #include "../live/cfg/entities_game_service_ring.cfg" + cfg UsedContinents = + cfg { + cfg "r2_desert", "10000", + cfg "r2_forest", "10001", + cfg "r2_jungle", "10002", + cfg "r2_lakes", "10003", + cfg "r2_roots", "10004", + cfg }; + cfgAfter MaxXPGainPerPlayer = 30.0; + cfgAfter DeathXPFactor = 0.0; + cfgAfter CachePrims = 1; + cfgAfter CorrectInvalidPlayerPositions = 0; + cfgAfter RingRPEnabled = 0; + + +// fes ----------------------------- + +define fes + use shard_common + cmdLine frontend_service -C. -L. --nobreak --writepid + cfg #include "../live/service_frontend_service/frontend_service.cfg" + cfg WriteFilesDirectory="../live/service_frontend_service/"; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + +define fes_solo + use fes + use sbs + cfg FSUDPPort = 47860; + +define fes_std_pair01 + use fes + use sbs + cfg FSUDPPort = 47851; + +define fes_std_pair02 + use fes + use sbs + cfg FSUDPPort = 47852; + +define fes_std_pair03 + use fes + use sbs + cfg FSUDPPort = 47853; + +define fes_std_pair04 + use fes + use sbs + cfg FSUDPPort = 47854; + + +// gpms ---------------------------- + +define gpms + use shard_common + cmdLine gpm_service -C. -L. --nobreak --writepid + data data_pacs_prim + cfg #include "../live/service_gpm_service/gpm_service.cfg" + cfg WriteFilesDirectory="../live/service_gpm_service/"; + cfgAfter GraphVars += { "TickSpeedLoop", "0" }; + cfgAfter GraphVars += { "TickSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "0" }; + cfgAfter GraphVars += { "MirrorCallbackCount", "60000" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "0" }; + cfgAfter GraphVars += { "MirrorCallbackTime", "60000" }; + +define gpms_mainland + use gpms + data data_newbieland + data data_indoors + cfg #include "../live/cfg/gpm_service_mainland.cfg" + +define gpms_ring + use gpms + data data_r2_desert + data data_r2_forest + data data_r2_jungle + data data_r2_lakes + data data_r2_roots + cfg #include "../live/cfg/gpm_service_ring.cfg" + + +// pdss ---------------------------- + +define pdss + name pdss + use common + data data_leveldesign + cmdLine pd_support_service -C. -L. --nobreak --writepid + cfg + cfg NSHost="localhost"; + cfg + cfg HourlyCommands = + cfg { + cfg "system /srv/core/bin/hourly_script.sh", + cfg }; + cfg + cfg DailyCommands = + cfg { + cfg "system /srv/core/bin/daily_script.sh", + cfg + cfg "fdcCacheClear", + cfg "fdcCacheAddFileSpecRecurse /srv/core/save_shard_backups/latest/characters/account_*_?_pdr.bin", + cfg + cfg "JobUpdatesPerUpdate 10", + cfg }; + cfg + cfg InputFileDirectory="/srv/core/save_shard_backups/latest/characters/"; + cfg OutputFileDirectory="../stats/"; + cfg ScriptDirectory="../live/service_pd_support_service/scripts/"; + cfg DontUseNS=1; + cfg DontUseTS=1; + cfg DontUseAES=1; + + +// ios ----------------------------- + +define ios + use shard_common + cmdLine input_output_service -C. -L. --nobreak --writepid + data data_language + cfg #include "../live/service_input_output_service/input_output_service.cfg" + cfg WriteFilesDirectory="../live/service_input_output_service/"; + cfgAfter VerboseStringManager = 0; + cfgAfter VerboseStringManagerParser = 0; + cfgAfter VerboseChat = 0; + cfgAfter VerboseChatManagement = 0; + cfgAfter VerboseNameTranslation = 0; + cfgAfter // Create a char name mapper + cfgAfter StartCommands += + cfgAfter { + cfgAfter "moduleManager.createModule CharNameMapper cnm", + cfgAfter "cnm.plug gw", + cfgAfter "moduleManager.createModule IOSRingModule iosrm", + cfgAfter "iosrm.plug gw", + cfgAfter }; + + +define ios_mainland + use ios + //cfg #include "../live/cfg/input_output_service_mainland.cfg" + +define ios_ring + use ios + cfg #include "../live/cfg/input_output_service_ring.cfg" + + +// las ----------------------------- + +define las + use common + cmdLine log_analyser_service -C. -L. --nobreak --writepid + cfg #include "../live/service_log_analyser_service/log_analyser_service.cfg" + cfg WriteFilesDirectory="../"; + + +// mfs ----------------------------- + +define mfs + use common + cmdLine mail_forum_service -C. -L. --nobreak --writepid + data data_www + cfg #include "../live/service_mail_forum_service/mail_forum_service.cfg" + cfg WriteFilesDirectory="../live/service_mail_forum_service/"; + +define mfs_std + use mfs + + +// mos ----------------------------- + +define mos + use shard_common + cmdLine monitor_service -C. -L. --nobreak --writepid + cfg #include "../live/service_monitor_service/monitor_service.cfg" + cfg WriteFilesDirectory="../live/service_monitor_service/"; + + +// ms ------------------------------ + +define ms + use shard_common + cmdLine mirror_service -C. -L. --nobreak --writepid + cfg #include "../live/service_mirror_service/mirror_service.cfg" + cfg WriteFilesDirectory="../live/service_mirror_service/"; + cfgAfter GraphVars += { "UserSpeedLoop", "0" }; + cfgAfter GraphVars += { "UserSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + +define ms_mini_ring + use ms + +define ms_mini_mainland + use ms + +define ms_std_ring + use ms + +define ms_std_mainland + use ms + + +// raes ----------------------------- + +define raes + cmdLine none + data service_ryzom_admin_service + + +// ras ----------------------------- + +define ras + use common + data data_www + cmdLine ryzom_admin_service --fulladminname=ryzom_admin_service --shortadminname=AS -C. -L. --nobreak --writepid + cfg #include "../live/service_ryzom_admin_service/ryzom_as.cfg" + cfg WriteFilesDirectory="../"; + + +// rns ------------------------------ + +define rns + use common + cmdLine ryzom_naming_service -C. -L. --nobreak --writepid + cfg #include "../live/service_ryzom_naming_service/naming_service.cfg" + cfg WriteFilesDirectory="../live/service_ryzom_naming_service/"; + +define rns_ring + use rns + +define rns_mainland + use rns + + +// rws ------------------------------ + +define rws + use common + cmdLine ryzom_welcome_service -C. -L. --nobreak --writepid + cfg #include "../live/service_ryzom_welcome_service/welcome_service.cfg" + cfg WriteFilesDirectory="../live/service_ryzom_welcome_service/"; + +define rws_std + use rws + +// sbs ------------------------------ + +define sbs + use common + cmdLine session_browser_server -C. -L. --nobreak --writepid + cfg SBSPort = FSUDPPort+1000; + cfg WriteFilesDirectory="../live/service_session_browser_server/"; + cfg DontUseNS = 0; + cfg StartCommands += + cfg { + cfg "moduleManager.createModule SessionBrowserServerMod sbs suAddr="+SUHost+":49999 listenPort="+SBSPort+" ring_db(host="+DBHost+" user="+DBRingUser+" password="+DBRingPass+" base="+DBRingName+")", + cfg "sbs.plug gw", + cfg }; + cfgAfter GraphVars += { "NetSpeedLoop", "0" }; + cfgAfter GraphVars += { "NetSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + + +define sbs_std + use sbs + +// su ------------------------------ + +define su + use common + cmdLine shard_unifier_service -C. -L. --nobreak --writepid + data data_www + cfg #include "../live/service_shard_unifier_service/shard_unifier_service.cfg" + cfg WriteFilesDirectory="../live/service_shard_unifier_service/"; + cfgAfter // Create a command executor + cfgAfter StartCommands += + cfgAfter { + cfgAfter "moduleManager.createModule CommandExecutor ce", + cfgAfter "ce.plug gw", +// cfgAfter "addNegativeFilterDebug NOPE", + cfgAfter }; + cfgAfter GraphVars += { "TotalConcurentUser", "60000" }; + cfgAfter GraphVars += { "NetSpeedLoop", "0" }; + cfgAfter GraphVars += { "NetSpeedLoop", "60000" }; + cfgAfter GraphVars += { "L5CallbackCount", "0" }; + cfgAfter GraphVars += { "L5CallbackCount", "60000" }; + cfgAfter GraphVars += { "L5CallbackTime", "0" }; + cfgAfter GraphVars += { "L5CallbackTime", "60000" }; + + +define su_std + use su + +define su_mini + use su + + +// ts ------------------------------ + +define ts + use shard_common + cmdLine tick_service -C. -L. --nobreak --writepid + cfg #include "../live/service_tick_service/tick_service.cfg" + cfg WriteFilesDirectory="../live/service_tick_service/"; + +define ts_std + use ts diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt new file mode 100644 index 000000000..a17f6f922 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_mini01.txt @@ -0,0 +1,116 @@ +//----------------------------------------------------------------------------- +// The set of mini01 domains +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- +// mini01 Domain +//----------------------------------------------------------------------------- + +// the mini01 domain ----------------- + +define domain_mini01 + domain mini01 + use shard_mini01_unifier + use shard_mini01_mainland01 +// use shard_mini01_ring01 + + // domain ports + cfg ASWebPort="46710"; + cfg ASPort="46711"; + cfg AESPort="46712"; + cfg SUPort = 50505; + cfg SUGlobalPort = 50503; + cfg L3BSPort = "49950"; + cfg L3SlaveBSPort = "49951"; + cfg L3MasterLGSPort = 49992; + cfg L3SlaveLGSPort = 49993; + cfg LGSBSPort = 49994; + cfg L3LGSBSPort = 49995; + + // domain hosts + cfg AESHost = "localhost"; + cfg SUHost = "ep1.mini01.ryzomcore.org"; + cfg MFSHost = "ep1.mini01.ryzomcore.org"; + cfg BSHost = "ep1.mini01.ryzomcore.org:49990"; + cfg SlaveBSHost= "ep1.mini01.ryzomcore.org:49991"; + cfg MasterLGSHost = "ep1.mini01.ryzomcore.org"; + cfg SlaveLGSHost = "ep1.mini01.ryzomcore.org"; + cfg LGSBSHost = "ep1.mini01.ryzomcore.org"; + cfg DBHost = "localhost"; // FIXME "sql.core.ryzomcore.org"; + cfgAfter WebSrvHost = "http://ep1.mini01.ryzomcore.org:50000/"; + + // initial config files + cfgFile ../cfg/00_base.cfg + cfgFile ../cfg/01_domain_mini01.cfg + + // shard names and ids + cfgAfter Mainlands = { + cfgAfter "301", "Mainland 01", "(Mainland 01)", "en", + cfgAfter }; + cfgAfter HomeMainlandNames = + cfgAfter { + cfgAfter "301", "Mainland 01", "mla", + cfgAfter }; + cfgAfter RRDVarPath = "../rrd_graphs"; + + // addition of extra filters for this domain +// cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; +// cfgAfter NegFiltersInfo+= {"FESTATS", "FETIME", "FERECV", "FESEND: sent SYNC message to client 1", "EIT: Register EId"}; +// cfgAfter NegFiltersWarning+= {"PIPO_SESSION1", "casino_session_matis01", "invalid damage type 10", "_log_Item_Delete", +// cfgAfter "_log_Item_Money", "_log_Item_Create", "_log_Item_Move", "botChatMissionAdvance> invalid index 0", +// cfgAfter "_MaxRange(0) < _MinRange(1)", "Can't find craft plan sheet 'unknown.unknown'"}; + cfgAfter DontUseAES=1; +// cfgAfter RingAccessLimits="d3:j2:f2:l2:p2"; + cfgAfter RingRPEnabled=0; + cfgAfter DomainName = "mini01"; + cfgAfter EnableStlAllocatorChecker = 0; + + cfgAfter // start commands for setting up the exchange level caps of different mini01 shards +// cfgAfter StartCommands += { "setShardExchangeLimit 101 250" }; +// cfgAfter StartCommands += { "displayShardExchangeLimits" }; + + +// shard unifier ------------------- + +define shard_mini01_unifier + shard unifier + cfg ShardId = 300; + data data_www + use ras + use exe_set_std_unifier + use bms_master + use exe_set_std_lgs_master + use exe_set_std_lgs_slave + use backup_lgs + cfg DBPass = DBNelPass; + host ep1.mini01.ryzomcore.org + + +// shard mainland01 ---------------- + +define shard_mini01_mainland01 + shard mainland01 + use exe_set_mini_mainland + cfg ShardId = 301; + cfg BasePort = 52000; + cfg SaveFilesDirectory="mini01_mainland01/"; + cfg NSHost = "ep1.mini01.ryzomcore.org"; + cfg FSListenHost = "ep1.mini01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_mini_mainland.cfg + host ep1.mini01.ryzomcore.org + + +// shard ring01 -------------------- + +define shard_mini01_ring01 + shard ring01 + use exe_set_mini_ring + cfg ShardId = 401; + cfg BasePort = 52400; + cfg SaveFilesDirectory="mini01_ring01/"; + cfg NSPort = 51100; + cfg NSHost = "ep1.mini01.ryzomcore.org" + 51100; + cfgFile ../cfg/02_shard_type_std_ring.cfg + host ep1.mini01.ryzomcore.org + diff --git a/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt b/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt new file mode 100644 index 000000000..311261110 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/shard_ctrl_std01.txt @@ -0,0 +1,442 @@ +//----------------------------------------------------------------------------- +// The set of std01 domains +//----------------------------------------------------------------------------- + + +//----------------------------------------------------------------------------- +// std01 Domain +//----------------------------------------------------------------------------- + +// the std01 domain ----------------- + +define domain_std01 + domain std01 + use shard_std01_unifier + use shard_std01_mainland01 + use shard_std01_mainland02 + use shard_std01_ring01 + use shard_std01_ring02 + + // domain ports + cfg ASWebPort="46700"; + cfg ASPort="46701"; + cfg AESPort="46702"; + cfg SUPort = 50505; + cfg SUGlobalPort = 50503; + cfg L3BSPort = "49950"; + cfg L3SlaveBSPort = "49951"; + cfg L3MasterLGSPort = 49992; + cfg L3SlaveLGSPort = 49993; + cfg LGSBSPort = 49994; + cfg L3LGSBSPort = 49995; + + // domain hosts + cfg AESHost = "localhost"; + cfg SUHost = "su1.std01.ryzomcore.org"; + cfg MFSHost = "su1.std01.ryzomcore.org"; + cfg BSHost = "pd1.std01.ryzomcore.org:49990"; // Backup service host for domain + cfg SlaveBSHost= "pd2.std01.ryzomcore.org:49991"; + cfg MasterLGSHost = "pd3.std01.ryzomcore.org"; + cfg SlaveLGSHost = "pd4.std01.ryzomcore.org"; + cfg LGSBSHost = "csr.core.ryzomcore.org"; // Backup service host for log service + cfg DBHost = "sql.core.ryzomcore.org"; + cfgAfter WebSrvHost = "http://su1.std01.ryzomcore.org:50000/"; + + // initial config files + cfgFile ../cfg/00_base.cfg + cfgFile ../cfg/01_domain_std01.cfg + + // shard names and ids + cfgAfter Mainlands = { + cfgAfter "101", "Mainland 01", "(Mainland 01)", "en", + cfgAfter "102", "Mainland 02", "(Mainland 02)", "en", + cfgAfter }; + cfgAfter HomeMainlandNames = + cfgAfter { + cfgAfter "101", "Mainland 01", "mla", + cfgAfter "102", "Mainland 02", "mlb", + cfgAfter }; + cfgAfter RRDVarPath = "../rrd_graphs"; + + // addition of extra filters for this domain +// cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; + cfgAfter NegFiltersInfo+= {"FESTATS", "FETIME", "FERECV", "FESEND: sent SYNC message to client 1", "EIT: Register EId"}; + cfgAfter NegFiltersWarning+= {"PIPO_SESSION1", "casino_session_matis01", "invalid damage type 10", "_log_Item_Delete", + cfgAfter "_log_Item_Money", "_log_Item_Create", "_log_Item_Move", "botChatMissionAdvance> invalid index 0", + cfgAfter "_MaxRange(0) < _MinRange(1)", "Can't find craft plan sheet 'unknown.unknown'"}; + cfgAfter DontUseAES=1; +// cfgAfter RingAccessLimits="d3:j2:f2:l2:p2"; + cfgAfter RingRPEnabled=0; + cfgAfter DomainName = "std01"; + cfgAfter EnableStlAllocatorChecker = 0; + + cfgAfter // start commands for setting up the exchange level caps of different std01 shards + cfgAfter StartCommands += { "setShardExchangeLimit 101 250" }; + cfgAfter StartCommands += { "setShardExchangeLimit 102 250" }; + cfgAfter StartCommands += { "displayShardExchangeLimits" }; + + +// shard unifier ------------------- + +define shard_std01_unifier + shard unifier + cfg ShardId = 100; + use shard_exe_set_std01_ras + use shard_exe_set_std01_unifier + +define shard_exe_set_std01_ras + use ras + host ep1.std01.ryzomcore.org + +define shard_exe_set_std01_unifier + use exe_set_std_unifier + host su1.std01.ryzomcore.org + cfg DBPass = DBNelPass; + + +// shard mainland01 ---------------- + +define shard_std01_mainland01 + shard mainland01 + use shard_exe_set_std01_mainland01_be01 + use shard_exe_set_std01_mainland01_be02 + use shard_exe_set_std01_mainland01_be03 + use shard_exe_set_std01_mainland01_fe01 + use shard_exe_set_std01_mainland01_fe02 + cfg ShardId = 101; + cfg BasePort = 51000; + cfg SaveFilesDirectory="std01_mainland01/"; + cfg NSHost = "mla1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_mainland.cfg + +define shard_exe_set_std01_mainland01_be01 + use exe_set_std_mainland_be01 + host mla1.std01.ryzomcore.org + +define shard_exe_set_std01_mainland01_be02 + use exe_set_std_mainland_be02 + host mla2.std01.ryzomcore.org + +define shard_exe_set_std01_mainland01_be03 + use exe_set_std_mainland_be03 + host mla3.std01.ryzomcore.org + +define shard_exe_set_std01_mainland01_fe01 + use exe_set_std_mainland_fe + host mla4.std01.ryzomcore.org + cfg FSListenHost = "mla4.std01.ryzomcore.org"; + +define shard_exe_set_std01_mainland01_fe02 + use exe_set_std_mainland_fe + host mla5.std01.ryzomcore.org + cfg FSListenHost = "mla5.std01.ryzomcore.org"; + + +// shard mainland02 ---------------- + +define shard_std01_mainland02 + shard mainland02 + use shard_exe_set_std01_mainland02_be01 + use shard_exe_set_std01_mainland02_be02 + use shard_exe_set_std01_mainland02_be03 + use shard_exe_set_std01_mainland02_fe01 + use shard_exe_set_std01_mainland02_fe02 + cfg ShardId = 102; + cfg BasePort = 51100; + cfg SaveFilesDirectory="std01_mainland02/"; + cfg NSHost = "mlb1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_mainland.cfg + +define shard_exe_set_std01_mainland02_be01 + use exe_set_std_mainland_be01 + host mlb1.std01.ryzomcore.org + +define shard_exe_set_std01_mainland02_be02 + use exe_set_std_mainland_be02 + host mlb2.std01.ryzomcore.org + +define shard_exe_set_std01_mainland02_be03 + use exe_set_std_mainland_be03 + host mlb3.std01.ryzomcore.org + +define shard_exe_set_std01_mainland02_fe01 + use exe_set_std_mainland_fe + host mlb4.std01.ryzomcore.org + cfg FSListenHost = "mlb4.std01.ryzomcore.org"; + +define shard_exe_set_std01_mainland02_fe02 + use exe_set_std_mainland_fe + host mlb5.std01.ryzomcore.org + cfg FSListenHost = "mlb5.std01.ryzomcore.org"; + + +// shard ring01 -------------------- + +define shard_std01_ring01 + shard ring01 + use shard_exe_set_std01_ring01_be + use shard_exe_set_std01_ring01_fe + cfg ShardId = 201; + cfg BasePort = 51400; + cfg SaveFilesDirectory="std01_ring01/"; + cfg NSHost = "rra1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_ring.cfg + +define shard_exe_set_std01_ring01_be + use exe_set_std_ring_be + host rra1.std01.ryzomcore.org + +define shard_exe_set_std01_ring01_fe + use exe_set_std_ring_fe + host rra2.std01.ryzomcore.org + cfg FSListenHost = "rra2.std01.ryzomcore.org"; + + +// shard ring02 -------------------- + +define shard_std01_ring02 + shard ring02 + use shard_exe_set_std01_ring02_be + use shard_exe_set_std01_ring02_fe + cfg ShardId = 202; + cfg BasePort = 51500; + cfg SaveFilesDirectory="std01_ring02/"; + cfg NSHost = "rrb1.std01.ryzomcore.org"; + cfgFile ../cfg/02_shard_type_std_ring.cfg + +define shard_exe_set_std01_ring02_be + use exe_set_std_ring_be + host rrb1.std01.ryzomcore.org + +define shard_exe_set_std01_ring02_fe + use exe_set_std_ring_fe + host rrb2.std01.ryzomcore.org + cfg FSListenHost = "rrb2.std01.ryzomcore.org"; + + +// the std01 backup domain ---------- + +define domain_std01_backup + domain backup01 + use shard_std01_backup_ras + use shard_std01_backup + use shard_std01_lgs + + // domain ports + cfg ASWebPort="46710"; + cfg ASPort="46711"; + cfg AESPort="46712"; + + // initial config files + cfgFile ../cfg/00_base.cfg + cfgFile ../cfg/01_domain_std01.cfg + + // addition of extra filters for this domain + cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; + cfgAfter NegFiltersInfo+= {"NET", "FETIME","TimerManagerUpdate"}; + cfgAfter NegFiltersWarning+= {"AES"}; + + // Force all backup services to launch in write only mode + cfgAfter BSReadState = 0; + cfgAfter RRDVarPath = "../rrd_graphs"; + cfgAfter DontUseAES=1; + cfgAfter DontUseNS=1; + + // shard names and ids + cfgAfter Mainlands = { + cfgAfter "101", "Mainland 01", "(Mainland 01)", "en", + cfgAfter "102", "Mainland 02", "(Mainland 02)", "en", + cfgAfter }; + cfgAfter HomeMainlandNames = + cfgAfter { + cfgAfter "101", "Mainland 01", "mla", + cfgAfter "102", "Mainland 02", "mlb", + cfgAfter }; + + +// backup domain ras --------------- + +define shard_std01_backup_ras + shard std01_backup_ras + cfg ShardId = 100; + use ras + host ep1.std01.ryzomcore.org + + +// the main backup pair ------------ + +define shard_std01_backup + shard backup + use shard_exe_set_std01_backup_master + use shard_exe_set_std01_backup_slave + +define shard_exe_set_std01_backup_master + name bs_master + use exe_set_std_backup_master + host pd1.std01.ryzomcore.org + +define shard_exe_set_std01_backup_slave + name bs_slave + // hack to workaround bug in backup service +// use exe_set_std_backup_slave + use exe_set_std01_backup_slave + host pd2.std01.ryzomcore.org + cfgAfter MasterBSHost = "pd1.std01.ryzomcore.org:49990"; + +// hack to workaround bug in backup service +define exe_set_std01_backup_slave + use raes + use std01_backup_slave + use pdss + +// hack to workaround bug in backup service +define std01_backup_slave + use bms + cmdLine backup_service -C. -L. --nobreak --writepid -P49991 + cfg #include "../std01/cfg/backup_module_service_slave.cfg" + cfgAfter ListeningPort = 49991; + cfgAfter L3ListeningPort = 49951; + cfgAfter WebPort = 49971; + cfgAfter BSReadState = 0; + cfgAfter SaveShardRoot = "../save_shard/"; + + +// lgs pair & relates bs ------------ + +define shard_std01_lgs + shard lgs + use shard_exe_set_std01_lgs_primary + use shard_exe_set_std01_lgs_secondary + use shard_exe_set_std01_lgs_bs + cfg L3MasterLGSPort = 49992; + cfg L3SlaveLGSPort = 49993; + cfg LGSBSPort = 49994; + cfg L3LGSBSPort = 49995; + cfg MasterLGSHost = "pd3.std01.ryzomcore.org"; + cfg SlaveLGSHost = "pd4.std01.ryzomcore.org"; + cfg LGSBSHost = "csr.core.ryzomcore.org"; + +define shard_exe_set_std01_lgs_primary + name lgs_primary + use raes + use exe_set_std_lgs_master + host pd3.std01.ryzomcore.org + +define shard_exe_set_std01_lgs_secondary + name lgs_secondary + use raes + use exe_set_std_lgs_slave + host pd4.std01.ryzomcore.org + +define shard_exe_set_std01_lgs_bs + name lgs_bs + use raes + use backup_lgs + host csr.core.ryzomcore.org + + +// the std01 las domain ------------- + +define domain_std01_las + domain las01 + use shard_std01_las_ras + use shard_std01_las_master + use shard_std01_las_slave + + // domain ports + cfg ASWebPort="46720"; + cfg ASPort="46721"; + cfg AESPort="46722"; + + // initial config files + cfgFile ../cfg/00_base.cfg +// cfgFile ../cfg/01_domain_std01.cfg + + // addition of extra filters for this domain + cfgAfter NegFiltersDebug+= {"DEFAULT_CB", "NET","ADMIN","MIRROR","CDB_MULTI_IMPULSION"}; + cfgAfter NegFiltersInfo+= {"NET", "FETIME","TimerManagerUpdate"}; + cfgAfter NegFiltersWarning+= {"AES"}; + cfgAfter DontUseAES=1; + + +// las domain ras ------------------ + +define shard_std01_las_ras + shard std01_las_ras + cfg ShardId = 100; + use ras + host ep1.std01.ryzomcore.org + + +// master las ---------------------- + +define shard_std01_las_master + shard std01_las_master + cfg ShardId = 99; + use raes + use las_mainland01 + use las_mainland02 + use las_ring01 + use las_ring02 + host pd3.std01.ryzomcore.org + +define las_mainland01 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland01/pds"}; + cfgAfter WebPort = 49899; + name las_mainland01 + use las + +define las_mainland02 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland02/pds"}; + cfgAfter WebPort = 49898; + name las_mainland02 + use las + +define las_ring01 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring01/pds"}; + cfgAfter WebPort = 49894; + name las_ring01 + use las + +define las_ring02 + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring02/pds"}; + cfgAfter WebPort = 49893; + name las_ring02 + use las + + +// slave las ------------------------ + +define shard_std01_las_slave + shard std01_las_slave + cfg ShardId = 98; + use raes + use las_mainland01_slave + use las_mainland02_slave + use las_ring01_slave + use las_ring02_slave + host pd4.std01.ryzomcore.org + +define las_mainland01_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland01/pds"}; + cfgAfter WebPort = 49899; + name las2_mainland01 + use las + +define las_mainland02_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_mainland02/pds"}; + cfgAfter WebPort = 49898; + name las2_mainland02 + use las + +define las_ring01_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring01/pds"}; + cfgAfter WebPort = 49894; + name las2_ring01 + use las + +define las_ring02_slave + cfgAfter StartCommands += {"PDRootDirectory /srv/core/backup01/save_shard_pd/std01_ring02/pds"}; + cfgAfter WebPort = 49893; + name las2_ring02 + use las diff --git a/code/ryzom/server/patchman_cfg/terminal_mini01/patchman_service.cfg b/code/ryzom/server/patchman_cfg/terminal_mini01/patchman_service.cfg new file mode 100644 index 000000000..351a8614a --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_mini01/patchman_service.cfg @@ -0,0 +1,93 @@ +//-------------------------------------------------------------------------------- +// Stuff for Windows (as opposed to Linux) + +//-------------------------------------------------------------------------------- +// Stuff common to all patchman services +DontUseAES = 1; +DontUseTS = 1; +DontUseNS = 1; +UpdateAssertionThreadTimeout = 0; + +// Common Filters +NegFiltersDebug = { "NET", "VERBOSE", "GUSREP" }; +NegFiltersInfo = { "NET" }; +NegFiltersWarning = { "NETL", "CT_LRC", "VAR:" }; + +// Setting up WIN displayer +WindowStyle = "WIN"; +FontName = "Courier New"; +FontSize = 9; + +// For windows boxes we dissable out stdin thread +DontUseStdIn = 1; + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup gateways + + // bridge gateway +// "moduleManager.createModule StandardGateway gw1", +// "gw1.transportAdd L3Client l3client", +// "gw1.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44748)", + + // ats spm gateway + "moduleManager.createModule StandardGateway gw2", + "gw2.transportAdd L3Client l3client", + "gw2.transportCmd l3client(connect addr=ep1.mini01.ryzomcore.org:44751)", + + + //------------------------------------------------------------------------------ + // Setup for terminal + + // setup an 'spt' module to act as a terminal for the internal spm module + "moduleManager.createModule ServerPatchTerminal terminal target=spm_mini01", + "terminal.plug gw1", + "terminal.plug gw2", +}; + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ + "@States|terminal.state *", + "", "@MINI01 Domains (Core Mini)|terminal.dump", + "", "@SPA States|terminal.state *spa", + "@Deploy|terminal.uploadDepCfg", + "@PAM States|terminal.state *pam", + "@Update PAMs|terminal.on *pam installUpdate", + "@Quit PAMs|terminal.on *pam quit", + "", "SPT0", + "", "SPT1", + "", "SPT2", + "", "SPT3", + "", "SPT4", + "", "SPT5", +// "", "SPT6", +// "", "SPT7", +// "", "SPT8", +// "", "SPT9", +// "", "SPTA", +// "", "SPTB", +// "", "SPTC", +// "", "SPTD", +// "", "SPTE", +// "", "SPTF", +// "", "LastMsg|LastSPTMessage", +}; + +NumSPTWatches=5; diff --git a/code/ryzom/server/patchman_cfg/terminal_mini01/server_park_database.txt b/code/ryzom/server/patchman_cfg/terminal_mini01/server_park_database.txt new file mode 100644 index 000000000..6ce239975 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_mini01/server_park_database.txt @@ -0,0 +1,10 @@ +// --------------------------------- +// common definitions + +include "../shard_ctrl_definitions.txt" + + +// --------------------------------- +// live domain + +include "../shard_ctrl_mini01.txt" diff --git a/code/ryzom/server/patchman_cfg/terminal_mini01/terminal_mini01.bat b/code/ryzom/server/patchman_cfg/terminal_mini01/terminal_mini01.bat new file mode 100644 index 000000000..7f61bfa59 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_mini01/terminal_mini01.bat @@ -0,0 +1,2 @@ +@echo off +start S:\devw_x86\bin\Release\ryzom_patchman_service.exe --nolog -C. -L. \ No newline at end of file diff --git a/code/ryzom/server/patchman_cfg/terminal_std01/patchman_service.cfg b/code/ryzom/server/patchman_cfg/terminal_std01/patchman_service.cfg new file mode 100644 index 000000000..7f36f47ee --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_std01/patchman_service.cfg @@ -0,0 +1,93 @@ +//-------------------------------------------------------------------------------- +// Stuff for Windows (as opposed to Linux) + +//-------------------------------------------------------------------------------- +// Stuff common to all patchman services +DontUseAES = 1; +DontUseTS = 1; +DontUseNS = 1; +UpdateAssertionThreadTimeout = 0; + +// Common Filters +NegFiltersDebug = { "NET", "VERBOSE", "GUSREP" }; +NegFiltersInfo = { "NET" }; +NegFiltersWarning = { "NETL", "CT_LRC", "VAR:" }; + +// Setting up WIN displayer +WindowStyle = "WIN"; +FontName = "Courier New"; +FontSize = 9; + +// For windows boxes we dissable out stdin thread +DontUseStdIn = 1; + +// how to sleep between to network update +// 0 = pipe +// 1 = usleep +// 2 = nanosleep +// 3 = sched_yield +// 4 = nothing +UseYieldMethod = 0; + + +//-------------------------------------------------------------------------------- +// Start Commands for configuring modules + +StartCommands += +{ + //------------------------------------------------------------------------------ + // Setup gateways + + // bridge gateway +// "moduleManager.createModule StandardGateway gw1", +// "gw1.transportAdd L3Client l3client", +// "gw1.transportCmd l3client(connect addr=localhost:44748)", + + // ats spm gateway + "moduleManager.createModule StandardGateway gw2", + "gw2.transportAdd L3Client l3client", + "gw2.transportCmd l3client(connect addr=localhost:44752)", + + + //------------------------------------------------------------------------------ + // Setup for terminal + + // setup an 'spt' module to act as a terminal for the internal spm module + "moduleManager.createModule ServerPatchTerminal terminal target=spm_std01", + "terminal.plug gw1", + "terminal.plug gw2", +}; + + +//-------------------------------------------------------------------------------- +// Displayed Variables... + +DisplayedVariables += +{ + "@States|terminal.state *", + "", "@STD01 Domains (live,backup,las)|terminal.dump", + "", "@SPA States|terminal.state *spa", + "@Deploy|terminal.uploadDepCfg", + "@PAM States|terminal.state *pam", + "@Update PAMs|terminal.on *pam installUpdate", + "@Quit PAMs|terminal.on *pam quit", + "", "SPT0", + "", "SPT1", + "", "SPT2", + "", "SPT3", + "", "SPT4", + "", "SPT5", +// "", "SPT6", +// "", "SPT7", +// "", "SPT8", +// "", "SPT9", +// "", "SPTA", +// "", "SPTB", +// "", "SPTC", +// "", "SPTD", +// "", "SPTE", +// "", "SPTF", +// "", "LastMsg|LastSPTMessage", +}; + +NumSPTWatches=5; diff --git a/code/ryzom/server/patchman_cfg/terminal_std01/server_park_database.txt b/code/ryzom/server/patchman_cfg/terminal_std01/server_park_database.txt new file mode 100644 index 000000000..da45f44f1 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_std01/server_park_database.txt @@ -0,0 +1,10 @@ +// --------------------------------- +// common definitions + +include "../shard_ctrl_definitions.txt" + + +// --------------------------------- +// live domain + +include "../shard_ctrl_std01.txt" diff --git a/code/ryzom/server/patchman_cfg/terminal_std01/terminal_std01.bat b/code/ryzom/server/patchman_cfg/terminal_std01/terminal_std01.bat new file mode 100644 index 000000000..7f61bfa59 --- /dev/null +++ b/code/ryzom/server/patchman_cfg/terminal_std01/terminal_std01.bat @@ -0,0 +1,2 @@ +@echo off +start S:\devw_x86\bin\Release\ryzom_patchman_service.exe --nolog -C. -L. \ No newline at end of file diff --git a/code/ryzom/server/sheet_pack_cfg/ai_service.cfg b/code/ryzom/server/sheet_pack_cfg/ai_service.cfg deleted file mode 100644 index e5840cfff..000000000 --- a/code/ryzom/server/sheet_pack_cfg/ai_service.cfg +++ /dev/null @@ -1,256 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES = 1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/ai_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; -// link the common configuration file - -// a list of system command that run at server startup. -SystemCmd = {}; - - -////////////////////////////////////////////////////////////////////////////// -//- Basic (specific) heal profile parameters --------------------------------- -// Downtime for normal heal (on other bots of the group) -HealSpecificDowntime = 100; -// Downtime for self heal -HealSpecificDowntimeSelf = 100; -////////////////////////////////////////////////////////////////////////////// - - -// Enable caching of ligo primitive in binary files -CachePrims = 1; -// Log to see which primitives where loaded from cache -CachePrimsLog = 0; - - -// do not log the corrected position. -LogAcceptablePos = 0; -// do not log group creation failure -LogGroupCreationFailure = 0; -// do not log aliad tree owner construstion. -LogAliasTreeOwner = 0; -// do not log outpost info -LogOutpostDebug = 0; -// Speed factor, for debug purpose only. Don't set to high speed factor ! -SpeedFactor = 1; -// Speep up the timer triggering. Set a value between 1 (normal) and INT_MAX. -TimerSpeedUp = 1; - -// Default timer for wander behavior -DefaultWanderMinTimer = 50; // 5s -DefaultWanderMaxTimer = 100; // 10s - -// Fame and guard behavior -// Fame value under witch the guard attack the player in sigth -FameForGuardAttack = -450000; -// The minimum of fame for guard to help the player -FameForGuardHelp = -200000; - -// The default aggro distance for NPC -DefaultNpcAggroDist = 15; -// The default escort range for escort behavior -DefaultEscortRange = 10; - -// Limits for multi IA test -NbFaunaLimit = 25000; -NbNpcLimit = 10000; -NbFxLimit = 200; - -BotRepopFx = ""; - -PathsNoRecurse += -{ - "data_leveldesign/leveldesign/game_element/emotes" -}; - -TribeNamePath = "data_leveldesign/leveldesign/world_editor_files/families"; - -// GROUP KEYWORDS -// used mainly in event handlers to determine to which groups events apply -KeywordsGroupNpc = { - - "patrol", // a group of bots who guard a patrol route or point - "convoy", // a group with pack animals who follow roads from place to place - "with_players", // a group who may travel with players -}; - -// BOT KEYWORDS -// used mainly in npc_state_profile to determine which ai profiles to assign to which bots -KeywordsBotNpc = { - - "team_leader", // a bot who leads the way in front of their team (and acts as leader - // in discussion with players) - "animal_leader", // a bot who leads pack animals - "guard", // a bot who is a guard of some sort (eg karavan guard) - "emissary", // eg karavan emissary - "preacher", // eg kami preacher - "guardian", // typically kami guardians - "vip", // someone who has an escort of players or NPCs (assumed to be harmless) -}; - -// STATE KEYWORDS -// used mainly in event handlers to determine to which state events apply -// eg: when a player goes link dead if the team that this player is escorting -// is in a dangerous area the team may enter a 'protect ourselves and wait for -// players' punctual state -KeywordsStateNpc = { - - "safe", // eg the gathering point at town entrance - "dangerous", // eg a route through the wilds -}; - - -ColourNames = -{ - "red : 0", - "beige : 1", - "green : 2", - "turquoise : 3", - "blue : 4", - "violet : 5", - "white : 6", - "black : 7", - - "redHair: 0", - "blackHair: 1", - -}; - - -// Any primitive containing one of this word will not be loaded -PrimitiveFilter = -{ -// "dynfauna", -// "staticfauna", -}; - - - -////////////////////////////////////////////////////////////////////////////// -// Aggro // -////////////////////////////////////////////////////////////////////////////// -AggroReturnDistCheck = 15.0; -AggroReturnDistCheckFauna = 15.0; -AggroReturnDistCheckNpc = 1.5; -AggroD1Radius = 250.0; -AggroD2Radius = 150.0; -AggroPrimaryGroupDist = 0.0; -AggroPrimaryGroupCoef = 0.0; -AggroSecondaryGroupDist = 0.0; -AggroSecondaryGroupCoef = 0.0; -AggroPropagationRadius = 60.0; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS", "FEVIS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate", "VISION_DELTA", "FEIMPE", "FEVIS" }; -NegFiltersWarning += { "LNET", "FEHACK", "FERECV", "CT_LRC", "AnimalSpawned" }; - diff --git a/code/ryzom/server/sheet_pack_cfg/gpm_service.cfg b/code/ryzom/server/sheet_pack_cfg/gpm_service.cfg deleted file mode 100644 index 7fd87cca0..000000000 --- a/code/ryzom/server/sheet_pack_cfg/gpm_service.cfg +++ /dev/null @@ -1,128 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES=1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", -// "save_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/gpm_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ -}; - -// define the primitives configuration used. -UsedPrimitives = -{ -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; - - - -CheckPlayerSpeed = 1; -SecuritySpeedFactor = 1.5; - -LoadPacsPrims = 0; -LoadPacsCol = 1; - -Paths += { "../common/data_leveldesign/leveldesign/World", "../common/data_leveldesign/leveldesign/world_editor_files" }; diff --git a/code/ryzom/server/sheet_pack_cfg/input_output_service.cfg b/code/ryzom/server/sheet_pack_cfg/input_output_service.cfg deleted file mode 100644 index 8772cf07f..000000000 --- a/code/ryzom/server/sheet_pack_cfg/input_output_service.cfg +++ /dev/null @@ -1,179 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES=1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", -// "save_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/input_output_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; - -// a list of system command that can be run with "sysCmd" service command. -SystemCmd = {}; - -// IOS don't use work directory by default -ReadTranslationWork = 0; -TranslationWorkPath = "translation/work"; - -//Paths += { "data_leveldesign/leveldesign/Game_elem" }; - -// Global shard bot name translation file. You sould overide this -// in input_output_service.cfg to specialize the file -// depending on the shard main language. -BotNameTranslationFile = "bot_names.txt"; - -// Global shard event faction translation file. You sould override this -// in input_output_service.cfg to specialize the file -// depending on the shard main language. -EventFactionTranslationFile = "event_factions.txt"; - -// Activate/deactivate debugging of missing paremeter replacement -DebugReplacementParameter = 1; - -// Id of database for PDS Chat Logging -DatabaseId = 1; - -// Default verbose debug flags: -//----------------------------- - -// Log bot name translation from 'BotNameTranslationFile' -VerboseNameTranslation = 0; -// Log chat management operation -VerboseChatManagement = 0; -// Log chat event -VerboseChat = 0; -// Log string manager message -VerboseStringManager = 0; -// Log the string manager parsing message -VerboseStringManagerParser = 0; - -// Directory to store ios.string_cache file -StringManagerCacheDirectory = "data_shard_local"; -// Directory to log chat into -LogChatDirectory = "data_shard_local"; - -// Persistent Logging - -// Log PD updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableLog = 1; - -// Log PD StringManager updates to log file (1 enabled, 0 disabled), see PDLogSaveDirectory to choose where to log -PDEnableStringLog = 0; - -// Number of seconds between 2 logs to file -PDLogUpdate = 10; - -// Log directory (with/without final slash), pd_logs is added to the path. If value is empty, default is SaveFilesDirectory -PDLogSaveDirectory = ""; - diff --git a/code/ryzom/server/sheet_pack_cfg/mirror_service.cfg b/code/ryzom/server/sheet_pack_cfg/mirror_service.cfg deleted file mode 100644 index da1e7aa15..000000000 --- a/code/ryzom/server/sheet_pack_cfg/mirror_service.cfg +++ /dev/null @@ -1,127 +0,0 @@ -// by default, use WIN displayer -FixedSessionId = 0; -DontUseStdIn = 0; -DontUseAES=1; -DontUseNS=1; - -// by default, use localhost to find the naming service -//NSHost = "localhost"; // "ld-02"; // "linuxshard0"; // localhost"; // -NSHost = "localhost"; -AESHost = "localhost"; -AESPort = 46702; - -// Use Shard Unifier or not -DontUseSU = 1; - -// AI & EGS -NbPlayersLimit = 5000; -NbGuildsLimit = 15000; - -// EGS -NbObjectsLimit = 50000; -NbNpcSpawnedByEGSLimit = 5000; -NbForageSourcesLimit = 10000; -NbToxicCloudsLimit = 200; - -// AI -NbPetLimit = 20000; // NbPlayersLimit*4 -NbFaunaLimit = 25000; -NbNpcLimit = 15000; - -Paths += -{ - "../common/data_leveldesign/leveldesign/DFN", - "data_shard", -// "save_shard", - "../common/data_common", - "../common/data_leveldesign/primitives" -}; - -PathsNoRecurse += -{ - "../common/data_leveldesign/leveldesign/Game_elem", // for sheet_id.bin - "../common/data_leveldesign/leveldesign/game_element", // not needed at all - "../common/data_leveldesign/leveldesign/world_editor_files", // for primitive format - "../common/data_leveldesign/leveldesign/World", // static fame and weather ? - "../common/data_leveldesign/leveldesign/DFN/basics" // Needed for outposts -}; - -GeorgePaths = -{ - "../common/data_leveldesign/leveldesign/Game_elem", - "../common/data_leveldesign/leveldesign/game_element" -}; - -// where to save generic shard data (ie: packed_sheet) -WriteFilesDirectory = "src/mirror_service/"; - -// Root directory where data from shards are stored into -SaveShardRoot = "save_shard"; - -// Where to save specific shard data (ie: player backup), relatively to SaveShardRoot -SaveFilesDirectory = ""; - -// Will SaveFilesDirectory will be converted to a full path? -ConvertSaveFilesDirectoryToFullPath = 0; - -/* Force default value for PDLib directory (e.g. SaveFilesDirectory...) - * PLEASE NOTICE THAT THIS LINE MUST BE LEFT TO "" - * Only log analyser must have the $shard parameter to find all shards root directory - */ -PDRootDirectory = ""; - -// This is the mapping for logical continent to physical one -ContinentNameTranslator = -{ -}; - -// This is the list of continent to use with their unique instance number -UsedContinents = -{ - "newbieland", "20" -}; - -// define the primitives configuration used. -UsedPrimitives = -{ - "newbieland", -}; - -NegFiltersDebug += { "NET", "ADMIN", "MIRROR", "NC", "PATH", "BSIF", "IOS" }; -NegFiltersInfo += { "NET", "ADMIN", "MIRROR", "NC", "CF", "TimerManagerUpdate" }; -NegFiltersWarning += { "CT_LRC", "AnimalSpawned" }; - - -FontName = "Lucida Console"; -FontSize = 9; - -IgnoredFiles = { "continent.cfg", "__read_me.txt", "bandit.html", "flora_primr.primitive" }; - -// If the update loop is too slow, a thread will produce an assertion. -// By default, the value is set to 10 minutes. -// Set to 0 for no assertion. -UpdateAssertionThreadTimeout = 600000; - -DefaultMaxExpectedBlockSize = 200000000; // 200 M ! -DefaultMaxSentBlockSize = 200000000; // 200 M ! - -// how to sleep between to network update -// 0 = pipe -// 1 = usleep -// 2 = nanosleep -// 3 = sched_yield -// 4 = nothing -UseYieldMethod = 0; - -// Set to one to use a full static fame and fame propagation matrix instead of -// a lower left half matrix. Remember to update static_fames.txt before -// activating this feature (which can be turned on/off at run time). -UseAsymmetricStaticFames = 1; - - -MaxOutBandwidth = 100000000; - -// Linux only -DestroyGhostSegments = 1; - -NegFiltersDebug += { "MSG:" }; diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index 07e9023bf..d257d0492 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -2889,35 +2889,6 @@ NLMISC_COMMAND(unloadPrimitiveFile,"unload a primitive file","") return true; } -////////////////////////////////////////////////////////////////////////////// -// MULTI_LINE_FORMATER // -////////////////////////////////////////////////////////////////////////////// - -static int const MULTI_LINE_FORMATER_maxn = 78; -void MULTI_LINE_FORMATER::pushTitle(std::vector& container, std::string const& text) -{ - const sint maxn = MULTI_LINE_FORMATER_maxn; - sint n = maxn - (sint)text.length() - 4; - container.push_back(" _/"); - container.back() += text; - container.back() += "\\" + std::string(n, '_'); - container.push_back("/"); - container.back() += std::string(maxn - 1, ' '); -} - -void MULTI_LINE_FORMATER::pushEntry(std::vector& container, std::string const& text) -{ - container.push_back("| "); - container.back() += text; -} - -void MULTI_LINE_FORMATER::pushFooter(std::vector& container) -{ - int const maxn = MULTI_LINE_FORMATER_maxn; - container.push_back("\\"); - container.back() += std::string(maxn - 1, '_'); -} - ////////////////////////////////////////////////////////////////////////////// // Bug simulation // ////////////////////////////////////////////////////////////////////////////// diff --git a/code/ryzom/server/src/ai_service/commands_mlf.cpp b/code/ryzom/server/src/ai_service/commands_mlf.cpp new file mode 100644 index 000000000..6437100cf --- /dev/null +++ b/code/ryzom/server/src/ai_service/commands_mlf.cpp @@ -0,0 +1,52 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + + + +#include "stdpch.h" + +using namespace NLMISC; +using namespace NLNET; +using namespace std; + +////////////////////////////////////////////////////////////////////////////// +// MULTI_LINE_FORMATER // +////////////////////////////////////////////////////////////////////////////// + +static int const MULTI_LINE_FORMATER_maxn = 78; +void MULTI_LINE_FORMATER::pushTitle(std::vector& container, std::string const& text) +{ + const sint maxn = MULTI_LINE_FORMATER_maxn; + sint n = maxn - (sint)text.length() - 4; + container.push_back(" _/"); + container.back() += text; + container.back() += "\\" + std::string(n, '_'); + container.push_back("/"); + container.back() += std::string(maxn - 1, ' '); +} + +void MULTI_LINE_FORMATER::pushEntry(std::vector& container, std::string const& text) +{ + container.push_back("| "); + container.back() += text; +} + +void MULTI_LINE_FORMATER::pushFooter(std::vector& container) +{ + int const maxn = MULTI_LINE_FORMATER_maxn; + container.push_back("\\"); + container.back() += std::string(maxn - 1, '_'); +} diff --git a/code/ryzom/server/src/ai_service/script_vm.h b/code/ryzom/server/src/ai_service/script_vm.h index cf57efe77..bc6e56c15 100644 --- a/code/ryzom/server/src/ai_service/script_vm.h +++ b/code/ryzom/server/src/ai_service/script_vm.h @@ -138,7 +138,12 @@ public: float& getFloat(); float const& getFloat() const; - int _val; + union + { + int _vali; + uintptr_t _valp; + }; + TStackTypes _type; }; @@ -346,7 +351,7 @@ inline CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(float const& f) { clean(); - _val = *((int*)&f); + _vali = *((int*)&f); _type = EFloat; return *this; } @@ -354,7 +359,7 @@ inline CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(int const& i) { clean(); - _val = i; + _vali = i; _type = EOther; return *this; } @@ -363,7 +368,7 @@ CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(std::string cons { clean(); std::string* const strPt = new std::string(str); - _val = *((int*)&strPt); + _valp = *((int*)&strPt); _type = EString; return *this; } @@ -371,7 +376,7 @@ inline CScriptStack::CStackEntry& CScriptStack::CStackEntry::operator=(IScriptContext* sc) { clean(); - _val = *((int*)&sc); + _valp = *((int*)&sc); _type = EContext; return *this; } @@ -386,9 +391,11 @@ bool CScriptStack::CStackEntry::operator==(CStackEntry const& other) const return getString()==other.getString(); case EFloat: return getFloat()==other.getFloat(); + case EContext: + return _valp==other._valp; case EOther: default: - return _val==other._val; + return _vali==other._vali; } } @@ -420,9 +427,11 @@ bool CScriptStack::CStackEntry::operator<(CStackEntry const& other) const return getString()(CStackEntry const& other) const return getString()>other.getString(); case EFloat: return getFloat()>other.getFloat(); + case EContext: + return _valp>other._valp; case EOther: default: - return _val>other._val; + return _vali>other._vali; } } @@ -473,43 +484,43 @@ inline std::string& CScriptStack::CStackEntry::getString() { nlassert(_type==EString); - return *(*((std::string**)&_val)); + return *(*((std::string**)&_valp)); } inline std::string const& CScriptStack::CStackEntry::getString() const { nlassert(_type==EString); - return *(*((std::string**)&_val)); + return *(*((std::string**)&_valp)); } inline IScriptContext* CScriptStack::CStackEntry::getIScriptContext() { nlassert(_type==EContext); - return *((IScriptContext**)&_val); + return *((IScriptContext**)&_valp); } inline int& CScriptStack::CStackEntry::getInt() { nlassert(_type==EOther); - return _val; + return _vali; } inline int const& CScriptStack::CStackEntry::getInt() const { nlassert(_type==EOther); - return _val; + return _vali; } inline float& CScriptStack::CStackEntry::getFloat() { nlassert(_type==EFloat); - return *((float*)&_val); + return *((float*)&_vali); } inline float const& CScriptStack::CStackEntry::getFloat() const { nlassert(_type==EFloat); - return *((float const*)&_val); + return *((float const*)&_vali); } inline diff --git a/code/ryzom/server/src/ai_service/sheets.cpp b/code/ryzom/server/src/ai_service/sheets.cpp index aa92fe3d4..bc7ece4fa 100644 --- a/code/ryzom/server/src/ai_service/sheets.cpp +++ b/code/ryzom/server/src/ai_service/sheets.cpp @@ -625,7 +625,7 @@ void AISHEETS::CCreature::readGeorges(NLMISC::CSmartPtr const& { std::string scriptCompStr; scriptCompNode->getArrayValue(scriptCompStr, arrayIndex); - +#ifndef NO_AI_COMP CFightScriptComp* scriptComp; try { @@ -636,6 +636,7 @@ void AISHEETS::CCreature::readGeorges(NLMISC::CSmartPtr const& { nlwarning("script read error (ignored): %s", ex.what()); } +#endif } } // Creature race @@ -763,6 +764,7 @@ void AISHEETS::CCreature::serial(NLMISC::IStream &s) string scriptCompStr; s.serial(scriptCompStr); +#ifndef NO_AI_COMP CFightScriptComp* scriptComp; try { @@ -773,6 +775,7 @@ void AISHEETS::CCreature::serial(NLMISC::IStream &s) { nlwarning("script read error (ignored): %s", ex.what()); } +#endif } } else @@ -881,8 +884,14 @@ void AISHEETS::CSheets::init() nlassert(_PlayerGroupIndex!=~0); #endif - CConfigFile::CVar *varPtr=IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths")); - const std::string writeFilesDirectoryName=IService::getInstance()->WriteFilesDirectory.toString(); + packSheets(IService::getInstance()->WriteFilesDirectory.toString()); + + _Initialised=true; +} + +void AISHEETS::CSheets::packSheets(const std::string &writeFilesDirectoryName) +{ + CConfigFile::CVar *varPtr = IService::isServiceInitialized() ? IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths")) : NULL; // if config file variable 'GeorgePaths' exists then only do a minimal loadForms otherwise do the full works if (varPtr!=NULL) @@ -947,8 +956,6 @@ void AISHEETS::CSheets::init() loadForm2("creature", writeFilesDirectoryName+AISPackedSheetsFilename, _Sheets, true); loadForm2("race_stats", writeFilesDirectoryName+AISPackedRaceStatsSheetsFilename, _RaceStatsSheets, true); } - - _Initialised=true; } void AISHEETS::CSheets::release() diff --git a/code/ryzom/server/src/ai_service/sheets.h b/code/ryzom/server/src/ai_service/sheets.h index 77605cae1..efa4d0c10 100644 --- a/code/ryzom/server/src/ai_service/sheets.h +++ b/code/ryzom/server/src/ai_service/sheets.h @@ -689,6 +689,7 @@ public: public: // load the creature data from the george files void init(); + void packSheets(const std::string &writeFilesDirectoryName); // display the creature data for all known creature types void display(NLMISC::CSmartPtr stringWriter, uint infoSelect = 0); diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp index 10b59d03b..cdc50a9ac 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_sheets.cpp @@ -56,6 +56,14 @@ CSheets CSheets::_StaticSheets; // the singleton instance bool CSheets::_Initialised=false; // - set true by constructor bool CSheets::_Destroyed=false; // - set true by destructor +#ifndef NO_EGS_VARS +static std::string writeDirectory() +{ + return IService::getInstance()->WriteFilesDirectory.toString(); +} +#else +extern std::string writeDirectory(); +#endif //--------------------------------------------------- // scanDirectoriesForFiles : utility routine for init() @@ -82,7 +90,7 @@ void scanGeorgePaths(bool forceFullRescan=false) NLMISC::CPath::clearMap(); // rescan 'Paths' directories - if ((var = IService::getInstance()->ConfigFile.getVarPtr ("Paths")) != NULL) + if (IService::isServiceInitialized() && ((var = IService::getInstance()->ConfigFile.getVarPtr ("Paths")) != NULL)) { for (uint i = 0; i < var->size(); i++) { @@ -91,7 +99,7 @@ void scanGeorgePaths(bool forceFullRescan=false) } // rescan 'PathsNoRecurse' directories - if ((var = IService::getInstance()->ConfigFile.getVarPtr ("PathsNoRecurse")) != NULL) + if (IService::isServiceInitialized() && ((var = IService::getInstance()->ConfigFile.getVarPtr ("PathsNoRecurse")) != NULL)) { for (uint i = 0; i < var->size(); i++) { @@ -101,7 +109,7 @@ void scanGeorgePaths(bool forceFullRescan=false) } // add any paths listed in the 'GeorgeFiles' config file variable - if ((var = IService::getInstance()->ConfigFile.getVarPtr ("GeorgePaths")) != NULL) + if (IService::isServiceInitialized() && ((var = IService::getInstance()->ConfigFile.getVarPtr ("GeorgePaths")) != NULL)) { for (uint i = 0; i < var->size(); i++) { @@ -123,9 +131,9 @@ template void loadSheetSet(const char *fileType,const char *sheetFile, sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm( fileType, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -133,7 +141,7 @@ template void loadSheetSet(const char *fileType,const char *sheetFile, { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm( fileType, writeDirectory()+sheetFile, sheetMap, true); } } @@ -148,9 +156,9 @@ template void loadSheetSet2(const char *fileType,const char *sheetFile sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm2( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm2( fileType, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -158,7 +166,7 @@ template void loadSheetSet2(const char *fileType,const char *sheetFile { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm2( fileType, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm2( fileType, writeDirectory()+sheetFile, sheetMap, true); } } @@ -172,9 +180,9 @@ template void loadSheetSet(const vector &fileTypes,const char sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -182,7 +190,7 @@ template void loadSheetSet(const vector &fileTypes,const char { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, true); } } @@ -196,9 +204,9 @@ void loadSheetSetForHashMap(const vector &fileTypes,const char *sheetFil map sheetMap; // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, false, false); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, false, false); } // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan @@ -206,7 +214,7 @@ void loadSheetSetForHashMap(const vector &fileTypes,const char *sheetFil { // if the 'GeorgePaths' variable exists and hasn't already been treated then add new paths to CPath singleton scanGeorgePaths(); - loadForm( fileTypes, IService::getInstance()->WriteFilesDirectory.toString()+sheetFile, sheetMap, true); + loadForm( fileTypes, writeDirectory()+sheetFile, sheetMap, true); } // Convert map to hash_map @@ -705,11 +713,15 @@ template void reloadSheetSet(const vector &fileTypes, T &sheet sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { scanGeorgePaths(); loadFormNoPackedSheet( fileTypes, sheetMap, wildcardFilter); } + else + { + nlwarning("No GeorgePaths in EGS config"); + } } // variant with smart pointers, maintain with function above @@ -719,11 +731,15 @@ template void reloadSheetSet2(const vector &fileTypes, T &shee sheetMap.clear(); // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files - if (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL) + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) { scanGeorgePaths(); loadFormNoPackedSheet2( fileTypes, sheetMap, wildcardFilter); } + else + { + nlwarning("No GeorgePaths in EGS config"); + } } template void reloadSheetSet(const string &fileType, T &sheetMap, const string &wildcardFilter) diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp index 94fbdcd11..f36fe91ab 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.cpp @@ -1878,6 +1878,7 @@ void CStaticItem::reloadSheet(const CStaticItem &o) const_cast(o).clearPtrs(false); } +#ifndef NO_EGS_VARS // *************************************************************************** float CStaticItem::getBaseWeight() const { @@ -1990,6 +1991,7 @@ float CStaticItem::getBaseWeight() const return 0; } } +#endif // *************************************************************************** void CStaticItem::clearPtrs(bool doDelete) diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h index 6fd990e65..ddea7be9c 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_item.h @@ -838,11 +838,13 @@ public: /// called to copy from another sheet (operator= + care ptrs) void reloadSheet(const CStaticItem &o); +#ifndef NO_EGS_VARS /** Get the base weigth for an item. * This weight must be multiplied by the craft parameter weight value * to obtain the real item weight. */ float getBaseWeight() const; +#endif std::vector lookForEffects(ITEM_SPECIAL_EFFECT::TItemSpecialEffect effectType) const; diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp index 0ee30916c..0cc44399d 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.cpp @@ -2093,7 +2093,7 @@ void CStaticLootTable::readGeorges( const NLMISC::CSmartPtr &f } // CStaticLootTable::readGeorges // - +#ifndef NO_EGS_VARS /// selectRandomLootSet CSheetId CStaticLootTable::selectRandomLootSet() const { @@ -2173,6 +2173,7 @@ const CStaticLootSet *CStaticLootTable::selectRandomCustomLootSet() const nlwarning("Can't find any lootset rand=%d probabilitySum=%d weightCount=%d",randWeight,probabilitySum,CustomLootSets.size()); return 0; } +#endif /////////////////////////////////////////////////////////////////////////// ///////////////////// Static Race Statistics ////////////////////////////// diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h index 9c88d3a91..527f5ee09 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_game_sheet.h @@ -868,10 +868,12 @@ public: /// read the sheet virtual void readGeorges( const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId ); +#ifndef NO_EGS_VARS /// select a loot set NLMISC::CSheetId selectRandomLootSet() const; const CStaticLootSet *selectRandomCustomLootSet() const; +#endif // return the version of this class, increments this value when the content of this class changed static uint getVersion () { return 1; } diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp index abd96f45f..4aad89e50 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.cpp @@ -31,6 +31,7 @@ const uint8 NbRawMaterials = 10; const float QuarteringForcedQuantities [6] = { 0, 1.0f, 2.0f, 3.0f, 4.0f, 0.5f }; +#ifndef NO_EGS_VARS const float *QuarteringQuantityByVariable [NBRMQuantityVariables] = { &QuarteringQuantityAverageForCraftHerbivore.get(), @@ -46,7 +47,7 @@ const float *QuarteringQuantityByVariable [NBRMQuantityVariables] = &QuarteringForcedQuantities[4], &QuarteringForcedQuantities[5] }; - +#endif CVariable VerboseQuartering( "egs", "VerboseQuartering", "", false, 0, true ); diff --git a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h index b89948f49..f23803bd3 100644 --- a/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h +++ b/code/ryzom/server/src/entities_game_service/egs_sheets/egs_static_harvestable.h @@ -34,7 +34,9 @@ enum TRMUsage { RMUTotalQuantity, RMUFixedQuantity, NbRMUsages }; enum TRMQuantityVariable { RMQVHerbivore, RMQVCarnivore, RMQVBoss5, RMQVBossBegin=RMQVBoss5, RMQVBoss7, RMQVBossEnd=RMQVBoss7, RMQVInvasion5, RMQVInvasion7, RMQVForceBase, NBRMQuantityVariables=RMQVForceBase+6 }; +#ifndef NO_EGS_VARS extern const float *QuarteringQuantityByVariable [NBRMQuantityVariables]; +#endif /** diff --git a/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp b/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp index 89322cc9f..b8f195857 100644 --- a/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp +++ b/code/ryzom/server/src/entities_game_service/entity_structure/resists.cpp @@ -22,8 +22,6 @@ #include "stdpch.h" // #include "resists.h" -#include "player_manager/character.h" -#include "game_item_manager/game_item.h" ////////////// // USING // diff --git a/code/ryzom/server/src/gpm_service/gpm_service.cpp b/code/ryzom/server/src/gpm_service/gpm_service.cpp index 9f30f2d58..0756f641e 100644 --- a/code/ryzom/server/src/gpm_service/gpm_service.cpp +++ b/code/ryzom/server/src/gpm_service/gpm_service.cpp @@ -298,7 +298,7 @@ void CGlobalPositionManagerService::init() GET_VAR_FROM_CF(LoadPacsPrims, true); - CSheets::init(); + CGpmSheets::init(); // World Position Manager init if (!IsRingShard) @@ -707,7 +707,7 @@ void CGlobalPositionManagerService::release() CWorldPositionManager::release(); } - CSheets::release(); + CGpmSheets::release(); }// release // diff --git a/code/ryzom/server/src/gpm_service/sheets.cpp b/code/ryzom/server/src/gpm_service/sheets.cpp index 6c6048258..72103ad75 100644 --- a/code/ryzom/server/src/gpm_service/sheets.cpp +++ b/code/ryzom/server/src/gpm_service/sheets.cpp @@ -45,14 +45,14 @@ using namespace NLGEORGES; //------------------------------------------------------------------------- // the singleton data -std::map CSheets::_sheets; -bool CSheets::_initialised=false; +std::map CGpmSheets::_sheets; +bool CGpmSheets::_initialised=false; //------------------------------------------------------------------------- // init -void CSheets::init() +void CGpmSheets::init() { if (_initialised) return; @@ -63,7 +63,17 @@ void CSheets::init() filters.push_back("creature"); filters.push_back("player"); - loadForm(filters, IService::getInstance()->WriteFilesDirectory.toString()+"gpms.packed_sheets", _sheets); + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm(filters, IService::getInstance()->WriteFilesDirectory.toString()+"gpms.packed_sheets", _sheets, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if (_sheets.empty()) + { + loadForm(filters, IService::getInstance()->WriteFilesDirectory.toString()+"gpms.packed_sheets", _sheets, true); + } _initialised=true; } @@ -72,11 +82,11 @@ void CSheets::init() //------------------------------------------------------------------------- // display -void CSheets::display() +void CGpmSheets::display() { nlassert(_initialised); - std::map::iterator it; + std::map::iterator it; for(it=_sheets.begin();it!=_sheets.end();++it) { nlinfo("SHEET:%s Walk:%f Run:%f Radius:%f Height:%f Bounding:%f Scale:%f",(*it).first.toString().c_str(), @@ -88,12 +98,12 @@ void CSheets::display() //------------------------------------------------------------------------- // lookup -const CSheets::CSheet *CSheets::lookup( CSheetId id ) +const CGpmSheets::CSheet *CGpmSheets::lookup( CSheetId id ) { nlassert(_initialised); // setup an iterator and lookup the sheet id in the map - std::map::iterator it; + std::map::iterator it; it=_sheets.find(id); // if we found a valid entry return a pointer to the creature record otherwise 0 diff --git a/code/ryzom/server/src/gpm_service/sheets.h b/code/ryzom/server/src/gpm_service/sheets.h index 1f711e1a5..78130d970 100644 --- a/code/ryzom/server/src/gpm_service/sheets.h +++ b/code/ryzom/server/src/gpm_service/sheets.h @@ -34,7 +34,7 @@ * \author Nevrax France * \date 2002 */ -class CSheets +class CGpmSheets { public: class CSheet @@ -85,7 +85,7 @@ public: private: // prohibit cnstructor as this is a singleton - CSheets(); + CGpmSheets(); static std::map _sheets; static bool _initialised; diff --git a/code/ryzom/server/src/gpm_service/world_entity.cpp b/code/ryzom/server/src/gpm_service/world_entity.cpp index 99396bfb3..d9976a1c4 100644 --- a/code/ryzom/server/src/gpm_service/world_entity.cpp +++ b/code/ryzom/server/src/gpm_service/world_entity.cpp @@ -309,7 +309,7 @@ void CWorldEntity::createPrimitive(NLPACS::UMoveContainer *pMoveContainer, uint8 Primitive = NULL; MoveContainer = NULL; - const CSheets::CSheet *sheet = CSheets::lookup(CSheetId(Sheet())); + const CGpmSheets::CSheet *sheet = CGpmSheets::lookup(CSheetId(Sheet())); float primRadius = 0.5f; float primHeight = 2.0f; diff --git a/code/ryzom/server/src/input_output_service/string_manager.cpp b/code/ryzom/server/src/input_output_service/string_manager.cpp index 56a351fea..1e1215594 100644 --- a/code/ryzom/server/src/input_output_service/string_manager.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager.cpp @@ -246,60 +246,6 @@ void CStringManager::clearCache(NLMISC::CLog *log) -// load the values using the george sheet -void CStringManager::TSheetInfo::readGeorges (const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId) -{ - if (form) - { - SheetName = sheetId.toString(); - - std::string ext = NLMISC::CSheetId::fileExtensionFromType(sheetId.getSheetType()); - - SheetName = SheetName.substr(0, SheetName.find(ext)); - // remove ending '.' - if (!SheetName.empty() && *SheetName.rbegin() == '.') - SheetName.resize(SheetName.size()-1); - - std::string gender; - - if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("creature")) - { - form->getRootNode ().getValueByName (gender, "Basics.Gender"); - sint genderId; - NLMISC::fromString(gender, genderId); - Gender = GSGENDER::EGender(genderId); - - form->getRootNode ().getValueByName (Race, "Basics.Race"); - -// form->getRootNode ().getValueByName (DisplayName, "Basics.First Name"); -// std::string s; -// form->getRootNode ().getValueByName (s, "Basics.CharacterName"); -// if (!DisplayName.empty()) -// DisplayName+=' '; -// DisplayName+=s; - - form->getRootNode ().getValueByName (Profile, "Basics.Profile"); - form->getRootNode ().getValueByName (ChatProfile, "Basics.ChatProfile"); - } - else if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("race_stats")) - { - form->getRootNode ().getValueByName (Race, "Race"); - } -/* else if (sheetId.getType() == NLMISC::CSheetId::typeFromFileExtension("sitem")) - { - // read any item specific data - } -*/ else - { - nlwarning("CStringManager::TEntityInfo : Do not know the type of the sheet '%s'.", sheetId.toString().c_str()); - return; - } - } -} - - - - const CStringManager::CEntityWords &CStringManager::getEntityWords(TLanguages lang, STRING_MANAGER::TParamType type) const { nlassert(lang < NB_LANGUAGES); diff --git a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp index dfa8098a3..67ce62f10 100644 --- a/code/ryzom/server/src/input_output_service/string_manager_parser.cpp +++ b/code/ryzom/server/src/input_output_service/string_manager_parser.cpp @@ -1864,14 +1864,19 @@ void CStringManager::init(NLMISC::CLog *log) if (_SheetInfo.empty()) { - std::map container; + // std::map container; // Load the sheet std::vector exts; exts.push_back("creature"); //exts.push_back("item"); //exts.push_back("sitem"); // not more needed ! exts.push_back("race_stats"); - loadForm(exts, NLNET::IService::getInstance()->WriteFilesDirectory.toString() + "ios_sheets.packed_sheets", _SheetInfo, false, false); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm(exts, NLNET::IService::getInstance()->WriteFilesDirectory.toString() + "ios_sheets.packed_sheets", _SheetInfo, false, false); + } if (_SheetInfo.empty()) { diff --git a/code/ryzom/server/src/input_output_service/string_manager_sheet.cpp b/code/ryzom/server/src/input_output_service/string_manager_sheet.cpp new file mode 100644 index 000000000..bb51b987e --- /dev/null +++ b/code/ryzom/server/src/input_output_service/string_manager_sheet.cpp @@ -0,0 +1,75 @@ +// Ryzom - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdpch.h" +#include "string_manager.h" +#include "nel/misc/i18n.h" +#include "nel/misc/path.h" +#include "nel/misc/file.h" +#include "nel/georges/u_form_elm.h" +#include "nel/georges/load_form.h" +#include + +// load the values using the george sheet +void CStringManager::TSheetInfo::readGeorges (const NLMISC::CSmartPtr &form, const NLMISC::CSheetId &sheetId) +{ + if (form) + { + SheetName = sheetId.toString(); + + std::string ext = NLMISC::CSheetId::fileExtensionFromType(sheetId.getSheetType()); + + SheetName = SheetName.substr(0, SheetName.find(ext)); + // remove ending '.' + if (!SheetName.empty() && *SheetName.rbegin() == '.') + SheetName.resize(SheetName.size()-1); + + std::string gender; + + if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("creature")) + { + form->getRootNode ().getValueByName (gender, "Basics.Gender"); + sint genderId; + NLMISC::fromString(gender, genderId); + Gender = GSGENDER::EGender(genderId); + + form->getRootNode ().getValueByName (Race, "Basics.Race"); + +// form->getRootNode ().getValueByName (DisplayName, "Basics.First Name"); +// std::string s; +// form->getRootNode ().getValueByName (s, "Basics.CharacterName"); +// if (!DisplayName.empty()) +// DisplayName+=' '; +// DisplayName+=s; + + form->getRootNode ().getValueByName (Profile, "Basics.Profile"); + form->getRootNode ().getValueByName (ChatProfile, "Basics.ChatProfile"); + } + else if (sheetId.getSheetType() == NLMISC::CSheetId::typeFromFileExtension("race_stats")) + { + form->getRootNode ().getValueByName (Race, "Race"); + } +/* else if (sheetId.getType() == NLMISC::CSheetId::typeFromFileExtension("sitem")) + { + // read any item specific data + } +*/ else + { + nlwarning("CStringManager::TEntityInfo : Do not know the type of the sheet '%s'.", sheetId.toString().c_str()); + return; + } + } +} diff --git a/code/ryzom/server/src/mirror_service/mirror_service.cpp b/code/ryzom/server/src/mirror_service/mirror_service.cpp index 651a509a8..9d1952cc7 100644 --- a/code/ryzom/server/src/mirror_service/mirror_service.cpp +++ b/code/ryzom/server/src/mirror_service/mirror_service.cpp @@ -178,7 +178,19 @@ void CMirrorService::init() // Fill temporary sheet map, loading dataset information TSDataSetSheets sDataSetSheets; - loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets ); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, false, false ); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if ( sDataSetSheets.empty() ) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, true ); + } + if ( sDataSetSheets.empty() ) { nlwarning( "No dataset found, check if dataset.packed_sheets and the georges sheets are in the path" ); diff --git a/code/ryzom/server/src/server_share/continent_container.cpp b/code/ryzom/server/src/server_share/continent_container.cpp index d94c0f9e8..90b7b60c7 100644 --- a/code/ryzom/server/src/server_share/continent_container.cpp +++ b/code/ryzom/server/src/server_share/continent_container.cpp @@ -47,7 +47,7 @@ CContinentContainer::CContinentContainer() } // -void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const string packedSheetsDirectory, double cellSize, bool loadPacsPrims) +void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const string &packedSheetsDirectory, double cellSize, bool loadPacsPrims) { _GridWidth = gridWidth; _GridHeight = gridHeight; @@ -56,9 +56,26 @@ void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitive _CellSize = cellSize; _LoadPacsPrims = loadPacsPrims; + buildSheets(packedSheetsDirectory); +} + +// +void CContinentContainer::buildSheets(const string &packedSheetsDirectory) +{ std::vector filters; filters.push_back("continent"); - loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (NLNET::IService::isServiceInitialized() && (NLNET::IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap, false, false); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if (_SheetMap.empty()) + { + loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap, true); + } } // diff --git a/code/ryzom/server/src/server_share/continent_container.h b/code/ryzom/server/src/server_share/continent_container.h index f6f33f890..7edfb0c96 100644 --- a/code/ryzom/server/src/server_share/continent_container.h +++ b/code/ryzom/server/src/server_share/continent_container.h @@ -161,7 +161,10 @@ public: CContinentContainer(); /// Init whole continent container - void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true); + void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string &packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true); + + /// Build sheets + void buildSheets(const std::string &packedSheetsDirectory); /// Init pacs prims void initPacsPrim(const std::string &path = std::string("landscape_col_prim_pacs_list.txt")); diff --git a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp index 1d233c8e5..f988ac054 100644 --- a/code/ryzom/server/src/tick_service/range_mirror_manager.cpp +++ b/code/ryzom/server/src/tick_service/range_mirror_manager.cpp @@ -145,7 +145,19 @@ void CRangeMirrorManager::init() // Load datasets into temporary map to get the names TSDataSetSheets sDataSetSheets; - loadForm( "dataset", "data_shard/datasets.packed_sheets", sDataSetSheets ); + + // if the 'GeorgePaths' config file var exists then we try to perform a mini-scan for sheet files + if (IService::isServiceInitialized() && (IService::getInstance()->ConfigFile.getVarPtr(std::string("GeorgePaths"))!=NULL)) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, false, false ); + } + + // if we haven't succeeded in minimal scan (or 'GeorgePaths' wasn't found in config file) then perform standard scan + if ( sDataSetSheets.empty() ) + { + loadForm( "dataset", IService::getInstance()->WriteFilesDirectory.toString()+"datasets.packed_sheets", sDataSetSheets, true ); + } + TSDataSetSheets::iterator ism; for ( ism=sDataSetSheets.begin(); ism!=sDataSetSheets.end(); ++ism ) { diff --git a/code/ryzom/tools/CMakeLists.txt b/code/ryzom/tools/CMakeLists.txt index 631a3ad28..0bf9fb632 100644 --- a/code/ryzom/tools/CMakeLists.txt +++ b/code/ryzom/tools/CMakeLists.txt @@ -14,6 +14,9 @@ IF(WITH_NET) ADD_SUBDIRECTORY(stats_scan) ADD_SUBDIRECTORY(pdr_util) ADD_SUBDIRECTORY(patch_gen) + IF(WIN32) + ADD_SUBDIRECTORY(sheets_packer_shard) + ENDIF(WIN32) ENDIF(WITH_NET) IF(WITH_LIGO AND WITH_NET) diff --git a/code/ryzom/tools/scripts/linux/service_launcher.sh b/code/ryzom/tools/scripts/linux/service_launcher.sh index 587f3875a..3be4af012 100755 --- a/code/ryzom/tools/scripts/linux/service_launcher.sh +++ b/code/ryzom/tools/scripts/linux/service_launcher.sh @@ -78,7 +78,7 @@ do printf STOPPED > $STATE_FILE # consume (remove) the control file to allow start once - rm $CTRL_FILE + rm -f $CTRL_FILE echo Press ENTER to relaunch fi diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php index 40a96f6c1..8f99bfc93 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php @@ -62,6 +62,11 @@ class Helpers{ $smarty -> assign( $key, $value ); } + //load ams content variables that are language dependent + foreach ( $variables['ams_content'] as $key => $value){ + $smarty -> assign( $key, $value); + } + //smarty inheritance for loading the matching wrapper layout (with the matching menu bar) if( isset($vars['permission']) && $vars['permission'] == 3 ){ $inherited = "extends:layout_admin.tpl|"; diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php index 867aa270b..f83f46576 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php @@ -289,8 +289,11 @@ class Users{ public static function createUser($values, $user_id){ try { //make connection with and put into shard db + $values['user_id']= $user_id; $dbs = new DBLayer("shard"); $dbs->execute("INSERT INTO user (Login, Password, Email) VALUES (:name, :pass, :mail)",$values); + $dbr = new DBLayer("ring"); + $dbr->execute("INSERT INTO ring_users (user_id, user_name, user_type) VALUES (:user_id, :name, 'ut_pioneer')",$values); ticket_user::createTicketUser( $user_id, 1); return "ok"; } diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index 586d49241..358fc5d64 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -5,6 +5,9 @@ login_info = "Please enter your MySQL Username and Password to install the database.This is being loaded because the is_installed file is missing.This process will take about 30 seconds." login_here = "here" +[ams_content] +ams_title="Ryzom Account Mangement System" + [dashboard] home_title = "Introduction" home_info = "Welcome to the Ryzom Core - Account Management System" @@ -126,8 +129,8 @@ go_home = "Go Home" userlist_info = "welcome to the userlist" [login] -login_info = "Please login with your Username and Password." -login_error_message = "The username/password were not correct!" +login_info = "Please login with your Email/Username and Password." +login_error_message = "The Email/username/password were not correct!" login_register_message ="Register If you don't have an account yet, create one" login_here = "here" login_forgot_password_message = "In case you forgot your password, click" @@ -242,4 +245,4 @@ email_body_forgot_password_header = "A request to reset your account's password email_body_forgot_password_footer = " ---------- If you didn't make this request, please ignore this message." -;=========================================================================== \ No newline at end of file +;=========================================================================== diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index b4fa1fcf6..b1e80440f 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -1,6 +1,9 @@ ; This is a sample configuration file ; Comments start with ';', as in php.ini +[ams_content] +ams_title="Ryzom Account Mangement System" + [dashboard] home_title = "Presentation" home_info = "Bienvenue sur le Ryzom Core - Account Management System" @@ -116,8 +119,8 @@ go_home = "Allez au main page" userlist_info = "bienvenue sur le userlist page!" [login] -login_info = "S'il vous plait vous connecter avec votre nom d'utilisateur et mot de passe." -login_error_message = "Le remplie nom d'utilisateur / mot de passe ne sont pas correctes!" +login_info = "S'il vous plait vous connecter avec votre Email/nom d'utilisateur et mot de passe." +login_error_message = "Le remplie Email/nom d'utilisateur / mot de passe ne sont pas correctes!" login_register_message =" Inscrivez-vous Si vous n'avez pas encore de compte, creez-en un" login_here = "ici" login_forgot_password_message = "Dans le cas ou vous avez oublie votre mot de passe, cliquez" @@ -230,4 +233,4 @@ email_body_forgot_password_header = "Une demande de reinitialiser le mot de pass email_body_forgot_password_footer = " ---------- Si vous n'avez pas fait cette demande, s'il vous plait ignorer ce message." -;=========================================================================== \ No newline at end of file +;=========================================================================== diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php index d8e59d1f9..ec09d9780 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php @@ -70,15 +70,15 @@ class WebUsers extends Users{ /** - * check if the login username and password match the db. - * @param $username the inserted username + * check if the login username/email and password match the db. + * @param $value the inserted username or email * @param $password the inserted password (unhashed) * @return the logged in user's db row as array if login was a success, else "fail" will be returned. */ - public static function checkLoginMatch($username,$password){ + public static function checkLoginMatch($value,$password){ $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username)); + $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:value OR Email=:value", array('value' => $value)); $row = $statement->fetch(); $salt = substr($row['Password'],0,2); $hashed_input_pass = crypt($password, $salt); @@ -89,9 +89,9 @@ class WebUsers extends Users{ } } - + /** - * returns te id for a given username + * returns the id for a given username * @param $username the username * @return the user's id linked to the username */ @@ -104,7 +104,7 @@ class WebUsers extends Users{ /** - * returns te id for a given emailaddress + * returns the id for a given emailaddress * @param $email the emailaddress * @return the user's id linked to the emailaddress */ @@ -118,7 +118,7 @@ class WebUsers extends Users{ return "FALSE"; } } - + /** * get uId attribute of the object. @@ -355,4 +355,4 @@ class WebUsers extends Users{ } } -} \ No newline at end of file +} diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php index aad237ae7..fa08ef1a5 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php @@ -37,6 +37,15 @@ function add_user(){ $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register_feedback', $pageElements); exit; + }elseif ($_POST['page']=="settings"){ + // pass error and reload template accordingly + $result['prevUsername'] = $_POST["Username"]; + $result['prevPassword'] = $_POST["Password"]; + $result['prevConfirmPass'] = $_POST["ConfirmPass"]; + $result['prevEmail'] = $_POST["Email"]; + $result['no_visible_elements'] = 'TRUE'; + helpers :: loadtemplate( 'settings', $result); + exit; }else{ // pass error and reload template accordingly $result['prevUsername'] = $_POST["Username"]; @@ -44,7 +53,7 @@ function add_user(){ $result['prevConfirmPass'] = $_POST["ConfirmPass"]; $result['prevEmail'] = $_POST["Email"]; $result['no_visible_elements'] = 'TRUE'; - $pageElements['ingame_webpath'] = $INGAME_WEBPATH; + $pageElements['ingame_webpath'] = $INGAME_WEBPATH; helpers :: loadtemplate( 'register', $result); exit; } diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php b/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php index b0b6b5add..f0212f18b 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php @@ -9,15 +9,16 @@ function login(){ global $INGAME_WEBPATH; global $WEBPATH; try{ - $username = filter_var($_POST['Username'],FILTER_SANITIZE_STRING); + $login_value = filter_var($_POST['LoginValue'],FILTER_SANITIZE_STRING); $password = filter_var($_POST['Password'],FILTER_SANITIZE_STRING); - //check if the filtered sent POST data returns a match with the DB - $result = WebUsers::checkLoginMatch($username, $password); + //check if the filtered sent POST data returns a match with the DB + $result = WebUsers::checkLoginMatch($login_value, $password); + if( $result != "fail"){ //handle successful login - $_SESSION['user'] = $username; - $_SESSION['id'] = WebUsers::getId($username); + $_SESSION['user'] = $result['Login']; + $_SESSION['id'] = $result['UId']; $_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id'])); $user = new WebUsers($_SESSION['id']); $_SESSION['Language'] = $user->getLanguage(); @@ -54,4 +55,4 @@ function login(){ exit; } -} \ No newline at end of file +} diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/index.php b/code/ryzom/tools/server/ryzom_ams/www/html/index.php index faf3488c6..b4827bfe2 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/index.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/index.php @@ -13,7 +13,6 @@ //load required pages and turn error reporting on/off error_reporting(E_ALL); ini_set('display_errors', 'on'); -require_once( '../../ams_lib/libinclude.php' ); if (!file_exists('../is_installed')) { //if is_installed doesnt exist run setup require( 'installer/libsetup.php' ); @@ -24,6 +23,7 @@ if (!file_exists('../is_installed')) { //if config exists then include it require( '../config.php' ); } +require_once( $AMS_LIB.'/libinclude.php' ); session_start(); //Running Cron? diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php index 2809ab05d..e51dc1872 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/installer/libsetup.php @@ -5,10 +5,57 @@ * @author Daan Janssens, mentored by Matthew Lagoe */ + ini_set('display_errors', 1); + error_reporting(E_ALL); + + function is__writable($path) { + + if ($path{strlen($path)-1}=='/') + return is__writable($path.uniqid(mt_rand()).'.tmp'); + + if (file_exists($path)) { + if (!($f = @fopen($path, 'r+'))) + return false; + fclose($f); + return true; + } + + if (!($f = @fopen($path, 'w'))) + return false; + fclose($f); + unlink($path); + return true; + } + + //set permissions + if(is__writable('../../../www/login/logs')) { + echo "failed to get write permissions on logs"; + exit; + } + if(is__writable('../../../admin/graphs_output')) { + echo "failed to get write permissions on graphs_output"; + exit; + } + if(is__writable('../../../admin/templates/default_c')) { + echo "failed to get write permissions on default_c"; + exit; + } + if(is__writable('../../www')) { + echo "failed to get write permissions on www"; + exit; + } + if(is__writable('../../www/html/cache')) { + echo "failed to get write permissions on cache"; + exit; + } + if(is__writable('../../www/html/templates_c')) { + echo "failed to get write permissions on templates_c"; + exit; + } + if (!isset($_POST['function'])) { //require the pages that are being needed. require_once( '../config.default.php' ); - require_once( '../../ams_lib/libinclude.php' ); ini_set( "display_errors", true ); error_reporting( E_ALL ); @@ -37,6 +84,8 @@ } } + require_once( $AMS_LIB.'/libinclude.php' ); + //var used to access the DB; global $cfg; @@ -44,7 +93,7 @@ //SETUP THE WWW DB $dbw = new DBLayer("install", "web"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['web']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['web']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `". $cfg['db']['web']['name'] . "`; DROP TABLE IF EXISTS ams_user; @@ -70,7 +119,7 @@ $dbl = new DBLayer("install", "lib"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `" . $cfg['db']['lib']['name'] ."`; DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`ams_querycache`; @@ -476,7 +525,7 @@ //SETUP THE SHARD DB $dbs = new DBLayer("install", "shard"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['shard']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['shard']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `". $cfg['db']['shard']['name'] . "`; CREATE TABLE IF NOT EXISTS `domain` ( @@ -594,7 +643,7 @@ CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."`; USE `". $cfg['db']['tool']['name'] . "`; - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['tool']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `" . $cfg['db']['tool']['name'] ."`; CREATE TABLE IF NOT EXISTS `neltool_annotations` ( @@ -1374,7 +1423,7 @@ //SETUP THE OPEN_SHARD DB $dbw = new DBLayer("install", "ring"); $sql = " - CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['ring']['name'] ."`; + CREATE DATABASE IF NOT EXISTS `" . $cfg['db']['ring']['name'] ."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE `" . $cfg['db']['ring']['name'] ."`; CREATE TABLE IF NOT EXISTS `characters` ( @@ -1670,6 +1719,8 @@ INSERT INTO `shard` (`shard_id`, `WSOnline`, `MOTD`, `OldState`, `RequiredState`) VALUES (302, 1, 'Shard up', 'ds_restricted', 'ds_open'); + + INSERT INTO `sessions` (`session_id`, `session_type`, `title`, `owner`, `plan_date`, `start_date`, `description`, `orientation`, `level`, `rule_type`, `access_type`, `state`, `host_shard_id`, `subscription_slots`, `reserved_slots`, `free_slots`, `estimated_duration`, `final_duration`, `folder_id`, `lang`, `icone`, `anim_mode`, `race_filter`, `religion_filter`, `guild_filter`, `shard_filter`, `level_filter`, `subscription_closed`, `newcomer`) VALUES (302, 'st_mainland', 'open shard mainland', 0, '2005-09-21 12:41:33', '2005-08-31 00:00:00', '', 'so_other', 'sl_a', 'rt_strict', 'at_public', 'ss_planned', 0, 0, 0, 0, 'et_short', 0, 0, 'lang_en', '', 'am_dm', 'rf_fyros,rf_matis,rf_tryker,rf_zorai', 'rf_kami,rf_karavan,rf_neutral', 'gf_any_player', '', 'lf_a,lf_b,lf_c,lf_d,lf_e,lf_f', 0, 0); GRANT ALL ON `" . $cfg['db']['ring']['name'] ."`.* TO `" . $cfg['db']['ring']['user'] ."`@".$cfg['db']['ring']['host']." identified by '".$cfg['db']['ring']['pass']."'; "; diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl index fa97211d7..5e5e0fb9f 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl @@ -12,7 +12,7 @@ http://twitter.com/halalit_usman --> - Ryzom Account Management System + {$ams_title} diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl index 26c992d50..54a87bbcb 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/login.tpl @@ -14,8 +14,8 @@ - - + + diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl index 4ea75af12..e4c545c98 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/settings.tpl @@ -76,6 +76,87 @@ + + + + + Add User + + + + + + + + + Add User + + + Username + + + + + + + + + + Password + + + + + + + + + + Confirm Password + + + + + + + + + + Email + + + + + + + + + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "OK"} + + The user is created! + + {/if} + + {if isset($SUCCESS_PASS) and $SUCCESS_PASS eq "SHARDOFF"} + + The user can't be created. + + {/if} + + + + + + + Create User + + + + + + + diff --git a/code/ryzom/tools/server/www/login/config.php b/code/ryzom/tools/server/www/login/config.php index cd490530f..11deb410b 100644 --- a/code/ryzom/tools/server/www/login/config.php +++ b/code/ryzom/tools/server/www/login/config.php @@ -22,6 +22,6 @@ $RingDBPassword = ""; // (in nel.user, nel.permission, ring.ring_user and ring.characters $AcceptUnknownUser = false; // if true, the login service automaticaly create a ring user and a editor character if needed -$AutoCreateRingInfo = false; +$AutoCreateRingInfo = true; ?> diff --git a/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt new file mode 100644 index 000000000..3e9f2a17f --- /dev/null +++ b/code/ryzom/tools/sheets_packer_shard/CMakeLists.txt @@ -0,0 +1,34 @@ +FILE(GLOB SRC *.cpp *.h) +FILE(GLOB EGSSHEETS ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/egs_sheets/*.cpp ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/egs_sheets/*.h) + +ADD_EXECUTABLE(sheets_packer_shard ${SRC} ${EGSSHEETS} + ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager_sheet.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/entity_structure/resists.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service/entity_structure/resists.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/sheets.cpp + ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/sheets.h + ${CMAKE_SOURCE_DIR}/ryzom/server/src/ai_service/commands_mlf.cpp) + +INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src ${CMAKE_SOURCE_DIR}/ryzom/tools/sheets_packer_shard ${CMAKE_SOURCE_DIR}/ryzom/server/src/entities_game_service) +TARGET_LINK_LIBRARIES(sheets_packer_shard + ryzom_gameshare + ryzom_servershare + ryzom_aishare + nelmisc + nelgeorges + nelnet + nelligo + ${LIBXML2_LIBRARIES}) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) + +NL_DEFAULT_PROPS(sheets_packer_shard "Ryzom, Tools: Sheets Packer Shard") +NL_ADD_RUNTIME_FLAGS(sheets_packer_shard) + +ADD_DEFINITIONS(-DNO_EGS_VARS) +ADD_DEFINITIONS(-DNO_AI_COMP) + +INSTALL(TARGETS sheets_packer_shard RUNTIME DESTINATION ${RYZOM_BIN_PREFIX} COMPONENT tools) diff --git a/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp new file mode 100644 index 000000000..9c2212efa --- /dev/null +++ b/code/ryzom/tools/sheets_packer_shard/sheets_packer_shard.cpp @@ -0,0 +1,176 @@ +// NeL - MMORPG Framework +// Copyright (C) 2014 by authors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// Author: Jan Boon + +#include + +// STL includes +#include +#include +#include +#include +#include + +// NeL includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Project includes +// ... + +namespace { + +} /* anonymous namespace */ + +// EGS +NLMISC::CVariable EGSLight("egs","EGSLight", "Load EGS with a minimal set of feature loaded", false, 0, true); +NLMISC::CVariable LoadOutposts("egs", "LoadOutposts", "If false outposts won't be loaded", true, 0, true ); +static std::string s_WriteDirectory; +std::string writeDirectory() +{ + return s_WriteDirectory; +} + +//////////////////////////////////////////////////////////////////////// +// note: *.packed_sheets files are placed in // +// and will need to be moved to the right location by // +// your build script system. // +//////////////////////////////////////////////////////////////////////// + +int main(int nNbArg, char **ppArgs) +{ + // create debug stuff + NLMISC::createDebug(); + + // verify all params + if (nNbArg < 6) + { + // sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard + nlinfo("ERROR : Wrong number of arguments\n"); + nlinfo("USAGE : sheets_packer_shard \n"); + nlinfo(" : Directory containing visual_slots.tab"); + return EXIT_FAILURE; + } + std::string leveldesignDir = std::string(ppArgs[1]); + if (!NLMISC::CFile::isDirectory(leveldesignDir)) + { + nlerrornoex("Directory leveldesign '%s' does not exist", leveldesignDir.c_str()); + return EXIT_FAILURE; + } + std::string dfnDir = std::string(ppArgs[2]); + if (!NLMISC::CFile::isDirectory(dfnDir)) + { + nlerrornoex("Directory dfn '%s' does not exist", dfnDir.c_str()); + return EXIT_FAILURE; + } + std::string datasetsDir = std::string(ppArgs[3]); + if (!NLMISC::CFile::isDirectory(datasetsDir)) + { + nlerrornoex("Directory datasets '%s' does not exist", datasetsDir.c_str()); + return EXIT_FAILURE; + } + std::string tabDir = std::string(ppArgs[4]); + if (!NLMISC::CFile::isDirectory(tabDir)) + { + nlerrornoex("Directory tab '%s' does not exist", tabDir.c_str()); + return EXIT_FAILURE; + } + std::string exportDir = std::string(ppArgs[5]); + if (!NLMISC::CFile::isDirectory(exportDir)) + { + nlerrornoex("Directory build_packed_sheets '%s' does not exist", exportDir.c_str()); + return EXIT_FAILURE; + } + s_WriteDirectory = exportDir + "/"; + + // add search paths + NLMISC::CPath::addSearchPath(leveldesignDir, true, false); + NLMISC::CPath::addSearchPath(dfnDir, true, false); + NLMISC::CPath::addSearchPath(datasetsDir, false, false); + NLMISC::CPath::addSearchPath(tabDir, false, false); + + // init sheet_id.bin + NLMISC::CSheetId::init(false); + + // this here does the magic + // MS + { + // Used by mirror_service.cpp + // Used by range_mirror_manager.cpp + // Used by mirror.cpp + TSDataSetSheets sDataSetSheets; + loadForm("dataset", exportDir + "/datasets.packed_sheets", sDataSetSheets); + } + + // IOS + { + // Used by string_manager_parcer.cpp + std::map container; + std::vector exts; + exts.push_back("creature"); + exts.push_back("race_stats"); + loadForm(exts, exportDir + "/ios_sheets.packed_sheets", container); + } + + // GPMS + { + std::map container; + std::vector filters; + filters.push_back("creature"); + filters.push_back("player"); + loadForm(filters, exportDir + "/gpms.packed_sheets", container); + } + + // CContinentContainer + { + CContinentContainer continents; + continents.buildSheets(s_WriteDirectory); + } + + // EGS + { + CSheets::init(); + } + + // CTimeDateSeasonManager + { + CTimeDateSeasonManager::packSheets(s_WriteDirectory); + } + + // AIS + { + AISHEETS::CSheets::getInstance()->packSheets(s_WriteDirectory); + AISHEETS::CSheets::destroyInstance(); + } + + // and that's all folks + return EXIT_SUCCESS; +} + +/* end of file */ diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 253eee75d..9eba8c8da 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -1574,7 +1574,7 @@ int cleanWordsDiff(int argc, char *argv[]) { LOG("Cleaning words diffs\n"); -/* + uint i,l; for (l=0; l