[WF-General] spawn area
erik.hjortsberg at gmail.com
Sat Jan 2 16:22:38 PST 2010
Yes, adding a "type" attribute to the "area" property would make it fit
with how the shapes are parsed for the terrain mods.
While the "points" and "type" attribute for terrain mods could be moved
up one level, my main idea with having them under a "shape" attribute
was that this attribute could be reused wherever a shape needed to be
defined (I'm thinking that there will be other future attributes which
will use shapes apart from the current ones).
Alistair Riddoch skrev:
> It looks like all that is required to make "area" compatible with the
> "shape" sub property of a terrain mod is to add "type" = "polygon".
> Making any other change will break the surface area mods used for
> paths, fields and under trees.
> The server side code for these surface mods is minimal so far, so the
> main issue is client side. I tend to think the terrain mod code is a
> bit messy, and nesting "type" and "points" inside "shape" is perhaps
> more complex than necessary.
> 2010/1/2 Erik Hjortsberg <erik.hjortsberg at gmail.com>:
>> Hi, here's an example of a terrain mod.
>> <map name="terrainmod">
>> <float name="heightoffset">0</float>
>> <map name="shape">
>> <string name="type">polygon</string>
>> <string name="type">levelmod</string>
>> Alistair Riddoch skrev:
>> Agreed the format needs to be common.
>> Also agreed that the format should be flexible enough to support
>> different shape types, though I am disinclined to go much out of my
>> way to support formats other than Polygon in much of the code for now.
>> Do you have Atlas examples to hand for the shape of terrain mods? I am
>> frantically busy sorting my move today, and if I can get this coded
>> today, I will.
>> I will spin the release last thing tonight.
>> 2010/1/2 Erik Hjortsberg <erik.hjortsberg at gmail.com>:
>> I can agree that not all different kind of shapes fits all kind of purposes,
>> but I still think that we would benefit from having both a common code and a
>> common atlas representation of shapes.
>> While the code can be common for parsing the shapes, different kind of
>> properties might have different kinds of shapes available. The changes made
>> to Mercator with the addition of atlas parsing of shapes was made with such
>> a harmonization in mind.
>> If the way shapes are defined for the terrain mods, there's a "shape"
>> attribute which in turn has a "type" attribute describing the type of shape,
>> and then different other attributes defining the shape, dependent on the
>> For spawn areas I would actually think that circles and rectangles would be
>> more suited than polygons, since the math for generating an evenly spread
>> random point within the shape probably would be simpler.
>> I did the code for the terrain mods; if you want I can take a stab at
>> implementing this for the spawn points too.
>> Another question regarding the spawn points: I see that there is proof of
>> concept code in SpawnEntity::populateEntity
>> Is the idea to let this be data driven, or to let it be implemented in a
>> script hook?
>> Yeah, populateEntity will become data driven, the idea being that
>> initial inventory will be determined here instead of in the core
>> character creation code. Will probably make some progress on this
>> tonight too.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General