Jump to content

Full sensor science transmission


MisterBennock

Recommended Posts

Greetings people,

you all know the reduction in science you get from transmitting sensor data. This has always rustled my jimmies as it's just numbers and I don't see why numbers shouldn't be able to be transmitted fully (especially when Crew and EVA Reports CAN be transmitted for 100%). Therefore, I tried to make a small .cfg that gives me the x1 science multiplier on sensors without having to mod the files themselves.

Check this:

@PART
[*]:HAS[@MODULE[ModuleEnviroSensor],@MODULE[ModuleScienceExperiment]]:FOR[ModuleScienceExperiment]
{
@MODULE[ModuleScienceExperiment]
{
@xmitDataScalar = 1
}
}

It works for the stock sensors, but somehow not for the B9 parts, even though they contain the very same module. But then again, I am not a coder or anything even remotely, so if anyone has an idea how to improve it, you are welcome to.

Link to comment
Share on other sites

It works for the stock sensors, but somehow not for the B9 parts, even though they contain the very same module. But then again, I am not a coder or anything even remotely, so if anyone has an idea how to improve it, you are welcome to.

When the game starts it automatically applies all patches it can process (e. g. all cfgs that start with PART instead of <operator>PART). Only after that ModuleManager (MM) kicks in. MM has several passes in which it applies the patches.

Order of execution in MM is defined by the parameter you (not) append to a line:

  1. :FIRST
    Lines with this paramater indicate that they will be applied before all other patches.
  2. :LEGACY
    It's an interal reference to all patches which don't specify when they should be applied. Like yours.
  3. :BEFORE[mod]*
    Patches applied immediately before the patches of that mod are applied.
  4. :FOR[mod]*
    Patches of a mod
  5. :AFTER[mod]*
    Executed after a mod is done.
  6. :FINAL
    Final patches after all the mod-related ones are done.

*Those three are done in a row for every mod. So the order is BEFORE[mod1] -> FOR[mod1] -> AFTER[mod1] -> BEFORE[mod2] -> etc. I'm not sure in which order the mod-related patches are applied. Either read the MM code or assume a random order (e. g. mod2, then mod1, then mod3, etc.). Edit: It looks like alphabetic ordering.

If B9 adds science modules per MM script they will apply after your script is executed. Therefore you want to change your script to be executed after these science modules are added. I suggest you pick :FINAL.

Also you don't need a FOR parameter. It's used to identify which mod the patches belong to.

@PART[*]:HAS[@MODULE[ModuleEnviroSensor],MODULE[ModuleScienceExperiment]]:FINAL
{
@MODULE[ModuleScienceExperiment]
{
@xmitDataScalar = 1
}
}

Another note for you: Your patch will be only applied to parts which contain both the part modules ModuleEnviroSensor and ModuleScienceExperiment. As far as I checked only the four little sensors fit to that filter. It also seems that the these sensors are the only ones which contain ModuleEnviroSensor. You can reduce MM's workload by only filtering for the sensor module.

The results won't be noticeable (it still only affects 4 parts) but why not do it? ^^

Edited by *Aqua*
Link to comment
Share on other sites

@*Aqua* - thanks for the insight, that was useful. Changed things accordingly :)

I had to use the ModuleScienceExperiment since the "xmitDataScalar" part is contained in it, so in order to apply it I have to include it. I think I even tried it first with ModuleEnviroSensor only, but it didn't work.

Link to comment
Share on other sites

No, I meant the "xmitDataScalar" parameter is contained in the ScienceExperiment module, not the EnviroSensor module, which is why I apparently need to address the Experiment. The ModuleEnviroSensor is just for filtering for sensors. Also, I just tried it and it still didn't work.

Also, I just tried the changerd version, but it still doesn't work out completely... I get 100% transmission on the seismic data ONLY somehow :D - even though all is contained in one sensor package. Strange, strange things.

Edit: Perhaps it could be because it only applies the patch once? Since the seismic scan is also the first in the part's cfg - what if it stops there?

Edited by MisterBennock
Link to comment
Share on other sites

Yes, I am pretty sure - I mean, stock sensors work, seismic scan on sensor package works, just not the other behind/below.

Here is the cfg of the B9 sensor package:

MODULE
{
name = ModuleEnviroSensor
sensorType = ACC
}

MODULE
{
name = ModuleScienceExperiment
experimentID = seismicScan
experimentActionName = Log Seismic Data
resetActionName = Delete Data
useStaging = False
useActionGroups = True
hideUIwhenUnavailable = False
xmitDataScalar = 0.45
dataIsCollectable = True
collectActionName = Take Data
interactionRange = 1.2
rerunnable = True
}

MODULE
{
name = ModuleEnviroSensor
sensorType = PRES
}

MODULE
{
name = ModuleScienceExperiment
experimentID = barometerScan
experimentActionName = Log Pressure Data
resetActionName = Delete Data
useStaging = False
useActionGroups = True
hideUIwhenUnavailable = False
xmitDataScalar = 0.5
dataIsCollectable = True
collectActionName = Take Data
interactionRange = 1.2
rerunnable = True
}

MODULE
{
name = ModuleEnviroSensor
sensorType = GRAV
}

MODULE
{
name = ModuleScienceExperiment
experimentID = gravityScan
experimentActionName = Log Gravity Data
resetActionName = Delete Data
useStaging = False
useActionGroups = True
hideUIwhenUnavailable = False
xmitDataScalar = 0.4
dataIsCollectable = True
collectActionName = Take Data
interactionRange = 1.2
rerunnable = True
}

MODULE
{
name = ModuleEnviroSensor
sensorType = TEMP
}

MODULE
{
name = ModuleScienceExperiment
experimentID = temperatureScan
experimentActionName = Log Temperature
resetActionName = Delete Data
useStaging = False
useActionGroups = True
hideUIwhenUnavailable = False
xmitDataScalar = 0.5
dataIsCollectable = True
collectActionName = Take Data
interactionRange = 1.2
rerunnable = True
}

Now compare to the stock sensor:

MODULE
{
name = ModuleEnviroSensor
sensorType = ACC
}
MODULE
{
name = ModuleScienceExperiment

experimentID = seismicScan

experimentActionName = Log Seismic Data
resetActionName = Delete Data

useStaging = False
useActionGroups = True
hideUIwhenUnavailable = False

xmitDataScalar = 0.45
dataIsCollectable = True
collectActionName = Take Data
interactionRange = 1.2

rerunnable = True
}

As you see, they are identical. And since every stock sensor works for itself and since in the package only the first sensor works, I really assume it has something to do with how often the "xmitDataScalar" line is changed, in that case apparently only once.

Edit: I just found out that you can find keys and nodes. Now my cfg looks like this:

@PART
[*]:HAS[@MODULE[ModuleEnviroSensor],@MODULE[ModuleScienceExperiment]]:Final
{
@MODULE[ModuleScienceExperiment],*
{
@xmitDataScalar,* = 1
}
}

As you can see, I am finding all "ModuleScienceExperiment" in the file and then edit all the "xmitDataScalar". Probably wouldn't even be needed, but hey, it's just two characters ;)

AND IT WORKS! YEAAAHAW! :D:D:D

Edited by MisterBennock
Link to comment
Share on other sites

There are multiple ModuleScienceExperiment part modules. That's the reason.

Change the line

@MODULE[ModuleScienceExperiment]

to

@MODULE[ModuleScienceExperiment],*

Then MM will apply the patch to all modules of that type in a part.

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