Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Any KSP modders?

Discussion in 'General Discussion' started by REDACT3D_, Oct 31, 2022.

  1. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    Just wonderin' if any of you guys have experience modding Kerbel Space Program?

    would be interesting to combine a Visual Scripting thing with a KSP mod thing but haven't looked deep enough yet. I've seen it done with script but yeah would be interesting project. as ksp 2 release is coming around soon.

    any ksp wizards have any advice on where to look for that?
    i've tried nothin' and i'm all out of ideas
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    Normally you would not be doing moding with Visual Scripting.
    That would be too limiting.
     
  3. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    true
    this is why is like the project lol
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    I see what you mea now.
    However, it is not like a simple task, to write visual scripting for modded game.
    Not only ksp2 haven't released yet, no knowing the API, and how moddable it suppose to be?

    Ss purely C#? Or uses also lua, which makes modding simpler in certain cases.

    If C#, you will be only exposed with some libraries. I don't even know, how to would bite the VS problem, to start with.

    Either way, seems like full time job for a year, to get anything resealable with vs tool.

    Alternatively you could look into blocky. You could write visual code like a scratch games.

    Then you need compiler, which converts to C#. And then compile into possible dll, which is compatible with game like ksp2.
    Still, tons of work on that front.

    Voluntary colabs like that usually dont workout. You would need start to make code base, so you can attract others to the project. And make it open source.

    BTW., I think you would be better off asking such questions, on dedicated KSP forum or discord. You will find more dedicated fans, willing out some time into nodding tools.
     
  5. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222

    yeah but Visual Scripting is a Unity specific thing. and the part I'm interested in.

    easy enough to add parts and such with blender and copy paste setting scrips.
     
  6. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    I'm not sure why you'd need to use visual scripting for this
     
  7. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    true
    I think the solution will be a stand alone app that generates the settings files from the templates, that possibly could be done with vs.

    why VS because it's fun lol
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    Did you ever tried to write any vs tool?
    Do you realise what it involves?
    What is your part in let say such project?
    Are you willing to put full time hrs on such?
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    I have such experience, writing this kidn of thing is absolutely unfun and is only worth the effort if someone is paying.
     
    arkano22, koirat and Antypodish like this.
  10. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    head on over to the Visual Scripting section of the forum. you might notice some of my posts.,.
    ill post the results when done.

    free :p buhahahaha
    charging for code haha hilarious
     
    Last edited: Nov 1, 2022
  11. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    Which thread specifically answers my questions?
    I don't expect Unity VS to work for game modding as an external tool. Unless you will have an access to the game source code, besides just exposed methods.
    But I would love to see, if you manage to solve that problem.
    That would be interesting to see.
     
  12. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    yes
    seems like an easy task to read a text file then write a new .cfg based on new inputs.

    for example the user builds a new part and wants to generate it's stats for game calculations.
    instead of manually editing code, the user selects from a drop-down list of pre-made templates then changes the values as needed..

    makin' parts could work as the project.
    like a part maker.
     
    Last edited: Nov 1, 2022
  13. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    Okay, but at that point you might as well just have those pre-made templates just be prefabs or monobehaviours.
     
  14. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    yeah exactly lol
    it's a rubegoldbergian style contraption
     
  15. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Given how big a part of KSP1 modding was, I would be surprised if there wasn't some out of the box mod support planned for KSP2.
     
    REDACT3D_ likes this.
  16. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    What I am thinking in such case, is that some simple table would be more suitable and easier to implement
    instead of Visual Scripting tool. It is pretty much like data base, isn't it?

    When you have mentioned VS for modding, I have imagine creating new mechanics, with compiled dlls etc.

    So my question would be, what do you exactly want to include into modding tool. What you want to mod?
    Is it just KSP parts making?
    Or writing the scripts, for new game logic and behaviours?

    Personally I would wait for any modding work, until KSP2 is released.
    Some tools may be provided by developers.
     
    REDACT3D_ likes this.
  17. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,606
    I'm pretty sure one of their recent videos explicitly states they have plans for extensive modding support.

    They did hire one of the more prolific modders into their staff too.
     
    REDACT3D_ likes this.
  18. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    I don't think I'd be happy just leaving it at basic parts and would want to move into things like automated flight controls and targeting systems and such. for that I'd need some way to perform the logic calculations obviously.

    But that would involve things like getting your aircraft flight characteristics and all that. I know how to use unity but not ksp custom components. but for that I can look to written script and reveal.

    I'm purposely trying to make this a VS project. as like a personal challenge but also I'd document it so others could learn via video or what not. otherwise I'd just use traditional script. just tryin' to figure out how to smash the puzzle peaces together to make em' fit.

    potentially there's other mods like the BD Armory mod that adds weapons like this and appear to have open source code on git hub. can be looked at to manually decipher everything. but that's the long way.

    Never know, may run into a guy that's done it before with ksp who could have some tips on workflow. But I doubt with VS. But like I said, I tried nothing yet and am all out of ideas over here.

    i think ksp is less concerned about cheating then other kinds of games so everything is a bit more exposed at least.
    but KSP 2 will be multiplayer so... i dono


    and yeah for KSP2 they've hired that Modder Chris.
    at 6:14 timestamp
     
    Last edited: Nov 2, 2022
    Antypodish likes this.
  19. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    You can already create mods like this for KSP so I see no reason why they wouldn't be possible for KSP2.
     
    REDACT3D_ likes this.
  20. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    KSP2 is being developed by a different team entirely with none of the original people returning after being in development hell for a while. It's hard to say what the modding situation will be like.
     
  21. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    bruh it's the same guys just more money and pressure this time round lol


    Without getting into ethics of adding weapons into games that don't have weapons, I would imagine they may lean into modding to provide continual changes for players over time. like micro updates in mod form. in other words, have some of the players do some of the work.

    to be clear. for myself, I'm focusing on ksp 1 as it seems like more documentation is around..and examples of other folks doing it. but if they releese some sort of mod sdk when ksp 2 comes out. you'll know what i'll be doin'

    like none of this is stock KSP for example. note the armorments have AI that can automatically select appropriate weapons, track and engage targets. This is not what they had in mind when making ksp but it's a thing.
    Capture1.jpg

    capture.jpg
     
    Last edited: Nov 2, 2022
  22. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    It really isn't. The bulk of development was done without most of Squad's involvement and "more members" were brought on only last year after the game's release was delayed by literally two years, now coming up on three. There is no reason to speculate that modding will be the same or even have the same degree of robustness before the game has even launched anyway.
     
  23. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
     
  24. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Only if you ignore the fact that the entire premise of the game is based on cold war ICBM development programs. Space programs pretty much all start out as a thinly veiled missile development programs. The only difference between a space rocket and an ICBM is what you put in the nose cone.
     
    REDACT3D_ likes this.
  25. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    It's more about changing the intent rather than the result.
     
  26. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    haha ^.^ shhh
    PS: a chimp made it into space before man.
    facts. lol



    anyways here's a parts template config

    Code (CSharp):
    1. values {
    2.     mass = ${math.floor(7.8 * modelSkinVolume * 1000 + 0.5)/1000}
    3.     capacity = ${math.floor((modelExtVolume-modelSkinVolume) * 1000)/1000}
    4.     resourceCapacity = ${math.floor(capacity*200)}
    5.     LiquidFuel = ${9 * resourceCapacity / 20}
    6.     Oxidizer = ${11 * resourceCapacity / 20}
    7. }
    8. PART
    9. {
    10.     name = DiamondGridContainerTetraHub
    11.     module = Part
    12.     author = Bill Currie
    13.  
    14.     MODEL {
    15.         model = mystuff/DGC-TetraHub
    16.         position = 0, 0, 0
    17.         rotation = 0, 0, 0
    18.         scale = 1, 1, 1
    19.     }
    20.     rescaleFactor = 1.0
    21.     scale = 1.0
    22.  
    23.  
    24.     TechRequired = advConstruction
    25.     entryCost = 3000
    26.     cost = 307.521
    27.     category = FuelTank
    28.     subcategory = 0
    29.     title = DGC-TetraHub-125
    30.     manufacturer = Kairyuu Shipping
    31.     description = Works with the octahedral hub to form interesting structures.
    32.  
    33.     // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
    34.     attachRules = 1,0,1,1,0
    35.  
    36.     mass = ${mass}
    37.     dragModelType = default
    38.     maximum_drag = 0.2
    39.     minimum_drag = 0.15
    40.     angularDrag = 2
    41.     crashTolerance = 8
    42.     breakingForce = 200
    43.     breakingTorque = 200
    44.     maxTemp = 1700
    45.  
    46.     RESOURCE {
    47.         name = LiquidFuel
    48.         amount = ${LiquidFuel}
    49.         maxAmount = ${LiquidFuel}
    50.     }
    51.     RESOURCE {
    52.         name = Oxidizer
    53.         amount = ${Oxidizer}
    54.         maxAmount = ${Oxidizer}
    55.     }
    56. }
    57.  
    58. @PART[DiamondGridContainerTetraHub]:NEEDS[ModularStorageContainer] {
    59.     MODULE {
    60.         name = ModuleStorageContainer
    61.         availableVolume = ${capacity}
    62.         Container {
    63.             name = Resource
    64.             volume = ${capacity}
    65.             LiquidFuel = ${"%g, %g" % (LiquidFuel, LiquidFuel)}
    66.             Oxidizer = ${"%g, %g" % (Oxidizer, Oxidizer)}
    67.         }
    68.     }
    69. }
    70.  


    I guess yeah, just need to create a dictionary for all of the keywords and such

    capture.png
     
    Last edited: Nov 4, 2022
  27. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222
    update.

    alright figured it out guys.
    Can make any kind of part now and have them appropriately located in the correct inventory and all of that.
    it's actually crazy simple but just not documented in a straightforward manor.

    you can start from scratch and build the parts, texture them and apply any kind of component. like for example, if you want to make an engine that has an intake and also holds fuel and is also a command pod with SAS.. it's easy.

    standby for results
     
  28. REDACT3D_

    REDACT3D_

    Joined:
    Nov 8, 2020
    Posts:
    222