ULX

Author Topic: UTeam -- now integrated with ULX SVN!  (Read 19928 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
UTeam -- now integrated with ULX SVN!
« on: June 26, 2010, 10:49:26 AM »
Due to popular demand, we decided to integrate UTeam into ULX. Currently you'll need to configure it by hand (just like the original UTeam), but I'm sure that will change when Stickly has enough time to add it to XGUI.

Configuration is now done through your standard ULib groups.txt file, like so:
Code: [Select]
"superadmin"
{
"allow"
{
<list_of_allows>
}
"inherit_from" "admin"
"team"
{
"name" "TheChosenOnes"
"color_red" 255
"color_blue" 0
"color_green" 0
"model" "alyx"
"health" 125
}
}

Only name and color are required, all other fields are optional. For model you can specify the short model names listed here, or you can specify the full path of a model. You can specify any name that has a corresponding "set" function for it on the player. For example, I specify health because there's a SetHealth function on the player, the health will be set to 125 every time the player spawns.

A quick list of other fields you can use (case is important):
duckSpeed
stepSize
unDuckSpeed
armor
crouchedWalkSpeed
deaths
frags
jumpPower
maxSpeed
runSpeed
walkSpeed

Let me know if something isn't working quite right or if there's some feature you'd like here.
Experiencing God's grace one day at a time.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: UTeam -- now integrated with ULX SVN!
« Reply #1 on: June 26, 2010, 11:14:57 AM »
Love it! Nice work.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: UTeam -- now integrated with ULX SVN!
« Reply #2 on: June 26, 2010, 11:45:26 AM »
Experiencing God's grace one day at a time.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: UTeam -- now integrated with ULX SVN!
« Reply #3 on: June 26, 2010, 12:06:16 PM »
Haha, couldn't pass up the opportunity for the sig :P
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam -- now integrated with ULX SVN!
« Reply #4 on: June 26, 2010, 05:14:18 PM »
Good job!
SPBogie is quiet in these parts lately. Glad that his code ideas still fit in so well with Ulysses core.
(We miss you spbogie!)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 77
  • Karma: 17
Re: UTeam -- now integrated with ULX SVN!
« Reply #5 on: June 26, 2010, 08:49:43 PM »
Awesome, I love it! But I looked at the code, and I think you left out the ability to set the team color alpha (transparency). The original UTeam allowed this.

This line:
Code: [Select]
local team_color = Color( tonumber( group_data.team.color_red ) or 255, tonumber( group_data.team.color_green ) or 255, tonumber( group_data.team.color_blue ) or 255 )

Should be like this:
Code: [Select]
local team_color = Color( tonumber( group_data.team.color_red ) or 255, tonumber( group_data.team.color_green ) or 255, tonumber( group_data.team.color_blue ) or 255, tonumber( group_data.team.color_alpha ) or 255 )
« Last Edit: June 26, 2010, 09:01:45 PM by RynO-SauruS »


YouTube music player by RynO-SauruS

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: UTeam -- now integrated with ULX SVN!
« Reply #6 on: June 26, 2010, 09:10:58 PM »
I did that on purpose because I haven't seen any place alpha is used. Have you?
Experiencing God's grace one day at a time.

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 77
  • Karma: 17
Re: UTeam -- now integrated with ULX SVN!
« Reply #7 on: June 26, 2010, 09:49:43 PM »
I guess I can't immediately see anywhere it's actually used, I didn't think about it. Whether to add alpha or not is up to you.


Edit: I tried to add this to the team section in the superadmin group in groups.txt, to set my armor:

Code: [Select]
"armor" 100

And all my team stuff is working fine except it's not setting my armor, could you try testing that yourself?

Here's my entire groups.txt (I'm a superadmin):
-snip-
« Last Edit: June 26, 2010, 10:32:22 PM by RynO-SauruS »


YouTube music player by RynO-SauruS

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: UTeam -- now integrated with ULX SVN!
« Reply #8 on: June 26, 2010, 10:12:36 PM »
Oops, was accidentally making the model option required. Sorry 'bout that, should be fixed now. Also, you don't have to set health to 100 in each, since that's the default.
Experiencing God's grace one day at a time.

Offline RynO-SauruS

  • Jr. Member
  • **
  • Posts: 77
  • Karma: 17
Re: UTeam -- now integrated with ULX SVN!
« Reply #9 on: June 26, 2010, 10:17:00 PM »
Thanks. I'll try it again tomorrow.


YouTube music player by RynO-SauruS

Offline Buggzie

  • Newbie
  • *
  • Posts: 48
  • Karma: 2
Re: UTeam -- now integrated with ULX SVN!
« Reply #10 on: June 27, 2010, 07:34:37 AM »


Fix that please... Its meant to be green like the original uteam but now its red...

Code: [Select]
"team"
{
"name" "Founders"
"color_red" "0"
"color_green" "255"
"color_blue" "0"
"health" "100"
"armor" "0"
}

EDIT: Its meant to be the same colour as uteam group.
« Last Edit: June 27, 2010, 07:38:18 AM by Buggzie »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: UTeam -- now integrated with ULX SVN!
« Reply #11 on: June 27, 2010, 08:04:06 AM »
You have it set to green and it's green. I don't see what the problem is?
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam -- now integrated with ULX SVN!
« Reply #12 on: June 27, 2010, 08:20:30 AM »
Megiddo, I think he means the title...at least the image I'm looking at, it appears red.
Not the eyefinity background - it does indeed appear green.
(Buggzie, if you do mean the background for Eyefinity, you may wish to 1) Check your monitor (Have someone else look and see, if it's showing green as red, something is mixed up) or 2) see a Dr and discuss colorblindness.)
According to the image you posted.
Title = red
Founder background = green
« Last Edit: June 27, 2010, 08:24:06 AM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline someone920

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
Re: UTeam -- now integrated with ULX SVN!
« Reply #13 on: June 27, 2010, 01:20:35 PM »
He's talking about the GMod logo, in the UTeam, it used to be whatever the highest rank color was. In that image, the highst rank color is green, but now the GMod logo isn't green.

EDIT: And do we have to remove the old UTeam files or can we keep those instead of using this version of groups?
« Last Edit: June 27, 2010, 01:23:02 PM by someone920 »

Offline DiscoBiscuit

  • Full Member
  • ***
  • Posts: 112
  • Karma: 1
    • DiscoBuild
Re: UTeam -- now integrated with ULX SVN!
« Reply #14 on: June 27, 2010, 01:34:27 PM »
How do you specify what order that they will be listed in? Or is it the same as they are listed in groups.txt?