Jump to content
SubSpace Forum Network

Recommended Posts

Posted

me and my buddy are making a pretty cool zone and it should be one of them zones that stick arround forever, we need a bot or a module, preferably module.

 

Specs:

 

Zone is a huge 'running' map with small bases scattered around it and warpradiuslimit set to 1024. Obviously, all ships have fairly high speeds, but well balanced, you should all check it out yes.gif . Anyways there are only 3 carriable flags. I want this to be sort of a super rabbit zone. So when the bot notices a player picked up a flag, he should be sent to the flagger freq with the other two flaggers.

 

Flaggers have: GunUpgrade, BombUpgrade, 0 FireCostPercent, 1500 DamagePercent (they take more damage), 1000 SpeedAdjustment, 500 ThrustAdjustment, 0 DropDelay.

 

Of coarse, we need the gameplay to be adjusted VIA .txt

Such as:

 

[Freq Manager] (do i put this flagger on flaggerfreq)

Flagger1=

Flagger2= 1/2 Yes/No

Flagger3=

 

^^ This allows us to make one flagger an enemy of the other two teamed up flaggers. Or to eliminate flagger teaming.

 

When the flagger gets killed the flag is already transfered to the killer. The bot should notice he has the flag now and make the switch.

 

Simple bot, eh? Any Takers?

Posted (edited)

It wasnt really a zone ad, i just said check them out because they are balanced although it sounds like an ubalanced super zone.

 

Anyways, OK.

 

1: All players on seperate freqs.

2: Any player picks up a flag.

3: Player who picked up flag gets his position sent to arena message every 30 seconds.

4: Player with flag dies, stop exposing his coordinates.

 

 

As you can see this is much more simplified, because i realized if everyone is on their own freq, and freqmax is 1, then we dont need to send the flagger to a private freq.

 

 

^^ Aquarius lol on a friends name.

Edited by Stray
Posted (edited)

you would load the module normaly, making sure to load chat, mainloop, game, playerdata, arenaman..other basic ones. you would then make a timer (mainloop->SetTimer()) then you would have arena data int time_left_for check to set it up. after you set it up, you would have function int timer() that ticks once every second. after each second you do arenadata->time_left_for_check--;

 

if(time_left_check == 0)

