Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Valkyrien Skies 2 Support #25

Open
Raeffi opened this issue Oct 8, 2024 · 5 comments
Open

[Suggestion] Valkyrien Skies 2 Support #25

Raeffi opened this issue Oct 8, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Raeffi
Copy link

Raeffi commented Oct 8, 2024

As far as i know valkyrien skies provides functions for other mods interacting with ships.

For example a really useful feature would be to make machines that only function as part of a ship.

@Yefancy Yefancy added the enhancement New feature or request label Oct 8, 2024
@blockninja124
Copy link

blockninja124 commented Nov 14, 2024

As someone whos made a VS addon, and so knows its api's decently, I'm intrigued by the idea of adding this through a PR eventually, however I don't know much about MB2s code (or the mod in general for that matter). If I wanted to add a "apply force to ship" and "is on ship" function to the machine events graph nodes (idk what to call them), how would I go about doing that? And where should I look in the source for similar things to take from? Only if your ok with me trying out at adding VS support, if you want to do it yourself or don't want it at all that's fine too, I just thought it could be something fun and cool for me to do as a project.

@Yefancy
Copy link
Member

Yefancy commented Nov 15, 2024

As someone whos made a VS addon, and so knows its api's decently, I'm intrigued by the idea of adding this through a PR eventually, however I don't know much about MB2s code (or the mod in general for that matter). If I wanted to add a "apply force to ship" and "is on ship" function to the machine events graph nodes (idk what to call them), how would I go about doing that? And where should I look in the source for similar things to take from? Only if your ok with me trying out at adding VS support, if you want to do it yourself or don't want it at all that's fine too, I just thought it could be something fun and cool for me to do as a project.

I'm glad you can provide help. I have no idea about this mod, because I havn't played the VS yet.
I'd like to give you some ideas about how to add custom nodes.
you can check here for how to add a custom node.

As your features, it should be something like this.

@LDLRegister(name = "apply force", group = "graph_processor.node.mbd2.machine.valkyrienskies", modID = "valkyrienskies")
public class EmitPhotonFXNode extends LinearTriggerNode {
    @InputPort
    public MBDMachine machine;
    // ......

    @Override
    protected void process() {
        if (machine != null) {
            // do your logic here
        }
    }
}

@Raeffi
Copy link
Author

Raeffi commented Nov 17, 2024

I dont really know anything about java programming so i have no idea how hard this is but it would be extremely useful if Eureka engine power was also supported directly (Eureka is an addon for Valkyrien Skies that adds easy to use ship parts)

Example of a mod that adds compat for create rotation to increase the engine power of a ship:
https://github.com/FixerSchis/create-eureka
(this may also be useful to look at because that block also only works on a ship)

@blockninja124
Copy link

Wait so you mean compat with eureka, to increase the power of its engines and stuff? I mean, it's theoretically possible, I'm just not sure why that would be super useful for a custom machine/multiblock

@Raeffi
Copy link
Author

Raeffi commented Nov 19, 2024

The use of that is that you could make a single powerful multiblock engine instead of having 99 of the eureka furnace like engines. Or a sail multiblock that speeds up the ship like an engine. And control them through the existing ship helm systen in eureka (also has cruise control). Also the built in stabilisation of Eureka ships doesnt like "external" forces when turning.

But simply applying a force (going forwards or backwards) as you wanted to implement would probably work too (as long as its not applying any torque to the ship).

PS
From my personal experience eureka with its built in stabilisation and weight manipulation blocks is the only viable way to make useable and non ugly ships in survival.

(It would be useful in general to be able to mimic all functional blocks of Eureka but i think being able to make your ship faster is the most important one. Beggars can't be choosers :P)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants