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
module loading process

 
Post new topic   Reply to topic Printable version
 View previous topic  Nifty features... lost in the bytecodes Post :: Post Free area check code  View next topic  
Author Message
Helicon
Server Help Squatter


Joined: Dec 03 2002
Posts: 771
Location: GNU Doldrums
Offline

PostPosted: Mon Apr 07, 2003 4:18 pm    Post subject: module loading process Reply to topic Reply with quote

Gremlinar, could you describe the process of loading a module, in your own words? Also, could someone describe the process of adding arena.conf sections and values... are there side effects if these values are set in .conf but not utilised? I notice strange things happen with Powerball shipsettings when the ball module is not loaded
_________________
Signatures just seem so quaint.
Back to top
View users profile Send private message Add User to Ignore List
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Tue Apr 08, 2003 2:31 am    Post subject: Reply to topic Reply with quote

Loading a module is pretty trivial (look at LoadMod in module.c). The file containing the module is identified and loaded with dlopen/LoadLibrary, then the MM_<modulename> symbol is located with dlsym/GetProcAddress, then it's called, with action equal to MM_LOAD, a pointer to the modman interface, and a null arena pointer (the arena ptr is used only when attaching).

The module entry point should do a few things, none of which is actually required: stash the modman pointer somewhere to get to later, get some other interface pointers, register some callbacks, register its own interface or two, call some functions in other interfaces (creating timers, packet handlers, etc.).
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Tue Apr 08, 2003 2:34 am    Post subject: Reply to topic Reply with quote

Values in config files are only used when requested (via cfg->GetStr or cfg->GetInt). You can add anything you want there, but it won't make a difference unless someone requests it. It'll be read in and stored in memory, though, so don't put lots of extra crap in there.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Helicon
Server Help Squatter


Joined: Dec 03 2002
Posts: 771
Location: GNU Doldrums
Offline

PostPosted: Thu Apr 10, 2003 4:53 pm    Post subject: Reply to topic Reply with quote

also, i notice that #include isnt as flexible as it could be. This is just a suggestion, or maybe i am doing this wrong


/conf/gunofDEATH.conf wrote:

InitialBombs = 2
MaxBombs = 3
;etc... for ultimate destructions


and then use it like this

Arena.conf wrote:


[Warbird]
#include /conf/gunofDEATH.conf
;etc...
[Javelin]
#include /conf/gunofDEATH.conf
;etc etc etc


am i doing this wrong? is this possible... if so it would really make those settings modular.
Back to top
View users profile Send private message Add User to Ignore List
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Fri Apr 11, 2003 8:11 pm    Post subject: Reply to topic Reply with quote

That should work now (it didn't work in my first version of config). You should use "conf/whatever.conf" as the include parameter. The inital slash is telling it to use that as an absolute pathname starting from /, and that won't work.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Helicon
Server Help Squatter


Joined: Dec 03 2002
Posts: 771
Location: GNU Doldrums
Offline

PostPosted: Fri Apr 11, 2003 9:50 pm    Post subject: Reply to topic Reply with quote

< the subject of this post has been dealt with, Moderators, please feel free to delete this post >
Back to top
View users profile Send private message Add User to Ignore List
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Fri Apr 11, 2003 11:23 pm    Post subject: Reply to topic Reply with quote

Nevar! (posts dont get deleted except with good reson)
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
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: Sat Apr 12, 2003 1:32 pm    Post subject: Reply to topic Reply with quote

Why not delete/close threads?

Simple. See that little "Search" button on the top of every page? If someone needs assistance, they can do a search before posting, and may find their answer.

As for not closing threads: What if someone else has a question that relates directly to this question? They can post a reply in it asking for some more info about it, even if the thread is 6 months old. Better they bump an old post with part of the info that they need than for them to post a new question with less information that we may not be able to understand their problem.
Back to top
View users profile Send private message Add User to Ignore List Send email
Helicon
Server Help Squatter


Joined: Dec 03 2002
Posts: 771
Location: GNU Doldrums
Offline

PostPosted: Sat Apr 12, 2003 6:35 pm    Post subject: Reply to topic Reply with quote

i did not intend for you to close this entire thread....i made one stupid post whose error i dealth with within 5 minutes of posting, and i realised it was not worth keeping... no one should waste their time on me, especially when i've already fixed the problem. I edited it to keep Gremlinar from wasting time (and thinking i am a complete moron). The message you see above requests that that post itself be deleted, nothing more
Back to top
View users profile Send private message Add User to Ignore List
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: 647 page(s) served in previous 5 minutes.

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