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
<c> drone

 
Post new topic   Reply to topic Printable version
 View previous topic  Custom bomb trajectory Post :: Post Attaching turret with aim and firing c...  View next topic  
Author Message
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed Jul 27, 2005 1:50 pm    Post subject: <c> drone Reply to topic Reply with quote

I've released the AI drone code from my server on http://rshl.org/open/index.php?topic=7.msg217#msg217

Breifly, it's an AI drone that walks around and shoots and can die. There's lots of little things that should be fixed, but I'm not going to fix since I don't think I'm using this interface / ai anymore. If you improve this interface I ask that you make it public too, for the good of subspace, but do whatever you want.
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Wed Jul 27, 2005 6:17 pm    Post subject: Reply to topic Reply with quote

Copy of rar file for those that don't want to register to get it.



Drone.rar - 15.26 KB
File downloaded or viewed 149 time(s)
Back to top
View users profile Send private message Add User to Ignore List Send email
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed Jul 27, 2005 8:23 pm    Post subject: Reply to topic Reply with quote

You have to register to get it? hmm
Back to top
View users profile Send private message Add User to Ignore List AIM Address
i88gerbils
Oldbie Server Help


Gender:Gender:Male
Joined: Dec 13 2002
Posts: 423
Location: OH
Offline

PostPosted: Wed Jul 27, 2005 10:28 pm    Post subject: Reply to topic Reply with quote

This interests me as I'd like to create a stationary turret that shoots at things with various levels of firepower, energy, etc ... It would probably be best paired up as something you can ?buy. Err right on that last one :D.
_________________
Oldbie Server Help
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website Yahoo Messenger
BB
Newbie


Age:40
Gender:Gender:Male
Joined: May 24 2003
Posts: 2
Location: Iowa
Offline

PostPosted: Mon Sep 05, 2005 1:25 am    Post subject: Reply to topic Reply with quote

I've downloaded and compiled this. I put the file Drone.dll into my bin directory, and then added Drone:drone to my modules.conf. My [ Modules ] section of arena.conf looks like this:

AttachModules = \
fm_normal \
points_kill \
points_flag \
points_goal \
buy
drone

When I entered the game the ?drone command doesn't do anything, or ?drone help. The ?buy drone command just comes back with Invalid item specified for purchase.

I didn't modify the code at all, just compiled it as is, 0 errors and 0 warnings. The Drone.dll file is 54.3 KB.

Is there something I'm doing wrong?

Thanks in advance for any replies.


*edit* Using Asss 1.4.0. Everything is still set up as default except the map file. *edit*
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Mon Sep 05, 2005 2:46 am    Post subject: Reply to topic Reply with quote

you're missing a backslash:

AttachModules = \
fm_normal \
points_kill \
points_flag \
points_goal \
buy \
drone

basicly, you need to add an ai to the interface (see simple.c), and then spawn a drone... looking at the interface funcs

Code: Show/Hide

void (*addDrone) (
      void (*aiFunc)(DroneData data, DroneSettings *ds, DroneAction* action, byte* perDroneData),  // packet function
      void (*actionFunction) (Player *p, const char *params, const Target* target, byte* perDroneData), // ?drone <param> function
      const char *name, // name used for when buying the drone
      const char *aboutText, // ?drone about text
      const char *helpText, // ?drone help extra text
      u32 bytesToAllocate, // amount of per drone data (int bytes) to allocate, use 0 to not allocate any memory
      int bulletlevel, // 1-3
      int bomblevel, // 1, for now
      int cost // how much does it cost to ?buy your drone
      );

   void (*removeDrone) ( const char *name ); // remove the drone with this name, used during your modules unloading

   // These next functions are how the server interacts with the drone modules, don't use these when designing your AI:
   void (*sendDroneCostInfo) (Player *p); // send the cost information to a player
   BOOL (*isDroneOwner) (Player *p); // is this player a drone owner?
   int (*getCost) (const char *type); // returns cost or -1 if not found
   BOOL (*spawnDrone) (Player *p, const char *type); // spawn a drone at the player's current position, true iff found type and spawned


use addDrone and then use spawnDrone to spawn it

the whole cost system was just because that's how I used it. It could easily be removed as it is not implemented in this module (but rather, in a different one by using getCost and isDroneOwner)
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:33
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Mon Sep 05, 2005 5:52 pm    Post subject: Reply to topic Reply with quote

its for As3, right?
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Mon Sep 05, 2005 11:40 pm    Post subject: Reply to topic Reply with quote

that's what this subforum is for, yes
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Quan Chi2
Member of "Sexy Teenagers that Code" Group
Member of


Age:33
Gender:Gender:Male
Joined: Mar 25 2005
Posts: 860
Location: NYC
Offline

PostPosted: Tue Sep 06, 2005 1:08 am    Post subject: Reply to topic Reply with quote

lol yea.. i realized that after i posted tongue.gif
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Kitsune (^)
Novice


Age:32
Gender:Gender:Male
Joined: Sep 29 2005
Posts: 42
Location: Between Heaven and Hell.
Offline

PostPosted: Sun Nov 20, 2005 1:43 pm    Post subject: Okay. Reply to topic Reply with quote

I can't get it to work, can someone help me.. it won't attach to AS3...

So meh.
_________________
If (Pi=Infinite 3 Infinitity)
Carpe diem!
Know thyself.
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


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

PostPosted: Sun Nov 20, 2005 7:22 pm    Post subject: Reply to topic Reply with quote

Well I would help you but... meh.
_________________
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
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Nov 22, 2005 9:36 pm    Post subject: Reply to topic Reply with quote

if the fail part of the attach section, print out the address of every module that should have been loaded correctly. $5 says one of them was not loaded and should be placed in modules.txt before drone

The address will be 0 if it was not loaded correctly.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
CaptainPoopface
Newbie


Joined: Dec 16 2008
Posts: 17
Offline

PostPosted: Mon Jan 05, 2009 7:11 am    Post subject: Reply to topic Reply with quote

Sorry for bump, but I would really like to get this working. It looks like you've put a great deal of work into it, and I want to play with it.

I cannot seem to spawn a drone. I've added the cmd_'s for addDrone, spawnDrone and removeDrone; put drone in the modules.conf AFTER objects, and referenced it in the arena.conf. The module attaches successfully. I try ?addDrone and ?spawnDrone (with no arguments) but nothing happens. What am I doing wrong?
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Mon Jan 05, 2009 6:45 pm    Post subject: Reply to topic Reply with quote

addDrone and spawnDrone are interface functions, not asss commands. The only command used is ?drone, and the behavior is customizable by the specific drone type.

if drone is loaded and attached correctly (use "?lsmod -a" to check), load the simple module to spawn a drone (see simple.c in MM_LOAD for how to do this in code). use "?insmod simple" (or drone:simple or <dllname>:simple if you compiled it into a non-core .dll or .so)

that should spawn one drone which follows enemies and shoots at them (I think the bounty is the drone's energy).


the following behavior looks incomplete which is weird. If you want to be able to do "?drone follow" you'll need to code the droneAction function to populate the PerDroneData.playerToFollow field, although there's no notion of ownership with the simple bot
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects 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 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: 644 page(s) served in previous 5 minutes.

phpBB Created this page in 0.573113 seconds : 41 queries executed (84.1%): GZIP compression disabled