Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Plugins & Mods

Quests::Plugins & Mods Completed plugins for public use as well as modifications.

Reply
 
Thread Tools Display Modes
  #46  
Old 05-14-2018, 09:36 AM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

@deladriendil

This is what I use:

Server Folder/plugins/MYSQL.pl
Code:
#::: Akkadius
#::: Description: These plugins are MySQL loaders in use with Perl DBI
#::: For plug and play, LoadMysql will load your database credentials from eqemu_config.json

sub LoadMysql {	
	use DBI;
	use DBD::mysql;
	use JSON;
	
    	my $json = new JSON();

	#::: Load Config
	my $content;
	open(my $fh, '<', "eqemu_config.json") or die "cannot open file $filename"; {
		local $/;
		$content = <$fh>;
	}
	close($fh);

	#::: Decode
	$config = $json->decode($content);

	#::: Set MySQL Connection vars
	$db = $config->{"server"}{"database"}{"db"};
	$host = $config->{"server"}{"database"}{"host"};
	$user = $config->{"server"}{"database"}{"username"};
	$pass = $config->{"server"}{"database"}{"password"};

	#::: Map DSN
	$dsn = "dbi:mysql:$db:$host:3306";
	
	#::: Connect and return
	$connect = DBI->connect($dsn, $user, $pass);
	
	return $connect;
}
Quote:
Originally Posted by Akkadius View Post
Thanks for taking this on bud - I'm sure many people will appreciate it

If you want to pretty it up and make sure it all works and is tested that would be great.

Swap out special attacks for the new hotness and make sure that works and things should be good

I will make sure that all of this gets into our new docs we've been working on for 2018
Not a problem. It's something I've wanted to do for a little while. I would assume I'm the best person other than yourself to get it done since I've used it for years now and I am pretty familiar with the inner workings.

Current plans:
  • Update code to take advantage of the new special_abilities system
  • Migrate code to the plugins folder to free up space in zone_controller.pl
  • Clean up my existing pet scaling code that works with this system
  • Simple boolean option to use pet scaling or not
  • Add a way to not scale entire zones
  • Add a "don't scale me" option for specific NPCs while still scaling the rest of the zone
Reply With Quote
  #47  
Old 05-14-2018, 12:06 PM
deladriendil
Sarnak
 
Join Date: Jan 2017
Posts: 30
Default

awesome. sorry, i misunderstood where that chunk of code went. got it now.
So we are just waiting on the change for the new special abilities then this is ready to test? or am I missing something.
Reply With Quote
  #48  
Old 05-14-2018, 01:41 PM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

No what you have now should work I briefly tested it. When I get everything I want done it'll be a simple drag and drop into the appropriate folders and you won't have to do anything further assuming you have no other customizations in your zone_controller.pl

Since I'm trying to migrate to the plugins folder any added functionality past my list will be drag an drop as well.
Reply With Quote
  #49  
Old 02-07-2019, 11:14 PM
Techungry
Fire Beetle
 
Join Date: Jan 2019
Location: Georgia
Posts: 25
Default

Hi. I first wanted to thank you for coming up with such an awesome approach to scaling. I am using it to setup a solo tuned server for my family and friends and have been playing with it for a bit. One thing I am unsure of is whether this approach will scale spells/procs of NPC's and how that works? What effect does the spell_scale column have on the NPC's?
Reply With Quote
  #50  
Old 02-08-2019, 06:51 AM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

Quote:
Originally Posted by Techungry View Post
Hi. I first wanted to thank you for coming up with such an awesome approach to scaling. I am using it to setup a solo tuned server for my family and friends and have been playing with it for a bit. One thing I am unsure of is whether this approach will scale spells/procs of NPC's and how that works? What effect does the spell_scale column have on the NPC's?
Yes it will.. the sp dmg and healing work the same way.

Spell Damage Scaling (100 = 100% or normal, <100 is weaker, >100 is stronger)


I still work on this from time to time.. I need to take some time out to just completely rewrite it in a cleaner way, it is so dirty atm.
Reply With Quote
  #51  
Old 02-08-2019, 11:22 AM
Techungry
Fire Beetle
 
Join Date: Jan 2019
Location: Georgia
Posts: 25
Default

Thanks Splose. Does it also affect procs? I tested with #Korucust in chardokb. He has a 1600 dmg life tap proc. It seemed he was classified as a type '1' NPC based on that was the type he inherited his other scaling from. I set spell_scale to 30 and he still had a full dmg proc, so I am wondering if procs are a special case?
Reply With Quote
  #52  
Old 02-08-2019, 05:20 PM
Techungry
Fire Beetle
 
Join Date: Jan 2019
Location: Georgia
Posts: 25
Default

It seems that editing the values on the NPC itself in the npc_types table works for scaling the proc, but setting the spell_scale and heal_scale to 0 does not result in the npc_scale_global_base value applying. It could be working fine for the standard casting spells but the NPC I am testing with casts nothing not lifetap and dots. I will find an NPC that casts something besides a DOT and see if that is working.
Reply With Quote
  #53  
Old 02-08-2019, 06:34 PM
superpally1
Sarnak
 
Join Date: Jul 2018
Location: Tennessee
Posts: 33
Default

there is also this now. https://github.com/EQEmu/Server/wiki/NPC-Scaling
Reply With Quote
  #54  
Old 02-08-2019, 06:58 PM
Techungry
Fire Beetle
 
Join Date: Jan 2019
Location: Georgia
Posts: 25
Default

Yes I am very familiar with it, thanks. That was actually very helpful once I found it, but the behavior seems to be different from described. I suspect its specific to procs or the lifetap for this NPC or something. I'll try testing a few more NPC's, maybe I am just unlucky.
Reply With Quote
  #55  
Old 02-08-2019, 09:54 PM
Techungry
Fire Beetle
 
Join Date: Jan 2019
Location: Georgia
Posts: 25
Default

Ok, spell_scale from the npc_scale_global_base is it is definitely not being applied when the NPC's spellscale and healscale are 0. For now i will work around it by updating the npc_types table directly which appears to work but you might want to check the code around that area as there is a bug somewhere.
Reply With Quote
  #56  
Old 02-10-2019, 05:17 AM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

Quote:
Originally Posted by Techungry View Post
Ok, spell_scale from the npc_scale_global_base is it is definitely not being applied when the NPC's spellscale and healscale are 0. For now i will work around it by updating the npc_types table directly which appears to work but you might want to check the code around that area as there is a bug somewhere.
It is working on older compiles.. I haven't tried on a recent compile but I would assume things have been updated/changed and that's why its broken.

I recommend going to link by superpally (https://github.com/EQEmu/Server/wiki/NPC-Scaling).

Huge improvement and it is being done source side rather than through Perl.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:32 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3