Giter Club home page Giter Club logo

Comments (9)

efroemling avatar efroemling commented on June 8, 2024 3

..And on that note, we could also add an opt-in "Import Everything In Mods Folder" option in settings/advanced for the time being until there's an official meta-tag for stuff wanting to run at launch...

from ballistica.

Dliwk avatar Dliwk commented on June 8, 2024 1

You may pass -exec parameter to ballisticacore_headless 🤡

from ballistica.

efroemling avatar efroemling commented on June 8, 2024

This is somewhat by design. 1.4 would simply import every script it found in the game's various python directories (such as the mods dir). However this isn't a very good idea for a number of reasons. For 1.5 I moved to a tagging system where scripts can tag things that they provide and the game can use those tags to locate and import particular modules such as mini-games dynamically.

https://github.com/efroemling/ballistica/wiki/Meta-Tag-System

The only issue is that there is not yet a way to tag something that wants to run at game launch or other particular times. I'll try to get this added in as soon as I can, but for right now you may have to add explicit imports for mod scripts that you add. The stuff in mods should still be importable; it's just not getting imported by default. (you can do print(sys.path) to verify this).

ba._app.on_app_launch() would probably be the correct place to add any extra imports/etc that you wanted. It wouldn't be too hard to wire it up to scan the mods dir and import everything it finds there if you want to restore the old behavior.

from ballistica.

sudo-logic avatar sudo-logic commented on June 8, 2024

The workaround should work pretty well on regular builds. But I guess on_app_launch() being an internal function, is 'Locked' on Server Builds. I'm stuck here, is there any other function that is executed as soon as the Server is launched?

from ballistica.

sudo-logic avatar sudo-logic commented on June 8, 2024

I managed to make a workaround by sending a command to the server (mgr.cmd).
I can edit the bombsquad_server file for now and make it execute a function to import all the mods! Problem Solved! Kudos to mgr.cmd.

@Dliwk That's a pretty similar idea to mine, how did you find out about the -exec parameter may I ask?

from ballistica.

Dliwk avatar Dliwk commented on June 8, 2024

Oh, I don't remember... Maybe I was looking at the output of the strings ./bombsquad...

from ballistica.

sudo-logic avatar sudo-logic commented on June 8, 2024

I guess I remember seeing it in some older version of bombsquad_server, well it's offtopic so I should stop. :>

from ballistica.

Dliwk avatar Dliwk commented on June 8, 2024

Hmm, but what about new meta-tag like # ba_meta import requied? It will not lead to the import of older mods.

from ballistica.

efroemling avatar efroemling commented on June 8, 2024

For the record, yes I am planning to add a meta-tag to register 'plugins' that get executed on launch. I'll try to get this in within the next few days.

from ballistica.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.