Jump to content

ZFM Development Progress Thread


Recommended Posts

This thead contains screenshots and code samples from updates that are being made to ZFM. It will also include details and updates to commits that have been made to Git source.

 

ZFM Layout Compositor

 

What it does

Lays out vehicles, units, and loot in appealing, symmetical and ordered ways by arranging them in equally-spaced grids.

 

Where is it available?

  • ZFM devel builds
  • ZFM Alpha release

Intended for use by

Everyone! It's open source. Use it in or out of ZFM.

 

How to use it

The layout compositor only requires two lines of code to create layouts, and uses the following types:

  • Vehicles defined in CfgVehicles
  • Arrays of ZFM unit types (i.e. ZFM_UNIT_TYPE_HEAVY)
  • Loot crates defined in ZFM

Firstly, create a layout as an array. You can have as many rows and columns as possible. An easy example of a layout is a bandit base from the ZFM crash missions:

 

// This is a single item in the layout array
["NameOfVehicle",<heading>,parameters]

// This is our layout array
ZFM_Layouts_Array =[
[["CampEast",0,[]],["CampEast",0,[]],["CampEast",0,[]]],
[0,["Land_tent_east",0,[]],0]
];

/*
This equates to:

Tent    Tent    Tent
SPC	Tent	SPC
*/
// 0 = The layout, 1 = Center of the layout, 2 = position of the layout, 3 = spacing of the layout
[ZFM_Layouts_Array,[1,1],[4600,10160,0],20] call ZFM_Layout_Parse;

To break this down, an individual cell of a layout array is an array itself with 3 elements. The first element is the name of the vehicle, unit or lootcrate type, the second is the degree heading, and the third is any parameters being passed when spawning this. At the moment, for alpha, no parameters will be passed as they're not required for crash missions, but in the future, they will be used to spawn items inside vehicles and so on. The "0"s in this are set as spacers, and won't spawn any vehicles or units in those spaces.

 

 

 

 

 

TGcLLfk.jpg

This is the result from the above code.

aguMkqj.jpg

 

Yi3dmxk.jpg

Link to comment
Share on other sites

ZFM Loot System

 

What it does

Alpha - Provides loot based upon ZFM difficulties (Deadmeat, easy, medium, hard, war machine)

Beta - FairShare system

 

Where is it available?

  • ZFM devel builds
  • ZFM Alpha release

Intended for use by

ZFM Mission developers

 

How to use it

I will expand upon this as the feature is redone. This system will be more robust than the previous and have minimum guarantee for loot, as well as probability-based weapons, which are designated "rare" and will have probabilities attached to them. Previous pre-alpha code used a purely probabilistic approach, however, sometimes this would lead to empty crates, or crates where only one thing spawned in them. This approach will have guaranteed loot, which in Alpha will be fixed in quantity based on difficulty.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...