Factory Entities

From MechWarrior: Living Legends Wiki
Revision as of 08:43, 9 May 2025 by Fire-hound (talk | contribs) (Factories, initially added images)
Jump to: navigation, search
Marauder.jpg Stub
This article is only a stub - it's far from covering the topic to match the MWLL Wiki standards.
You may help MWLL Wiki by expanding it


Our game mod's strongly depends on building assets ranging from weapons to assault class war machines that fly or crawl across the battlefields of 31st century. To facilitate this we use factories across the map.

Factories

For any factory to even exist or function in the level it has to have the Factory Entity to begin with.
factory

This entity can optionally have an mesh assigned to it (the "model" property).
For said Entity to be usable at all it has to have at the very least the BuyArea defined and assigned to it.

capture point
capture link

Once said factory has a team assigned to it (by default property or by a designated Capture Point) a player that is a member of that team can exchange c-bills for assets designated as available in that Factory.
capture point

For said assets, once paid for and built, to appear at all on the map/level, the factory has to have a helper, typically called "spawn" or "spawn<number>" designated and assigned to a Factory Slot.
Aforementioned Slot could potentially become crowded and further assets appearing in it could lead to damage, collisions or other unforeseen consequences - this is avoided by designating a Build Volume Trigger Area Shape that prevents further spawning of assets until vacated of any other similar entity. It lies upon the mapper to accordingly size and place the areas to help and facilitate those functions.

trigger

Historically there was one more Area Shape/Volume to be designated: the Kill Volume. It's role was to vacate the build area of players so that it appears the build process is both deadly to watch and never seen. This function is regarded obsolete in the mapper community of this mod since long time now.

Aforementioned Spawn Helpers can be set up in the geometry of the factory mesh - in blender for instance, by making an Empty, that is a child of the main Empty that carries the same name of the Mesh/cgf file, so both the mesh and the empty are children to the parent-most empty. Those one or more Spawn_Helper_empty_entities are to be named "empty<number>" and same names are to be assigned to the corresponding slots in the Sandbox2 Editor.
The other option is to use Basic Entity or Geom Entity for the spawn helper. The corresponding tick box is to be set and the Link Name is to be set accordingly to the Factory Slot - the name of the entity is irrelevant in this case.
BasicEntity
BasicEntity

There seems to be indication that this later case can lead to unforeseen consequences - like the said entity to undergo state change upon nearby strong enough explosion during the game play - rendering the factory disabled until reload. This phenomena while well documented to occur seems to be ill understood and hard to avoid when using factories in this fashion. However it seems to be totally absent when the spawn helpers are embedded in the Factory mesh. There seems to be evidence that the mesh alone can be void of any other geometry aside the spawn helpers (examine the quad forward factory prefab).

One of the future proofing consideration for the mapper is to decide if to extract any prefab or to keep it "sealed":

Any Prefab that is not extracted will get due updates as the game changes down the road.
Any extracted prefab is no longer a prefab and as the game changes there might be manual labor due to make the map/level function again. This is only possible to do when the map source is available to the mapper.

GeomEntities are to be used very sparingly, and only if it can't be avoided by any other way. It seems that Basic Entities work as well.

There is a range of prefabs in MWLL that can be used both as readily available factories with an assigned team or, once extracted, can be set up to change the team when a point nearby is captured/freed by the competing teams during a match.

Simple spawn point

The simple infantry bunker. One Spawn group, few spawn entities and a single buy area. Only weapons can be bought that spawn in the players hands. There is no Vehicle area. It can be either assigned to tan (IS) or black (Clan), and/or left to be captured by an CapturePoint entity

/TODO/image showing it all

Single forward factory

The next step in complexity. All above applies, but an actual factory entity is placed nearby too. The entity can be assigned a 3d art, or used without.

For the factory to be assigned to a team, the same applies as for the spawn point or group (tan/black).

For the factory to be of certain weight the map maker can opt to manually select the individual classes of spawn entities in the table shown in the roll-up bar, or one can assign the factory an predefined class:

Value Assets provided
defMechHanger All Surface Assets
defVtolPad VTOL
defAeroHanger VTOL + ASF
/TODO/ unknown yet Medium Surface Assets up to 65 tons

