Skip to content

Releases: Fernando-A-Rocha/mta-add-models

v5.2.0

26 Feb 15:39
fcf8cd2
Compare
Choose a tag to compare

Newmodels v5.2.0 (Codename Azul 💙)

Changelog

Changes since previous version (v5.1.0):

  • Updated default object ID verification to include the CJ clothing component IDs
  • Added spawnPlayer function override and exported that supports custom model ID as skin ID argument. Previously you had to manually re-apply/set the player's skin using setElementModel after using spawnPlayer with the base model skin ID.

Documentation is available!

Don't forget the main README file which contains all you need to know!

v5.1.0

20 Feb 16:51
f09f385
Compare
Choose a tag to compare

Newmodels v5.1.0 (Codename Azul 💙)

Changelog

Additions since previous version (v5.0.0):

  • New function getCustomModelName(id) to obtain the custom name (string) defined for a custom model ID
  • NandoCrypt files (.nandocrypt) support. Mod files with this extension (.dff.nandocrypt, .txd.nandocrypt, .col.nandocrypt) will now get automatically decrypted and loaded thanks to your nando_decrypter script (one is included for testing).

Documentation is available!

Don't forget the main README file which contains all you need to know!

v5.0.0

14 Feb 11:50
eb27cdc
Compare
Choose a tag to compare

⚠️ A newer version has been published, check the latest release! ⚠️

Newmodels v5 (Codename Azul 💙)

This version (v5) changes the core and exported scripts to no longer use element data!

The principle stays the same, models are synced automatically and as a developer you don't need to worry about anything!

Good bye element data!

Now the custom model IDs of elements are stored in a table on the server that gets synced to all clients whenever it is updated and when a client starts the resource.

To prevent memory leaking, this table is properly cleared when elements are destroyed both on the client and server.

Documentation is available!

Don't forget the main README file which contains all you need to know!

v4.0.0

03 Sep 12:25
48bb0b7
Compare
Choose a tag to compare

A more recent version is out, don't download this!

v3.3.0

17 Sep 19:40
46b588b
Compare
Choose a tag to compare

Please do not use this version, check the latest release!

Changes:

  • Fixed vehicle handling sync for added models!

The previous implementation would cause severe server lag if used in many vehicles & with many players online. This is safe now.

  • Updated isDefaultID with MTA 1.6 new skin IDs (ped models)

  • Added 2 missing aclrequest permissions to newmodels

Enjoy !! ❤️

v3.2.0

07 Sep 18:16
f2e0401
Compare
Choose a tag to compare

Changelog

  • refreshStreamedInElements fix => frees all allocated IDs when mod list is received to prevent conflicts
  • added engineLoadTXD optional param (default true): filteringEnabled
  • added engineReplaceModel optional param (default false): alphaTransparency
  • updated minimum client & server version to MTA 1.6 🥳

As always don't forget to leave feedback. Check out the MTA forum thread that links to an active Discord discussion thread.

v3.1.0

09 Mar 16:21
595009b
Compare
Choose a tag to compare

This release doesn't break anything. The previous 3.0.0 release remains stable, although I recommend updating :-)

Revamped Exported Functions

⚡️ Cleaner & Easier to Use

✔️ Backwards Compatible

  • addExternalMods_IDFilenames
  • addExternalMod_IDFilenames
  • addExternalMods_CustomFileNames
  • addExternalMod_CustomFilenames
  • removeExternalMods

Changes the format of the modInfo list passed as argument to addExternalMods_IDFilenames and addExternalMods_CustomFileNames.

Adds a new optional argument "onFinishEvent" to addExternalMods_IDFilenames, addExternalMods_CustomFileNames and removeExternalMods.

Functions addExternalMod_IDFilenames and addExternalMod_CustomFilenames can now receive a table with options instead of all the argument variables.

Using the old argument formats in the functions will output a warning to the debug console.

