Open GoogleCodeExporter opened 9 years ago
[deleted comment]
An example of where the room description information is grabbed from is
available below. Room descriptions are obtained from the variables located
within the GenerationTypes.xml file.
<!-- here is the location -->
<type number="1" mobs="15" respawn="12" generation="Standard" inside="Yes">
<name>Abyss</name>
<description>The current ...</description>
</type>
<!-- here is the prefix -->
<type number="1" difficulty="Hard" items="10">
<name>Abominable</name>
<description>This secluded area holds a larger more formidable source of dangerous creatures.</description>
</type>
<!-- here is the suffix -->
<type number="1" difficulty="Normal" items="11">
<name>Abberations</name>
<description></description>
</type>
------------------------------
Here is the Generation Type function as of 10/31/11 for dissecting the
GenerationTypes.xml.
Private Function RetrieveGenerationTypes(ByVal LocationNumber As String, ByVal
AddendumNumber As String) As Boolean
'declare xml dimensions
Dim m_xmld As XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
Dim CurNumber As String
Try
m_xmld = New XmlDocument()
m_xmld.Load(Replace(MainProgram.DirMapHeader, "MapHeader.TG", "GenerationTypes.xml"))
m_nodelist = m_xmld.SelectNodes("/types/location/type")
For Each m_node In m_nodelist
CurNumber = m_node.Attributes.GetNamedItem("number").Value
If CurNumber = LocationNumber Then 'location type requested was found
CurrentMap.MobSpawnMaximum = Val(m_node.Attributes.GetNamedItem("mobs").Value)
CurrentMap.MobRespawnRate = Val(m_node.Attributes.GetNamedItem("respawn").Value)
CurrentMap.GenerationType = m_node.Attributes.GetNamedItem("generation").Value
CurrentMap.LocationTypeName = m_node.InnerText
Exit For
End If
Next
If CurrentMap.AddendumType = False Then
m_nodelist = m_xmld.SelectNodes("/types/prefix/type")
Else
m_nodelist = m_xmld.SelectNodes("/types/suffix/type")
End If
For Each m_node In m_nodelist
CurNumber = m_node.Attributes.GetNamedItem("number").Value
If CurNumber = AddendumNumber Then 'prefix or suffix type requested was found
CurrentMap.MobDifficulty = m_node.Attributes.GetNamedItem("difficulty").Value
CurrentMap.ItemDropRate = Val(m_node.Attributes.GetNamedItem("items").Value)
CurrentMap.AddendumDescription = m_node.Attributes.GetNamedItem("description").Value
CurrentMap.AddendumName = m_node.InnerText
Exit For
End If
Next
CurNumber = ""
Catch errorVariable As Exception
MainProgram.SND("/RERROR: " + errorVariable.ToString())
Return False
End Try
End Function
---------------------
At the moment environments are generated randomly, in the future, the locations
will limit the environments slightly, but for the most part, environments will
be pushed together depending on the instance situation. Therefor weather
variables and temperature variables (dependant, both on environment) are
technically random as well, again varying on their own situations on weather
patterns (ensuring that they work together and meld appropriately).
Original comment by NBIn...@gmail.com
on 31 Oct 2011 at 6:43
Original comment by NBIn...@gmail.com
on 2 Nov 2011 at 6:03
Original issue reported on code.google.com by
NBIn...@gmail.com
on 4 May 2011 at 7:26