Thomas changed the topic of #kspmodding to: Welcome to #kspmodding - the channel for discussing, and learning about, modding Kerbal Space Program. Code of Conduct: https://git.io/vSQh6 | Always provide logs (do !support for help). | *** PSA: https://kerbalspaceprogram.com/api/index.html | <Red5> Guy was asked for a log file, he gave this link: http://pastebin.com/wfVarZPf
Sigma88 is now known as SigmaAway
<taniwha> Virindi: s@a@/@g
<taniwha> bah, Qboid, learn regex :P
<taniwha> (though how's the bot supposed to know that's regex...)
<taniwha> Virindi: s/a/\//g
<Qboid> taniwha thinks Virindi meant to say: (or the surf/ce of l/ythe in my universe, so hey be sure you h/ve / config file so people c/n ch/nge wh/t /tmospheres /re bre/th/ble)
stratochief|remote is now known as stratochief
stratochief is now known as stratosleep
xShadowx has joined #kspmodding
Pap|Away is now known as Pap
<oren> Qboid: s/\([ei]\)/\1\1/
<Qboid> oren thinks Qboid meant to say: U+0065 LATIN SMALL LETTER E \1\1
<oren> LOLWUT\
<oren> Qboid: s/e/ee/
<Qboid> oren thinks Qboid meant to say: oreen thinks Qboid meant to say: U+0065 LATIN SMALL LETTER E \1\1
<oren> Qboid: s/e/ee/
<Qboid> oren thinks Qboid meant to say: oreen thinks Qboid meant to say: oreen thinks Qboid meant to say: U+0065 LATIN SMALL LETTER E \1\1
<oren> Qboid: s/e/ee/g
<Qboid> oren thinks Qboid meant to say: oreen thinks Qboid meeant to say: oreeeen thinks Qboid meeant to say: oreeeen thinks Qboid meeant to say: U+0065 LATIN SMALL LeeTTeeR ee \1\1
<oren> Qboid: s/e/ee/g
<Qboid> oren thinks Qboid meant to say: oreen thinks Qboid meeant to say: oreeeen thinks Qboid meeeeant to say: oreeeeeeeen thinks Qboid meeeeant to say: oreeeeeeeen thinks Qboid meeeeant to say: U+0065 LATIN SMALL LeeeeTTeeeeR eeee \1\1
<oren> Qboid: s/e/ee/g
<Qboid> oren thinks Qboid meant to say: oreen thinks Qboid meeant to say: oreeeen thinks Qboid meeeeant to say: oreeeeeeeen thinks Qboid meeeeeeeeant to say: oreeeeeeeeeeeeeeeen thinks Qboid meeeeeeeeant to say: oreeeeeeeeeeeeeeeen thinks Qboid meeeeeeeeant to say: U+0065 LATIN SMALL LeeeeeeeeTTeeeeeeeeR eeeeeeee \1\1
<oren> Qboid: s/e/ee/g
<Qboid> oren thinks Qboid meant to say: oreen thinks Qboid meeant to say: oreeeen thinks Qboid meeeeant to say: oreeeeeeeen thinks Qboid meeeeeeeeant to say: oreeeeeeeeeeeeeeeen thinks Qboid meeeeeeeeeeeeeeeeant to say: oreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeen thinks Qboid meeeeeeeeeeeeeeeeant to say: oreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeen thinks Qboid meeeeeeeeeeeeeeeeant to say: U+0065 LATIN SMALL
<Qboid> LeeeeeeeeeeeeeeeeTTeeeeeeeeeeeeeeeeR eeeeeeeeeeeeeeee \1\1
<oren> wait it overflows into another line?!
* xShadowx puts oren in a hole
* xShadowx tosses in a lit match
Pap is now known as Pap|zzzzz
ferram4 has quit [Ping timeout: 200 seconds]
ferram4 has joined #kspmodding
riocrokite has joined #kspmodding
ferram4 has quit [Ping timeout: 186 seconds]
ferram4 has joined #kspmodding
SigmaAway is now known as Sigma88
Olympic1 is now known as Olympic1|Nomz
Pap|zzzzz is now known as Pap
Olympic1|Nomz is now known as Olympic1
<Sigma88> if I want a method to have an optional parameter
<Sigma88> can I just do this?
<Sigma88> void Method(double a, bool b = false)
<riocrokite> don't see why not
<Sigma88> k
<Sigma88> thanks
<Sigma88> any of you know if a Vector3Parser can be "null" ?
Ezriilc has joined #kspmodding
Thomas|AWAY is now known as Thomas
<Thomas> Sigma88: Assuming you are talking about my config parser: Yes
<Sigma88> I didn't know it was kopernicus'
<Sigma88> :D
<Thomas> In theory it isnt.. I seperated it into Kopernicus.Parser.dll
<Thomas> So other mods can use it
<Thomas> But noone uses it :( :D
<Sigma88> I use it
<Sigma88> in SD
<Sigma88> and SB
<Thomas> Yes because they depend on Kopernicus :P
<Thomas> I mean independent mods :D
<Sigma88> potato potato
stratosleep is now known as stratochief
riocrokite has quit [Quit: http://www.mibbit.com ajax IRC Client]
Sigma88 is now known as SigmaAFK
* xShadowx makes a new project and refs Kopernicus.Parser.dll to make Thomas happy :)
<Thomas> :P :D
Pap has quit [Quit: Leaving]
stratochief is now known as stratochief|away
SigmaAFK is now known as SigmaTrain
Pap1723 has joined #kspmodding
SigmaTrain is now known as SigmaAFK
stratochief|away is now known as stratochief|remote
Olympic1 is now known as Olympic1|Nomz
Olympic1|Nomz is now known as Olympic1
rsparkyc has joined #kspmodding
<rsparkyc> can someone tell me what i'm doing wrong? I'm trying to look up the amount of remaining fuel/oxidizer for an engine, but am getting a NPE
<xShadowx> rsparkyc: first off use FixedUpdate(), Update() is for graphical stuff :)
* xShadowx goes back to reading
<xShadowx> and you fetch the module /every/ frame, which itself can be slow, toss that into onStart() :)
<rsparkyc> yeah, this is just for debugging
<xShadowx> only need once :D
<rsparkyc> but good to remember
<xShadowx> which part is giving the exc at?
<rsparkyc> so the exception is here
<rsparkyc> 1.                    part.GetConnectedResourceTotals(resourceDefinition.id, out amount, out maxAmount);
<rsparkyc> 2.
<rsparkyc> and i have this on an LV-45
<rsparkyc> so logs show this
<rsparkyc> [EMR] - Looking up Resource: LiquidFuel
<rsparkyc> (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
<rsparkyc> NullReferenceException: Object reference not set to an instance of an object
<rsparkyc> at PartSet.GetOrCreateList (Int32 id, Boolean pulling) [0x00000] in <filename unknown>:0
<rsparkyc> at PartSet.GetConnectedResourceTotals (Int32 id, System.Double& amount, System.Double& maxAmount, Boolean pulling) [0x00000] in <filename unknown>:0
<rsparkyc> at Part.GetConnectedResourceTotals (Int32 resourceID, ResourceFlowMode flowMode, System.Double& amount, System.Double& maxAmount, Boolean pulling) [0x00000] in <filename unknown>:0
<rsparkyc> at Part.GetConnectedResourceTotals (Int32 resourceID, System.Double& amount, System.Double& maxAmount, Boolean pulling) [0x00000] in <filename unknown>:0
<rsparkyc> at EMRController.EMRController.Update () [0x00000] in <filename unknown>:0
<rsparkyc> part's not null, because i find a module on it earlier
<rsparkyc> resource definition isn't null, because i log that too
<rsparkyc> the out variables don't need to be initialized do they?
<xShadowx> i thought they default to 0 o.O but been so long since i accually tried, just habbi to always = 0; lol
<xShadowx> and GetConsumedResources returns List<PartResourceDefinition>
<xShadowx> you're looking up def when you have the def?;3
* xShadowx scratches head
* xShadowx is trying to follow in ILSpy because var is used everywhere :D
<xShadowx> sorry :D
<rsparkyc> before i was just using what came out of GetConsumedresources, but was still getting the exception
<rsparkyc> let me simplify
<xShadowx> either the instance i have loaded in ILSpy is outdated, or im not seeing a GetResourceTotals with just 3 args
* xShadowx points to that
<rsparkyc> last parameter has a default
<rsparkyc> default pulling = true
<xShadowx> oh :D
<xShadowx> most of that should fit in onStart() though as no need to grab refs multiple times
<xShadowx> and you have in Update which is frame updates
<rsparkyc> new one
<rsparkyc> like i said, it's in update only because i'm testing it
<xShadowx> so could be the cause but overall code looks fine
<rsparkyc> and i want it to spam the logs
<xShadowx> still err?:(
<rsparkyc> about to check
* xShadowx thinks itll work
<xShadowx> its weird walking a kerbal by a fire and said kerbal not having any temp change......
* xShadowx looks up temp of LOX+LH2 fire
<rsparkyc> still getting the NRE
<rsparkyc> and it wouldn't be the doubles, since they're not even in the function on top of the call stack
regex has joined #kspmodding
<rsparkyc> i'd like to see the implementation of at PartSet.GetOrCreateList (Int32 id, Boolean pulling) [0x00000] in <filename unknown>:0
<xShadowx> have ILSpy?:)
<rsparkyc> I have some decompiler, don't remember which one
<xShadowx> just dont mention it on ksp forums / kspo etc that squad runs ^.^
<xShadowx> ILSpy is lovely lets you just browse everything
<rsparkyc> dotPeek is what I have
<xShadowx> im curious if the partset stuff got made yet ;/
* xShadowx hasnt used parset enough
<xShadowx> partset*
<rsparkyc> PartSet.ResourcePrioritySet resourcePrioritySet;
<rsparkyc> if (pulling)
<rsparkyc> {
<rsparkyc> if (!this.pullList.TryGetValue(id, out resourcePrioritySet))
<rsparkyc> {
<rsparkyc> resourcePrioritySet = this.BuildResList(id, true);
<rsparkyc> this.pullList[id] = resourcePrioritySet;
<rsparkyc> }
<rsparkyc> }
<rsparkyc> else if (!this.pushList.TryGetValue(id, out resourcePrioritySet))
<rsparkyc> {
<rsparkyc> resourcePrioritySet = this.BuildResList(id, false);
<rsparkyc> this.pushList[id] = resourcePrioritySet;
<rsparkyc> }
<rsparkyc> return resourcePrioritySet;
<rsparkyc> so pullList?
<xShadowx> this is a partmodule you're making?
<rsparkyc> yeah
<xShadowx> ModuleAblator.Start() calls GetConnectedResources() so stuff must be made by then.......
<xShadowx> ohhh
<xShadowx> it only checks if loaded scene is flight
<rsparkyc> ahhh
<xShadowx> you in flight?:3
<rsparkyc> nope, VAB
<xShadowx> uh no clue if partset works in vab
<rsparkyc> ok, so how do we get connected resources in the VAB?
<rsparkyc> MechJeb must do it
<rsparkyc> maybe i need to dig through that
<xShadowx> someone else smarter then me XD
<rsparkyc> time to look at how MechJeb gets their DeltaV numbers
<rsparkyc> thx for your help
<xShadowx> worst case theres part crawling
* xShadowx is curious about this as he needs this same thing for his LS mod
<rsparkyc> i think KER part crawls
<rsparkyc> if i'm even looking at the right thing
<xShadowx> seems like it, though PartSet is new to 1.2, so could be not every mod jumped on it, and to me PartSet feels like its the right way to go, but i just dont know enough about it yet :(
<rsparkyc> looking at mechjeb at how it gets DeltaV
<rsparkyc> it runs a simulation
<rsparkyc> and then part scans
<rsparkyc> hmm, let me try something
SigmaAFK is now known as Sigma88
<rsparkyc> holy crap that worked
<rsparkyc> (at least i think it did)
<rsparkyc> xShadowx let me get you a new paste
<rsparkyc> don't know how that works with stages and everything yet, but it's not throwing exceptions
<xShadowx> part crawling (looping every part) works ya, but then you have crossfeed checks, flow checks, etc :|
<rsparkyc> again, that code will need some cleanup
<rsparkyc> double editor checks and such, but i'm getting numbers in the VAB, and it's not throwing exceptions
<xShadowx> partset was to make all that checks simple and done for ya ;3 so might wanna wait for someone more knowing, or go back n fix later
<rsparkyc> well i'm using PartSet, did you see the new paste?
<xShadowx> ah heh ^.^
<xShadowx> ya
<rsparkyc> ok
<xShadowx> that spamming of buildpartset every frame might suck :P
<xShadowx> (yaya tests)
<xShadowx> i gotta go a bit further, i gotta see what group partA is in, and if diff from partB, so i can combine kerbals and just do 1 LS calc per group
dormantdex is now known as DuoDex
stratochief|remote is now known as TungstenTiger
TungstenTiger is now known as stratochief
regex has quit [Remote host closed the connection]
Pap1723 is now known as Pap|Away
rsparkyc has quit [Quit: Leaving.]
Markus has joined #kspmodding
<Markus> hi :) Can somebody help me please? I want to change a Ressource Mass with ModuleManager, I installed the 6.4 rescale and multiplied the amount of Ablator every Heat Shield holds, but now the HS weighs more than the Capsule!
<xShadowx> heh
<xShadowx> you know how to use MM in general?
<xShadowx> Markus: ^
* xShadowx taps foot
<Markus> well
<Markus> I read the description
<Markus> I wrote some small part reconfigs
<xShadowx> @RESOURCE_DEFINITION[resourcename] { @density = newdensity }
VITAS has joined #kspmodding
<VITAS> wow that realy is a thing
<xShadowx> ?
<Markus> ?
<xShadowx> this chan?
<VITAS> yes never knew
<VITAS> :D
<xShadowx> i told you like 6 months ago
<xShadowx> -.-
<VITAS> lol
<Markus> so I put that in instead of more amount or with?
<VITAS> i also started uploading crafts to kerbalx today
<xShadowx> Markus: you can make a *.cfg file anywhere in gamedata and put that line inside, replacing resourcename and newdensity with whatever you like
<VITAS> off to bed now
<Markus> Yes, I know, but what does it do specifically? Higher mass, more heat resistance or less?
<Markus> bye
<xShadowx> that changes the density of Ablator resource to whatever you set, replacing old value
<Markus> so I want lower density right?
<xShadowx> if you want it lighter, ya
<Markus> ok thanks
<Markus> let me test it real quick
<xShadowx> if you want higher heat resistance, you set hsp higher i think, but keep it lower than the part maxtemp
<xShadowx> or lower :| i forget
<xShadowx> Markus: you can also MM to lower the HS base mass
<xShadowx> many roads to go
<Olympic1> oh there is some modding documentation now for 1.3
<xShadowx> linky?
<Olympic1> http://forum.kerbalspaceprogram.com/index.php?/topic/157804-modders-notes-for-129/
<Markus> It worked very well, thank you
Markus has quit [Quit: Web client closed]
<xShadowx> ah ya saw that :)
<Sigma88> stupid dictionaries
<Sigma88> !c new[] {"a","b"} == new[] {"a","b"}
<Qboid> false
<Sigma88> -.-
<Sigma88> how are those not the same???
<xShadowx> objectA != objectB
<Virindi> yeah how COULD those be the same :P
<Virindi> new int[0] != new int[0] too...
<Virindi> xshadowx: decompilers! what the hell are you talking about, nobody uses those. that would be wrong.
<xShadowx> you're asking if 2 arrays are the same object
<Virindi> need an equals operator overload
<xShadowx> !c new int[0].Equals(new int[0])
<Qboid> false
<xShadowx> heh
<Virindi> that's because int[] doesn't override object.equals
<Virindi> duh
<Virindi> however there could easily be some class virindiclass such that
<Virindi> new virindiclass() == new virindiclass()
<xShadowx> !c new int[1].SequenceEqual<int>(new int[1]
<Virindi> so the most accurate way of saying it is something like, "object.equals compares if the two references are to the same object"
<xShadowx> !c new int[1].SequenceEqual<int>(new int[1])
<Qboid> true
<Virindi> "for a class derived from object, it may or may not work like that" :)
<xShadowx> use SequenceEqual for arrays
<Virindi> pfft
<Virindi> use a loop. hipster.
<xShadowx> !c new string[] {"a","b"}.SequenceEqual<string>(new string[] {"a","b"})
<Qboid> true
<Virindi> bool isequal = true;
<Virindi> if (seq1.Length != seq2.Length)
<Virindi> if (seq1[i]!=seq2[i]) { isequal = false; break; }
<Virindi> isequal = false;
<Virindi> else for (int i=0;i<seq1.Length;++i)
<xShadowx> !c new string[] {"a","b"}.SequenceEqual<string>(new string[] {"a","b"})
<Qboid> true
<xShadowx> taniwha: new cruiser?;3
<Virindi> I had been wondering in what situations people would actually use the mk2 4way
<Virindi> :)
<Virindi> I tried using it on a plane but I couldn't get it to look planelike
<Virindi> btw that thing has broken symmetry for me, is that fixed now or something? the sides couldn't place symmetric
<xShadowx> wheres the mk2 curve and X from?;3
* xShadowx doesnt see in stock folder
<Virindi> I think it is "mk2 expansion"?
<Virindi> mod
<Virindi> yeah that's the one.
<xShadowx> ^.^
<Virindi> I like the 90 degree twist piece
<Virindi> great parts mod.
Ezriilc has quit [Quit: Going offline, see ya! (www.Kerbaltek.com)]
<Virindi> one of the best :)