Home / Gmod Addons Marketplace / Gmod Mana System + HUD Creator


Media
Description ๐Ÿ‡ฌ๐Ÿ‡ง Description ๐Ÿ‡ซ๐Ÿ‡ท

Gmod Mana System + HUD Creator - Script


Demonstration Youtube video of Gmod Mana System + HUD Creator

Do you want to add a magic bar to your server, which is aesthetically changeable and unique with the possibility to give it various shapes, colors, positioning? Or do you want a gauge system to restrict the use of magic (Mana or Force), disable the use of magic by DarkRP jobs or by Rank? "Gmod Mana System + HUD Creator" does all three.


mana-mp-magic-force-gauge mana-system mana-items-spawnmenu mana-system-upgrade-with-items restrict-the-mana-per-rank restrict-the-mana-per-job customisation-mana-bar edit-the-design-of-mana-hud apply-rules-of-mana-system Quick access for the wiki and other interfaces gmod-spawnmenu

Maximum image size
Description

Description of Gmod Mana System + HUD Creator

Summary:
  1. ๐Ÿ“˜ Addon description: Gmod Mana System + HUD Creator
  2. ๐Ÿ“ฆ Contents
  3. ๐Ÿ”ฎ Max Mana Level Upgrade System
  4. ๐Ÿช„ Mana bar customization system
  5. ๐Ÿ•น๏ธ The Commands
  6. ๐Ÿ’พ Backup and persistence
  7. โš—๏ธ Pre-scripted mana recharge items in Gmod Mana System + HUD Creator
  8. ๐Ÿง™ APIs associated with User Class for coders and object creation
  9. โœ”๏ธ Compatibility with gamemodes
  10. ๐Ÿ“š List of HUDs collection


๐Ÿ“˜ Addon description: Gmod Mana System + HUD Creator

Gmod Mana System + HUD Creator is the latest in my long series of HUDs with their own standalone systems. I always said that I would never make simple HUDs when I was asked to make HUDs. This is still true today. I didn't just make HUDs, I made complete systems with their editable gameplay rules with their customizable HUDs in real time.

Gmod Mana System + HUD Creator is part of it, it will allow you to add a magic gauge system with various options of restriction by jobs or rank, and a nice glowing magic gauge on the interface of your players connected to your Gmod server, this magic bar is of course as the title indicates aesthetically modifiable and unique with the possibility to give it various shapes, colors, positioning.

A system to restrict the use of magic by DarkRP jobs and by Rank. For example a citizen has no magic.

How it happens on the user side, the user doesn't see the administration menus to start with, you will have the possibility to make your users have no magic at all at the beginning of their game. They will either have to evolve (LevelUP) or find artifacts to unlock the maximum amount of magic. Just like you can choose if they already have the maximum magic at the beginning. Everyone governs the rules of their server as they see fit.

The script does not include spells or special effects. It provides a complete system with its APIs, for example to block the use of a weapon or a wand if the mana is less than the required amount of mana it will be enough to place in the code of the weapon:

To restrict the use of a weapon that requires 20 points of magic for example :

if self:GetOwner():Mana() < 20 then

return
end


To remove mana when using a wand or a spell that costs 20 magic points: player:addMana(-20)

A documentation translated in several languages provides more details about the different possibilities.



๐Ÿ“ฆ Contents

You will find:
1. An sql database system to store user progress.
2. A magic restriction system, for example no magic for Muggles or ordinary citizens.
3. A module to manage the magic system according to the ranks: superadmin, admin, moderator, vip, user, etc.
4. Modular magic bar in the HUD with the HUD Creator.
5. A Management Module of the magic system according to the DarkRP JOBS: mayor, citizen, vip, etc.
6. A customization system for the magic bar in the HUD.
7. A large number of customizable HUD styles.
8. A max magic upgrade entity either by level or by magic extension item.
9. Sample potions for creating your own entities.
10. Gameplay customization options.
11. Various potions available in the workshop in a potion pack that you can use as examples and develop your own potions.
12. And of course a support.



๐Ÿ”ฎ Max Mana Level Upgrade System

With Gmod Mana System + HUD Creator, you will be able to choose if the max magic increases with the level of the user, provided you have a leveling system installed on your server garry's mod, you will find one of my collection in the store / Section Gmod addons
It will be possible to choose the upgrade possibilities of max magic either by finding a spawnable key item as well, or depending on the level of your users. The progress of your users is recorded when they log out.



๐Ÿช„ Mana bar customization system

