Author |
Message |
Helicon Server Help Squatter
Joined: Dec 03 2002 Posts: 771 Location: GNU Doldrums Offline
|
Posted: Mon Apr 07, 2003 4:18 pm Post subject: module loading process |
 |
|
|
|
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 |
|
 |
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: Tue Apr 08, 2003 2:31 am Post subject: |
 |
|
|
|
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 |
|
 |
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: Tue Apr 08, 2003 2:34 am Post subject: |
 |
|
|
|
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 |
|
 |
Helicon Server Help Squatter
Joined: Dec 03 2002 Posts: 771 Location: GNU Doldrums Offline
|
Posted: Thu Apr 10, 2003 4:53 pm Post subject: |
 |
|
|
|
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 |
|
 |
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: Fri Apr 11, 2003 8:11 pm Post subject: |
 |
|
|
|
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 |
|
 |
Helicon Server Help Squatter
Joined: Dec 03 2002 Posts: 771 Location: GNU Doldrums Offline
|
Posted: Fri Apr 11, 2003 9:50 pm Post subject: |
 |
|
|
|
< the subject of this post has been dealt with, Moderators, please feel free to delete this post > |
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Fri Apr 11, 2003 11:23 pm Post subject: |
 |
|
|
|
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 |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sat Apr 12, 2003 1:32 pm Post subject: |
 |
|
|
|
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 |
|
 |
Helicon Server Help Squatter
Joined: Dec 03 2002 Posts: 771 Location: GNU Doldrums Offline
|
Posted: Sat Apr 12, 2003 6:35 pm Post subject: |
 |
|
|
|
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 |
|
 |
|