Settings.lua changes won't take affect

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Settings.lua changes won't take affect

Post by kjLotus » Thu Nov 06, 2014 2:48 pm

Cyprus wrote:I figured it was GM because of the @ symbol...I will try that command tonight when I get home. It's just odd because I have restarted the server each time I have made changes & have had no issues with things not taking effect until trying to change the BRD song settings. Since I know all of the people on my server IRL, it hasn't been an issue to just restart anytime I change something. So unless there is something wrong with the settings.lua for BRD songs, I'm hoping the command will fix things...
not sure if the bard settings are even set up with bard songs anymore, since i rewrote the bard songs framework entirely a year ago

Cyprus
Posts: 53
Joined: Sat Sep 06, 2014 10:54 pm

Re: Settings.lua changes won't take affect

Post by Cyprus » Thu Nov 06, 2014 3:21 pm

That might be why I can't get them to take...was hoping to be able to increase the allowed bard songs & song durations to help compensate for the extremely low population on my server. I am using custom foods to help with this as well but wanted a little more flexibility. Is there any way to fix the lua file so that these work again(assuming that they aren't currently functioning)?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Settings.lua changes won't take affect

Post by kjLotus » Thu Nov 06, 2014 4:03 pm

Cyprus wrote:That might be why I can't get them to take...was hoping to be able to increase the allowed bard songs & song durations to help compensate for the extremely low population on my server. I am using custom foods to help with this as well but wanted a little more flexibility. Is there any way to fix the lua file so that these work again(assuming that they aren't currently functioning)?
you can change the duration in each songs script (or put the setting back in them all), but i'm not sure if max songs is script side anymore (or ever was)

Cyprus
Posts: 53
Joined: Sat Sep 06, 2014 10:54 pm

Re: Settings.lua changes won't take affect

Post by Cyprus » Thu Nov 06, 2014 4:18 pm

I will have to tinker around when I have some free time. Still learning a lot of this stuff as I go so scripting isn't really my strong suit...or even my suit at all lol. If I look at & compare settings for other scripts that do work, I might be able to figure out the duration setting thing so that I wouldn't have to manually change the duration of each song if/when I chose to...but the song limit is definitely something over my head right now.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Settings.lua changes won't take affect

Post by kjLotus » Thu Nov 06, 2014 4:46 pm

every bard song script has a local var called duration, you just modify that before it gets used in addBardSong

Cyprus
Posts: 53
Joined: Sat Sep 06, 2014 10:54 pm

Re: Settings.lua changes won't take affect

Post by Cyprus » Thu Nov 06, 2014 6:25 pm

Ya...I can see where it is in the script. How would I go about telling those scripts to pull that duration from the settings.lua? I will happily go in & mod all of my BRD songs to do that...it's just a matter of knowing how that I lack.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Settings.lua changes won't take affect

Post by kjLotus » Thu Nov 06, 2014 7:16 pm

add require("scripts/globals/settings"); at the top of every script and then replace "local duration = 120;" with "local duration = 120 * ENHANCING_SONG_DURATION;"

Cyprus
Posts: 53
Joined: Sat Sep 06, 2014 10:54 pm

Re: Settings.lua changes won't take affect

Post by Cyprus » Fri Nov 07, 2014 7:09 am

I will try that out this weekend & see what I can come up with...thanks!

Is there a place that I could find the song limit so that I can change it?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Settings.lua changes won't take affect

Post by kjLotus » Fri Nov 07, 2014 3:26 pm

in lua_baseentity.cpp there's a function called addBardSong (which is the one the script calls), it has a variable called maxSongs that you can modify to whatever you want

alternatively, you can just add the modifier MOD_MAXIMUM_SONGS_BONUS to players and that'll work too

Cyprus
Posts: 53
Joined: Sat Sep 06, 2014 10:54 pm

Re: Settings.lua changes won't take affect

Post by Cyprus » Fri Nov 07, 2014 4:32 pm

Awesome, I will dig into those on Sunday & make some changes! Thanks!

Post Reply