Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-02-2006, 01:44 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Scripting a Pause/NoPK system

As I stray away from using the default system with my systems that I'm preparing for the Classic server, I've encountered quite a few complications with the default pausing system, and the system that determines whether players block or don't block.

I see a lot of potential in straying away from that system and implementing a scripted one, but the amount of structuring that would go into it might scare anyone.

You can't detect whether a player should or shouldn't be blocking on the clientside without using onwall/onwall2, though it seems you should. However, my movement system doesn't use these commands. In fact, I'm waiting on the next release of v4 to complete the handling of NPCs not blocking.

The ideas for a new pausing system flow out of my mind like a great river of disarray. I've been trying to design a structure for this using diagrams.

So far I've figured: (serverside)
serverr.noblocking: players not blocking
serverr.nohurting: players that can't be hurt

The catch is that the noblocking list needs to be accessable to any client where the player might run into a player in the serverr.noblocking list. What my biggest fear is: the server vars being overloaded with a list of noblocking or paused players.

Yea, I've decided to rescript nicks in this system too. The problem is that it doesn't pick up paused as part of the nickname. I also am going to add different forms of pausing.

serverr.paused: players that are paused
serverr.spectate: players that are spectating

Having two different server vars for something as simple as drawing (paused) or (spectating) at the end of a nick display? This is starting to sound a little bit outrageous to even myself . I think I need to find a different approach for making paused/spectating players decipherable.
Reply With Quote
  #2  
Old 02-02-2006, 02:09 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Why would you need to use so many serverr strings? I'm sure many of those can be substituted with other more efficient methods. Especially the serverr string used for (paused) tags. What's wrong with doing a showimg with index less than 200 on the client of the user that is paused?
__________________
Reply With Quote
  #3  
Old 02-02-2006, 02:28 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by ZeLpH_MyStiK
Why would you need to use so many serverr strings? I'm sure many of those can be substituted with other more efficient methods. Especially the serverr string used for (paused) tags. What's wrong with doing a showimg with index less than 200 on the client of the user that is paused?
Well, the trick is that the individual clients would control the nick display.
The modes currently are: show all nicks except your own nick, show all nicks, show only your nick, or show no nicks (this includes NPC nicks). I seriously don't think of using a serverr var for paused and spectate tags is efficient, but I don't know what might be a good way of informing other players that this player is paused. The best idea I can think of is player attribute modification. I'd have to mess around with it though, putting in

The first two serverr vars mentioned make the most sense, and in particular the nohurting one, but then of course, the entire damage system is serverside so I could just to clientr.vars for that, so eliminate that one.

The noblocking one... I don't know...

maybe setting some attr[#] to ".paused.spectate.dontblock" and then tokenize it with a delim "."? I don't know if that would work... could try it though.

Last edited by jake13jake; 02-02-2006 at 02:47 AM..
Reply With Quote
  #4  
Old 02-02-2006, 02:59 AM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
(takes a look ... walks away from the people who want to put themselves through the torment of essentially reinventing the wheel)
Reply With Quote
  #5  
Old 02-02-2006, 03:44 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by jake13jake
Well, the trick is that the individual clients would control the nick display.
The modes currently are: show all nicks except your own nick, show all nicks, show only your nick, or show no nicks (this includes NPC nicks). I seriously don't think of using a serverr var for paused and spectate tags is efficient, but I don't know what might be a good way of informing other players that this player is paused. The best idea I can think of is player attribute modification. I'd have to mess around with it though, putting in

The first two serverr vars mentioned make the most sense, and in particular the nohurting one, but then of course, the entire damage system is serverside so I could just to clientr.vars for that, so eliminate that one.

The noblocking one... I don't know...

maybe setting some attr[#] to ".paused.spectate.dontblock" and then tokenize it with a delim "."? I don't know if that would work... could try it though.
Oh I see what you're doing with the nicks. Basically a player can choose which type of nicks he/she can see. Why not script showing nicks in the ganis so by simply using a flag check, you can choose whether or not to display the nicks.
__________________
Reply With Quote
  #6  
Old 02-02-2006, 04:38 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by ZeLpH_MyStiK
Oh I see what you're doing with the nicks. Basically a player can choose which type of nicks he/she can see. Why not script showing nicks in the ganis so by simply using a flag check, you can choose whether or not to display the nicks.
There are an awful lot of ganis, so it wouldn't seem to practical. However, I might want to see what I can do for using attr[] with values that have no image or gani. I can't do it now though, because I'm not in my dorm room.
I'm kind of peaved of at my CS instructor for giving me a 0 on an assignment that I did perfectly well. If she won't do anything about it, I'm just going to withdraw and go for credit by examination. Unfortunately the drop deadline has passed, but the withdrawal deadline has not. So now I'm just going to stay up all night studying in the math college building to get ahead in other courses so that I may have the time to study for dropping the class, if indeed my instructor won't act.
And yea, reinventing the wheel isn't hard if you understand what it's supposed to do.

Oh God, this is ridiculous. I get a 0 because Visual C++ 2003 doesn't support declaration of arrays based on a dynamic expression? Oh god, one line of code. All because Bloodshed Dev C++ is different from Microsoft Visual C++ 2003... -_-
(even though I'm required to have Microsoft Visual C++ )

int key_count[key_size];
becomes
int key_count[KEY_MAX];

Considering the rest of the program is based on key_size anyway, what the hell is the difference? If this doesn't get fixed, I'm going to be very upset.

Last edited by Lance; 02-02-2006 at 05:49 AM.. Reason: Merged.
Reply With Quote
  #7  
Old 02-02-2006, 05:25 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
I thought this was the NPC Scripting forum, not the complain-about-my-computer-science-course forum. x.X
__________________
Reply With Quote
  #8  
Old 02-02-2006, 05:50 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by jake13jake
Oh God, this is ridiculous. I get a 0 because Visual C++ 2003 doesn't support declaration of arrays based on a dynamic expression? Oh god, one line of code. All because Bloodshed Dev C++ is different from Microsoft Visual C++ 2003... -_-
(even though I'm required to have Microsoft Visual C++ )

int key_count[key_size];
becomes
int key_count[KEY_MAX];

Considering the rest of the program is based on key_size anyway, what the hell is the difference? If this doesn't get fixed, I'm going to be very upset.
If you want it to be dynamic, perhaps you should instead have declared it dynamically...?
Reply With Quote
  #9  
Old 02-02-2006, 06:56 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Lance
If you want it to be dynamic, perhaps you should instead have declared it dynamically...?
lol, dynamic memory allocation for something so simple... nah. If you wanted to mimic Graal tokens, however, that would be required.
Reply With Quote
  #10  
Old 02-02-2006, 03:49 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by jake13jake
lol, dynamic memory allocation for something so simple... nah. If you wanted to mimic Graal tokens, however, that would be required.
If you're not willing to declare it dynamic the appropriate way, why are you complaining about not being able to do it a way in which you shouldn't have been able to?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.