Sarbian 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. | *** PSA: https://kerbalspaceprogram.com/api/index.htm | Someone is writting a Phd dissertation on KSP modding please fill out this survey https://goo.gl/forms/1vrkPYH4az8l32sb2 - I have met him and it s legit
xEvilReeperx has joined #kspmodding
BasharMilesTeg_ has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 200 seconds]
Ezriilc has quit [Quit: Going offline, see ya! (www.Kerbaltek.com)]
NathanKell|AWAY is now known as NathanKell
gk_su_ has joined #kspmodding
gk_su_ has left #kspmodding [#kspmodding]
gk_su_ has joined #kspmodding
gk_su_ has left #kspmodding [#kspmodding]
NathanKell is now known as NathanKell|Twitch
gk_su_ has joined #kspmodding
gk_su_ has left #kspmodding [#kspmodding]
egg is now known as egg|zzz|egg
NathanKell|Twitch is now known as NathanKell
xEvilReeperx has quit [Quit: Web client closed]
smoke_fumus has joined #kspmodding
NathanKell is now known as NathanKell|NOMZ
TriggerAu has quit [Quit: Leaving, Laters...]
TriggerAu has joined #kspmodding
BasharMilesTeg has joined #kspmodding
BasharMilesTeg_ has quit [Ping timeout: 383 seconds]
Pap is now known as Pap|Sleep
<xShadowx> [Persistent] + CreateObjectFromConfig() work with floatcurves?
<blowfish> I don't think so, but you can try it
blowfish has quit [Quit: Leaving]
NathanKell|NOMZ is now known as NathanKell
NathanKell is now known as NathanKell|Twitch
NathanKell|Twitch is now known as NathanKell|AWAY
ferram4 has quit [Ping timeout: 204 seconds]
BasharMilesTeg_ has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 186 seconds]
BasharMilesTeg_ has quit [Ping timeout: 200 seconds]
BasharMilesTeg has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 201 seconds]
BasharMilesTeg has joined #kspmodding
Starwaster has quit [Ping timeout: 204 seconds]
BasharMilesTeg_ has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 204 seconds]
BasharMilesTeg_ has quit [Ping timeout: 186 seconds]
BasharMilesTeg has joined #kspmodding
APlayer has joined #kspmodding
<APlayer> Hi everyone! I think I need some help with MM syntax. So, I installed EngineIgnitor for my current career save, and trying to come up with a universal patch for modded engines.
<APlayer> I figured I would try to tell apart orbital engines from non orbital ones using thrust, ASL/vac ISP ratio and/or presence of gimbal capability. I believe I cannot use all of those without writing a proper mod for this, but I am sure I can use at least one of the three criteria.
<APlayer> So, the question itself is, is it possible to read out, calculate and/or compare numbers in MM selectors? If so, how?
BasharMilesTeg has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
BasharMilesTeg has joined #kspmodding
xEvilReeperx has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 201 seconds]
BasharMilesTeg has joined #kspmodding
BasharMilesTeg_ has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 200 seconds]
BasharMilesTeg has joined #kspmodding
BasharMilesTeg_ has quit [Ping timeout: 204 seconds]
BasharMilesTeg_ has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 186 seconds]
BasharMilesTeg has joined #kspmodding
BasharMilesTeg_ has quit [Ping timeout: 383 seconds]
BasharMilesTeg_ has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 201 seconds]
BasharMilesTeg_ has quit [Ping timeout: 204 seconds]
BasharMilesTeg has joined #kspmodding
Pap|Sleep is now known as Pap|SemiAFK
APlayer has quit [Ping timeout: 383 seconds]
APlayer has joined #kspmodding
APlayer has quit [Ping timeout: 204 seconds]
APlayer has joined #kspmodding
Starwaster has joined #kspmodding
APlayer has quit [Ping timeout: 204 seconds]
APlayer has joined #kspmodding
BasharMilesTeg has quit [Ping timeout: 201 seconds]
<APlayer> If I may bump my question from earlier today, could anyone help me with MM a bit?
<Sigma88> APlayer: what kind of help?
<APlayer> Sigma88: Is it possible to read out, calculate and/or compare numbers in MM selectors? If so, how?
<Sigma88> I need a specific and simple example
<APlayer> I am working on a MM patch for Engine Ignitor which should apply a different patch based on engine type (vacuum/atmospheric, etc.).
<APlayer> I figured I would try to tell apart orbital engines from non orbital ones using thrust, ASL/vac ISP ratio and/or presence of gimbal capability. I believe I cannot use all of those without writing a proper mod for this, but I am sure I can use at least one of the three criteria.
<APlayer> Say for example ASL/vac ISP ratio: If it is greater than (whatever), apply this patch to all parts that have ModuleEngines*
TheKosmonaut has quit [*.net *.split]
TheKosmonaut has joined #kspmodding
<Sigma88> you need to create a new parameter
<Sigma88> let's call it ISPratio
<Sigma88> so you do something like this:
<Sigma88> (writing on pastebin)
<Sigma88> can you link me the cfg of an engine part
<Sigma88> ?
<Sigma88> I don't know how it looks like
<APlayer> Do you mean a patch or a part cfg?
<Sigma88> the part
<Sigma88> there's no mention of ISP in that cfg
<Sigma88> how do you plan to get the isp?
<APlayer> Let me check...
<APlayer> Uh, how does KSP even get the ISP?
<Sigma88> that's not an MM question so I don't know the answer to that
<APlayer> Let me check the wiki...
<Sigma88> if you find out what you want to do and need mm help feel free to ping me, I'll answer if I am around
<Sigma88> :)
<APlayer> Well, let's get the thrust and gimbal capability first, then.
<Sigma88> ok, so what do you want to do?
<APlayer> If it is a big thrust LFO engine and has no gimbal, it is likely for lower stages
<APlayer> Ah, I found the ISP numbers. That's the atmosphere keys. They are in ASL - ISP pairs.
<APlayer> AtmosphereCurve, that is.
<Sigma88> that's a patch for LF-OX engines with no gimbal
<APlayer> Yeah, but the question was how to get numbers into that - that's what I can currently do, but it also patches the Ant engine.
<Sigma88> I cannot read minds
<Sigma88> you asked for "liquid fuel + oxigen + no gimbal"
<APlayer> "If it is a big thrust LFO engine and has no gimbal" :P
<Sigma88> big?
<APlayer> Well, high.
<Sigma88> over 9000?
lamont_ has joined #kspmodding
<Sigma88> I don't work with parts, I've no idea what high means
<APlayer> I haven't settled on a number yet, that's fine tweaking. Probably more like 300 - 500 kN of thrust.
lamont has quit [Ping timeout: 186 seconds]
lamont_ is now known as lamont
<Sigma88> so maxThrust > 400
<Sigma88> let's say
<APlayer> Yeah.
<Sigma88> here you go
<APlayer> And I can do calculations with that too? So, if I get the atmosphereCurve keys, divide the first by the second and combine this ratio and the thrust as a weighted formula to get an idea whether the engine is a vacuum one?
<APlayer> Well, nevermind the second sentence in that message. I see how it can be confusing.
<Sigma88> you can't trust the curves
<Sigma88> KSP will parse those as curves which means modders can add any number of "key"
<Sigma88> so the second value might have different meanings in different parts
<APlayer> Yeah, but it seems to be a convention to use 0, 1 and a larger number for the third?
<Sigma88> that's just because all the parts you have seen have 3 keys
<APlayer> Oh. Well, that does make sense.
<Sigma88> but engines can have any number of keys
<Sigma88> so I would suggest against using that to filter parts
<Sigma88> and for math
<Sigma88> you need to do the math on a separate value
<Sigma88> one you create
<Sigma88> and then you can filter parts reading that value
<APlayer> So I need to first patch every part that is not obviously excluded, create a temporary value in it, and later go through all parts again and see if that value matches?
<APlayer> And lastly, is there a place where I can see the syntax for getting specific values from a specific module? I know the one form, #$stuff$, but what if I need to access a value from the same part but a different module? Is there some sort of "path" I need to specify?
<Sigma88> yes
<Sigma88> the sintax is
<Sigma88> "../" means "go back one level"
<Sigma88> and if you start with "/" it means that you start from the PART you are currently in
<APlayer> So it actually works like a normal file structure path? And I use it like #$path$?
<Sigma88> yes
<Sigma88> if you start with "@" you can even change PART
<APlayer> Could you give an example on that?
<Sigma88> @banana = #$@PART[FruitBasket]/BANANAS/maxbananas$
<APlayer> Wow, thanks a lot!
<Sigma88> that will find a part called fruitbasket enter a "BANANAS" node and copy the value of "maxbananas"
<APlayer> Is there a place where I can see such things? Because the Wiki on GitHub doesn't mention copying values at all, not to mention what you just showed me.
<Sigma88> I think the forum page should have some of that
<Sigma88> no you are right
<Sigma88> there's no mention
<Sigma88> I guess you just need to ask
<Sigma88> nobody had the time to write documentation apparently
ferram4 has joined #kspmodding
<APlayer> Okay, I will ask in the thread, and will also offer my help documenting that officially. Thanks a lot for the help!
<APlayer> I need to go now, but I'll be back later.
<Sigma88> there's some here
<Sigma88> http://forum.kerbalspaceprogram.com/index.php?/topic/50533-130-module-manager-281-june-29th-2017-with-n-cats-physics/&do=findComment&comment=1789984
APlayer has quit [Ping timeout: 204 seconds]
Ezriilc has joined #kspmodding
smoke_fumus has quit [Read error: Connection reset by peer]
Ezriilc has quit [Ping timeout: 201 seconds]
APlayer has joined #kspmodding
CragnatharTheDestroyer has joined #kspmodding
egg|zzz|egg is now known as egg|nomz|egg
<APlayer> Can you round a value to an integer using MM maths?
<APlayer> That is, floor/ceil/round style, any of those is okay.
<Sigma88> APlayer: someone asked this yesterday
<Sigma88> this was the answer someone gave
<Sigma88> I haven't tested it myself
<Sigma88> @value ^= :(?<=[0-9])\..*::
APlayer has quit [Remote host closed the connection]
APlayer has joined #kspmodding
APlayer has quit [Ping timeout: 383 seconds]
egg|nomz|egg is now known as egg
<xShadowx> that method just truncates, regex cant do math just pattern find/replace, MM can do basic math +-/*, so not really a way to floor/ceiling/nearest without making a very large patch (check every 1.0 1.1 1.2 1.3 etc) to replace correctly
APlayer has joined #kspmodding
BPlayer has joined #kspmodding
APlayer has quit [Ping timeout: 383 seconds]
Ezriilc has joined #kspmodding
<egg> xShadowx: you can just implement the logic without going through a silly lookup table since MM is a Turing-complete language now, but in any case you shouldn't, if you start wanting to do that just write a bloody plugin
<egg> (proof of Turing completeness: http://forum.kerbalspaceprogram.com/index.php?/topic/50533-130-module-manager-281-june-29th-2017-with-n-cats-physics/&do=findComment&comment=2530142)
* xShadowx places egg under a rocket and launches it, frying egg
<xShadowx> i stil cant believe sarb accually let that in :P
<Sigma88> I don't know how I could not have liked that comment until now
Ezriilc has quit [Quit: Going offline, see ya! (www.Kerbaltek.com)]
BPlayer has quit [Ping timeout: 383 seconds]
egg is now known as egg|zzz|egg
NathanKell|AWAY is now known as NathanKell
NathanKell is now known as NathanKell|Twitch
blowfish has joined #kspmodding