ULX

Author Topic: Adverts  (Read 10631 times)

0 Members and 1 Guest are viewing this topic.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Adverts
« on: February 22, 2010, 12:33:09 PM »
I'm not fully understanding a part of the adverts.....
Code: [Select]
// If you want to make it so that one advertisement is shown and then will always be followed by another,
// put them in another table inside center_advertisements or chat_advertisements. For example, if you
// put the following inside chat_advertisements, A will always show first followed by B.
// "my_group"
// {
//     "Advertisement A" 200
//     "Advertisement B" 300
// }
Could you explain further or give a better example?

EDIT: I think I figured it out, but what is is suppose to do exactly?  Is it suppose to make one advert show then start the timer for the next because that would work a lot better rather then having it spam 3 adverts at once.
« Last Edit: February 22, 2010, 01:58:50 PM by Aaron113 »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Adverts
« Reply #1 on: February 22, 2010, 02:49:52 PM »
Yes, it shows one advert and then starts the timer for the next. How could we word that to be better understood?
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: Adverts
« Reply #2 on: February 22, 2010, 03:59:12 PM »
Aaron, Many (used to) think that using two or three single advertisements, then placing the time a few seconds apart, would work to display two in a row. Example
addadvert "Hello" 20
addadvert "world" 25
Looking at that, you might think it would say "Hello" 20 seconds, then 5 seconds later say "World"
Well, it would, ONCE.
See, that's cumulative from server start...so, after server start, it would say hello 20 seconds, then 5 later say world.
But,
40 seconds later - Hello
50 seconds later - World
60 seconds later - Hello
75 seconds later - World
... notice how world is getting farther and farther time away from Hello?

We updated ULX 2.3 (.2 maybe?) to allow grouping of adverts, the SVN is yet just another way of upgrading it more into one table.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Adverts
« Reply #3 on: February 22, 2010, 07:15:12 PM »
Yes, it shows one advert and then starts the timer for the next. How could we word that to be better understood?
Well, it must not be working right, I have sometimes 3 adverts that show at the same time.... I'll give you my advert.txt

Code: [Select]
"center_advertisements"
{
"You're playing on %host%, enjoy your stay!"
{
"red" "100"
"green" "255"
"blue" "200"
"time_on_screen" "10"
"time" "300"
}
}

"chat_advertisements"
{
"This server is running ULX Admin Mod version %ulx_version% by Team Ulysses -- ulyssesmod.net" "200"
"Use !votekick <name> to vote to kick someone." "300"
"Please remove all and any thruster or turret sounds." "400"
"Goto --------------- to check out this servers website!" "500"
"Say !motd to open the MOTD." "600"
}

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Adverts
« Reply #4 on: February 22, 2010, 07:40:06 PM »
You'll need to put the adverts in a group like given in the example if you don't want them showing up at the same time.
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: Adverts
« Reply #5 on: February 22, 2010, 07:44:02 PM »
Of course you do!
"Center_advertisement" is set to 300
So, from server start, at
300, 600, 900, 1200, 1500, 1800, 2100, 2400, ... seconds the center part shows.

Under "chat_advertisements", you didn't make a "separate_group"ing, so all would start <X> seconds after 200.

"This server is running ULX Admin Mod version %ulx_version% by Team Ulysses -- ulyssesmod.net" "200"
200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000, 2200, 2400

"Use !votekick <name> to vote to kick someone." "300" -
500, 700, 900, 1100, 1300, 1500, 1700, 1900, 2100, 2300, 2500, 2700

"Please remove all and any thruster or turret sounds." "400"
900, 1100, 1300, 1500, 1700, 1900,

See all the numbers that match on each line?
In a single group under "chat_advertisements", if no other group is created, adv 1 timer hits, then time from adv 1 gets added from adv 2.
As megiddo stated, timer one hits, then the next timer starts.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Adverts
« Reply #6 on: February 23, 2010, 09:38:00 AM »
So would this be right?
Code: [Select]
"chat_advertisements"
{
"adverts"
{
"This server is running ULX Admin Mod version %ulx_version% by Team Ulysses -- ulyssesmod.net" "200"
"Use !votekick <name> to vote to kick someone." "300"
"Please remove all and any thruster or turret sounds." "400"
"Goto --------------- to check out this servers website!" "500"
"Say !motd to open the MOTD." "600"
}
}

