Author Topic: Can someone point me in the right direction with group in-heritage?  (Read 2250 times)

0 Members and 1 Guest are viewing this topic.

Offline Monikas_Comin

  • Newbie
  • *
  • Posts: 6
  • Karma: 1
So. I'm having a bit of trouble with ULX. I run a server and want a working little branch of mods in this order when compiled.

user > FreeVIP > VIP > Nebula > Galactic > t-mod > jr moderator > moderator > sr moderator > jr admin > admin> sr admin > superadmin

However the inherit as I learned plays a good part in all of this. And I feel as if im going to up everything if I do it like this:

FreeVIP and up inherit user, t-mod inherits user but with other perms, jr mod inherits from t-mod but with more perms, etc etc.

Can someone point me in the right direction with this please as what I should be doing and what I should not be doing?


My ULib/ULX versions:
ULib v2.63w
ULX v3.73w


Game mode(s) I am having this problem on: DarkRP

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Can someone point me in the right direction with group in-heritage?
« Reply #1 on: December 26, 2018, 09:24:31 PM »
If you want that order for the first ranks (FreeVIP > VIP > Nebula > Galactic), they will all need to inherit from the one below them and have a similar can_target (":" means inherits, "*" means can_target): FreeVIP : user * !%VIP, VIP : FreeVIP * !%Nebula, etc.

I'm typing this on my phone so it may not make a lot of sense but got the most part you've got the right ideas except for the first few ranks all inheriting from user, unless you want those first four ranks (excluding user) to be able to target each other, in which case you're correct.

I feel like I was confusing so let me know if you have any questions.

iViscosity - Mod Developer

I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Monikas_Comin

  • Newbie
  • *
  • Posts: 6
  • Karma: 1
Re: Can someone point me in the right direction with group in-heritage?
« Reply #2 on: December 26, 2018, 09:31:39 PM »
If you want that order for the first ranks (FreeVIP > VIP > Nebula > Galactic), they will all need to inherit from the one below them and have a similar can_target (":" means inherits, "*" means can_target): FreeVIP : user * !%VIP, VIP : FreeVIP * !%Nebula, etc.

I'm typing this on my phone so it may not make a lot of sense but got the most part you've got the right ideas except for the first few ranks all inheriting from user, unless you want those first four ranks (excluding user) to be able to target each other, in which case you're correct.

I feel like I was confusing so let me know if you have any questions.

iViscosity - Mod Developer



Yea. That was a bit confusing. I'll point out what I think was confusing.

Quote
have a similar can_target (":" means inherits, "*" means can_target): FreeVIP : user * !%VIP, VIP : FreeVIP * !%Nebula, etc.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Can someone point me in the right direction with group in-heritage?
« Reply #3 on: December 26, 2018, 10:14:53 PM »
I made a quick diagram of what I mean



It's not perfect but it represents what I mean. At the top is your lowest inheritance (user) and at the bottom is your highest (superadmin). In the example you gave:

FreeVIP and up inherit user, t-mod inherits user but with other perms, jr mod inherits from t-mod but with more perms, etc etc.

this means that FreeVIP, VIP, Nebula, Galactic, and t-mod all have the same level of inheritance, meaning that, by default, they can target each other unless specifically said not to.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Monikas_Comin

  • Newbie
  • *
  • Posts: 6
  • Karma: 1
Re: Can someone point me in the right direction with group in-heritage?
« Reply #4 on: December 26, 2018, 10:35:21 PM »
I made a quick diagram of what I mean



It's not perfect but it represents what I mean. At the top is your lowest inheritance (user) and at the bottom is your highest (superadmin). In the example you gave:

this means that FreeVIP, VIP, Nebula, Galactic, and t-mod all have the same level of inheritance, meaning that, by default, they can target each other unless specifically said not to.

Ah, then yea that's what I'm looking for currently. Although was I incorrect on anything such as Jr. Mod inheriting from t-mod?

Also, I was wondering if you could tell me if this is correct for set targets.

user cantarget !%FreeVIP
FreeVIP cantarget !%VIP
VIP cantarget !%VIP+

Etc. Or am I doing it completely wrong?

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Can someone point me in the right direction with group in-heritage?
« Reply #5 on: December 27, 2018, 12:52:33 AM »
That looks right. I do see a problem with that inheritance tree. T-mod implies a level of immunity, however FreeVIP, VIP, Nebula, and Galactic can all target them. ULX only really supports inheritance in a linear tree (each group is inherited by zero or only one other group), whereas you have 5 groups inheriting from user. If that is what you want, that's okay and it will work properly, however you may run into issues if you decide you want it the other way, because it's not as easy as just changing the "can_target" (however changing inheritances isn't too hard)

But your can_targets are correct. Essentially you want any given rank's can_target to be "!%" and then whatever rank is immediately above it. Having FreeVIP's can_target as "!%VIP" wouldn't work as expected due to them having the same level on the inheritance tree. If FreeVIP's can_target is !%VIP, users in the FreeVIP group wouldn't be able to target anyone else in their group (or, IIRC, themselves). This is where a linear tree comes into place. If VIP inherited from FreeVIP (which inherits from user), having FreeVIP's can_target as !%VIP would work as expected.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Monikas_Comin

  • Newbie
  • *
  • Posts: 6
  • Karma: 1
Re: Can someone point me in the right direction with group in-heritage?
« Reply #6 on: December 27, 2018, 07:31:51 AM »
That looks right. I do see a problem with that inheritance tree. T-mod implies a level of immunity, however FreeVIP, VIP, Nebula, and Galactic can all target them. ULX only really supports inheritance in a linear tree (each group is inherited by zero or only one other group), whereas you have 5 groups inheriting from user. If that is what you want, that's okay and it will work properly, however you may run into issues if you decide you want it the other way, because it's not as easy as just changing the "can_target" (however changing inheritances isn't too hard)

But your can_targets are correct. Essentially you want any given rank's can_target to be "!%" and then whatever rank is immediately above it. Having FreeVIP's can_target as "!%VIP" wouldn't work as expected due to them having the same level on the inheritance tree. If FreeVIP's can_target is !%VIP, users in the FreeVIP group wouldn't be able to target anyone else in their group (or, IIRC, themselves). This is where a linear tree comes into place. If VIP inherited from FreeVIP (which inherits from user), having FreeVIP's can_target as !%VIP would work as expected.

Sorry about the pause, fell asleep. Anyway, so pretty much when making the groups you inherit from the group you want the order to be in and then the can_targerts would most likely work as expected?

Example:

FreeVIP Inherits from user
VIP inherits from FreeVIP
VIP+ inherits from VIP
Nebula inherits from VIP+
And on and on