Jump to content

Experience System 5.0


Recommended Posts

This was tested on most recent altis life framework. This was my first major projects on arma so sorry if there are bugs but after a lot of testing I believe that it is working!

This requires modifications to the life server file please make a copy of it before you make any changes to it.  I have tried to make the installation to this as simple as possible to prevent mistakes. please tell me if you are having any issues!

Description: This is a full blown experience system for altis life with experience, perks, levels etc... this connects to the database a to save all variables. 

1. download the files below!

2. drag custom into core in the main mission file

3. in Functions.hpp after  class Vehicle or line 382 paste this in 

Spoiler
    class experincesystem { 
        file = "core\custom\experincesystem"
        class dataexperince {}; 
        class experinceinit {};
        class firstjoin {};
        class giveexperince {};
        class saveexperince {};
        class experinceReceived {};
        class Experince_menu {};
        class upgrade_experince {};
        class experince_menu_change {};
    }; 
};

4. now in description.ext in the main mission file after #include "dialog\progress.hpp" paste in 

Spoiler

#include "dialog\Experince_bar.hpp"

5. in CfgRemoteExec.hpp after   jip = 0;  paste in 

Spoiler

#include "core\custom\Medusa_Handler.hpp"

6. go to your dialog folder in your main mission file and place the files from the  experinceMenu folder that you just downloaded into the dialog folder

7. go into MasterHandler.hpp and paste this at the bottom 

Spoiler

#include "experinceMenu.hpp"
#include "Experince_bar.hpp"

8. go into your init file in your main mission and look for [] call life_fnc_hudSetup; and paste under it 

Spoiler

call life_fnc_experinceinit;

9. you are now done inside the main mission folder now go into your life server file and go into functions and paste experience from what you just downloaded 

10. now go into your config.cpp and go to line 114 or after class PlayTime add this 

Spoiler

        class Experince { 
            file = "\life_server\Functions\Experince"; 
            class fetchexperince {}; 
            class firstexperince {}; 
            class saveexperinceserver {};   
        };

11. now for the database your gonna wanna add this code into your tables on your database 

Spoiler

CREATE TABLE IF NOT EXISTS `experience` (
    `uid`          INT NOT NULL AUTO_INCREMENT,
    `pid`          VARCHAR(17) NOT NULL,
    `name`             VARCHAR(32) NOT NULL,
    `exp_experince`  INT NOT NULL DEFAULT 0,
    `exp_level`      INT NOT NULL DEFAULT 0,
    `exp_points`      INT NOT NULL DEFAULT 0,
    `exp_perks`      VARCHAR(32) NOT NULL DEFAULT '"[0,0,0,0,0]"',
    
    PRIMARY KEY (`pid`),
    UNIQUE KEY `unique_uid` (`uid`),
    INDEX `index_name` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;    

12. you are finished! 

Please let me know about any bugs that you may find and I will try to workout a fix for them. 

any recommendation please put them downlow and if you have any question please contact me! here is my steam if you would like to https://steamcommunity.com/id/meanpark/

Helpful comments / commands 

bring up experience menu 

[] spawn {sleep 2; createDialog "Experince_Menu";}

add experience  

[10, "test"] spawn life_fnc_giveexperince

1 part is how much experience second part is a message that you want to go with it

check the level for what ever it may be 

experince_check = false; if (life_exp_perks select 1 == 0) then { experince_check = false; hint "its not true";} else { experince_check = true; hint "its true";}

To add more perk choices 

go into fn_experinceinit and in life_exp_perks and another ,0 

then in life_exp_perks_choice at the end add ["Name",1,2,3,4] you can add as many levels as you want just add an extra number at the end to max it out. 

then go into fn_experince_menu_change and add another case. the case name needs to be the exact same as the name you set for it. just write the description out and make sure to format it. 

here is a link on how to do that https://community.bistudio.com/wiki/formatText 

 

 

Experince.zip custom.zip experinceMenu.zip

Edited by Medusa
adding info
  • Thanks 1
Link to post
Share on other sites
  • Medusa changed the title to Experience System 5.0
  • 5 weeks later...
  • 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...

Important Information

By using this site, you agree to our Terms of Use.