The magic system HUD is made for you to express your creativity, as in my editable HUD collection the magic bar is fully customizable, from icons to style to shape and position. No need for file updates or workshops. All you see when editing is a preview, don't forget to save to apply your changes.

List of HUD customization choices (I took care to make a modification by screenshots above):
Vertical and horizontal position, Length and Width, Bar background color, Progress bar color, Text color, Icon color, Font, Replace default magic icons with your own by simple image link, various pre-saved HUD styles, real-time creation and no gmod reboot.



๐Ÿ•น๏ธ Commands

To access the interface the chat command : !mana
The console command : norda_hud_mana_system



๐Ÿ’พ Backup and persistence

Like most of my player stats management scripts, the player's evolution is saved at the time of disconnection for optimization reasons, it's a choice you can make from the configuration file.



โš—๏ธ Pre-scripted mana recharge items in Gmod Mana System + HUD Creator

The addon includes a spawn menu of potions that you can add in the table of items in the configuration file, you will only need a model, a sound and when the potion is spawned the model will be displayed and if you drink the potion the sound will be played.
The potions already present named potion_blue and potion_red serve as examples to help you create your own, you can then with my other scripts designate them as loot in containers, or Loot spawn point to spawn on the map, or loot when a Npc dies, or at a merchant.

You will be able to choose the values of each potion, for example if it affects life points, armor points, stamina, magic, hunger etc... A potion can have more or less values than another one according to your own choice. You can do this with the potions already present or those you add.

An item called max magic upgrade will give you the possibility to increase the max capacity of the magic bar. This kind of upgrade can be disabled so the max mana will depend only on the level of the player.



๐Ÿง™ APIs associated with the User Class for coders and object creation

1. Lua functions: Client and Server :
player:Mana() = Allows to know the remaining magic points of the user.
player:GetMaxMana() = Returns the user's maximum magic points.

2. Lua functions : Server :
player:addMana(number) = Allows you to give or remove magic. For example. 20 = Adds 20 magic to the magic gauge. -20 Removes 20 for example when using a spell.
player:setMana(number) = Allows you to set the player's magic gauge.
player:addMaxMana(number) = Allows you to increase or decrease the max magic. If you want to create entities that upgrade or downgrade the max magic points, you can do so.
player:setMaxMana(number) = Allows you to set the max magic points of the player. By default the max magic is capped at 200. You can lift this limit in the configuration file.



โœ”๏ธ Compatibility with gamemodes

Compatible with DarkRP, CityRP, SCPRP, StarwarsRP, HogwartsRP, HogwartsRP, CloneRP, MilitaryRP, AnimRP, MangaRP, ect... It is a system on its own so it does not depend on a gamemode.



๐Ÿ“š List of HUDs collection

Gmod Mana System + HUD Creator is part of the HUD collection:
Gmod Leveling System
Gmod Health Modules + HUD Editor
Gmod Stamina System + Customisable HUD
Gmod Hunger Mod + Customizable HUD
Gmod Thirst Mod + HUD Builder
Gmod Mana System + HUD Creator


๐Ÿ”น WIKI & F.A.Q ๐Ÿ‡ฌ๐Ÿ‡ง
Wiki ๐Ÿ‡ฌ๐Ÿ‡ง Wiki ๐Ÿ‡ซ๐Ÿ‡ท

Wiki of Gmod Mana System + HUD Creator

Gmod Mana System + HUD Creator


โ˜ฐ 1. Installation of Gmod Mana System + HUD Creator
Installation: Download and Unzip the folder norda_hud_mana_system.zip Install the addon in the addons file of your Gmod server,
Path: garrysmod/addons/norda_hud_mana_system
โ˜ฐ 2. Where can I find resources and materials? What is the Gmod Mana System + HUD Creator Workshop id?
Vous trouverez les ressources dans le workshop de Garry's Mod sur Steam. - Gmod Workshop ID of Gmod Mana System + HUD Creator: 2731848652
- The AddWorkshop function is automatically added to the script server file and can be deactivated from the configuration file. : resource.AddWorkshop( 2731848652 )
- To add gmod workshop resources to your collection : Gmod Mana System + HUD Creator [Content Only] | Gmod Workshop
โ˜ฐ 3. How to restrict magic to jobs or roles?
From the interface select the job or role you wish to modify.
restrict magic jobs roles
โ˜ฐ 4. How to make a weapon use Mana?
In a crude example:

function SWEP:PrimaryAttack()


