 |
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu May 17, 2007 3:39 pm Post subject: fm_shiplimits |
 |
|
|
|
I couldn't find a topic for this so I'm starting one.
fm_shiplimits is a module that will restrict how many players can be of a certain ship and which freqs can have certain ships. An example would be 4/4 team split with or without capital ships. Or if you have an event where everyone must be in a certain ship you can use it for that too.
I also added speclock for vie clients like subgame has.
[fm_shiplimits]
; ShipN (1-8) = only|exclude,<freq (-1 no one)>,<max allowed (0 unlimited)>
; Example 1
; Freq 0 can use 1-4
; Freq 1 can use 5-8
; Ships 4 and 8 are capital ships, only 1 player can have it at a time
Ship1 = only,0,0
Ship2 = only,0,0
Ship3 = only,0,0
Ship4 = only,0,1
Ship5 = only,1,0
Ship6 = only,1,0
Ship7 = only,1,0
Ship8 = only,1,1
; Example 2
; Freq 0 can use Warbird and Jav
; Freq 1 can use Terr and Weasel
; All other ships can't be used (so other modules can *setship a nightwasp or something)
Ship1 = only,0,0
Ship2 = only,0,0
Ship3 = only,-1,0
Ship4 = only,-1,0
Ship5 = only,1,0
Ship6 = only,1,0
Ship7 = only,-1,0
Ship8 = only,-1,0
; whether or not players are notified when they try to change to an illegal ship
NotifyIllegal = 1
; spec lock vie clients
VIEMessage = This arena is Continuum-only. Please get Continuum client from http://www.subspace.net to play here
LockSpecVIE = 0
|
Note: At the time of writing this module is based off fm_normal from asss-1.4.3, so it may inherit bugs from there. _________________ ss news
v1.3 (16k 1.4.3 doc dll src)
asss-fm_shiplimits-1.3.zip - 15.26 KB
File downloaded or viewed 57 time(s)
|
|
Back to top |
|
 |
Aquarius Guest
Offline
|
Posted: Thu May 17, 2007 6:49 pm Post subject: |
 |
|
|
|
exactly what i needed
|
|
Back to top |
|
 |
Aquarius Guest
Offline
|
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Fri May 18, 2007 4:34 am Post subject: |
 |
|
|
|
And link to mysqldll.a in windeps. Really you should create a separate project to separate out the hs modules from non-hs modules.
|
|
Back to top |
|
 |
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sat Mar 01, 2008 11:48 pm Post subject: |
 |
|
|
|
i added a feature for ship limit by points.
basically in the shipok function i added this :
else if(ad->ship[ship].pointlimit > 0)
{
int points;
pd->Lock();
points = stats->GetStat(p, STAT_FLAG_POINTS, 0) + stats->GetStat(p, STAT_KILL_POINTS, 0);
pd->Unlock();
if(points < ad->ship[ship].pointlimit)
return 0;
} |
i'm not sure what exactly makes up a player points so i stuck with that.
the settings in config follows the same pattern as smong initialy had. for each ship simply add another comma, followed by the amount of points needed to use that ship (i didn't implement minium amount as that did not seem reasonable. i could add it if needed).
i hope it is clear that i didn't make this module, smong did. i just added the points.
oh, and smong it would always be good if you, the initial maker of the module, could check over what i have added.
edit:i never did test this new feature.
src, dll, and new .conf
fm_shiplimits.zip - 11.76 KB
File downloaded or viewed 44 time(s)
|
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
|
Back to top |
|
 |
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sun Mar 02, 2008 3:17 pm Post subject: |
 |
|
|
|
oh i see how that function is setup now. should have noticed that. i will add to the version at top.
new correct version attached
src, .dll, .conf, .txt
fm_shiplimits.zip - 12.48 KB
File downloaded or viewed 43 time(s)
|
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sun Mar 02, 2008 7:17 pm Post subject: |
 |
|
|
|
That's still not right, also I notice you based it on version 1.2 instead of 1.3 which was the latest.
So I went and edited it to work and tested it. I also recoded the notify message so it can tell the player if they need more points or if they are on the wrong freq (previously it would have just assumed it was the wrong freq). I also merged in changes from fm_normal 1.4.3 -> 1.4.4. So here's 1.4 attached.
1.4.4 doc dll src
asss-fm_shiplimits-1.4.zip - 16.27 KB
File downloaded or viewed 45 time(s)
|
|
Back to top |
|
 |
tcsoccerman Server Help Squatter
Age:32 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sun Mar 02, 2008 7:39 pm Post subject: |
 |
|
|
|
i fail.
|
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sun Mar 02, 2008 7:45 pm Post subject: |
 |
|
|
|
Nah, you got all the asss specific code right (grabbing the stats interface, extending the arena settings struct, etc), you just didn't get the program logic right.
|
|
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: 44 page(s) served in previous 5 minutes.
|