thiagohdf Posted January 9, 2017 Share Posted January 9, 2017 Hello everyone! I created a cfg to apply the ModuleRCSFX to my old parts. @PART[*]:HAS[@MODULE[ModuleRCS],!MODULE[ModuleRCSFX]]:Final { @MODULE[ModuleRCS] { @name = ModuleRCSFX runningEffectName = running } EFFECTS { running { AUDIO { channel = Ship clip = sound_rocket_mini volume = 0.0 0.0 volume = 0.1 0.0 volume = 0.5 0.025 volume = 1.0 0.1 pitch = 0.0 0.75 pitch = 1.0 1.5 loop = true } MODEL_MULTI_PARTICLE { modelName = Squad/FX/Monoprop_small transformName = RCSthruster emission = 0.0 0.0 emission = 0.1 0.0 emission = 1.0 1.0 speed = 0.0 0.8 speed = 1.0 1.0 localRotation = -90, 0, 0 } } } } But it only ran on parts that are RCS blocks, but it did not work primarily on capsules and cokpits with rcs. Directly from ModuleManager.ConfigCache, an example of a part where it did not work: Spoiler PART { // --- general parameters --- name = NoseCone module = Part author = Pete (Pak) // --- asset parameters --- MODEL { model = Cormorant Aeronology/Assets/NoseCone } rescaleFactor = 1 // --- definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z node_stack_bottom = 0.0, -0.07, 0.11, 0.0, -1.0, 0.0, 1 // --- node definitions --- TechRequired = experimentalAerodynamics entryCost = 25000 cost = 3800 category = Aero subcategory = 0 title = CA - Forward Reaction Control System manufacturer = Cormorant Aeronology description = Full Nose Cone for the Shuttle Lifting Body comes equipped with 14 RCS thrusters and an ample amount of MonoPropellent // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision attachRules = 1,0,1,1,0 // --- standard part parameters --- mass = 0.6 dragModelType = default maximum_drag = 0.01 minimum_drag = 0.01 angularDrag = 0.1 crashTolerance = 50 maxTemp = 2800 vesselType = Ship bulkheadProfiles = size2 breakingForce = 50 breakingTorque = 50 RESOURCE { name = MonoPropellant amount = 300 maxAmount = 300 } MODULE { name = ModuleRCSFX thrusterTransformName = RCSthruster thrusterPower = 2 resourceName = MonoPropellant resourceFlowMode = STAGE_PRIORITY_FLOW runningEffectName = running atmosphereCurve { key = 0 275 key = 1 125 key = 4 0.001 } } EFFECTS { running { AUDIO { channel = Ship clip = sound_rocket_mini volume = 0.0 0.0 volume = 0.1 0.0 volume = 0.5 0.025 volume = 1.0 0.1 pitch = 0.0 0.75 pitch = 1.0 1.5 loop = true } MODEL_MULTI_PARTICLE { modelName = Squad/FX/Monoprop_small transformName = RCSthruster emission = 0.0 0.0 emission = 0.1 0.0 emission = 1.0 1.0 speed = 0.0 0.8 speed = 1.0 1.0 localRotation = -90, 0, 0 } } } MODULE { name = ModuleReactionWheel PitchTorque = 45 YawTorque = 20 RESOURCE { name = ElectricCharge rate = 0.06 } } What should I do? Thanks. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted January 9, 2017 Share Posted January 9, 2017 @thiagohdf The example you gave doesn't seem to demonstrate the problem. You wanted to end up with a part with ModuleRCSFX and that's what you got. With all the configuration changes you wanted to add in. Quote Link to comment Share on other sites More sharing options...
thiagohdf Posted January 9, 2017 Share Posted January 9, 2017 @Starwaster Ok, I understand, but I guess I was not clear on my explanation.Is my CFG correct? The example I posted it changed exactly what I wanted, as you said. But it is not working as it should. I only have the sound effect, but not the RCS thrusters ...Is there something missing? Could you tell me?Thanks for your time. Quote Link to comment Share on other sites More sharing options...
sarbian Posted January 9, 2017 Author Share Posted January 9, 2017 52 minutes ago, thiagohdf said: @Starwaster Ok, I understand, but I guess I was not clear on my explanation.Is my CFG correct? The example I posted it changed exactly what I wanted, as you said. But it is not working as it should. I only have the sound effect, but not the RCS thrusters ...Is there something missing? Could you tell me?Thanks for your time. You mean you do ave the visual effect of the thrusters ? If that the case it is most likely because the capsule/... does not have the a transform called RCSthruster. It needs to use the same name as the one in the ModuleRCS block. Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted January 10, 2017 Share Posted January 10, 2017 I had this crazy idea that involved removing Ore from the game entirely. I tried to do this with a MM config: !GLOBAL_RESOURCE[*]:HAS[ResourceName[Ore]]:FINAL { } And it simply does not work. The ore remains. For reference, this is what appears to be the stock ore definition in "ore.cfg" GLOBAL_RESOURCE { ResourceName = Ore ResourceType = 0 Distribution { PresenceChance = 100 MinAbundance = 1 MaxAbundance = 15 Variance = 50 Dispersal = 3 } } I wrote the code I did based on some comments about deleting parts in this post: I'm sure I'm just doing something wrong (that's almost always what it is) but - as I'm the one doing it wrong - I can't figure out what that wrong thing is. Any ideas? Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted January 10, 2017 Share Posted January 10, 2017 3 minutes ago, 5thHorseman said: I had this crazy idea that involved removing Ore from the game entirely. I tried to do this with a MM config: !GLOBAL_RESOURCE[*]:HAS[ResourceName[Ore]]:FINAL { } And it simply does not work. The ore remains. For reference, this is what appears to be the stock ore definition in "ore.cfg" GLOBAL_RESOURCE { ResourceName = Ore ResourceType = 0 Distribution { PresenceChance = 100 MinAbundance = 1 MaxAbundance = 15 Variance = 50 Dispersal = 3 } } I wrote the code I did based on some comments about deleting parts in this post: I'm sure I'm just doing something wrong (that's almost always what it is) but - as I'm the one doing it wrong - I can't figure out what that wrong thing is. Any ideas? I don't understand why everybody keeps using [*] every single mm patch I've seen posted here always has that. as far as I know that will *successfully* select no modules since none of those modules have a "name" defined Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted January 10, 2017 Share Posted January 10, 2017 (edited) 8 minutes ago, Sigma88 said: I don't understand why everybody keeps using [*] every single mm patch I've seen posted here always has that. as far as I know that will *successfully* select no modules since none of those modules have a "name" defined I used * because the resource definition has no "name." What should I use instead of *? I thought the options were "put the name there" or "put a * there" so at least the me part of everybody does it for that reason. Edited January 10, 2017 by 5thHorseman Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted January 10, 2017 Share Posted January 10, 2017 I need a little help here. I have two MM patches, from two different mods. I need to integrate one patch into another, and am not quite sure of the syntax. First patch (primary patch): @PART[SeatHDCommand]:HAS[@MODULE[KerbalSeat]]:FOR[TakeCommand] { CrewCapacity = 1 MODULE { name = TakeCommand minimumCrew = 1 } Second patch (abbreviated): @PART[*]:HAS[#CrewCapacity[>0]]:NEEDS[VanguardTechnologies]:Final { %MODULE[ModuleKrEjectPilot] { %name = ModuleKrEjectPilot %ejectionForce = 100 } } So, what I need is to have the 2nd patch added to the first, so taht the module ModuleKrEjectPilot will be added if there is a part SeatHDCommand. I think this will do it, can someone confirm: @PART[SeatHDCommand]:HAS[@MODULE[KerbalSeat]]:FOR[TakeCommand] { CrewCapacity = 1 MODULE { name = TakeCommand minimumCrew = 1 } %MODULE[ModuleKrEjectPilot]:NEEDS[VanguardTechnologies] { %name = ModuleKrEjectPilot %ejectionForce = 100 } } Quote Link to comment Share on other sites More sharing options...
Sigma88 Posted January 10, 2017 Share Posted January 10, 2017 3 hours ago, 5thHorseman said: I used * because the resource definition has no "name." What should I use instead of *? I thought the options were "put the name there" or "put a * there" so at least the me part of everybody does it for that reason. * is a wildcard that means "anything" and [*] means that MM will look for a "name" which can be anything, but the name has to exist (I believe) since the module you are looking to edit doens't have a name you should not tell MM to look for the name, because MM will not select modules without a name if you do that. just remove the [*] !GLOBAL_RESOURCE:HAS[ResourceName[Ore]]:FINAL using [*] is pointless 99.99% of the times, you could argue that it helps making sure the module you are trying to edit has a name, but honestly I just think most people put it there without considering why, they just put it there because everybody does that. also, now that I take a closer look I notice that you don't have the correct syntax in the :HAS[] in order to look for a certain ResourceName you need to tell MM that it's a key, using # so: !GLOBAL_RESOURCE:HAS[#ResourceName[Ore]]:FINAL Quote Link to comment Share on other sites More sharing options...
toric5 Posted January 11, 2017 Share Posted January 11, 2017 i would like to make a patch that looks for ralially mouted parts .1t or under and makes them physicless (to simplify COM balancing) any idea how i would do this. it seems simple enough to select parts at or under .1t, but how would i determine if they were radial? also, what would the simplest way to add a blacklist be? Quote Link to comment Share on other sites More sharing options...
sebi.zzr Posted January 11, 2017 Share Posted January 11, 2017 (edited) 45 minutes ago, toric5 said: but how would i determine if they were radial? All radial attach capable parts have "node_attach (= x, y, z, angx, angy, angz, size)" parameter,so you must determine,if this is the only parameter you need to include radial attachable parts and no others. For the physicless part you need: PhysicsSignificance = 0 Edited January 11, 2017 by sebi.zzr Quote Link to comment Share on other sites More sharing options...
toric5 Posted January 11, 2017 Share Posted January 11, 2017 Just now, sebi.zzr said: All radial attach capable parts have "node_attach (= x, y, z, angx, angy, angz, size )" parameter,so you must determine,if this is the only parameter you need to include radial attachable parts and no others. For the physicless part you need: PhysicsSignificance = 0 i know about the physics significance, and that might do... maybye with a blacklist of modules (blacklist some fuel tanks, for example) that could work. how would i implement the node attach check? Quote Link to comment Share on other sites More sharing options...
blowfish Posted January 11, 2017 Share Posted January 11, 2017 (edited) 3 minutes ago, toric5 said: i know about the physics significance, and that might do... maybye with a blacklist of modules (blacklist some fuel tanks, for example) that could work. how would i implement the node attach check? You just need to check for the presence of node_attach @PART:HAS[#node_attach[*],#mass[<0.1]] Worth noting though, that this will pick up any part which can be surface attached and has a mass less than 0.1t, and many radially attachable parts can also be stack attached by different nodes. Edited January 11, 2017 by blowfish Quote Link to comment Share on other sites More sharing options...
toric5 Posted January 11, 2017 Share Posted January 11, 2017 Just now, blowfish said: You just need to check for the presence of node_attach @PART:HAS[#node_attach[*],#mass[<0.1]] Worth noting though, that this will pick up any part which can be surface attached and has a mass less than 0.1t, and many radially attachable parts can also be stack attached by different nodes. what about adding a NOT[node_stack*] ? could that work? Quote Link to comment Share on other sites More sharing options...
sebi.zzr Posted January 11, 2017 Share Posted January 11, 2017 (edited) ninjaed For blacklist you need to use "!" example: @PART[*]:HAS[!MODULE[name],!name[parameter]] Spoiler @PART:HAS[#node_attach[*],!node_stack[*],#mass[<0.1]] Edited January 11, 2017 by sebi.zzr Quote Link to comment Share on other sites More sharing options...
sarbian Posted January 11, 2017 Author Share Posted January 11, 2017 Can you have your talk about physicless heresy in a thread far far away from this one ? Thx. Quote Link to comment Share on other sites More sharing options...
toric5 Posted January 11, 2017 Share Posted January 11, 2017 (edited) the reason i want them physicsless is simply for balance (the mass kind). physics less parts aren't really physics less, they just assign their mass to their parent part, thereby not affecting the COM, and making things like comms and science satellites much easier to build. Edited January 11, 2017 by toric5 Quote Link to comment Share on other sites More sharing options...
sarbian Posted January 11, 2017 Author Share Posted January 11, 2017 That does not change than they do not exist for the physic engine. No mass, no MoI, no nothing. It has far more consequences than moving the CoM and can create real mess with joint. Quote Link to comment Share on other sites More sharing options...
blowfish Posted January 11, 2017 Share Posted January 11, 2017 (edited) 43 minutes ago, sarbian said: That does not change than they do not exist for the physic engine. No mass, no MoI, no nothing. It has far more consequences than moving the CoM and can create real mess with joint. I think that may have been changed semi-recently. My recollection is that physicsless parts now add their mass to the parent part (this caused some issues with re-entry vehicle CoM because the heat shields were physicsless for some reason) 1 hour ago, sebi.zzr said: Hide contents @PART:HAS[#node_attach[*],!node_stack[*],#mass[<0.1]] This won't work. node_stack[*] will only match a value called "node_stack", it won't match "node_stack_top" or "node_stack_top01" etc 1 hour ago, toric5 said: what about adding a NOT[node_stack*] ? could that work? So I think there's no way to do this, unfortuantely. MM cannot do wildcard matching on the left side of the equal sign. Edited January 11, 2017 by blowfish Quote Link to comment Share on other sites More sharing options...
toric5 Posted January 11, 2017 Share Posted January 11, 2017 2 minutes ago, blowfish said: I think that may have been changed semi-recently. My recollection is that physicsless parts now add their mass to the parent part (this caused some issues with re-entry vehicle CoM because the heat shields were physicsless for some reason) this is exactly why i want it. i dont want to have to worry about the com misalignment caused by a scansat dish or dmagic science experement... Quote Link to comment Share on other sites More sharing options...
toric5 Posted January 11, 2017 Share Posted January 11, 2017 21 minutes ago, blowfish said: This won't work. node_stack[*] will only match a value called "node_stack", it won't match "node_stack_top" or "node_stack_top01" etc wont [node_stack*] work? Quote Link to comment Share on other sites More sharing options...
blowfish Posted January 12, 2017 Share Posted January 12, 2017 32 minutes ago, toric5 said: wont [node_stack*] work? It looks like no, but you can try it if you want. Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted January 12, 2017 Share Posted January 12, 2017 On 1/10/2017 at 7:28 AM, Sigma88 said: !GLOBAL_RESOURCE:HAS[#ResourceName[Ore]]:FINAL First off thank you for helping. I really do appreciate it even though... ...this still isn't working. Here is my exact config. I cut it down to the bare bones: !GLOBAL_RESOURCE:HAS[#ResourceName[Ore]]:FINAL GLOBAL_RESOURCE { ResourceName = LiquidFuel ResourceType = 0 Distribution { PresenceChance = 100 MinAbundance = 1 MaxAbundance = 15 Variance = 50 Dispersal = 3 } } This config does successfully add LiquidFuel to planets, but it still doesn't remove the ore. Quote Link to comment Share on other sites More sharing options...
Superfluous J Posted January 12, 2017 Share Posted January 12, 2017 Ore seems either hard coded, or defined elsewhere. I manually edited ore.cfg in the Squad folder and renamed "Ore" to "Foo" and now there are NO resources anywhere. Also, the icons in the toolbar are wonky. After the orbital survey, the ore icon isn't available but the "which kerbals are on this ship" icon is. If I tab away from the planet and then shift-tab back, the ore icon exists. I'm going to try this without MM or any other mods at all and see if it's a stock thing. Quote Link to comment Share on other sites More sharing options...
sebi.zzr Posted January 12, 2017 Share Posted January 12, 2017 @5thHorseman,why do you struggle so much,just remove resource definition.If there is no definition the resource not exist. !RESOURCE_DEFINITION[Ore] { } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.