Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Misc ASSS Questions
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  per-arena commands? Post :: Post ASSS Zone crashed after 120 days of be...  View next topic  
Author Message
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Sat Mar 14, 2009 2:24 pm    Post subject: Reply to topic Reply with quote

sure enough, it works nicely now :P

however, now i have two questions.
since multipub is now enabled, will the main pub overflow into 2 now?

and if i have the 2nd zone set to enter into 'arena' why do you get placed into 'arena1',
and is there a way to go arena, arena2, arena3, etc and NOT arena1, arena2, arena3, etc
_________________
SSC Distension Owner
SSCU Trench Wars Developer
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sat Mar 14, 2009 5:14 pm    Post subject: Reply to topic Reply with quote

Cheese wrote:
since multipub is now enabled, will the main pub overflow into 2 now?


I don't recall.

Cheese wrote:
and if i have the 2nd zone set to enter into 'arena' why do you get placed into 'arena1',
and is there a way to go arena, arena2, arena3, etc and NOT arena1, arena2, arena3, etc


Rewrite the module. It's about as simple a module as you could ask for.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Sat Mar 14, 2009 7:29 pm    Post subject: Reply to topic Reply with quote

ap_multipub.c is part of the core, would making a module overwrite its actions?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sat Mar 14, 2009 7:59 pm    Post subject: Reply to topic Reply with quote

Cheese wrote:
ap_multipub.c is part of the core, would making a module overwrite its actions?


Write a module that provides the interface that ap_multipub provides, then load your module and not ap_multipub. The core functions only care about finding an interface of the correct type. They don't care where it's located.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Sun Mar 15, 2009 6:56 pm    Post subject: Reply to topic Reply with quote

also, looking through the src, i cant seem to find how asss handles setting doors...
aka, it doesnt use cfg DoorMode, theres no game->door(250);, etc
or did i miss something...?

also, why does adding dmg watch crash my module?
just one line,
wd->ModuleWatch(p,1);
can crash it...
no compilation issues.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sun Mar 15, 2009 8:28 pm    Post subject: Reply to topic Reply with quote

Cheese wrote:
also, looking through the src, i cant seem to find how asss handles setting doors...
aka, it doesnt use cfg DoorMode, theres no game->door(250);, etc
or did i miss something...?


ASSS doesn't handle doors. The clients handle them.

Cheese wrote:
also, why does adding dmg watch crash my module?
just one line,
wd->ModuleWatch(p,1);
can crash it...
no compilation issues.


Run it in a debugger.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Fri Mar 20, 2009 1:39 am    Post subject: Reply to topic Reply with quote

where can i find the code that deals with *timer and ?time?




also, will

cfg->SetInt(GLOBAL,"door","doormode",0,"open sesame!",1);
then
cfg->FlushDirtyValues();

make all the doors open for players?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Fri Mar 20, 2009 6:47 am    Post subject: Reply to topic Reply with quote

Cheese wrote:
where can i find the code that deals with *timer and ?time?


Search the source for Ctimer and Ctime. On linux:

Code: Show/Hide