ply:addMana(-10)

end

function SWEP:SecondaryAttack()

ply:addMana(-10)

end
โ˜ฐ 5. How do you make it so that you can't use a magic weapon if the user has no mana left?
In a simple example:

function SWEP:PrimaryAttack()


local ply = self:GetOwner()
if ply:Mana()<10 then return end

ply:addMana(-10)

---- YOUR CODE ----

end

function SWEP:SecondaryAttack()

if self.Owner:Mana()<10 then return end

ply:addMana(-10)

---- YOUR CODE ----

end
โ˜ฐ 6. How to customize Potions, Models Audio effect?
In the configuration file:

cfg.Potion_List=cfg.Potion_List or {}


local Potion_List={
potion_blue={
Name="Potion Blue",
Model="models/props_junk/popcan01a.mdl",
Sound="physics/glass/glass_bottle_impact_hard1.wav",
Life=0,
Armor=0,
Stamina=0,
Food=0,
Thirst=0,
Mana=50,
},
potion_red={
Name="Potion Red",
Model="models/mechanics/various/211.mdl",
Sound="physics/glass/glass_bottle_impact_hard1.wav",
Life=0,
Armor=0,
Stamina=0,
Food=0,
Thirst=0,
Mana=100,
},
}
โ˜ฐ 7. How to change the restoration value of a potion?
See question 4, you will see the value "Mana".
Insert the number you need.
โ˜ฐ 8. How to get unlimited mana for testing?
This will come in update 1.1. This paragraph will be updated at the same time.
โ˜ฐ 9. The objects disappear by themselves after 30 seconds, can I change that?
Yes for reasons of optimization of Gmod server I put by default at 30 seconds.

In the configuration file :

cfg.Ent_Lifetime=30 -- 0 = OFF
โ˜ฐ 10. How to set up the starting mana?
In the configuration file :

cfg.Mana_start = 100 -- By default the starting mana is 100. 0 = players will arrive with 0 magic.
โ˜ฐ 11. How to make Max Magic evolve with the level?
In the configuration file :

cfg.MaxMana_define_per_lvl = 0 --0 = The player must find items to upgrade the max magic, 1 = The max magic evolves with the level
โ˜ฐ 12. How to cap the limit of max magic?
In the configuration file :

cfg.MaxMana_max = 200 -- By default the max magic cannot go above 200. Change this value to change the limit of the max magic, a user will not be able to go above it.
โ˜ฐ 13. How to change the max magic gain per level?
In the configuration file :

cfg.MaxMana_gain_per_levelup = 10 -- 10 = 10 points per level. A level 5 player will have 50 magic points max.
โ˜ฐ 14. I don't know where to put the line of code to put mana at the level of the swep
You have several ways to do it.

Either you add: at Zero or below 0 the weapon does not attack anymore.
//CanPrimaryAttack or CanPrimaryAttack


function SWEP:CanPrimaryAttack()

if ( self.Owner:Mana() <= 0 ) then

self:SetNextPrimaryFire( CurTime() + 0.2 )
return false

end

return true

end


Either find the PrimaryAttack or/and SecondaryAttack function of the swep and add to the first line: if ( self.Owner:Mana() <= 0 ) then return end if a player has 0 in mana he will not be able to attack. If your weapon has a mana cost, for example 4 then replace <= 0 with < 4.
function SWEP:PrimaryAttack()


if ( self.Owner:Mana() <= 0 ) then return end

-- The code contained in the function

end
โ˜ฐ 15. How to check if a user has enough mana? For example, blocking a function if he has less than 10 mana points?
All you have to do is add at the beginning of the line.

if player:Mana()<10 then return end


If the user has less than 10 mana points: if player:Mana()<10
Tips

Tip to avoid the leak of Gmod Mana System + HUD Creator installed on your Garry's Mod server: How avoid the Leak of your Gmod scripts
How Install an addon on Gmod? : How install an addon on Gmod
How Publish an addon on the Gmod workshop? : Documentation how create a content pack to publish on the workshop?

Gmod Addon



๐Ÿ“ฅ Download 2.5


๐ŸŽซ Open Ticket
โ›”๏ธ Sorry, you are not connected
Script Information
Creator : Norda Scripts
Sales :36
Published :2 years
Last update :
Version :version 2.5
DRM :Yes
Categories : Gmod addons
Requierements : Garry's Mod Server
Languages : ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ช๐Ÿ‡ธ
Tags :
DarkRP HUD Gameplay Management Allgamemode