MUDPercolator
public interface AreaGenerationLibrary extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static class |
AreaGenerationLibrary.LayoutFlags |
Enum of the type of room layoutnode
|
static interface |
AreaGenerationLibrary.LayoutManager |
Area generators work by first laying out a set of rooms into a
configuration called a Layout.
|
static interface |
AreaGenerationLibrary.LayoutNode |
A layout node represents a single room in a layout
manager.
|
static class |
AreaGenerationLibrary.LayoutRuns |
If this room layoutnode is a street type, what
direction does it run?
|
static class |
AreaGenerationLibrary.LayoutTags |
Enum of the types of tags that room layoutnodes can
be flagged with.
|
static class |
AreaGenerationLibrary.LayoutTypes |
Enum of the type of room layoutnode.
|
static class |
AreaGenerationLibrary.UpdateSet |
The result set from an update
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
void |
buildDefinedIDSet(java.util.List<XMLLibrary.XMLTag> xmlRoot,
java.util.Map<java.lang.String,java.lang.Object> defined,
java.util.Set<java.lang.String> overrideIds) |
Given an area-generation xml file, this method will return all the defined tag ids.
|
java.lang.String |
buildQuestScript(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined,
Modifiable E) |
Builds a quest script based around the given variables using the given xml tag root.
|
Room |
buildRoom(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined,
Exit[] exits,
int direction) |
Given a specific ROOM generation tag, this method will return the room selected
by that tag piece, with the entrace to it being in the given direction
|
void |
checkRequirements(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined) |
Does nothing but check the requirements to build the given xml tag piece, and compares it with
the variables in the given id definition map, to see if all requirements are met.
|
void |
defineReward(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined) |
If an xml tag is selected manually, by something outside the library, then
certain post-selection processes are not properly done, making generation
based on the tag potentially impossible.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
doMQLSelectObjects(Modifiable E,
java.lang.String mql) |
Returns the raw output from an MQL query that begins with SELECT:
|
java.lang.String |
doMQLSelectString(Modifiable E,
java.lang.String mql) |
Returns a flattened string result from an MQL query that begins with SELECT:
|
java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
doMQLSelectStrings(Modifiable E,
java.lang.String mql) |
Returns the string output from an MQL query that begins with SELECT:
|
java.util.List<AreaGenerationLibrary.UpdateSet> |
doMQLUpdateObjects(Modifiable E,
java.lang.String mql) |
Updates objects using an MQL query that begins with UPDATE:
|
boolean |
fillInArea(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined,
Area A,
int direction) |
Given a specific AREA generation tag, and an empty area, this method will
populate the area with rooms from the given tag piece, with the entrance
to it being in the given direction.
|
Area |
findArea(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined,
int directions) |
Given a specific AREA generation tag, this method will return the area selected
by that tag piece, with the entrance to it being in the given direction
|
java.util.List<Item> |
findItems(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined) |
Given a specific ITEM generation tag, this method will return the items selected
by that tag piece.
|
java.util.List<MOB> |
findMobs(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined) |
Given a specific MOB generation tag, this method will return the MOBs selected
by that tag piece.
|
java.lang.String |
findString(java.lang.String tagName,
XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined) |
Returns a string of the given tag name type, from the given top-level xml tag piece that
resolves to a string, and with the given pre-defined id set.
|
java.util.List<XMLLibrary.XMLTag> |
getAllChoices(java.lang.String tagName,
XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined) |
Given a root xml tag and a tag name, this method will return all matching xml tag pieces.
|
AreaGenerationLibrary.LayoutManager |
getLayoutManager(java.lang.String named) |
Returns the layout manager of the given name.
|
java.util.Map<java.lang.String,java.lang.String> |
getUnfilledRequirements(java.util.Map<java.lang.String,java.lang.Object> defined,
XMLLibrary.XMLTag piece) |
Check the requirements to build the given xml tag piece, and compares it with
the variables in the given id definition map, to see if all requirements are met.
|
void |
postProcess(java.util.Map<java.lang.String,java.lang.Object> defined) |
Sometimes an object cannot be generated at a given time because some tag which
will be defined later has not yet been defined, and cannot be resolved at
generation time.
|
void |
preDefineReward(XMLLibrary.XMLTag piece,
java.util.Map<java.lang.String,java.lang.Object> defined) |
If an xml tag is selected manually, by something outside the library, then
certain pre-selection processes are not properly done, making generation
based on the tag potentially impossible.
|
boolean |
relevelRoom(Room room,
int oldMin,
int oldMax,
int newMin,
int newMax) |
Adjusts the levels of all mobs, items, and mob-items in the room by adjusting
them from their place in an existing range to a new range.Does not save -- that's up to you.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
void buildDefinedIDSet(java.util.List<XMLLibrary.XMLTag> xmlRoot, java.util.Map<java.lang.String,java.lang.Object> defined, java.util.Set<java.lang.String> overrideIds)
xmlRoot
- the root of the area-generation xml filedefined
- a map of ids to objects, whether strings or tags.overrideIds
- a set of ids that are allowed to be duplicated, because they overridejava.util.List<Item> findItems(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
piece
- the identified tag that can return itemsdefined
- the defined id set from the entire xml documentCMException
- any parsing or generation errorsbuildDefinedIDSet(List, Map, Set)
java.util.List<MOB> findMobs(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
piece
- the identified tag that can return MOBsdefined
- the defined id set from the entire xml documentCMException
- any parsing or generation errorsbuildDefinedIDSet(List, Map, Set)
java.lang.String findString(java.lang.String tagName, XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
tagName
- the name of the string tagpiece
- the top level piece, probably of type tagnamedefined
- the pre-defined id set from the entire xml documentCMException
- any parsing or generation errorsbuildDefinedIDSet(List, Map, Set)
Room buildRoom(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined, Exit[] exits, int direction) throws CMException
piece
- the identified tag that can return a roomdefined
- the defined id set from the entire xml documentexits
- pre-defined exits from this room, if anydirection
- the direction of entrance to this roomCMException
- any parsing or generation errorsbuildDefinedIDSet(List, Map, Set)
java.lang.String buildQuestScript(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined, Modifiable E) throws CMException
piece
- the identified tag that can return a roomdefined
- the defined id set from the entire xml documentE
- a given set object or null (such as an area, room, or mob)CMException
- any parsing or generation errorsbuildDefinedIDSet(List, Map, Set)
void checkRequirements(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
piece
- the xml tag piece you want to builddefined
- the defined id set from the entire xml document, and the userCMException
- any parsing or generation errorsjava.util.Map<java.lang.String,java.lang.String> getUnfilledRequirements(java.util.Map<java.lang.String,java.lang.Object> defined, XMLLibrary.XMLTag piece)
defined
- the defined id set from the entire xml document, and the userpiece
- the xml tag piece you want to buildArea findArea(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined, int directions) throws CMException
piece
- the identified tag that can return a roomdefined
- the defined id set from the entire xml documentdirections
- the direction of entrance to this roomCMException
- any parsing or generation errorsbuildDefinedIDSet(List, Map, Set)
boolean fillInArea(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined, Area A, int direction) throws CMException
piece
- the identified tag that can return a roomdefined
- the defined id set from the entire xml documentA
- the area to put the rooms intodirection
- the direction of entrance to this roomCMException
- any parsing or generation errorsbuildDefinedIDSet(List, Map, Set)
AreaGenerationLibrary.LayoutManager getLayoutManager(java.lang.String named)
named
- the name of the layout managervoid postProcess(java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
defined
- the defined ids after they've gone through generating an objectCMException
- any parsing or generation errorsvoid defineReward(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
piece
- the selected xml tag piecedefined
- the defined id set from the entire xml documentCMException
- any parsing or generation errorsvoid preDefineReward(XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
piece
- the selected xml tag piecedefined
- the defined id set from the entire xml documentCMException
- any parsing or generation errorsjava.util.List<XMLLibrary.XMLTag> getAllChoices(java.lang.String tagName, XMLLibrary.XMLTag piece, java.util.Map<java.lang.String,java.lang.Object> defined) throws CMException
tagName
- the name of the tag to search forpiece
- the root xml tag piecedefined
- the defined id set from the entire xml documentCMException
- any parsing or generation errorsboolean relevelRoom(Room room, int oldMin, int oldMax, int newMin, int newMax)
room
- the room to adjustoldMin
- current minimum level range for the rooms areaoldMax
- current maximum level range for the rooms areanewMin
- new minimum level range for the rooms areanewMax
- new maximum level range for the rooms areajava.util.List<java.util.Map<java.lang.String,java.lang.Object>> doMQLSelectObjects(Modifiable E, java.lang.String mql) throws MQLException
E
- a random object you want to use as a base, or nullmql
- the MQL queryMQLException
- something went wrongjava.util.List<AreaGenerationLibrary.UpdateSet> doMQLUpdateObjects(Modifiable E, java.lang.String mql) throws MQLException
E
- a random object you want to use as a base, or nullmql
- the MQL queryMQLException
- something went wrongjava.util.List<java.util.Map<java.lang.String,java.lang.String>> doMQLSelectStrings(Modifiable E, java.lang.String mql) throws MQLException
E
- a random object you want to use as a base, or nullmql
- the MQL queryMQLException
- something went wrongjava.lang.String doMQLSelectString(Modifiable E, java.lang.String mql)
E
- a random object you want to use as a base, or nullmql
- the MQL query