Jump to content
MakeWebGames

Gangster Legends V2.4.1 - Full Release


Dayo

Recommended Posts

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

Edited by Dayo
  • Like 1
Link to comment
Share on other sites

  • Dayo pinned and featured this topic
1 hour ago, AinzOoalGown said:

Awesome! Nice work Dayo 😄

@Dayo I am getting an error after installing. I created a new issue on github with error:

https://github.com/ChristopherDay/Gangster-Legends-V2/issues/71

@AinzOoalGownthis will be due to @Dayo reverting the nbbc version back to PHP7 as that version does not work with PHP8 correctly and even later versions of PHP7 try downgrading PHP or replace the nbbc class with the newer version in the pre-release.

Link to comment
Share on other sites

1 minute ago, URBANZ said:

@AinzOoalGownthis will be due to @Dayo reverting the nbbc version back to PHP7 as that version does not work with PHP8 correctly and even later versions of PHP7 try downgrading PHP or replace the nbbc class with the newer version in the pre-release.

This is possible, ill be looking at fixing this next week, i didn't have time this week to set up a php8 server. 

Link to comment
Share on other sites

7 minutes ago, Dayo said:

This is possible, ill be looking at fixing this next week, i didn't have time this week to set up a php8 server. 

i have tested the class version i pushed with versions 7.3.28, 7.4.20 and 8.0.7 and it does function on all of them just not sure about earlier versions of PHP7 as i know alot in the newer versions has either been deprecated or totally removed.

Edit: @Dayo just to confirm the PHP version is definitely the thing causing the error just made a fresh install PHP8 that error shows and all PHP7 versions the error goes away.

Link to comment
Share on other sites

1 hour ago, Seridam said:

If you go to the premium GL marketplace page you will see the latest version updated today.

Last update the mods weren't all updated. When I say mods i mean the ones that are sold with Premium being the difference of free and paid versions. 

Link to comment
Share on other sites

11 hours ago, URBANZ said:

@AinzOoalGownthis will be due to @Dayo reverting the nbbc version back to PHP7 as that version does not work with PHP8 correctly and even later versions of PHP7 try downgrading PHP or replace the nbbc class with the newer version in the pre-release.

Thanks that worked reverting back to PHP 7.2

@Dayo Will the 3 column theme work with this update?

I have installed latest version as well as installed all premium mods, but when I install the 3 column theme it doesnt show all the premium mods and is missing the character stats in top left.

Thanks

Link to comment
Share on other sites

58 minutes ago, AinzOoalGown said:

Thanks that worked reverting back to PHP 7.2

@Dayo Will the 3 column theme work with this update?

I have installed latest version as well as installed all premium mods, but when I install the 3 column theme it doesnt show all the premium mods and is missing the character stats in top left.

Thanks

I added a few new menus in GL 2.3 and forgot to update that theme. When im home from holiday on monday ill fix it.

from memory its missing the casino, money and points menu's

  • Like 1
Link to comment
Share on other sites

1 minute ago, Dayo said:

I added a few new menus in GL 2.3 and forgot to update that theme. When im home from holiday on monday ill fix it.

from memory its missing the casino, money and points menu's

Ah cool thanks, I will have a look and see if I can fix it over the weekend. If I do ill send you files.

Link to comment
Share on other sites

  • 3 weeks later...
10 hours ago, rednspirited said:

got the free version to start and get the ball rolling on some things as far as word changes but i can not find where Boss & Underboss are to change them to what i need can anyone help me?

 

You would have to change gang.inc.php and gang.tpl.php

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...