Jump to content

help me get into modding :) (vocabulary, best practices, etc.)


Recommended Posts

Sorry if this is in the wrong forum.

I heard the game is easily moddable and the community is super nice so I wanted to propose my help to update a mod ( RP-0 ).

But I'm not a programmer ; i realize i lack so much vocabulary to even understand where to start.

First help me set up a "work copy" of ksp (i have a dual-boot windows and linux Mint 64b)

  1. i have a fresh untouched copy of KSP
  2. I have a "game" copy of KSP with like 30 mods, including Real Solar System, Realism Overhaul and the mod version of Real Progression 0, which is supposed to add carrer-friendliness to RSS+Ro
  3. I have a "work" copy of KSP with all the same mods except for the version of RP-0, which is the version i got from github
    • When i launch the game, RP-0 is not loaded. So if i modify something in the mod files it will not appear in the game. What should I do ?

Then i installed " git " but i dont know how to use it. What is a "repository" ? What means "commit" ? How do i tell git to look into my RP-0 work folder to track the changes ?

So yeah, generaly speaking, where do i start :huh:

If anyone could share his modding knowledge with me, that would be much appreciated :)

Link to comment
Share on other sites

RP-0 is a complex mod, and it builds upon and requires several other mods to work. It may not be the best place to start.

Mods consist of several different bits. Generally:

1) Parts. You can create a new engine or fuel tank without any real programming, you just draw it in special software, write a config file for it and drop it into the appropriate folder.

2) Plugins. These are changes or additions to the KSP program itself, and are written in a programming language. Since SQUAD use a language called c# to write KSP, most plugins are also written in c#.

RP-0 contains both parts and plugins.

When writing a plugin (or indeed any program) you start with source code, which is desired to make sense to a human then a special program called a compiler translates your source code to a binary, which makes sense to a computer. When writing a mod or any not-tiny project, you end up making many changes to the source code. When you have many people working on the project, they all make changes. To keep track of all the changes, many people use a tool called source control. Git is an example of source control. A repository contains all the source code for a particular project. A commit is when you add your changes to the source code in a particular repository.

Edited by Kermunist
typos
Link to comment
Share on other sites

Don't even think of attempting to repair or resurrect an existing mod without considerable experience in programming. You need to be able to easily interpret the style of programming contained within, or else you're in for A Bad Time. Start small with plugins, with something new and simple. A part that spits out "hello word" when you click a context menu item, for instance.

Link to comment
Share on other sites

Thanks Kermunist, your explanations are very clear :)

Don't even think of attempting to repair or resurrect an existing mod without considerable experience in programming. You need to be able to easily interpret the style of programming contained within, or else you're in for A Bad Time. Start small with plugins, with something new and simple. A part that spits out "hello word" when you click a context menu item, for instance.

Well my goal is not to resurect a mod all by myself. Have a look at the RP-0 to-do list. I feel there are several things i can do there, like " Move parts as appropriate for the new tree. " or " Add some basic ContractConfigurator contracts " and " Update our tree changes for the new CTT ". As I understand it, this is basicaly move things around and find a good balance.

To test my changes i think i'll need to compile the mod. How do you recommend i do that ?

Link to comment
Share on other sites

For what you are talking about you don't need to compile the mod, you will use the existing mod and leave the programming to the programmers. What it sounds like you want to be is a scripter, which is slightly easier because you don't need to know all the programming constructs (programmers are usually capable of both). You need Notepad++ and you need to gain an understanding of the scripts used to define a part and possibly ModuleManager depending on the mod.

Parts have a *.cfg file which is basically a text file formatted in a special way. Consider the following part (which is stock):

PART
{
name = noseCone
module = Part
author = C. Jenkins
mesh = model.mu
scale = 1.0
rescaleFactor = 1
node_stack_bottom01 = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0
TechRequired = stability
entryCost = 2000
cost = 240
category = Aero
subcategory = 0
title = Aerodynamic Nose Cone
manufacturer = Goliath National Products
description = Aerodynamic, lightweight and mostly non-explosive. As a reminder to all personnel operating nearby, this part is really sharp and it'd probably hurt if you fell on it.
attachRules = 1,0,1,1,0
stackSymmetry = 2
mass = 0.03
dragModelType = default
maximum_drag = 0.1
minimum_drag = 0.1
angularDrag = 0.5
crashTolerance = 10
maxTemp = 2400 // = 3400
emissiveConstant = 0.7
thermalMassModifier = 6.0
fuelCrossFeed = False
bulkheadProfiles = size1
}

You can see this is a very specific formatting. A part is defined by the PART keyword and it's attributes are listed between the brackets. Most of these are fairly self explanatory, for example TechRequired defines the tech tree node. I chose this particular part because of maxTemp. Notice the "//" That is a comment, everything after that is ignored. You can leave messages to yourself or in this case the author wanted to remember what the value was before he changed it. Start poking around in the GameData\Squad\Parts folder and you will quickly start to figure out the majority of the stuff here. You can always ask more specific question in the mod forums.

- - - Updated - - -

Oh and as for Github, well that is a beast and a half starting from scratch but basically what you will do is create a "fork" of the repository. This is your local copy of the project. You can then make changes to the files (for scripting, you can really just copy your changes out of Notepad++ and use the web interface edit the file directly, you can use Git to push it without a web interface but it's almost a language all of it's own and may prove difficult to learn right away). Once you are satisfied with the changes you need to create a "Pull Request" which tells the person in charge of the project you want to merge your changes into his/hers. He can then evaluate your changes and decide to accept or reject them and leave comments for you if changes need to be made.

Link to comment
Share on other sites

The Mod Development Links Compilation thread contains a good list of references and resources to help get you started.

I strongly suggest that, rather than jump into the deep end of the pool and getting involved in contributing to an add-on as complex as RP-0, you should probably familarize yourself with the part modelling process by learning to make a simple fuel tank - it might not sound like much, but in the process of making it you'll learn how to make models, collision meshes, UV unwrapping, texturing, configuration/exporting through Unity and KSP PartTools and CFG writing.

Link to comment
Share on other sites

After glancing over what's been said, I still couldn't gather whether you we're making plugins or mods or other, so I tell you what I know: If you want to start somewhere, start by making a part work in the game- start small, a fuel tank, structure, non-animated radar dish. Once you've implemented this into the game, you understand basic parts. This is my current stage, and I believe, whilst I'm quite amateur, I've got the hang of it. PM me if you want some help making something small :)

Link to comment
Share on other sites

I found a neat tutorial you might want to check out. It shows how to model and texture. The guy has an accent that is hard to understand but he does a great job covering most questions new modders might have. I highly recommend watching it. :)

aXLEq6GVJ&index=1
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...