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
Bounty multiplier

 
Post new topic   Reply to topic Printable version
 View previous topic  Help with a bot How would I make a bot... Post :: Post Design resolution for website(s)  View next topic  
Author Message
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat Sep 10, 2005 6:01 pm   Post maybe stupid    Post subject: Bounty multiplier Reply to topic Reply with quote

I fully don't expect anybody to know this, but does SubSpace use a short or int for the bounty * Flag:FlaggerKillMultiplier on a player death? Just curious, because MERV's using a short right now, which could roll over. Just wondering if I should fix it.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Sep 10, 2005 6:52 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

The setting uses a short, but since register size is typically 32bits I think it's going to get extended when used in math (in ss).
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Sep 11, 2005 12:40 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Well, it'll get extended, but is it still stored as a short? You wouldn't think so, but hey, these are the guys that stored score as a signed value.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Sun Sep 11, 2005 4:56 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Cyan~Fire wrote:
.. these are the guys that stored score as a signed value.

Thats because you could originally get negative scores. Ever wonder why people with low bounties are neg killers? You used to start with negative bounty. So some people would have an average kill of -10, which were refered to as negative bounty hunters. Later on, after they realised that people would still kill small bountied players, they had them start at 0 again, to remove the goal of getting the smallest score. The neg killer term still stuck.

The way most C compilers work, if you do a short * short -> int, it will extend it as if it was int * int. Tested on GCC and MSVC 6.0
Code: Show/Hide
int main()
{
        short a, b;
        int c;

        a = 30000;
        b = 100;

        c = a * b;

        printf("%d * %d -> %d [%d]\n", a, b, c, a * b);
}

Code: Show/Hide
30000 * 100 -> 3000000 [3000000]
Back to top
View users profile Send private message Add User to Ignore List Send email
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Sep 11, 2005 2:57 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

OK, the way it was happening was something like
Code: Show/Hide
short bounty = pkt.bounty;
if (killer->flags > 0)
   bounty *= settings.FlaggerKillMultiplier + 1;   //possible loss

but I've changed it to use an int now.

And that makes sense about the negatives, but I'd think it would just be better to have the score unsigned and the bounty signed, then "negative bounty hunters" would just have a score of 0. Haha.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Mon Sep 12, 2005 6:18 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Woo! You are "fixing" Mervbot, Cyan? biggrin.gif
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Mon Sep 12, 2005 9:03 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

In a way. I'm doing it at just the wrong time though. First I though MERV was cool, then I realized it sucked (compared to how cool it could be), then I figured it's useless with asss, then I figured it might still be useful, then I decided that since I started I mightn't as well finish.

What I'm wondering about, though is plugin changes. I would have to make sure old plugins would work, but I'm thinking of adding a whole new callback type interface instead of this messaging thing. Basically what it would do is search for a specific function name (like "handlePlayerMove") in the plugin, and call it if it finds it. That way, it completely automatically calls only the functions you need. Kinda cool, right?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Tue Sep 13, 2005 2:48 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Sounds cool.
But make sure its backward-compatible as you already said or alot of coders are going to be mad at you (including me) sa_tongue.gif .

What's so sucky about Mervbot btw? (specific points if you can name them)
Only thing I can mention is the lacking feature of registering commands (so you can't ever catch all the commands that the plugin isn't handling). (Aka.. like TWCore does)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Sep 13, 2005 9:21 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Command registration is definitely an issue. Ekted's timer feature is also a bonus.

But a lot of the improvements are behind the scenes. Plugin interaction is exactly the same now, but the core code is completely whacked out.

Parital list of changes:

  • Conversion from iostream classes to FILE io.
  • Formed class SSConnection, which does a pretty good job of black-boxing the core protocol.
  • A lot of items use static buffers instead of dynamically allocated.
  • Packets are handled as structures and not as byte strings (much, much cleaner).
  • Removed class UDPSocket, as it didn't provide enough Winsock features. (I mean, a wrapper for a library? Ugh.)
  • The map now treated as a class and not a pure byte structure.
  • Packet handlers use a pure array and not a template class.
  • Formatted sendPrivate(), sendPublic(), etc. messaging, eliminates need to use String class for chatting.
  • Using more library functions instead of catid ones: isprint() instead of isPrintable() among others, zlib's crc32() instead of getFileChecksum(), and an intrinsic strlen() instead of STRLEN().
  • In the middle of getting rid of struct clientMessage, which dynamically allocates the size needed for the packet, and instead using a packet structure on the stack.

That's all the major ones I can think of right now.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Sep 16, 2005 6:51 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Code: Show/Hide
sub   esp, 3064

LOL. Yes, I am definitely going to implement command-registering with handler functions.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
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 cannot 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: 16 page(s) served in previous 5 minutes.

phpBB Created this page in 0.628773 seconds : 34 queries executed (86.2%): GZIP compression disabled