Pymous Posted March 30, 2015 Share Posted March 30, 2015 Hello ! First post here, first question ! I'm trying, like a lot of people, to create a mod on my own, but looking at the actual state of things, it's quite messy, and I have a few questions. Where can I find a list of the "events" available in inst.ListenForEvent() ? Is it possible to cancel an event ? Like a Chat Message having a specific syntaxe, and being cancelled for exemple. How can I access a "list" of the properties available for a specific "object" ? Like TheNet ? Is it possible to "reload" mods (or equivalent) from the console ? Restarting the whole server, connecting, ... just to type a message is quit boresome.Thanks in advance for all the answers ! Good day. Link to comment Share on other sites More sharing options...
rezecib Posted March 30, 2015 Share Posted March 30, 2015 @Pymous, 1. There is no master list of them. Your best bet is doing some clever Find-in-Files, e.g. with the regex pattern "PushEvent("2. No. You can remove an event callback (make something stop listening for an event), but you have to have access to the function it was using to listen in the first place, which you seldom do.3. Read the Lua code. TheNet and a few other things are C++ objects, though, so the only way to get the list of their properties is by decompiling the game's exe. Someone had a spreadsheet with a list of function names, but it looks like it's no longer public... At some point Peter has said they plan on generating an API for the C++ code.4. Not really. You can, however, use c_reset() to restart the server a little faster. Link to comment Share on other sites More sharing options...
Pymous Posted March 30, 2015 Author Share Posted March 30, 2015 Thanks for your answer ! So basically, it's nope for everything, sad I'm actually doing a small script/website to parse the .lua available in /scripts to extract the object/method/arguments and display them in a more ... visual way. Do you think this good be usefull for the community ? Link to comment Share on other sites More sharing options...
rezecib Posted March 31, 2015 Share Posted March 31, 2015 @Pymous, Sure. I believe there is already a project on this (here), but it does not look like much (any?) progress was made. Link to comment Share on other sites More sharing options...
Pymous Posted March 31, 2015 Author Share Posted March 31, 2015 Thanks @rezecib. Ok, so it's a W.I.P (early-early), but I have made some progress ! By parsing the scripts folder available, I managed to get a good list of some components and their methods. At terms, I'd like to get the search working, and a list of some arguments, ... (for listenForEvent, ...), but I will finish with the components first. I'd like to get this page to be able to evolve with the community, if the page is a good idea in the first place, and allow members to edit a few things : comment, api-version, method arguments, ... Do you, or another members, think this could be a good thing ? Link to comment Share on other sites More sharing options...
Pymous Posted March 31, 2015 Author Share Posted March 31, 2015 Crap, I can't edit my own post and I forgot to put the link in it... sorry ! You can see the project here : http://clapity.eu/dst/ Link to comment Share on other sites More sharing options...
Blueberrys Posted April 1, 2015 Share Posted April 1, 2015 I believe there is already a project on this (here), but it does not look like much (any?) progress was made. The progress is slow, but definitely has been on-going. There are currently 80+ completed pages (including many components with descriptions, methods, etc). @Pymous I definitely think it is a good idea and would be helpful, but you might wanna check out the other site first. You seem to be trying to accomplish the same task, documenting the API. You can post on the thread if you have any questions, concerns, ideas, etc. Link to comment Share on other sites More sharing options...
Maris Posted April 1, 2015 Share Posted April 1, 2015 It should be wiki format Link to comment Share on other sites More sharing options...
hottehead Posted April 13, 2015 Share Posted April 13, 2015 The progress is slow, but definitely has been on-going. There are currently 80+ completed pages (including many components with descriptions, methods, etc). @Pymous I definitely think it is a good idea and would be helpful, but you might wanna check out the other site first. You seem to be trying to accomplish the same task, documenting the API. You can post on the thread if you have any questions, concerns, ideas, etc. There has definitly been progress just a slow one due to active contributors. But we are far away from dead. @Pymous you are exactly the kind of guy we need over at DS API Docs. We already started a similar project and could use your help. We have already gone through the setup process inlcudingMulti user accessSecurity measuresUser permission setupNotification structuresAuthor discussions for single articlesAnd if you're also able to code HTML, JS or CSS you are welcome to contribute to this to. So far I am the only one maintaining the codebase. Could use a helping hand We are open minded for suggestions so you can go in implementing your ideas... together with us =) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now