Jump to content

Nistenf

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by Nistenf

  1. 5 hours ago, Corax said:

    Patches without an order specified are applied alphabetically based on the containing directory's name, and so are those with only FOR, just as if (or rather exactly because) they had no order specified. From alphabetic order, one would expect UKS to get applied after Restock, but just like zzzUKS, nothing prevents Restock from having an aaaRestock pass...

    Thanks for the explanation! And indeed, that's exactly what's happening, the ReStock pass is actually 000_ReStock:
     

    // LV-T30 "Reliant" Liquid Fuel Engine
    @PART[liquidEngine]:HAS[~RestockIgnore[*]]:FOR[000_ReStock]
  2. 13 hours ago, Corax said:

    Just an FYI @Nistenf, it's not generally advisable to use "FOR[someMod]" in your own patches, since that indicates to other patches that "someMod" is installed, even if it isn't.
    This causes those other patches to get applied, which can cause issues if that mod isn't actually there (for example, because you uninstalled it but forgot you still had that patch somewhere). Use "BEFORE[]" or "AFTER[]" instead.

    Oh I'm aware, but those are not supposed to be personal patches running on top of UkS, rather they are fixes for the original UkS patches, replacing these two files:

    GameData/UnKerballedStart/parts/UKSliquidEngineLVT05.cfg and GameData/UnKerballedStart/parts/UKSliquidEngineLVT10.cfg, though the fixes themselves are just on just a few lines, described in my previous post. Most of the file is unchanged.

    Curiously, the original patches did not include for[zzzUnkerballedStart] in the new parts, causing my issue with ReStock. What I'm not sure is in what order are parts/patches without a FOR, BEFORE or AFTER clause supposed to be loaded by ModuleManager, but in this case the copy was being made BEFORE ReStock changed the model, causing the problem. I'm not very familiar with ModuleManager, so there might be a legit reason for not originally including the FOR clause that I'm missing.

  3. I'm using 1.9.1 with Restock 1.1.2 and the two engines added by UKS don't show up in the game at all. According to the log, the game can't find the model the original model Squad from the copied part. Since I'm using Restock, that makes sense, due to its blacklisting of stock assets. After whitelisting the model, the engine shows up. That was not satisfactory though, I wanted the Restock model to be used for the new parts to keep consistency.

    Apparently what was happening is that the UKS engines are copying the Squad engine before Restock replaces the model. So I looked around the config files for UKS and made the following modifications:

    Added "FOR[zzzUnKerballedStart]" to the +PART section, so it runs during the UKS stuff.

    Changed the sections that change the nodes from BEFORE to AFTER[zzzUnkerballedStart] so they run after the part has been copied.

    This these changes both engines show up and work fine in R&D, VAB and in flight (including the RealPlume), using the Restock model.

    Here are the final configs:

    // GameData/UnKerballedStart/parts/UKSliquidEngineLVT05.cfg
    
    // Rescale LV-T30 to .625m
    
    +PART[liquidEngine]:FOR[zzzUnKerballedStart]
     {
    	@name = UKSliquidEngineLVT05
    	@TechRequired = basicRocketry
    	@node_stack_top = 0.0, 7, 0.0, 0.0, 1.0, 0.0, 0
    	@node_stack_bottom = 0.0, -7, 0.0, 0.0, -1.0, 0.0, 0
    	@fx_exhaustFlame_blue_small = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    	@fx_exhaustLight_blue = 0.0, -10.3, 0.0, 0.0, 0.0, 1.0, running
    	@fx_smokeTrail_light = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    	@fx_exhaustSparks_flameout = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, flameout
    	@entryCost *= .5
    	@cost *= .5
    	@mass = .156
    	@title = #LOC_UKS_liquidEngineLVT05_title
    	@description = #LOC_UKS_liquidEngineLVT05_description
    	@bulkheadProfiles = size0
    	rescaleFactor = 0.5
    	
    	@MODULE[ModuleEngines*]
    	{
    		@maxThrust = 23
    	}
    }
    
    @PART[UKSliquidEngineLVT05]:NEEDS[MissingHistory|Restock]:AFTER[zzzUnKerballedStart]
    {
    	@node_stack_top = 0.0, 0.45, 0.0, 0.0, 1.0, 0.0, 0
    	@node_stack_bottom = 0.0, -.42, 0.0, 0.0, -1.0, 0.0, 0
    }
    
    @PART[UKSliquidEngineLVT05]:NEEDS[SmokeScreen,!ReStock]:AFTER[zzzUnKerballedStart]
    {
        PLUME
        {
            name = Kerolox-Lower
            transformName = thrustTransform
            localRotation = 0,0,0
            flarePosition = 0,0,0.1
            plumePosition = 0,0,0.3
            plumeScale = 0.15
            flareScale = 0.3
            energy = 1.0
            speed = 0.6
        }
        @MODULE[ModuleEngines*]
        {
            %powerEffectName = Kerolox-Lower
    	    !runningEffectName = DELETE
        }
    }
    // GameData/UnKerballedStart/parts/UKSliquidEngineLVT10.cfg
    
    // Rescale LV-T45 to .625m
    
    +PART[liquidEngine2]:FOR[zzzUnKerballedStart]
     {
    	@name = UKSliquidEngineLVT10
    	@TechRequired = generalRocketry
    	@node_stack_top = 0.0, 7, 0.0, 0.0, 1.0, 0.0, 0
    	@node_stack_bottom = 0.0, -6.0, 0.0, 0.0, -1.0, 0.0, 0
    	@fx_exhaustFlame_blue_small = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    	@fx_exhaustLight_blue = 0.0, -10.3, 0.0, 0.0, 0.0, 1.0, running
    	@fx_smokeTrail_light = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, running
    	@fx_exhaustSparks_flameout = 0.0, -10.3, 0.0, 0.0, 1.0, 0.0, flameout
    	@entryCost *= .5
    	@cost *= .5
    	@mass = .1875
    	@title = #LOC_UKS_liquidEngineLVT10_title
    	@description = #LOC_UKS_liquidEngineLVT10_description
    	@bulkheadProfiles = size0
    	rescaleFactor = 0.5
    	
    	@MODULE[ModuleEngines*]
    	{
    		@maxThrust = 21
    	}
    }
    
    @PART[UKSliquidEngineLVT10]:NEEDS[MissingHistory,!Restock]:AFTER[zzzUnKerballedStart]
    {
    	@node_stack_top = 0.0, 0.45, 0.0, 0.0, 1.0, 0.0, 0
    	@node_stack_bottom = 0.0, -.35, 0.0, 0.0, -1.0, 0.0, 0
    }
    
    @PART[UKSliquidEngineLVT10]:NEEDS[Restock]:AFTER[zzzUnKerballedStart]
    {
    	@node_stack_top = 0.0, 4.5, 0.0, 0.0, 1.0, 0.0
    	@node_stack_bottom = 0.0, -3.5, 0.0, 0.0, -1.0, 0.0
    }
    
    @PART[UKSliquidEngineLVT10]:NEEDS[SmokeScreen,!ReStock]:AFTER[zzzUnKerballedStart]
    {
        PLUME
        {
            name = Kerolox-Lower
            transformName = thrustTransform
            localRotation = 0,0,0
            flarePosition = 0,0,0.1
            plumePosition = 0,0,0.3
            plumeScale = 0.15
            flareScale = 0.3
            energy = 1.0
            speed = 0.6
        }
        @MODULE[ModuleEngines*]
        {
            %powerEffectName = Kerolox-Lower
    	    !runningEffectName = DELETE
        }
    }

    I haven't run into any issues, but do make a backup of the original configs just in case if you're gonna use them.

  4. On 4/19/2019 at 3:13 AM, severedsolo said:

    @ussdefiant - I've moved the conversation over to this thread as it's a ScrapYard issue you are having

    T/N/I is "total/new/inventoried" (it's ScrapYard recording the builds). I've raised issue #3 for this, but it looks like I broke KCT when doing the latest update. Fairly certain I know what the issue is, but could you please provide your full log on the Github issue just in case.

    Hi! I'm also experiencing this issue, but in 1.6.1. I just left the log on the Github issue.

  5. So I did some messing around and managed to get this working with the new KAS modules. I only modified the SEP.plug part: I removed both deprecated KAS modules (KASModulePort and KASModuleStrut) and replaced them with the new modules, by trying to replicate the KAS parts. The plug now has a KASLinkTargetBase module which allows cables to be connected to it, and KASLinkSourceInteractive, KASRendererPipe, KASJointCableBase which allow it to create cables to connect to other plugs. I set this connection as AlwaysCoupled so there's no need to use the GUI after connecting for the experiments to register as connected to the station. This allows the experiments to be calibrated and run, with EC being correctly drained from the station. Both warping and saving/loading seem to work. I also tested having a power station between the central station and the experiment and nothing broke.

    Now this is not perfect (at all): since plugs are both a LinkTarget and a LinkSource, it's possible to have two connections for each plug (one as a connection starter, the other as a receiver). This is probably not the way the plugs are supposed to work. Also, since I had to add a new node and had no idea how its coordinates work, the connections are not very pleasing to the eyes (look at the pic). Or maybe it's not about the node but some of the joint configurations, no idea.

    Anyway, here's the config for the plug:

    PART
    {
    	name = SEP_plug
    	module = Part
    	author = AlbertKermin and CobaltWolf
    	MODEL
    	{
    		model = SurfaceExperimentPackage/Parts/SEP_plug
    	}
    	rescaleFactor = 1.0
    	node_stack_top = 0.0, 0.0319243, 0.0, 0.0, 1.0, 0.0, 0
    	node_stack_bottom = 0.0, 0.0319243, 0.0, 0.0, -1.0, 0.0, 0
    	node_attach = 0.0, 0.0319243, 0.0, 0.0, -1.0, 0.0, 0
    	
    	TechRequired = basicScience
    	entryCost = 1800
    	cost = 100
    	category = Electrical
    	subcategory = 0
    	title = #LOC_SurfaceExperimentPack_plug_title //= AKI Power Transfer Conduit
    	manufacturer = #LOC_SurfaceExperimentPack_mfg //= Albert Kermin Industries
    	description = #LOC_SurfaceExperimentPack_plug_desc //= This plug is one end of an AKI Power Transfer Conduit. Use it to connect your various Surface Experiment Package components back to the Central Station. Attach one to each end of where you need the conduit, then link them using the right click menu.
    	attachRules = 1,0,1,0,1
    	mass = 0.002
    	dragModelType = default
    	maximum_drag = 0.2
    	minimum_drag = 0.2
    	angularDrag = 1
    	crashTolerance = 30
    	breakingForce = 2000
    	breakingTorque = 2000
    	maxTemp = 2000
    	bulkheadProfiles = srf
    	
    	tags = #LOC_SurfaceExperimentPack_plug_tags //= cck-eva-items sep kis kas surface experiment inventory attachment eva plug port power energy (elect cord connector
    	
    		MODULE
    	{
    		name = ModuleKISItem
    		volumeOverride = 5
    		stackable = true
    		allowStaticAttach = 1
    		staticAttachBreakForce = 2000
    	}
    
    	MODULE
    	{
    		name = KASLinkTargetBase
    
    		// AbstractLinkPeer
    		linkType = SEPCable
    		linkTypeDisplayName = this is a test
    		attachNodeName = top
    		allowCoupling = true
    	}
    	MODULE
    	{
    		name = KASLinkSourceInteractive
    
    		// AbstractLinkPeer
    		linkType = SEPCable
    		linkTypeDisplayName = this is a test
    		attachNodeName = kasSrcAuto0
    		attachNodeDef = 0.0, 0.1191, 0.0,  0.0, 1.0, 0.0,  0
    		allowCoupling = true
    
    		// KASLinkSourceBase
    		jointName = cableJoint
    		linkRendererName = cableRenderer
    		coupleMode = AlwaysCoupled
    
    		// KASLinkSourceInteractive
    		sndPathPlug = KAS/Sounds/grappleAttachEva
    		sndPathUnplug = KAS/Sounds/grappleDetach
    		sndPathBroke = KAS/Sounds/broke
    		startLinkMenu = Link
    		breakLinkMenu = Unlink
    	}
    	MODULE
    	{
    		name = KASRendererPipe
    
    		// KASRendererPipe
    		rendererName = cableRenderer
    		pipeDiameter = 0.04
    		pipeTexturePath = SurfaceExperimentPackage/Parts/pipe
    		pipeNormalsTexturePath = KAS/Textures/ProceduralSteelCableNRM
    		pipeTextureSamplesPerMeter = 40
    		sourceJoint
    		{
    		}
    		targetJoint
    		{
    		}
    	}
    	MODULE
    	{
    		name = KASJointCableBase
    
    		// AbstractJoint
    		jointName = cableJoint
    		anchorAtSource = 0, 0, 0
    		anchorAtTarget = 0, 0, 0.0422
    		minLinkLength = 0
    		maxLinkLength = 5
    		linkBreakForce = 100
    
    		// KASJointCableBase
    		cableSpringForce = 1000
    		cableSpringDamper = 1
    	}
    }

    And here's Bill after plugging the things didn't blow up the whole universe:

    Bill looking at the not so shiny new plugs

    Now PLEASE do not use this config in an important save for the following reasons: 1) I have no idea what I'm doing. 2) I've only done limited testing. 3) There's hardcoded text in there 4) There's surely ways to break this and make everything explode violently. 5) I still have no idea what I'm doing.

  6. Hi.

    With SEP 2.7.1 and KAS 1.2 (all from CKAN) I can confirm the bug regarding the lack of a "link" option in the context menu for the AKI plug. I can also confirm that adding the old KAS.dll from the LEGACY folder from KAS 1.1 makes it appear again. I did a quick test with one station and one experiment, linked them together and the experiment both calibrated and started. But a lot of other KAS errors showed up while doing this so it's not a real fix. I looked around the config files and found some KAS compatibility patches that seem to replace the KASModuleStrut module used by the plug to something else, for example from KAS/Patches/COMP-LegacyParts.cfg

    		MODULE
    		{
    			name = KASModuleStrut
    			action = Drop
    		}
    		MODULE
    		{
    			name = KASLinkTargetBase
    			action = Add
    		}

    I'm not familiar with what those actions do though. I can also see that no new parts in KAS use the KASModuleStrut, and that the removed LEGACY parts did, so maybe they removed those modules completely? My log file seems to support this:

    [LOG 23:05:55.508] PartLoader: Compiling Part 'SurfaceExperimentPackage/Parts/SEP_plug/SEP_plug'
    [ERR 23:05:55.523] Cannot find a PartModule of typename 'KASModulePort'
    
    [ERR 23:05:55.523] Cannot find a PartModule of typename 'KASModuleStrut'

    And the old KAS.dll at least references the module:

    $ grep -R KASModuleStrut *
    Binary file KAS/LEGACY/Plugins/KAS.dll matches

    Please let me know if I can provide any more info!

×
×
  • Create New...