Code Monkey home page Code Monkey logo

Comments (7)

notpeelz avatar notpeelz commented on September 27, 2024 1

No problem! Also feel free to just remove the WriteToChat call in PrintNotification. Might be simpler for your use case :)

from kf2-friendlyhud.

notpeelz avatar notpeelz commented on September 27, 2024 1

Implemented in 66f500e

from kf2-friendlyhud.

notpeelz avatar notpeelz commented on September 27, 2024

That's a good idea. I'll implement it next time I have to push out an update (if TWI breaks my code).

Not gonna lie, I haven't played KF2 in a long time and I'm not looking forward to reinstalling the game :P

I'll leave this issue open for now as a reminder to myself.

from kf2-friendlyhud.

notpeelz avatar notpeelz commented on September 27, 2024

I pushed cd6e373 on the dev branch. If you want, you can compile it yourself and use that version on your server.

I realize that this is not exactly what you had in mind. I would implement your server-side setting idea but since I don't have the game installed, I don't have any way of testing my changes (or if my code even compiles).

Also keep in mind that INI version changes can screw with your players' FHUD configs. The client config is shared across all servers and if different servers start using customized FHUD versions with slightly different INI entries... well, things could break.
If you want to use a custom version, I would suggest renaming the Config name to avoid potential conflicts.

...or you could just delete the PrintNotification() call and recompile it :D

from kf2-friendlyhud.

GenZmeY avatar GenZmeY commented on September 27, 2024

Also keep in mind that INI version changes can screw with your players' FHUD configs. The client config is shared across all servers and if different servers start using customized FHUD versions with slightly different INI entries... well, things could break.
If you want to use a custom version, I would suggest renaming the Config name to avoid potential conflicts.

...or you could just delete the PrintNotification() call and recompile it :D

To be honest, this is how it works for me now :) But I didn't change the name of the config, but changed the name of the package to avoid conflicts.

I pushed cd6e373 on the dev branch. If you want, you can compile it yourself and use that version on your server.

I realize that this is not exactly what you had in mind. I would implement your server-side setting idea but since I don't have the game installed, I don't have any way of testing my changes (or if my code even compiles).

Now when I think about it, it seems to me that your idea to leave the setting on the client side is more logical (all settings are there, under the control of the user). Besides, one single setting in the server config will look very strange xD

But what do you think about the idea of only showing the notification the first time?
As far as I understand, we cannot find out in any way whether the config is being created for the first time or changed, but you can do something like this:

simulated function PrintNotification()
{
	if (!HUDConfig.NotificationAlreadyDisplayed)
	{
		WriteToChat("[FriendlyHUD] type !FHUDHelp to open the command list.", "B986E9");
		HUDConfig.NotificationAlreadyDisplayed = True;
	}

	...
}

Yes, it's a crutch, so I'll understand you perfectly if you don't want to do that.

Btw, i think it's better to replace this:

if (!HUDConfig.ShowHelpNotification) return;

WriteToChat("[FriendlyHUD] type !FHUDHelp to open the command list.", "B986E9");

to this:

if (HUDConfig.ShowHelpNotification)
	WriteToChat("[FriendlyHUD] type !FHUDHelp to open the command list.", "B986E9");

so as not to lose the update messages.

Anyway, being able to customize this on the client is great. I didn't think you'd do it so quickly, thanks.

P.S.: I have an installed game, I know how to compile mutators (FHUD too) and upload them to the workshop. I can help with that (and testing of course). I hope I'm not too annoying. If you want to do everything yourself when TWI breaks your code - no problem, I understand

from kf2-friendlyhud.

notpeelz avatar notpeelz commented on September 27, 2024

To be honest, this is how it works for me now :) But I didn't change the name of the config, but changed the name of the package to avoid conflicts.

Changing the package name is enough in your case. Unless you add/modify INI entries, you don't have to change the name of the config.

Now when I think about it, it seems to me that your idea to leave the setting on the client side is more logical (all settings are there, under the control of the user). Besides, one single setting in the server config will look very strange xD

I just opted for that because it was the simpler option :P
I think it's a good idea to add a server-side setting but it would require setting up server-to-client config replication (needs testing to make sure its robust).

But what do you think about the idea of only showing the notification the first time?

If it only showed for the first time, I feel like a lot of players would forget that the command even exists and manually look up the guide. I'd rather have the players manually disable the reminder.

Btw, i think it's better to replace this:
...
so as not to lose the update messages.

You're right. Oops :P
Updated commit (force push): 66f500e

Anyway, being able to customize this on the client is great. I didn't think you'd do it so quickly, thanks.

P.S.: I have an installed game, I know how to compile mutators (FHUD too) and upload them to the workshop. I can help with that (and testing of course).

I wouldn't mind but IIRC my build process was quite involved due to having to merge FriendlyHUDAssets.upk into FriendlyHUD.u. The mergepackages commandlet doesn't work out of the box and requires a bit of fiddling around. Also I can't remember if I used a 3rd-party workshop upload tool or not 🤔

I hope I'm not too annoying. If you want to do everything yourself when TWI breaks your code - no problem, I understand

No worries. There's no harm done in asking :)
But yeah, I think I would rather do it myself when the time comes (it's easier that way).

from kf2-friendlyhud.

GenZmeY avatar GenZmeY commented on September 27, 2024

Fair enough! Then I will use the version from the dev branch. And I will switch to the workshop version when you release an update there. Thanks again for your time.

from kf2-friendlyhud.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.