Gangster Legends v2.4.1 Release


Gangster Legends V2.4.1

Release Notes

Over the past few months since the previous release of GL I have been working on the next release of Gangster Legends. This release aims to fill a few gaps in the engine and fix some core issues.

Below is a full list of the major changes in this version:

New Template engine/renderer 
In the past i built the template engine from scratch using HandleBars.js as a concept. Rather then re-inventing the wheel i have just chosen to replace my engine with the real thing. I have implemented HandleBars PHP into GL.

While HandleBars uses double braces  ({{variable}}) I have altered HandleBars it so it uses single braces to keep backwards compatibility with 3rd party modules.

This fixes several bugs when rendering large templates as well as introducing a lot more functionality you can visit the documentation here to see whats possible with the new engine.

New Item System
One of the core limitations of Gangster Legends was its lack of an item/inventory system, before you would define several items that the user could equip and that was it. The new system opens up endless possibilities. You now have a inventory of items and you can pick and choose what items to equip/use.

Items can have several effects and these can be expanded with 3rd party mods using the hook system. Some of the effects shiped with GL include:

  • Modify Attack Power
  • Modify Defence Power
  • Modify User Health
  • Heal HP
  • Modify timer
  • Give an item
  • Add money
  • Add EXP
  • Add Bullets

Premium Membership
Out of the box Gangster Legends will ship with a new Premium Membership feature. Users will be able to buy Premium Membership with points, If the user is a Premium Member they will have access to additional features. By default Gangster Legends ships with the following benefits:

  1. Reduce crime timers by 25%
  2. Increase theft success chance by 10%
  3. 75% off of travel costs

As with most of GL 3rd party mods can hook into this system to expand on this functionality further.

Standardised Money Output

By default Gangster Legends output any monetary value in dollars ($x,xxx,xxx) in this version any monetary value is passed through a function, this means if you want to change it from $ to £ or € you just define a new hook with the format.

This will only work with modules shipped with the GL Core, but 3rd party modules will need to be updated to follow this. It is very easy to update code from the old way to the new way.

//module.inc.php
/* old */ $this->error("You need $" . number_format($cost));
/* new */ $this->error("You need " . $this->money($cost));


// module.tpl.php
/* old */ Cost: ${number_format cost}
/* new */ Cost: {#money cost}

Links