{

Foreachplayer()

{

if(p->position.flagscarried > 0)

{

//here you do an algorith to find the players position, because p->position.x(or y) returns values of pixels or some other smaller #.

// i would also suggest finding map reginos that players are familiar with such as h5, o10.

Edit:found the algorith, thanks to smong's halo_hill.

int x = p->position.x >> 4;

int y = p->position.y >> 4;

char xchar = 'A' + (ad->x * 10) / 512;

int ynum = 1 + (ad->y * 10) / 512;

 

chat->SendArenaMessage(arena, "Player %s has %d flags at %d, %d(%s%d), p->name, p->flagfscarried, x, y, letter, number)

}

}

}

i wrote this off the top of my head, some variables are obviously not correctly named.

Edited by tcsoccerman
Posted

This is why I'm a graphic designer and not a programmer.

What zone are you with? Which do you support? Do you need graphics?

 

Work with me, I'll work with you.

 

Thanks?

 

(i need this module)

 

SSDev has ASSS test server, test it in arena bzrabbit.

Posted

Here you go, all you need to do now is compile it.

 

 

Add the following to arena.conf:

 

AttachModules = flaggerposition <any other modules>

[FlaggerPosition]
AnnounceTicks = 3000

 

And the following to modules.conf:

 

yourdll:flaggerposition

flaggerposition.c

Posted
creatix is better than you'll ever be.

 

Uhm? That was rude.. Why are you here again?

 

 

Here you go, all you need to do now is compile it.

 

 

Add the following to arena.conf:

 

AttachModules = flaggerposition <any other modules>

[FlaggerPosition]
AnnounceTicks = 3000

 

And the following to modules.conf:

 

yourdll:flaggerposition

 

 

Thank you jowie!

Posted

I feel like a noob. I simply followed exactly what was stated on http://wiki.minegoboom.com/index.php/Installing_New_Modules

 

Compiler: Default compiler
Building Makefile: "C:\Do!@#$%^&*ents and Settings\Aquarius\Desktop\Makefile.win"
Executing  make...
make.exe -f "C:\Do!@#$%^&*ents and Settings\Aquarius\Desktop\Makefile.win" all
gcc.exe -c flaggerposition.c -o ../Desktop/flaggerposition.o -I"C:/Dev-Cpp/include"  -I"C:/Do!@#$%^&*ents and Settings/Aquarius/Desktop/!@#$%^&*s-1.4.3/src"  -I"C:/Do!@#$%^&*ents and Settings/Aquarius/Desktop/!@#$%^&*s-1.4.3/windeps"  -I"C:/Do!@#$%^&*ents and Settings/Aquarius/Desktop/!@#$%^&*s-1.4.3/src/include"  -DBUILDING_DLL=1  

dllwrap.exe --output-def libflaggerposition.def --implib libflaggerposition.a ../Desktop/flaggerposition.o  -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias ASSS-1.4.3/windeps/pthreadGC2.dll   -o flaggerposition.dll

../Desktop/flaggerposition.o(.text+0x9a):flaggerposition.c: undefined reference to `current_ticks'
collect2: ld returned 1 exit status

dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
dllwrap.exe: gcc exited with status 1

make.exe: *** [flaggerposition.dll] Error 1

Execution terminated

 

I probably just need another include directory?

Posted (edited)

Heh, you need the following paths set up in your makefile / IDE / whatever:

 

Link libraries:

asss-1.4.4\windeps\pthreadGC2.dll

 

Include directories:

asss-1.4.4\src\
ASSS-1.4.4\src\include
ASSS-1.4.4\windeps

 

Also, you need to compile a .c file from the ASSS src directory with it:

asss-1.4.4\src\main\util.c

 

 

Anyways, if you can't figure it out, I have also attached a .dll containing only this module.

flaggerposition.dll.gz

Edited by Samapico
Posted (edited)
Then you need to compile it on linux (resulting file will have a .so extension not .dll), which I can not do for you. Edited by JoWie
Posted (edited)

Works properly here.

 

Did you extract the .gz?

 

Try adding "pause" after the last line of ASSS.bat and tell me the consoles output.

Also make sure the line "flaggerposition:flaggerposition" is BELOW the lines "chat", "config", "playerdata", "arenaman" and "mainloop" in modules.conf.

 

If that doesn't work, see what happens if you remove it from modules.conf and type "?insmod flaggerposition:flaggerposition" in zone.

 

 

Oh, and are you using ASSS 1.4.4? The dll only works on that version

Edited by JoWie
Posted (edited)

i have only seen ss gfx, and yes u need or at least should have 1.4.4 . i'm not sure that it's necesarry though. i'll takea look at the module.

 

hmmm..

 

Jowie: As far as i'm following the coding, you never set the tick interval to the cfg->interval, it's always 100. also, i suggest making the default tick interval NOT 0, but 3000. and remove the if statement right after it also. these are m suggestions though. also, at line 58, what is the function current_ticks() from? couldn't find that.

Edited by tcsoccerman
Posted
Did you extract the .gz?

 

Yes.

 

Try adding "pause" after the last line of ASSS.bat and tell me the consoles output.

 

starting ASSS...
ASSS 1.4.3 built at Jun  8 2006 23:41:46
Loading modules...
I <cmod> loading C module 'deadlock' from 'internal'
I <cmod> loading C module 'prng' from 'internal'
I <cmod> loading C module 'logman' from 'internal'
I <cmod> loading C module 'mainloop' from 'internal'
I <cmod> loading C module 'config' from 'internal'
I <cmod> loading C module 'log_file' from 'internal'
I <cmod> loading C module 'playerdata' from 'internal'
I <cmod> loading C module 'lagdata' from 'internal'
I <cmod> loading C module 'bw_default' from 'internal'
I <cmod> loading C module 'net' from 'internal'
I <cmod> loading C module 'chatnet' from 'internal'
I <cmod> loading C module 'arenaman' from 'internal'
I <cmod> loading C module 'mapdata' from 'internal'
I <cmod> loading C module 'capman' from 'internal'
I <cmod> loading C module 'mapnewsdl' from 'internal'
I <cmod> loading C module 'core' from 'internal'
I <cmod> loading C module 'clientset' from 'internal'
I <cmod> loading C module 'persist' from 'scoring'
I <cmod> loading C module 'idle' from 'internal'
I <cmod> loading C module 'cmdman' from 'internal'
I <cmod> loading C module 'chat' from 'internal'
I <cmod> loading C module 'stats' from 'scoring'
I <cmod> loading C module 'basicstats' from 'scoring'
I <cmod> loading C module 'log_sysop' from 'internal'
I <cmod> loading C module 'log_staff' from 'internal'
I <cmod> loading C module 'auth_file' from 'internal'
I <cmod> loading C module 'security' from 'security'
I <cmod> loading C module 'directory' from 'internal'
I <cmod> loading C module 'auth_ban' from 'internal'
I <cmod> loading C module 'banners' from 'internal'
I <cmod> loading C module 'game_timer' from 'internal'
I <cmod> loading C module 'flagcore' from 'internal'
I <cmod> loading C module 'balls' from 'internal'
I <cmod> loading C module 'bricks' from 'internal'
I <cmod> loading C module 'koth' from 'internal'
I <cmod> loading C module 'fm_normal' from 'internal'
I <cmod> loading C module 'game' from 'internal'
I <cmod> loading C module 'lagaction' from 'internal'
I <cmod> loading C module 'cfghelp' from 'internal'
I <cmod> loading C module 'filetrans' from 'internal'
I <cmod> loading C module 'quickfix' from 'internal'
I <cmod> loading C module 'playercmd' from 'internal'
I <cmod> loading C module 'admincmd' from 'internal'
I <cmod> loading C module 'help' from 'internal'
I <cmod> loading C module 'sendfile' from 'internal'
I <cmod> loading C module 'autowarp' from 'funky'
I <cmod> loading C module 'brickwriter' from 'funky'
I <cmod> loading C module 'buy' from 'internal'
I <cmod> loading C module 'fake' from 'internal'
I <cmod> loading C module 'autoturret' from 'funky'
I <cmod> loading C module 'record' from 'funky'
I <cmod> loading C module 'sgcompat' from 'funky'
I <cmod> loading C module 'enc_cont' from 'security'
I <cmod> loading C module 'enc_vie' from 'internal'
I <cmod> loading C module 'messages' from 'internal'
I <cmod> loading C module 'objects' from 'internal'
I <cmod> loading C module 'flaggerposition' from 'internal'
E <cmod> error in GetProcAddress: The specified procedure could not be found.

Unrecoverable error (5): Error in loading module 'flaggerposition'
ASSS cannot start. error loading modules.

 

Also make sure the line "flaggerposition:flaggerposition" is BELOW the lines "chat", "config", "playerdata", "arenaman" and "mainloop" in modules.conf.

 

It is.

 

If that doesn't work, see what happens if you remove it from modules.conf and type "?insmod flaggerposition:flaggerposition" in zone

 

 

Well I cant get my local zone to boot for other reasons now so I don't know.

 

Then you need to compile it on linux (resulting file will have a .so extension not .dll), which I can not do for you.

 

Not even with ssh? blum.gif

 

a pymod would be -ideal-

Posted (edited)

you are getting that error because u are loading from internal, which doesn't make sense if modules.conf has

 

flaggerposition:flaggerposition

 

also jowie, i don't see where you prize flaggers speed and such. that shouldn't be to hard though.

 

i'll tell you what, i'll make the module for u smile.gif

 

ummm do you even want to prize the flagger?

Edited by tcsoccerman
Posted
JoWie: As far as i'm following the coding, you never set the tick interval to the cfg->interval, it's always 100. also, i suggest making the default tick interval NOT 0, but 3000. and remove the if statement right after it also. these are m suggestions though. also, at line 58, what is the function current_ticks() from? couldn't find that.

 

I do set the interval, look in ReadConfig(), a tick interval of 0 means the messages are not sent at all (look in AnnounceTimer()).

 

AnnounceTimer is called every second and checks if the current time differs with the last update more then adata->announceTicks.

I am doing it this way so adata->announceTicks can be changed anytime without the need to restart the timer.

 

current_ticks() is how many ticks ASSS has been running, look in util.h.

 

if you remove that if statement, you get an arena message every second

 

 

you are getting that error because u are loading from internal, which doesn't make sense if modules.conf has

 

flaggerposition:flaggerposition

 

also jowie, i don't see where you prize flaggers speed and such. that shouldn't be to hard though.

 

i'll tell you what, i'll make the module for u smile.gif

He said he didn't need that anymore:

 

It wasnt really a zone ad, i just said check them out because they are balanced although it sounds like an ubalanced super zone.

 

Anyways, OK.

 

1: All players on seperate freqs.

2: Any player picks up a flag.

3: Player who picked up flag gets his position sent to arena message every 30 seconds.

4: Player with flag dies, stop exposing his coordinates.

 

As you can see this is much more simplified, because i realized if everyone is on their own freq, and freqmax is 1, then we dont need to send the flagger to a private freq.

 

^^ Aquarius lol on a friends name.

 

 

 

Aquarius, try pasting your modules.conf

Posted (edited)

Oh ok. i already ahve one made though, and it includes bounty upgrades, although that is optional.

 

Edit: to install this module, open dev cpp, make a new .dll project. name it w.e.

then go to project->options->include directory's and add ASSS/src, ASSS/src/include, ASSS/windeps

compile it and if you somehow get an error let me know

 

 

p.s. this has not been tested.

 

.c, .dll

flaggergame.zip

Edited by tcsoccerman

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...