Jump to content

Identify source of a MM patch change?


Recommended Posts

I'm curious if there is an easy way to identify what mod an MM change to a part module comes from? What I mean is, when a mod includes a MM patch that say, adds a new resource option to a fuel tank, how can I identify what mod made that change?

The current situation is I'm trying to use kOS to control a fuel cell on a satellite. The program will automatically activate the fuel cell if the craft's total EC falls below 20% of capacity. Problem is, I have a mod that altered the fuel cell and added an "LHO2" option or something like that, in addition to the stock "Fuel Cell: stopped" button. The LHO2 option requires liquid hydrogen to work, while the stock button requires just hydrogen (modded from the stock LF by Universal Storage I believe).

When I use the kOS command "FUELCELLS ON", it activates the damn LHO2 one instead of the stock one. The craft doesn't have any liquid hydrogen, but it does have plenty or regular ol' hydrogen. Unfortunately, I'm not very good with kOS yet, and I not understanding how the PARTMODULES stuff works right now to be able to activate actions or events manuallly. I found the FUELCELLS command and figured that would work for the time being. I figure someone can tell me what mod is doing this so I can maybe go alter he MM patch to stop it, but for future reference, I'd like to know if there is a simple way to find out this information on my own without having to ask. "Teach a man to fish" type thing.

I have about 150 mods active. My main suspects are KSP-I, Universal Storage (don't think this is it), or one of the Near Future Techs.

Link to comment
Share on other sites

not the answer you wanted 

this is the KOS script I use
the important part is

function doe {parameter st,M,stat. if M:hasevent(st) {M:DOEVENT(st). print (i-lsp)+" "+M:part:name+"-"+M:part:tag+stat at (0,i).}}.
doe("stop fuel cell",M," off ").
doe("start fuel cell",M," on ").

or in long
for M in ship:MODULESNAMED("Moduleresourceconverter") if M:hasevent("stop fuel cell") {M:DOEVENT("stop fuel cell").
for M in ship:MODULESNAMED("Moduleresourceconverter") if M:hasevent("start fuel cell") {M:DOEVENT("start fuel cell").

 

CLEARSCREEN.
function doe {parameter st,M,stat. if M:hasevent(st) {M:DOEVENT(st). print (i-lsp)+" "+M:part:name+"-"+M:part:tag+stat at (0,i).}}.
set twe to " Water Electrolizer".
parameter  minEC is 200, mce is 0.35.
set fc to ship:MODULESNAMED("Moduleresourceconverter").
LIST RESOURCES IN RESLIST.
for r in RESLIST {if r:name ="ELECTRICCHARGE" set me to r:capacity.}
set oldec to ship:ELECTRICCHARGE.
if minEC<99 and minEC>1 set mce to minEC/100.
if minEC<1 and minEC>0 set mce to minEC.
set minEC to max(minEC,mce*me).
set lsp to 4.
until 0 {set i to lsp+1.
if ship:ELECTRICCHARGE >minEC// or ship:ELECTRICCHARGE/me>mce 
	for M in fc {  
		if (oldec - ship:ELECTRICCHARGE)*25>-0.1 and me-ship:ELECTRICCHARGE>1 break.
		doe("stop fuel cell",M," off ").
		set oldec to ship:ELECTRICCHARGE.
		set i to i+1.
		wait 0.
	}set i to lsp+1.
if ship:ELECTRICCHARGE <minEC// or ship:ELECTRICCHARGE/me<mce 
	for M in fc {  
		if (oldec - ship:ELECTRICCHARGE)*25<0 break.
		doe("start fuel cell",M," on ").
		set oldec to ship:ELECTRICCHARGE.
		set i to i+1.
		wait 0.
	}set i to lsp+1.
if ship:ELECTRICCHARGE <0.8*me// or ship:ELECTRICCHARGE/me<mce 
	for M in fc {  
		doe("Stop"+twe,M," off ").
		set i to i+1.
	}set i to lsp+1.
if (ship:ELECTRICCHARGE >0.8*me) and ((oldec - ship:ELECTRICCHARGE)*25<0.1)// or ship:ELECTRICCHARGE/me<mce 
	for M in fc {  
		if (oldec - ship:ELECTRICCHARGE)*25>-14 and me-ship:ELECTRICCHARGE>1 break.
		doe("Start"+twe,M," on ").
		set oldec to ship:ELECTRICCHARGE.
		set i to i+1.
		wait 0.
	}
}

 

Link to comment
Share on other sites

On 12/3/2017 at 10:39 PM, kananesgi said:

I'm curious if there is an easy way to identify what mod an MM change to a part module comes from? What I mean is, when a mod includes a MM patch that say, adds a new resource option to a fuel tank, how can I identify what mod made that change?

I would use a tool like Notepad++ that lets you do a "find in files", filter on *.cfg, and search for the top-level part name first. That will show you all files that edit that part specifically. 

You might need to search also for the module name, as sometimes mods will do 'blanket replace' on everything.

Link to comment
Share on other sites

If you search your ksp.log for @PART[internal part name], you can see every listing where it was modified where MM. At each listing, it will also give you the filepath to the patch that modified it.

This only works for parts that were specifically named in the patch, those that use @PART[*] entries do not show up.

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...