August 19, 2022, 03:05:05 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: 1 ... 3 4 [5]

Author Topic: Server-side plugin which announces killstreaks also killstreak RTD  (Read 6437 times)

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #60 on: February 23, 2014, 03:05:00 am »

I didn't quite feel like reading that entire frankenstein plugin but I you list the killstreak texts 3 times in the main plugin and once in log plugin. /WHY/

Also I don't understand why you would want to sync killstreaks since they're so easy to keep track of clientsided.

Also you're attempting to send chat messages as host (which is dumb since you also want to put them in the killlog) and then you duplicated that code in the client part again...
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

ZaSpai

  • Ray Bann's Minion
  • *
  • Karma: 14
  • Offline Offline
  • Posts: 2239
  • "Eeh?! We're just allies!"
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #61 on: February 23, 2014, 03:10:14 am »

I didn't quite feel like reading that entire frankenstein plugin but I you list the killstreak texts 3 times in the main plugin and once in log plugin. /WHY/

Also I don't understand why you would want to sync killstreaks since they're so easy to keep track of clientsided.

Also you're attempting to send chat messages as host (which is dumb since you also want to put them in the killlog) and then you duplicated that code in the client part again...

It's all copied from whatever Cerapter and Rummy had before, I'll trim things off as I work out what works I suppose

Why is for the same reason as Cerapter, learning networking (also the RTD will come in eventually)

Probably gonna force everything to the kill log at the end of it (as for RTD effects I have no idea)

Long story short should the only things I should be doing be calling KS on the host under global.isHost section, and clients just send/receive the buffer?
Logged
Right behind you when you most expect it | classicwell master race

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #62 on: February 23, 2014, 03:38:56 am »

Actually I think you guys broke this thing beyond repair. I'll take a look at the player end step:

Code: [Select]
        ksBuffer = buffer_create();
        write_ubyte(ksBuffer,ds_list_find_index(global.players,global.myself));
        PluginPacketSend(ksRTDPacket,ksBuffer);
        buffer_destroy(ksBuffer);
What's the point of this? Both client and server do this too...
Also the if check above this code is reaaalllly fishy, I haven't checked but multiple clients will execute that code even when they didn't just die.

Code: [Select]
if global.isHost {
with(global.myself) {
currentStreak = stats[KILLS]
killStreak = 0;
var resetTimer;
resetTimer = 0;
}
}
}
"If you're host, reset your own stats. everytime ANY player dies"

Then when you check if the killstreak increased, you send the player id thing again (the code in the first block i posted)
After that you do the same as above, if ANY player got a kill, check if the host can announce a killstreak

Then the whole killstreak text dealio which has no point. Then the chat thing, which looks broken since you're calling a user_event(4) outside the chatwindow object.
Then you put the killstreak in the killlog. (only as host)

Then you read all pluginpackets attempt sending stuff to chat and announcing stuff to the killlog again (as host). After that you basically send the id back to everyone as host (which includes your self in the latest version of gg2 if i'm not mistaking)

After that, stuff that happens as client:
try sending stuff to chat as a host (eeeyup)
put thing in killlog

Also the indentation looks horrible (in game maker at least)
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

ZaSpai

  • Ray Bann's Minion
  • *
  • Karma: 14
  • Offline Offline
  • Posts: 2239
  • "Eeh?! We're just allies!"
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #63 on: February 23, 2014, 04:13:22 am »

Maybe it's easier for me to understand what errors there are with what I have if I explain my intentions at the moment:

(click to show/hide)

I'm using Notepad++ right now for setting out, I suppose a Gist paste and tab indent change might sort it out (if not I'll GML optimize later)

Cerpater's last attempt on it is here

If I were to push on through this, ahem, mess and get the RTD dice uses and effect number(s) active etc (I'd have to redefine effect[0] as no effect because ubytes won't accept noone or -1) can I also create a new buffer for that purpose specifically?

Also should I change the killstreak parts to just use global.SendBuffer (and take it on course to a non argument1 plugin with collateral script executions)?
« Last Edit: February 23, 2014, 04:16:39 am by ZaSpai »
Logged
Right behind you when you most expect it | classicwell master race

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #64 on: February 23, 2014, 05:11:59 am »

the logical way to do this is:
Keep track of killstreaks on the host and just send a simple event with the pluginpackets when someone got a killstreak that needs to be put in the killlog.
The clients don't need to send anything, if I understand this correctly RTD is supposed to be triggered by the killstreaks right? That means that the client doesn't ever have to send anything to the server, only receive an event to add things to the killlog and maybe what effect a player got.

Again, it's better to start over (just keep that script to put things in the killlog) because none of the new code in that plugin works I think.
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

ZaSpai

  • Ray Bann's Minion
  • *
  • Karma: 14
  • Offline Offline
  • Posts: 2239
  • "Eeh?! We're just allies!"
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #65 on: February 23, 2014, 06:40:41 am »

