Wiki section for scripting/extending ALiVE?

  1. 7 years ago

    I'm working on a Antistasi-style scenario with ALiVE (players are guerillas), and we're going to be adding some systems on top of ALiVE for tracking player progress, etc.

    The documentation available for people looking to extend, build on top of, or otherwise use ALiVE outside of the editor is kind of sparse. For example, the core data types aren't explained anywhere (what's the difference between an objective, a cluster, and a sector? What data does each contain?), and the headers on the code itself aren't very verbose either.

    As an example, we're looking to add an "influence" system, where the mission keeps track of which side is dominant in each town (if the players are dominant in a majority of the towns on the map, they win). It took me a while to figure out that the best way to do this would be to access all the civillian clusters via `ALIVE_clustersCivSettlement`, narrow it down via a TAOR, and then use `fnc_getDominantFaction`. I was confused by whether or not I should be looking at objectives or sectors, but realized clusters were really what I wanted. Maybe this isn't even the best way!

    The only thing currently available on the wiki for people like me is Script Snippets .

    Where should this sort of documentation live? In the code itself, in function headers? Or can we get a new Wiki section that documents the internals of ALiVE?

  2. Friznit

    14 Dec 2016 Administrator

    In the func headers and the code itself. ALiVE is far to complex a beast to document the full technical detail a wiki (and tbh I have a day job, so would never find the time!) That said, if there are some high level concepts that you specifically need then we could potentially add that to the wiki but you may be better off joining our slack channel and simply talking to devs directly.

  3. There's a Slack channel? Where? Wiki/google not showing any results.

    I'm not looking for a dev to explain anything to me, really, because the code is actually well written and easy enough to follow. But I feel like I'm learning a lot by reading that would be useful to other scripters and I should document that knowledge publicly. It sounds like I should just start a wiki section for that.

  4. Friznit

    14 Dec 2016 Administrator

    I'll happily make you an editor on the wiki if you want to get stuck in - I'd would appreciate the assistance!

  5. Friznit

    15 Dec 2016 Administrator

    http://alivemod.com/wiki/index.php?title=Functions&action=edit&redlink=1

    I've added you as an editor on the wiki and created a new page here where you can leave anything relating to functions or other technical stuff for the record.

  6. If you get the "influence system" up and running I would love to have a look, been trying to get that kind of victory condition working without luck.

  7. Hm, it looks like I have a Wiki account but can't edit anything or create any pages.

    Here's an example of the type of documentation I would like to create: https://gist.github.com/nateberkopec/1996216ed16291202a19b966b9fc1315

  8. Edited 7 years ago by SpyderBlack723

    @nateberkopec
    Just confirming, can you edit the page Friz created here: http://alivemod.com/wiki/index.php/Functions ?

  9. Nope: "There is currently no text in this page. You can search for this page title in other pages, or search the related logs, but you do not have permission to create this page."

  10. @Friznit

  11. Friznit

    17 Dec 2016 Administrator

    Try now? Last option should be "edit this page"

  12. Nope: https://imgur.com/a/YMBUi

  13. @Imbazil here's the gist of what we're going to do for influence: https://github.com/SpaceHunnies/spacehunnies-test.Tanoa/issues/4#issuecomment-266898540

    We need to write a getDominantSide function (getDominantFaction works for us right now because there is only one faction per side, but that's gonna change), and turn the script into a CBA per-frame handler, but that's pretty much all there is to it.

    I'd like to add the influence display to the C2ISTAR intel menu, but that looks pretty complicated. The tablet isn't really designed for extensibility.

  14. Edited 7 years ago by SpyderBlack723

    Create a ticket on GH for the intel stuff. It's probably doable (although limited) with a bit of additional development.

  15. Friznit

    17 Dec 2016 Administrator

    @nateberkopec Nope: https://imgur.com/a/YMBUi

    Stupid wiki. Should be fixed now.

  16. Edited 7 years ago by Docbuck

    There is also this:

    https://community.bistudio.com/wiki/BIS_fnc_exportFunctionsToWiki

    If you can get the import page working, which you might be able to take right off BIS wiki, should be able to use this to export your functions. Assuming they have standard headers.

 

or Sign Up to reply!