cd asss/src
grep Ctime */*.c


will tell you where they are. Most windows IDEs and advanced text editors have some sort of "search in files" that will accomplish the same thing.


Cheese wrote:

will

cfg->SetInt(GLOBAL,"door","doormode",0,"open sesame!",1);
then
cfg->FlushDirtyValues();

make all the doors open for players?

FlushDirtyValues isn't necessary. You just have to make sure they get a new clientset packet. Be warned, clientset packets are relatively large, and will eat your zone's bandwidth if you send them too often.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Fri Mar 20, 2009 5:34 pm    Post subject: Reply to topic Reply with quote

how would i ensure they get one?
when are they sent?


also, windows has a grep, i use it a LOT
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Fri Mar 20, 2009 8:18 pm    Post subject: Reply to topic Reply with quote

Cheese wrote:
how would i ensure they get one?
when are they sent?


Read through the clientset module. See what conditions it takes to send out a clientset. It might even do it automatically when you update settings.

Cheese wrote:
also, windows has a grep, i use it a LOT


More likely you've got Cygwin installed somewhere on your path.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Sat Mar 21, 2009 1:35 pm    Post subject: Reply to topic Reply with quote

Why exactly would you use cfg->SetInt, then use clientset to force the client to update its settings? I fail to see how this is more advantageous than using the first with cfg->FlushDirtyValues(); . Why not just only use clienset's AreanaOverride and SendClientSettings in the first place?
Back to top
View users profile Send private message Add User to Ignore List Send email
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sat Mar 21, 2009 2:34 pm    Post subject: Reply to topic Reply with quote

Well, FlushDirtyValues only writes changes back into the configuration files, and since you'd want to be using temporary setting for this, it'd effectively be doing nothing.

Using the clientset's arena override would be fine, but you need to be aware that random doors will cause you trouble if players have different clientset packets (since I believe the timing is based off of that).
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
D1st0rt
Miss Directed Wannabe


Age:31
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Tue Mar 24, 2009 4:31 pm    Post subject: Reply to topic Reply with quote

I believe the timers are reset with a synchronization request, so there might still be differences among clients but not due to the settings packets (unless you're talking about a transition from set to random I suppose)
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Mar 24, 2009 6:43 pm    Post subject: Reply to topic Reply with quote

I thought maybe its prng was seeded from a hash of the clientset. I haven't looked at it too much, though, since we don't use doors in Hyperspace very often.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Tue Mar 24, 2009 6:56 pm    Post subject: Reply to topic Reply with quote

how has the asss core gotten this far without an easy way to change door state?

its used a lot, and accordingly there should be a
game->Door(255)

or SOMETHING, ffs
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Initrd.gz
Seasoned Helper


Joined: Sep 18 2008
Posts: 134
Location: Over there --->
Offline

PostPosted: Tue Mar 24, 2009 8:51 pm    Post subject: Reply to topic Reply with quote

Make your own function. biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Mar 24, 2009 9:16 pm    Post subject: Reply to topic Reply with quote

Cheese wrote:
how has the asss core gotten this far without an easy way to change door state?

its used a lot, and accordingly there should be a
game->Door(255)

or SOMETHING, ffs


Doing that would give people the false impression that it's a good idea. Did you not read what I said about sending lots of clientset packets? It's bad.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Tue Mar 24, 2009 9:31 pm    Post subject: Reply to topic Reply with quote

Dr Brain wrote:
Doing that would give people the false impression that it's a good idea. Did you not read what I said about sending lots of clientset packets? It's bad.

Then would it ultimately be better to just use the cfg->SetInt, and if really needed, cfg->FlushDirtyValues afterwards?

Actually, since you mentioned that the problem would lie moreso with random doors, would using the ArenaOverride to set the doormode to 0 or 255, and then Unoverride to return the door state back to random also be just as problematic?
Back to top
View users profile Send private message Add User to Ignore List Send email
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Wed Mar 25, 2009 6:23 am    Post subject: Reply to topic Reply with quote

Any way you change the door mode will have to involve sending every player in the arena a fairly large packet. And you have to do this every time you change the doors. If you change the doors once per event, then it's not a big deal. Changing it once per minute, however, would probably double your zone's bandwidth.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Tue Sep 22, 2009 11:26 am    Post subject: Reply to topic Reply with quote

new question:

i know it is possible to rewrite chat messages, like in an obscene module like cerium's hyperspace one.

i can create a new message with the rewritten text, but how do i prevent the original message from being sent?

is it possible to simply change the old message without sending a new one?

and if i change their message, will the sender recieve the change? (i dont want them to)
because in hyperspace i notice they dont.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Dr Brain
Flip-flopping like a wind surfer


Age:33
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Sep 22, 2009 2:33 pm    Post subject: Reply to topic Reply with quote

You have to replace the core's chat module with your own. Typically this means commenting out chat in modules.conf, and adding my_modules:my_chat.

In the future things like modifying chat messages will be possible without a core replacement, but not at present.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1014
Offline

PostPosted: Tue Sep 22, 2009 2:56 pm    Post subject: Reply to topic Reply with quote

just found this in chat.h, what does it do?
Code: Show/Hide

/* this isn't for general use */
#define CB_REWRITECOMMAND "rewritecommand"
typedef void (*CommandRewriterFunc)(int initial, char *buf, int len);



and the chat rewrite would be nice to have in your new core version icon_wink.gif
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Animate
Guest


Offline

PostPosted: Tue Oct 06, 2009 1:14 pm    Post subject: Reply to topic Reply with quote

This is kind of a guess. But that's a callback, so... it looks like this is called when a command is sent through the chat, before it's passed to whatever actually calls the actual function that the command represents.

Does sgcompat use this? Is this how it turns *arena into ?a ? It looks like you could use it to intercept a command, then physically change the *arena string to ?a. I have no idea where sgcompat even is in the code, so I can't check from where I am, unless bitbucket has a Find In Files option. I didn't see the callback in cmdman.c so it must be something that happens before the module sees it.
Back to top
Hakaku
Server Help Squatter


Joined: Apr 07 2006
Posts: 299
Location: Canada
Offline

PostPosted: Tue Oct 06, 2009 1:49 pm    Post subject: Reply to topic Reply with quote

You're correct, sgcompat does use it to rewrite commands such as *arena into ?a. However, looking briefly at the source, the term 'rewrite' seems a misnomer to me. Unless I'm missing something, the callback enables a module to listen on all commands being sent, so that when a user types "*arena", the module can detect the command and appropriately handle it (?a). It does not, however, overwrite existing commands. So if you tried to rewrite ?lag to something else, both ?lag and your new function will be called. Probably the only difference between the command rewrite and adding a new command, is that in the first, you're able to read the original string being sent, which would allow you to distinguish *cmd from ?cmd.

(the callback's in chat.h like Cheese mentioned)
Back to top
View users profile Send private message Add User to Ignore List Send email
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:32
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Tue Oct 06, 2009 5:23 pm    Post subject: Reply to topic Reply with quote

Yeah, I guess it's rewriting the string? It could be named better.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 2 of 10

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 121 page(s) served in previous 5 minutes.

phpBB Created this page in 0.155201 seconds : 49 queries executed (44.5%): GZIP compression disabled