SFJackBauer Posted December 4, 2013 Share Posted December 4, 2013 Ah bummer. That's ok though, back to plan A. Quote Link to comment Share on other sites More sharing options...
prioronion Posted December 5, 2013 Share Posted December 5, 2013 could anyone recommend me some code that would do the same as this, all parts without a tech allocation to be set to composites@PART[*]:HAS[~TechRequired[]]:Final{ TechRequired=composites}as this doesn't work Quote Link to comment Share on other sites More sharing options...
prioronion Posted December 5, 2013 Share Posted December 5, 2013 also just to be clear the dll in gamedatathe config in any directory in gamedata Quote Link to comment Share on other sites More sharing options...
sarbian Posted December 5, 2013 Author Share Posted December 5, 2013 Mine looks like your and works fine @PART[*]:HAS[~TechRequired[]]:Final{ TechRequired=advScienceTech} Quote Link to comment Share on other sites More sharing options...
prioronion Posted December 5, 2013 Share Posted December 5, 2013 did you use version of mm 1.5.5? Quote Link to comment Share on other sites More sharing options...
prioronion Posted December 5, 2013 Share Posted December 5, 2013 also does your file say the type is a .cfg because mine won't change to one so just to be sure there's a original file i had and i had to get a config file from smoewhere else Quote Link to comment Share on other sites More sharing options...
sarbian Posted December 6, 2013 Author Share Posted December 6, 2013 Yes, and yes Quote Link to comment Share on other sites More sharing options...
prioronion Posted December 6, 2013 Share Posted December 6, 2013 thx ill try it now Quote Link to comment Share on other sites More sharing options...
therealcrow999 Posted December 6, 2013 Share Posted December 6, 2013 I am liking the new features in 1.5 Quote Link to comment Share on other sites More sharing options...
SFJackBauer Posted December 7, 2013 Share Posted December 7, 2013 It seems the % (create-or-change) operator is not working on nodes?My code is:@PART[foo]{ %MODULE[ModuleGimbal] { %gimbalTransformName = thrustTransform %gimbalRange = 0.5 }}But the engine still shows up having no vectoring range in VAB. It works if I add it directly to the part cfg. Quote Link to comment Share on other sites More sharing options...
ialdabaoth Posted December 7, 2013 Share Posted December 7, 2013 (edited) Suggestion on syntax:When modifying, @NODE[blah] {...} affects a node, while !NODE[blah] removes a node; likewise, @PROPERTY=... affects a property, while !PROPERTY removes a property.For consistency's sake, when searching, :HAS[@NODE[blah]] should match on having a node, while :HAS[!NODE[blah]] should match on not having a node. Likewise, :HAS[@PROPERTY] should match on having a property, while :HAS[!PROPERTY] should match on not having that property (note the lack of [] if it's a property). So this:@PART[*]:HAS[~TechRequired[]]:Finalshould really look like this:@PART[*]:HAS[!TechRequired]:Finalif we want a tight, consistent language.That said, it's of course your baby right now - but I'd strongly advise considering my recommendation; I know a thing or two about language and script design.One thing you need to be very mindful of, is that eventually Squad will catch up with you - and on that day, you want them to be able to implement their own version of your parser from scratch, without your help, so that mod authors everywhere won't have to redo everything in their cfg files. Every change you make to ModuleManager's CFG syntax is a change that needs to make absolute intuitive sense, AND be easy to write a parser for, or you open the temptation for Squad to just do their own thing and throw your design out the window. Edited December 7, 2013 by ialdabaoth Quote Link to comment Share on other sites More sharing options...
sarbian Posted December 8, 2013 Author Share Posted December 8, 2013 Fair points. I have no idea to why I used ~You are right that as I add new feature the need for a true parser is rising. It just seems going overboard for such a simple addon. If you have an advice on a tool/method I should use I would welcome it.I would be glad if squad catched up, since right now some feature are impossible with the public API. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted December 9, 2013 Share Posted December 9, 2013 Fair points. I have no idea to why I used ~You are right that as I add new feature the need for a true parser is rising. It just seems going overboard for such a simple addon. If you have an advice on a tool/method I should use I would welcome it.I would be glad if squad catched up, since right now some feature are impossible with the public API.I assume you used ~ because that's how I did it when I submitted my code fragment and I did it that way because it was a quick way for me to work around the bracket issue with properties while staying within the confines of how the parser worked at the time. (back when it was 1.3 + Sarbian's MM Extensions)Consistifying the syntax is definitely a good thing. (yeah I know, that's not really a word...) Quote Link to comment Share on other sites More sharing options...
jrandom Posted December 10, 2013 Share Posted December 10, 2013 I'm trying to alter the energy usage of the command and I can't seem to get it to work. The following appears to have no effect:@PART[*]:HAS[@MODULE[ModuleCommand],#CrewCapacity[3]]:Final{ @MODULE[ModuleCommand] { @RESOURCE[ElectricCharge] { @rate = 1 // 0.5 for coms, 0.1666666 for operation per kerbal } }} Quote Link to comment Share on other sites More sharing options...
NathanKell Posted December 10, 2013 Share Posted December 10, 2013 Because there is no RESOURCE block to change. They exist only for the unmanned pods where command modules cost EC; manned pods' command modules don't.% was created for just this reason (create-or-change) but above SFJackBauer mentions issues with creating subnodes. Quote Link to comment Share on other sites More sharing options...
jrandom Posted December 10, 2013 Share Posted December 10, 2013 Because there is no RESOURCE block to change. They exist only for the unmanned pods where command modules cost EC; manned pods' command modules don't.% was created for just this reason (create-or-change) but above SFJackBauer mentions issues with creating subnodes.Huh. Okay. So where does a manned pod's default electrical usage come from? I need to change it! Quote Link to comment Share on other sites More sharing options...
NathanKell Posted December 10, 2013 Share Posted December 10, 2013 There isn't any, stock. Instead do:@PART[*]:HAS[@MODULE[ModuleCommand],#CrewCapacity[3]]:Final{ @MODULE[ModuleCommand] { RESOURCE { name = ElectricCharge rate = 1 // 0.5 for avionics, 0.1666666 for operation per kerbal } }}(Also I changed it to avionics, since the command module is avionics, and RT2 antenna module would represent comms. Plus, where's the extra 1kW coming from? It should be ~2EC/sec usage for a 3-person pod, IMO.) Quote Link to comment Share on other sites More sharing options...
jrandom Posted December 10, 2013 Share Posted December 10, 2013 (Also I changed it to avionics, since the command module is avionics, and RT2 antenna module would represent comms. Plus, where's the extra 1kW coming from? It should be ~2EC/sec usage for a 3-person pod, IMO.)I'm trying to make the other 1kW come from IonCross but at present I've not been able to successfully get its power consumption to change. I think it might be because I'm adding IonCross support to all pods in another .cfg file and this other one might be loading first. I'll try and combine them and see if that works. Quote Link to comment Share on other sites More sharing options...
sarbian Posted December 10, 2013 Author Share Posted December 10, 2013 I missed the % post. I'll try to fix the current bug before .23 so we can have a stable release. Quote Link to comment Share on other sites More sharing options...
jrandom Posted December 11, 2013 Share Posted December 11, 2013 Is there a way to prioritize :Final blocks? I have a patch I want to apply but it's being overridden by RealismOverhaul. I thought I saw somewhere there was a way to do this, but I've digging through forum posts to no avail. Quote Link to comment Share on other sites More sharing options...
jrandom Posted December 11, 2013 Share Posted December 11, 2013 Another question. The following block should, as far as I can tell, only apply to parts that do not have a LifeSupportModule module, and that do have a crew capacity of 1:@PART[*]:HAS[!MODULE[LifeSupportModule], #CrewCapacity[1]]:Final{ MODULE { name = LifeSupportModule }}However, this gets applied to every part. What did I miss? Quote Link to comment Share on other sites More sharing options...
sarbian Posted December 11, 2013 Author Share Posted December 11, 2013 (edited) Remove the space after the comaRealismOverhaul hsuld not use :Fianl, but they may have the need to. If you want a patch to be applied last you should try to put it in a directory named zzz_something Edited December 11, 2013 by sarbian Quote Link to comment Share on other sites More sharing options...
jrandom Posted December 11, 2013 Share Posted December 11, 2013 Remove the space after the comaWhoa, really? Does nobody trim their tokens anymore?...... I'm a grumpy old coder, stop laughing at me. RealismOverhaul hsuld not use :Fianl, but they may have the need to. If you want a patch to be applied last you should try to put it in a directory named zzz_somethingI'll give it a shot. Thank you! Quote Link to comment Share on other sites More sharing options...
NathanKell Posted December 11, 2013 Share Posted December 11, 2013 Final is used since RO modifies heatshields of pods that already have heatshields added via DeadlyReentry. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted December 12, 2013 Share Posted December 12, 2013 Whoa, really? Does nobody trim their tokens anymore?...... I'm a grumpy old coder, stop laughing at me. I'll give it a shot. Thank you!He does trim them, but for some reason it doesn't stop the spaces from breaking things.... 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.