Updated sampobj_reloaded and vehicle_manager examples to reflect these changes and use the new function formats.

Updated documentation (please read).

Thank you

Rick for suggesting these enhancements.

v3.0.0

06 Feb 13:15
60cf049
Compare
Choose a tag to compare

Release Notes

⚠️ Check your custom code (need to update)

This update permenantly fixes element model logic.

Now, client or server newmodels scripts never listen to element model change. You are responsible for using setElementModel in your scripts, and setting custom model ID element data.

Some explanations

In the past, the element model was being altered by newmodels (using performance-heavy debug hooks) because I thought that it was necessary due to how the engineRequestModel & engineFreeModel features worked. This belief was wrong.

Model serverside always remains the same for an element. It is changed on the client to the allocated/requested ID when set, and it restores the parent/base model ID when the allocated ID is freed automatically. Before, I thought that it didn't restore the parent/base model ID clientside and the element stayed with an "allocated/requested" model ID even after it was freed, this was proved incorrect by time and testing.

What to do

For example, If you have a player with custom skin ID data set, and you want to switch it to a default skin ID, you need to set the custom skin data to nil and do setElementModel. This used to be handled "automatically", however it was unnecessarily performance-heavy.

Check this example for how to spawn a player properly because the use of spawnPlayer requires special attention.

⚠️Please read the documentation, in particular the examples which use newmodels-engine to simplify the implementation process.

Changes

  • Removed unnecessary & breaking element model change logic (such as doing set element model refresh, it only caused additional issues)
  • Replaced newmodels-example with vehicle_manager

v2.2.0

01 Feb 11:39
246878b
Compare
Choose a tag to compare

Improvements

  • removed thisRes variable to use hidden var resource
  • added example of path table usage in modList (mod id 80006)
  • replace client request mods logic with onPlayerResourceStart with clientsWaiting queue
  • moved start/stop messages from testing_server.lua to server.lua
  • improved clientside debug overlay & fixed /listmods GUI not showing mod paths correctly
  • slight refactor in updater_s.lua
  • modList can now be optional (mod_list.lua can be removed if u dont want mods defined in newmodels
  • added test mods & reorganized modList
  • added model LOD distance optional mod parameter
  • added removeExternalMods(ids_list) exported function
  • improved the file downloading functions
  • cited some mod sources in README credits

Fixes

  • ⚠️ fixed small typo in newmodels-engine setElementModel function - it was setting the base model data incorrectly
  • fixed mod list checks not cancelling the resource because they were inside an Async function
  • (edge case) fixed startFreeingMod(...) not doing tonumber(data_id) to compare with id, so people who set id element data string had problems

Documentation

  • documented functions & events in new .MD files for newmodels & newmodels-example!

Full Changelog

v2.1.0...v2.2.0

v2.1.0

23 Jan 10:21
b134c7b
Compare
Choose a tag to compare

⚠️ The previous 2.0.4 version remains semi-stable, but it is highly recommended that you update your newmodels resource to this version, as well as make use of the new resource added (see below). ⚠️

PLEASE CHECK THE UPDATED README AND THE OTHER UPDATED DOCUMENTATION PAGES.

Changes

  • newmodels:

    • Fixed problem with modList table not copying properly
    • Fixed editor custom funcs & create element base ID
    • Added editor custom pickup support
    • Fixed freeing functions
    • Added disableAutoFree modList setting & add functions parameter
    • Added forceFreeAllocated exported function
    • Added isModAllocated exported function
    • Fixed test commands
    • Fixed setElementModel refresh in server.lua and client.lua
    • Added checkModelID exported function
    • Remade test_server.lua examples
  • Added newmodels-engine resource (thanks @httpRick for the inspiration)

    • 7 exported functions
    • 1 optional test command
  • Updated all documuentation

    • improved descriptions and links
    • rewrote Lua examples which now use newmodels-engine for simpler usage

Full Changelog: v2.0.4...v2.1.0