MERGE(Builder)

From CoffeeMud Wiki
Jump to navigation Jump to search
CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    
===MERGE===
Usage: MERGE (AREA/ROOM) (CHANGE="FIELD,..") (ON="FIELD,..") (IGNORE="FIELD,..") "PATH & FILE NAME"

MERGE (AREA/ROOM) DATABASE (MOBS/ITEMS/ROOMS) DBCLASS="JAVACLASS" DBSERVICE="DB SERVICE URL" DBUSER=(USERNAME) DBPASS=(PASSWORD) (IGNORE=(FIELD,..)) (MASK=(ZAPPERMASK))

Examples: merge /myfiles/myitems.cmare

merge change=damage,level,ability /myfiles/myweapons.cmare

merge area change=material ignore=level /myfiles/myweapons.cmare

merge change=damage on=name /myfiles/weapons.cmare

merge area database dbclass=com.mysql.jdbc.Driver dbservice=jdbc:mysql://localhost:3306/db

dbuser=username dbpass=password ignore="IMG,ATTACK" MASK="-NAMES +Bob"

Shorts:
Description: Allows you to selectively modify all instances of a mob or item in the world based on the contents of a CMARE file containing items or mobs, or another CoffeeMud database.

When using CMARE files, the files must be generated using the EXPORT (WORLD/AREA/ROOM) (ITEMS/WEAPONS) command. The first parameter specifies whether the items in the text file are to be merged with those in the entire world, in your current area, or just the room. The second parameter (CHANGE) is implied to be ALL unless specified otherwise. It denotes which fields in the existing items may be changed based on what changes are seen to the item inside the CMARE file. The third parameter (ON) is implied to be ALL unless specified otherwise. It denotes how an item in the CMARE file is matched with an existing item in your world. If the listed fields from the CMARE file and the existing item are equal, the items will be considered a match for the purposes of merging. The fourth parameter (IGNORE) is implied to be NONE unless specified otherwise. It denotes exceptions to the (ON) parameter, namely which fields are allowed to differ between items in the CMARE file and an existing item in cases where they would otherwise be considered a match according to the (ON) parameter. Matched items in your existing world, in every room, will be modified accordingly, and the room will be resaved to your database. The log will reflect all changes made to your world. Every room in every area in your world will be reloaded from the database prior to any evaluations or changes.

When using a database as a source, the merge command will compare and match the database version of the room contents with the local world. The user is then given the opportunity to make changes to the local world depending on differences. The merge requires DBCLASS, DBSERVICE, DBUSER, and DBPASS parameters be set. The IGNORE parameters is a comma delimited list of fields to ignore when displaying differences. To mask the types of objects checked, the user can specify mobs, items, or the whole rooms after the word database, and a zappermask can be included after the mask parameters.

Notes

.