The way Cerapter has RTD set is that the killstreak determines the 'power' of the effects of dice, of which a block may be added for each kill made (max 3). Should the taunt to roll bit be plugin packet buffered?

Re the KS section, alright.
Logged
Right behind you when you most expect it | classicwell master race

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #66 on: February 23, 2014, 06:54:39 am »

If you want taunting to activate rtd, just trigger the diceroll on taunt.
If you want to bind the diceroll to a different key, make the client send a packet to the server everytime that key is pressed.
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

ZaSpai

  • Ray Bann's Minion
  • *
  • Karma: 14
  • Offline Offline
  • Posts: 2239
  • "Eeh?! We're just allies!"
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #67 on: February 23, 2014, 08:07:16 pm »

Alright.

(The following is asking anyone else who cares about the plugin, not just Lorgan :P)

Now as I recall the original RTD spat out a message in chat whenever an effect or RTD death occurred, but I don't really want to clutter the existing kill log just for the purposes of RTD related messages (Player died while using RTD may be an exception), not to mention I'd like to have the SSP also function in non chat servers. Should I make a ghetto log just for RTD stuff, and if so where should it be placed? (Top left corner? Where chat normally is?)

Also is there significant desync with original RTD at all (everything's host managed right?)? All the hyper speed things aren't desync so much as horrible control of movement
Logged
Right behind you when you most expect it | classicwell master race

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #68 on: February 24, 2014, 12:53:43 am »

The hyperspeed is somewhat desynced, if there is infinite jumping, that's a bit desynced and the broken spy thing.

I don't think there should be simultaneous dicerolls because that's what makes it a cluttered.
Did rtd ever use chat? Pretty sure it only used the servermessage thing.
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

ZaSpai

  • Ray Bann's Minion
  • *
  • Karma: 14
  • Offline Offline
  • Posts: 2239
  • "Eeh?! We're just allies!"
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #69 on: February 24, 2014, 01:03:45 am »

The hyperspeed is somewhat desynced, if there is infinite jumping, that's a bit desynced and the broken spy thing.

I don't think there should be simultaneous dicerolls because that's what makes it a cluttered.
Did rtd ever use chat? Pretty sure it only used the servermessage thing.
I'm gonna base the effects on Cerapter's choice so hyperspeed/infinijump/brokenteamswitch will be gone

Yeah I kinda don't want to stack rolls...

As for the message thing I'll have a quick check (maybe I'm used to seeing it on RM + RTD or something)

EDIT - trust Skele's server to have RTD + RM (tho Arctic did the relevant code thing I think)
I feel like I might add icons to the RTD log but it might get too cluttered then -_-"
« Last Edit: February 24, 2014, 01:35:06 am by ZaSpai »
Logged
Right behind you when you most expect it | classicwell master race

ZaSpai

  • Ray Bann's Minion
  • *
  • Karma: 14
  • Offline Offline
  • Posts: 2239
  • "Eeh?! We're just allies!"
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #70 on: February 26, 2014, 04:56:33 am »

Ugh I hate double posts

I've got the kill log to sync the killstreak message but now it's looping the messages every step for both host and client (along with the annoying notice sound) until the milestone has been passed, code is as follows

(click to show/hide)

I don't think the resetTimer (or KSSwitch as I've named it here) is gonna be the solution but I can't think of what other checks I can do. Oddly enough the frankenplugin didn't run into this problem...
Logged
Right behind you when you most expect it | classicwell master race

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3657
    • My own website
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #71 on: February 26, 2014, 08:27:22 am »

Pretty sure the kksswitch is useless atm but that doesn't really matter.

You did
   if (player.stats[KILLS] > currentStreak && player.stats[KILLS] - currentStreak != killStreak) {
      killStreak = player.stats[KILLS] - currentStreak;
   }
   if (global.isHost) {
   }


instead of


   if (player.stats[KILLS] > currentStreak && player.stats[KILLS] - currentStreak != killStreak) {
      killStreak = player.stats[KILLS] - currentStreak;
      if (global.isHost) {
      }
   }
« Last Edit: February 26, 2014, 08:30:39 am by Lorgan »
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

ZaSpai

  • Ray Bann's Minion
  • *
  • Karma: 14
  • Offline Offline
  • Posts: 2239
  • "Eeh?! We're just allies!"
Re: Server-side plugin which announces killstreaks also killstreak RTD
« Reply #72 on: February 27, 2014, 08:35:27 am »

Yeah that unnested global.isHost wasn't something I should've changed >.>

anyway I think the killstreak bit now works with the logs appearing fine to me at least for a client racking up the killstreak (shouldn't matter though since I added loopback=true now). Also added the annoying >=30 condition for 'should stop playing this game!' message :P

(added zip; I don't want this added to SSP review or w/e ajf does since it's not yet got the RTD function it needs)
« Last Edit: February 27, 2014, 08:37:22 am by ZaSpai »
Logged
Right behind you when you most expect it | classicwell master race
Pages: 1 ... 3 4 [5]
 

Page created in 0.041 seconds with 50 queries.