Medusa Posted June 14, 2022 Share Posted June 14, 2022 (edited) I wanted to state that I haven't worked on this for a while and I don't think that I will work on this much more unless people ask for it. I will work on bugs if anyone points them out to me but I don't have that much more enthusiasm to work on this anymore. This is a version 2 for the experience system that I put out a while ago and I feel that it is much better that the first one that I put out. The features are: A experience and level up system that is saved by the database with experience points, levels and level ups saved to the database. A new menu thanks to @Drunken Cheetah A new algorithm that allows the server developer to add and remove perks without having to rest the database that is super easy to do! set conditions on perks to make things more interesting such you need to be a certain cop level or a certain level to get the perk. a small debug addition to make things easier to debug on the developer side. a new way to give out experience that prevents bugs. A cleaner looking database to give developers an easier time Installation: Please back up everything before moving forward! In mission file download the files from Files - up to date in Functions.hpp insert Spoiler class experiencesystem { file = "core\custom\experiencesystem"; class dataexperience {}; class experienceinit {}; class firstjoin {}; class giveexperience {}; class saveexperience {}; class experienceReceived {}; class Experience_menu {}; class upgrade_experience {}; class experience_menu_change {}; class queueexp {}; }; in init.sqf at line 123 insert Spoiler call life_fnc_experienceinit; in cfgRemoteExec.hpp on line 19 insert Spoiler #include "core\custom\Medusa_Handler.hpp" in description.ext add this into line 24 Spoiler #include "dialog\Experience_bar.hpp" in MasterHandler.hpp add this Spoiler #include "experienceMenu.hpp" #include "Experience_bar.hpp" in Config_Master.hpp on the bottom add Spoiler #include "Config_Experience.hpp" and in the cofig file in the main mission directory drop from the downloads Config_Experience.hpp optional if you want to have this on your vanilla y menu place on line 279 of player_inv.hpp Spoiler class Experience_button: Life_RscButtonMenu { idc = 2035; text = "Experience Menu"; onButtonClick = "createDialog ""Experience_Menu"";"; x = 0.42 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH)); y = 0.805; w = (6.25 / 40); h = (1 / 25); }; Drop in Missionfolder from downloads into your mission folder Server files in config.cpp insert Spoiler class Experience { file = "\life_server\Functions\Experience"; class fetchexperience {}; class firstexperience {}; class saveexperienceserver {}; }; and drop in server files from downloads The last thing you need to do is put in the data base with this code Spoiler CREATE TABLE IF NOT EXISTS `experience` ( `uid` INT NOT NULL AUTO_INCREMENT, `pid` VARCHAR(17) NOT NULL, `name` VARCHAR(30) NOT NULL, `exp_experience` INT NOT NULL DEFAULT 0, `exp_level` INT NOT NULL DEFAULT 0, `exp_perks` TEXT NOT NULL, `exp_points` INT NOT NULL DEFAULT 0, PRIMARY KEY (`pid`), UNIQUE KEY `unique_uid` (`uid`), INDEX `index_name` (`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; That should be it. Please let me know if you find any bugs! Helpful commands [10, "test"] spawn life_fnc_queueexp; give exp [] spawn {sleep 2; createDialog "Experience_Menu";} call menu Like I said please let me know if you have any bugs I will try to fix them! Hope yall enjoy! download the files that are up to date on git hub Files - up to date Edited April 23 by Medusa github link added 3 Quote Link to comment Share on other sites More sharing options...
Wayne Posted July 11, 2022 Share Posted July 11, 2022 Where do we add a new perk? Quote Link to comment Share on other sites More sharing options...
GraveYard Posted July 12, 2022 Share Posted July 12, 2022 @Medusa It does appear you forgot the config file. As it's being called inside fn_experienceinit.sqf Quote Link to comment Share on other sites More sharing options...
Medusa Posted July 15, 2022 Author Share Posted July 15, 2022 @Wayne@GraveYard you are totally right ill fix it right away Quote Link to comment Share on other sites More sharing options...
CrazyCowboy8565 Posted December 17, 2022 Share Posted December 17, 2022 (edited) I am getting the following error https://imgur.com/a/6HbFPP7 There is no file called this in the files I have been given. @Medusa Edited December 17, 2022 by CrazyCowboy8565 Quote Link to comment Share on other sites More sharing options...
Medusa Posted December 20, 2022 Author Share Posted December 20, 2022 On 12/17/2022 at 2:11 PM, CrazyCowboy8565 said: I am getting the following error https://imgur.com/a/6HbFPP7 There is no file called this in the files I have been given. @Medusa I would make sure that you installed everything correctly specifically on the mission side with the dialog. If everything is installed correctly I will take a try to do a fresh install on my side. The only thing that could possibly use that file is button for the y menu, maybe try removing that and trying again. Quote Link to comment Share on other sites More sharing options...
RavenRAMIREZ Posted February 18 Share Posted February 18 Good morning; I allow myself to contact you because your script: https://www.altisliferpg.com/topic/13832-experience-system-v2/ does contain your zip, however the file CustomControlClasses.hpp is missing in the file: experience_v2.zip\exp\Missionfolder\dialog can you put it? Thank you. Quote Link to comment Share on other sites More sharing options...
Medusa Posted February 21 Author Share Posted February 21 On 2/18/2023 at 5:31 AM, RavenRAMIREZ said: Good morning; I allow myself to contact you because your script: https://www.altisliferpg.com/topic/13832-experience-system-v2/ does contain your zip, however the file CustomControlClasses.hpp is missing in the file: experience_v2.zip\exp\Missionfolder\dialog can you put it? Thank you. Im sorry for some reason I am not able to update the files to fix the possible error, I haven't been able to test it but I believe the error is this. in the exp download there are 2 files, Experience_bar.hpp and experienceMenu.hpp these need to be moved to the dialog folder in the root of the mission folder. Sorry about this and ill put this in the main post as well Quote Link to comment Share on other sites More sharing options...
NIGO Posted March 3 Share Posted March 3 I'm not sure if I'm doing anything wrong, but the level and exp or all of the data is not saved to the database at all. Quote Link to comment Share on other sites More sharing options...
Medusa Posted March 4 Author Share Posted March 4 17 hours ago, NIGO said: I'm not sure if I'm doing anything wrong, but the level and exp or all of the data is not saved to the database at all. few things that you will wanna check do you have the Medusa_Handler.hpp being called in your cfgRemoteExec.hpp, if so then make sure you have your server files in order IE make sure that in your config.cpp functions are being declared and your DB is loaded up correctly. if your still having issues feel free to add me on steam and I can talk to you directly. https://steamcommunity.com/id/meanpark Quote Link to comment Share on other sites More sharing options...
Puma Power.PT Posted April 21 Share Posted April 21 On 04/03/2023 at 04:31, Medusa said: algumas coisas que você vai querer verificar se você tem o Medusa_Handler.hpp sendo chamado em seu cfgRemoteExec.hpp, se sim, certifique-se de ter seus arquivos de servidor em ordem, ou seja, certifique-se de que em suas funções config.cpp estão sendo declaradas e seu banco de dados está carregado corretamente. se ainda tiver problemas, sinta-se à vontade para me adicionar no Steam e posso falar diretamente com você. https://steamcommunity.com/id/meanpark hi i have same problme missing dialog\CustomControlClasses.hpp not found i dont understand how to fix that Quote Link to comment Share on other sites More sharing options...
Drunken Cheetah Posted April 21 Share Posted April 21 16 hours ago, Puma Power.PT said: hi i have same problme missing dialog\CustomControlClasses.hpp not found i dont understand how to fix that You can create a new file called CustomControlClasses.hpp and enter this and save it. #ifndef HG_CustomControlClassesh #define HG_CustomControlClassesh 1 //Create a header guard to prevent duplicate include. #endif Quote Link to comment Share on other sites More sharing options...
Puma Power.PT Posted April 21 Share Posted April 21 2 minutes ago, Drunken Cheetah said: You can create a new file called CustomControlClasses.hpp and enter this and save it. #ifndef HG_CustomControlClassesh #define HG_CustomControlClassesh 1 //Create a header guard to prevent duplicate include. #endif already make that ,and i rename the folder in life server is wrong and the 3 files inside too rename the experince too experience, but continou not working broken Y menu and actions win button Quote Link to comment Share on other sites More sharing options...
Puma Power.PT Posted April 21 Share Posted April 21 (edited) and cant find nothing in server and client side rpt maybe its wrong in playerinv? Edited April 21 by Puma Power.PT Quote Link to comment Share on other sites More sharing options...
Puma Power.PT Posted April 21 Share Posted April 21 more one error is db table `exp_experince` rename to exp_experience Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.