EDIT: nvm, I tried it and it worked
Thanks for the help
« Last Edit: February 23, 2010, 10:13:00 AM by Aaron113 »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Adverts
« Reply #7 on: February 23, 2010, 10:49:00 AM »
How would you like to see the help text worded to be more clear?
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: Adverts
« Reply #8 on: February 23, 2010, 03:05:18 PM »
So would this be right?

Megiddo, refresh my memory.
The first ad of a grouping wouldn't show up again until after the last ad of a grouping, right?
If it would, then perhaps we should make groupings so that First doesn't reappear until after last.
« Last Edit: February 23, 2010, 03:07:14 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Adverts
« Reply #9 on: February 23, 2010, 03:54:19 PM »
Megiddo, refresh my memory.
The first ad of a grouping wouldn't show up again until after the last ad of a grouping, right?
If it would, then perhaps we should make groupings so that First doesn't reappear until after last.


I'm not sure what you're referring to, but I'm going to go out on a limb and assume it's something to do with the timings of adverts in a group. Say you have advert A appearing with an interval of 5 seconds and advert B appearing with an interval of 10 seconds, both in the same group. Five seconds into the game, A shows. Ten seconds after that, B shows. Five more seconds and A shows again, etc. Hopefully that answered your question? :P
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: Adverts
« Reply #10 on: February 23, 2010, 04:46:00 PM »
Group
A 5
B 10
Start of server (0)
A = 5
B = 15
Does A again appear at 10 from start of server?
OR, 5 seconds after B (25)?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Adverts
« Reply #11 on: February 23, 2010, 04:58:42 PM »
Going with the A 5 and B 10 in a group config, it'd look like this:
A at 5 secs
B at 15 secs
A at 20 secs
B at 30 secs
A at 35 secs
B at 45 secs
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: Adverts
« Reply #12 on: February 23, 2010, 07:03:47 PM »
Got it, like I expected (if not for bad math)

As for how to make it easy to explain...I'm at a current loss for words.

Any ideas Aaron?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Adverts
« Reply #13 on: February 24, 2010, 02:10:40 PM »
Maybe making it more clear that you don't just put it in the Advert but you actually have to make a group, because when it said "my_group" I though it meant the "center_advertisements" or the "chat_advertisements".

I was thinking something like this..... You can do w/e you want just try to make it more clear that you have to add a group not just put it inside the advert you want.
Code: [Select]
// Here's where you put advertisements
// If you want an advertisement that shows in the center of the screen, put it in "center_advertisements"
// If you want an advertisement that shows inside the chat box, put it in "chat_advertisements"
//
// The 'time' argument inside a center advertisement and the number following a chat advertisement are the
// time it takes between each showing of this advertisement in seconds. Set it to 300 and the advertisement
// will show every five minutes.
//
// If you want to make it so that one advertisement is shown and then will always be followed by another,
// put them in another table inside center_advertisements or chat_advertisements. For example, if you
// put the following inside chat_advertisements, A will always show first followed by B.
// "my_group"
// {
//     "Advertisement A" 200
//     "Advertisement B" 300
// }
//
// For Example :
//
// "chat_advertisements"
// {
// "group1"
// {
// "This server is running ULX Admin Mod version %ulx_version% by Team Ulysses -- ulyssesmod.net" "60"
// "Say !motd to open the ULX motd" "60"
// }
// Then any other advertisements you would like here that would not be affected by groups or create more groups that run seprately from the one above.
// }
//

"center_advertisements"
{
"You're playing on %host%, enjoy your stay!"
{
"red" "100"
"green" "255"
"blue" "200"
"time_on_screen" "10"
"time" "300"
}
}

"chat_advertisements"
{
"This server is running ULX Admin Mod version %ulx_version% by Team Ulysses -- ulyssesmod.net" "60"
}