|
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sun Feb 01, 2009 2:31 pm Post subject: Misc ASSS Questions |
|
|
|
|
ive been messing around with EVERYTHING in as3, and its raising a lot of questions, so i thought id make a topic where i can throw them in without a central topic.
such as:
with this code:
local void Damaged(Arena *a, Player *p, struct S2CWatchDamage *damage, int count)
{
chat->SendMessage(p,"You took %i damage. c=%i",damage->damage->damage,count);
chat->SendArenaMessage(ALLARENAS,"someone took dmg");
return;
}
|
and this call:
mm->RegCallback(CB_PLAYERDAMAGE,Damaged,ALLARENAS);
|
why does nothing happen with a successful compile?
why does it seem that arena->playing and arena->total give the same number, even while 2 are in ships and 1 in spec?
why is there an arena passed to the export function, when it seems that any attempt to get information from the struct fails, or even worse, crashes the server on load?
is it possible to get an as3 server to listen on an external chat and respond to words/commands?
why do as3 zones prevent you from firing for a moment after you get the ball passed to you?
where are my periodic rewards?
is it possible to create a non eLVL region?
why is http://asss.yi.org/ down 95% of the time?
how can i detect a ball or flag win?
why does as3 have ?flagreset and not ?ballreset?
i suppose other people can ask questions here too... _________________ SSC Distension Owner
SSCU Trench Wars Developer |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sun Feb 01, 2009 9:52 pm Post subject: Re: Misc ASSS Questions |
|
|
|
|
Cheese wrote: |
with this code:
local void Damaged(Arena *a, Player *p, struct S2CWatchDamage *damage, int count)
{
chat->SendMessage(p,"You took %i damage. c=%i",damage->damage->damage,count);
chat->SendArenaMessage(ALLARENAS,"someone took dmg");
return;
}
|
and this call:
mm->RegCallback(CB_PLAYERDAMAGE,Damaged,ALLARENAS);
|
why does nothing happen with a successful compile? |
Because no damage watching is enabled. Try /?watchdamage'ing a few players. Be aware that watchdamage uses a lot of bandwidth.
Cheese wrote: | why does it seem that arena->playing and arena->total give the same number, even while 2 are in ships and 1 in spec? |
Because playing doesn't mean what one might think. If I recall correctly, playing in this context means game clients capable of entering the game. I think chatnet clients and fake players don't count toward that number.
Cheese wrote: | why is there an arena passed to the export function, when it seems that any attempt to get information from the struct fails, or even worse, crashes the server on load? |
Which export function are you talking about?
Cheese wrote: | is it possible to get an as3 server to listen on an external chat and respond to words/commands? |
Anything is possible. In this case, you'd have to write a module.
Cheese wrote: | where are my periodic rewards? |
In the periodic points module.
Cheese wrote: | is it possible to create a non eLVL region? |
Is it possible to create a non-beef hamburger? Not while still remaining edible.
Probably because it's hosted on grel's computer (I'm assuming from the yi.org part).
Cheese wrote: | how can i detect a ball or flag win? |
Callbacks.
Cheese wrote: | why does as3 have ?flagreset and not ?ballreset? |
Because no one bothered to write one. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Sun Feb 01, 2009 11:39 pm Post subject: |
|
|
|
|
Quote: | Cheese wrote:
is it possible to create a non eLVL region?
Quote: | Is it possible to create a non-beef hamburger? Not while still remaining edible. |
|
LOL
Yeah... you "could" make a pseudo-region like oldschool Mervbot plugins... works well for rectangular areas, but other than that, it's a pain in the butt. A useless one too; why would you want/need to avoid using eLVL? If you use DCME, creating a region is easier than putting tiles on a map. _________________ (Insert a bunch of dead links here) |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Mon Feb 02, 2009 3:48 pm Post subject: |
|
|
|
|
Quote: | Quote:
Cheese wrote:
is it possible to create a non eLVL region?
Quote:
Is it possible to create a non-beef hamburger? Not while still remaining edible.
LOL
|
btw, thank you for adding the bolded part. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Mon Feb 02, 2009 4:28 pm Post subject: |
|
|
|
|
Dr Brain wrote: |
Which export function are you talking about?
|
//what does this do?
EXPORT const char info_hs_fuschia[] = "v1.0 Dr Brain <drbrain@gmail.com>";
//why is *arena there?
EXPORT int MM_hs_fuschia(int action, Imodman *_mm, Arena *arena)
|
^export functions
***edit: also, why am i getting linker undefined reference errors to LLInit+LLAdd+LLEmpty?
Dr Brain wrote: |
Callbacks.
|
which, i cant seem to find them...
Dr Brain wrote: |
Because no damage watching is enabled.
|
Cheese> ?man watchdamage
Sorry, I don't know anything about ?watchdamage
how might i remedy this? didnt find a commented out module that looked suspicious...
Cheese wrote: |
arena->playing and arena->total give the same number
|
turns out, i wasnt updating it, it would lock to the same number the first time u called a->playing
Dr Brain wrote: |
In the periodic points module.
|
does this mean i have to use GetPoints() with SetTimer() because theres no callback? =(
also, where can i find a correct usage of SetTimer(), getting compile warnings for not using pointers correctly, its annoying the hell out of me... |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Mon Feb 02, 2009 7:55 pm Post subject: |
|
|
|
|
if you want to use the functions (llinit ect.) defined in util.h, you must compile with the associated code in util.c, otherwise the linker won't know how to execute them.
it's like if someone told you to compile and link this program:
int doSomething();
int main()
{
doSomething();
return 0;
}
You'd probably say waht the fuck where is doSomething... that's what you're telling the linker to do _________________ SubSpace Discretion: A Third Generation SubSpace Client |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Mon Feb 02, 2009 9:26 pm Post subject: |
|
|
|
|
Cheese wrote: | ^export functions |
The info_modname is for ?modinfo.
The arena* is in the function for the attach and detach calls, not for the load and unload calls. You should learn more about the differences between attaching and loading. It'll come up a lot in asss programming.
Cheese wrote: | ***edit: also, why am i getting linker undefined reference errors to LLInit+LLAdd+LLEmpty? |
Like Bak said, add util.o (or util.c) to your build. I'm not sure the exact technique for windows.
Cheese wrote: | Dr Brain wrote: | Callbacks. |
which, i cant seem to find them... |
CB_WARZONEWIN
CB_GOAL
It's generally helpful to look in modules that do similar kinds of things. In this case, the points modules. That's how I started doing asss programming: by looking in other modules that did things that I wanted to do.
Cheese wrote: | Cheese> ?man watchdamage
Sorry, I don't know anything about ?watchdamage
how might i remedy this? didnt find a commented out module that looked suspicious... |
Look at where you found the original callback for the damage. You'll find the necessary module there too. I'll let you do the exploration.
Cheese wrote: | Dr Brain wrote: | In the periodic points module. |
does this mean i have to use GetPoints() with SetTimer() because theres no callback? =(
also, where can i find a correct usage of SetTimer(), getting compile warnings for not using pointers correctly, its annoying the hell out of me... |
I've never used either of those functions, but the simple solution is to just make a copy of points_periodic.c and make your own changes (like adding a callback). You could also see how the points module gets called and reproduce the same kind of thing in your own module. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Feb 03, 2009 1:48 am Post subject: |
|
|
|
|
Dr Brain wrote: |
CB_WARZONEWIN
CB_GOAL
|
i was using CB_FLAGRESET,
reset cmd = -1
win = 0+
how is CB_WARZONEWIN different?
and how can CB_GOAL detect when the game is won and reset?
Cheese wrote: |
will an attached module work if it isnt in modules.conf?
|
this
Cheese wrote: |
why does pymod give this console error when loading?
I <cmod> loading C module 'pymod' from 'pymod'
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named os
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named os
ImportError: No module named copy_reg
--edit-- also:
E <pymod> can't import cPickle
--edit2-- and after ?shutdown:
M <net> [Cheese] [pid=5] unknown packet type 165
M <net> [Cheese] [pid=5] unknown packet type 165
E <module> error unloading module playerdata
--edit3-- sometimes its this instead:
M <banners> {0} [Cheese] bad size for banner packet
M <banners> {0} [Cheese] bad size for banner packet
E <module> error unloading module playerdata
|
|
this
Cheese wrote: |
why can i load <py> fg_wz, but <py> fg_turf will crash the server?
|
this
Dr Brain wrote: |
In the periodic points module.
|
does that mean that its supposed to work automatically if the .cfg for the arena is correct?
because it isnt...
Dr Brain wrote: |
look at where you found the original callback for the damage
|
it turns out i forgot the interface... oops.
however, the callback still did nothing, so i added AddWatch(), which crashes the zone when it is used...
Dr Brain wrote: |
That's how I started doing asss programming
|
i always assumed you were one of the co-founders of as3, how naive of me...
--edit--
why is the standard SendAnyMessage() sent to a linked list?
why not to a player or arena?
why cant we have those?
its nice having nice things... =( |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Tue Feb 03, 2009 9:48 am Post subject: |
|
|
|
|
Cheese wrote: | i was using CB_FLAGRESET,
reset cmd = -1
win = 0+
how is CB_WARZONEWIN different? |
The FLAGRESET callback will be called as soon as the flags are reset (e.g. dropping all flags when timer runs out, or when you force a reset). The WARZONEWIN callback is called after a warzone-style flagging game is won (after all flags are won, usually also after the messages "Team victory!" and "Reward:#").
Cheese wrote: | and how can CB_GOAL detect when the game is won and reset? |
The current scoring module has no callback for when a ball game is won. I ran into this problem while creating a soccer-style event; you might be better off creating your own module that calculates the scores using the GOAL callback. Otherwise you could modify points_goal.c and add the feature yourself. I'm not familiar with how to do this, but I assume it would be something like the following, added each time it says 'Soccer game over':
chat->SendArenaSoundMessage(arena, SOUND_DING, "Soccer game over.");
RewardPoints(arena, freq);
DO_CBS(CB_GOALWIN, arena, GoalWinFunc, (arena, freq, RewardPoints)); |
And then create points_goal.h with:
/* dist: public */
#ifndef __POINTS_GOAL_H
#define __POINTS_GOAL_H
#define CB_GOALWIN "goalwin"
typedef void (*GoalWinFunc)(Arena *a, int freq, int points);
/* called after a ball game is won */
#endif |
|
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Feb 03, 2009 3:34 pm Post subject: |
|
|
|
|
also, is there some sort of command listing command that i dont know about yet?
if not, i will make one |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Tue Feb 03, 2009 5:07 pm Post subject: |
|
|
|
|
Cheese wrote: | also, is there some sort of command listing command that i dont know about yet?
if not, i will make one |
You mean a way to list every command in-game? In that case, no, there's no such list. The best there is, is browsing through the /groupdef.dir/ folder. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Tue Feb 03, 2009 7:27 pm Post subject: |
|
|
|
|
just the basic core ones, nothing fancy...
i figured i would make so a simple ?cmd would spam you with a list of cmds and a basic description on the same line.
just for ingame reference |
|
Back to top |
|
|
anon Guest
Offline
|
Posted: Sat Feb 07, 2009 1:47 pm Post subject: |
|
|
|
|
i get that same console error too |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Sat Feb 07, 2009 2:18 pm Post subject: |
|
|
|
|
To answer the other questions...
Cheese wrote: | will an attached module work if it isnt in modules.conf? |
You can load a module and attach it in-game using ?insmod (to load it), and ?attmod (to attach it). Placing the (attach) module directly in modules.conf will ensure that it always gets loaded automatically, as long as you added it in the arena.conf file as well.
Cheese wrote: | why can i load <py> fg_wz, but <py> fg_turf will crash the server? |
You shouldn't be able to load either, since your console is telling you that pymod isn't loaded properly. (I provided the fix in my previous post)
Cheese wrote: | DrBrain wrote: | In the periodic points module. |
does that mean that its supposed to work automatically if the .cfg for the arena is correct?
because it isnt... |
It needs to be attached to the arena, and you need ALL the proper settings for it. A lot of the necessary settings aren't available via esc+c, so you need to add them manually. I probably spent like an entire week trying to explain to resol that he needs to add all (never overlook anything) the necessary settings manually for it to work.
Also make sure that you didn't add insane time delays between each periodic interval, or else you'll probably never know if it works.
Cheese wrote: | why is the standard SendAnyMessage() sent to a linked list?
why not to a player or arena? |
For most things, you shouldn't use SendAnyMessage... There already exists specific ways to send messages such as SendMessage, SendSoundMessage, SendArenaMessage, SendArenaSoundMessage, SendModMessage, plus a lot more. Take a look at chat.h for an entire listing with explanations on usage.
Edit: Didn't notice you replied when I was writing this.
Cheese wrote: | thanks, and might that be causing <py> fg_turf to crash the server as well?
pretty sure i dont have python anywhere on the computer...
but at the same time, why does <py> fg_wz work then? |
Yes, I'm 100% sure that this is what's causing the crash. And obviously if you don't have python anywhere on your computer, it won't work. You should install it from http://www.python.org/. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Feb 07, 2009 2:27 pm Post subject: |
|
|
|
|
Hakaku wrote: | look at chat.h for an entire listing with explanations on usage.
|
or here
Hakaku wrote: | A lot of the necessary settings aren't available via esc+c |
the settings are client side?
meaning the server doesnt send -anything- except the .cfg to the client?
ill investigate the periodic stuff...
i still havnt figured out watching damage, if anyone has a nice example |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Sat Feb 07, 2009 2:42 pm Post subject: |
|
|
|
|
For the redirect part, ASSS doesn't support that at the moment. You would need Snrrrub's Sendto patch. (If you have it, you should ask him how it works, since I've seen it used for Chaos/League) I also think you need to be on the same biller, but someone should correct me if I'm wrong.
As for the points, they're dealt by the periodic_points module. The problem is though, that esc+c (i.e. clientset) doesn't provide a full list of settings, and it doesn't provide any easy way to expand it if you ever wanted custom settings to be easily changed in-game. (probably should mention this in your checklist, since it really is a problem)
Take a look at the following and make sure you're not missing anything:
http://wiki.mineplowers.com/index.php/Complete_Settings |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Feb 07, 2009 3:01 pm Post subject: |
|
|
|
|
userguide.pdf wrote: |
9 Virtual Servers
asss allows one server process to apear to clients as several di?erent servers. The primary
advantage of this feature is that players connecting to all virtual servers are treated the same
internally and can move between arenas and communicate as if they connected to the same
server.
To create virtual servers, you have to tell the net module to listen on more than one port.
You do this by creating additional sections in global.conf named \Listen1," \Listen2," etc.
Each setting must specify a port, and can also optionally specify a virtual server identi?er, and
a speci?c IP address to bind to.
Virtual server identi?ers are used in several ways: if you are using an arena placing module
that supports them (e.g., ap_multipub), the server id will be used as the arena basename to
place players who connect through that port in.
The directory module also supports virtual servers: it will create one directory entry for
each virtual server. The server name and description can be di?erent for each virtual server. To
specify them, create \Name" and \Description" settings in the section \Directory-servername"
for each virtual server identi?er. If either of those settings is missing from that section, it will
fall back to their values in the \Directory" section.
Finally, an example to make this all clear:
;; global.conf
;; listen on 3 different ports:
; players connecting to port 2000 will be send to a random arena.
[Listen1]
Port = 2000
; players who connect to 5000 will be sent to pb1, pb2, etc.
[Listen2]
Port = 5000
ConnectAs = pb
; port 7500 will send them to aswz by default, and so on.
[Listen3]
Port = 7500
ConnectAs = aswz
; this will force the server to listen on an internal interface only
; and send those players to a secret arena:
[Listen4]
BindAddress = 192.168.0.23
Port = 3300
ConnectAs = #secret
[Directory]
;; point to the directory servers you want to be listed on. using
12
;; default port and password.
Server1 = sscentral.one.com
Server2 = sscentral.two.com
;; now describe what this server is called by default:
Name = A Testing Zone
Description = Testing happens here.
[Directory-pb]
;; specify the name and description for pb:
Name = PowerBall
Description = Play with balls!
[Directory-aswz]
;; specify only name for aswz:
Name = A Small Warzone
|
Redirects:<name>
Type: String
Settings in the Redirects section correspond to arena names. If a player tries to ?go to an arena
name listed in this section, they will be redirected to the zone speci?ed as the value of the
setting. The format of values is 'ip:port[:arena]'. */
|
|
from the asss user guide
Hakaku wrote: | (probably should mention this in your checklist, since it really is a problem) |
if its client side, it will never get fixed...
---edit---
lol, never noticed shanky.com, minegoboom.com, and mineplowers.com were the same thing... |
|
Back to top |
|
|
Hakaku Server Help Squatter
Joined: Apr 07 2006 Posts: 299 Location: Canada Offline
|
Posted: Sat Feb 07, 2009 3:49 pm Post subject: |
|
|
|
|
Ok, so I was wrong about that part.
Quote: | if its client side, it will never get fixed... |
It's not clienside, it's serverside. I'm refering to a problem with clientset.c/def, which is what appears in your esc+c. A common problem for ppl is that they believe that all the settings are included in the list provided in-game, but a good portion of the settings are not. |
|
Back to top |
|
|
D1st0rt Miss Directed Wannabe
Age:36 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Sun Feb 08, 2009 11:47 am Post subject: |
|
|
|
|
You should probably be using ?quickfix anyway _________________
|
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Sat Mar 07, 2009 8:00 pm Post subject: |
|
|
|
|
has anyone successfully used the dual-port multizone function?
i have gotten in by 2 different ports, and got it to report as 2 zones to directories, but in the second 'zone' it does NOT take me to an arena, but to pub like the other... |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Sat Mar 07, 2009 9:14 pm Post subject: |
|
|
|
|
Cheese wrote: | but in the second 'zone' it does NOT take me to an arena, but to pub like the other... |
You need an arena placer that supports the connectas stuff. I know ap_multipub will do it, but I also recall that it gave us some other trouble later on. I don't remember the specifics of the trouble.
You could easily write your own if you run into trouble relating to multiple public arenas by taking ap_multipub and removing nearly everything except the connectas parts. |
|
Back to top |
|
|
Cheese Wow Cheese is so helpful!
Joined: Mar 18 2007 Posts: 1017 Offline
|
Posted: Wed Mar 11, 2009 5:42 pm Post subject: |
|
|
|
|
i was under the impression that one 'zone' could take you to pub, while the second 'zone' could take you to a specific subarena.
i have multipub disabled. |
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Wed Mar 11, 2009 8:23 pm Post subject: |
|
|
|
|
Cheese wrote: | i was under the impression that one 'zone' could take you to pub, while the second 'zone' could take you to a specific subarena.
i have multipub disabled. | It can. You just need to enable the module that does it. |
|
Back to top |
|
|
|
|
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
|
Software by php BB © php BB Group Server Load: 131 page(s) served in previous 5 minutes.
|