This might be very handy not to worry about any future convention changes, as those would be followed up by the dev team and the map would remain up to date by automagic.

For the 3d art to work properly, if designed in blender, an actual mesh is mandatory to be supplied alongside the helpers (an empty in blender), the helpers are usually named spawn01 and onward. One helper has to bear the same name as the *.cgf file to be created. This empty is to be parent to all other objects of the file. The rest of the preparation is same as every other export from blender via the Collada plugin: have all objects in a group named as the *.cgf to be, assign the mesh(-es) an material and UV, no spaces allowed anywhere.


If without, it is to be linked to an entity /TODO Geom Entity only?/ that will both orient and place the spawned product in the map space. The "body" of the factory has to provide spawn helpers,otherwise separate entities have to be used. Place the helpers so that the spawned assets don't fall from too high as it breaks the immersion somewhat - ideally let them be 1m or less above ground.
Two area shapes are to be defined - one for the factory buy zone - and the smaller for the actual vehicle spawn area. There is provision for another area shape in each slot, this shape is used to define an area that will enforce an damage blow to each asset within as soon as asset building is started.

Never link this (AreaID) to the same ID as the larger buy area - or it will instantly kill every player making a purchase in that area.
Factories where the vehicle spawn area is not defined, will allow for multiple assets to spawn one atop of each other. This will lead to destroyed legs and damage upon spawn. Mappers are most strongly advised to avoid this.

Quad forward factory

The same applies here as for the preceding factory, except that we have more slots available for building. For a slot to spawn an purchased asset, it has to have the helper defined. If the Vehicle area is defined in such a way, that the spawned asset is outside of it once spawned, the slot will be available for further production. For this to be avoided three things are to be taken care of:

  1. The spawn slot is to be encircled with an Area shape reaching at least somewhat below (one meter or less) the ground, so the spawned asset is completely shrouded by it
  2. That same area shape has to be linked to the factory it belongs to (one way link)
Numbering of the Area ID is relative only to the factory they are linked to, so numbering schemes can be repeated without fear that any two factories might inter-connect or interfere.
  1. That same shape area's ID has to match the ID of the slot it represents in the factory parameter called VehicleAreaID
For the game flow, it is of great importance that only vacant slots be filled by spawning assets. It preserves immersion, reduces odd events during game-play and is overall more aesthetically pleasing.

If the factory is set up correctly, an occupied slot will accept assets in the Queue but will not build until it is vacated. Once vacant, the build process will commence in the slot with the lowest number.
It is highly recommended to mark the production bays with the slot numbers designated.

In lower quality settings the decals and roads are not rendered in the play engine, but are shown in the editor engine - mappers should bear this in mind.

Dropship forward factory

/TODO/ differences for dropships - more solids where and why

Main Hanger bases factory

/TODO/ Maximal factory potential - 8 slots, animated body *.cga with separately animated parts of it (*.anm). even more solids,and occlusion areas to improve performance.

Repair zones

We don't actually have an HUD indicator (yet) for repair zones, as we have for buy zones. In repair zones a shut down vehicle trades it's damage for c-bills. Area shapes define the zone of repair on repair pads, while Area shapes' ID via the VehicleAreasID, in the factory properties spawn slots, define them on factories.

Simple repair pad

The simple repair pad consists of the entity and the area shape. The entity can be assigned an 3d "body". The body can be linked to a capture point, so it can belong to a competing team, or not linked so it's serves any player in need.

Factories repair ability

The factory repair zone is defined by the Vehicle Area shape. /TODO/ image

Mobile repair zone (Repair truck)

Merely a placeholder in case we get one ever :) .


Buy zones

The buy zones of MWLL mod can be finely tuned for particular asset type or class, or, alternatively, a predefined factory type:

defMechHanger
defVtolPad
defAeroHanger

If the predefined factory type is used, the fine tuning of the available assets does not apply.

Air strip

The airstrip has to be a buy zone for the ASF assets to be able to replenish ammunition. They will be able to repair there as well.

Mobile buy zone (APC)

In the buy zone of the APC one can by infantry (BA) weapons and ammunition only.

Factory buy zones

The factory buy zone is one that can be tuned the most. For the clean tech game mode,one does not need to alternate IS and CL tech, it is done elsewhere, it suffices to define the classes regardless of faction.