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
<Virindi>
and then, inconveniently, once you do that
<Virindi>
if later you want to change the mix...
<Virindi>
wait I am not explaining that well
<taniwha>
heh, TAPE: "my trajectory got killed by floating point". sorry, no, it got killed by misused solver
<Virindi>
say I have a spaceplane that has both lfo and lf engines
<taniwha>
Virindi: the buttons would be automatic
<Virindi>
hold on though
<Virindi>
so I initially click and get 600 units of lfo balance, and 400 units of lf
<taniwha>
ie, you would get buttons for each fuel mix
<Virindi>
but then I test my plane and I have too much lf, but now the lf number is inconveniently "mixed in" with the lfo number
<taniwha>
so ah "mix" entry where you put the amount, then hit the right button?
<Virindi>
so I have to whip out a calculator, depending on the scenario
<Virindi>
for removing the lf I don't need a calculator but I do for removing lfo
<xShadowx>
taniwha read priv chat :P
<Virindi>
because you go into the edit, and you just see one number for lf and one number for ox, and you want to REMOVE a proper proportion of lfo
<Virindi>
dunno what the solution to that is, it is just a scenario where I need a calculator when building ships.
<taniwha>
hmm
<Virindi>
I was thinking that there would be separate tanks inside, is it possible to make a part that contains two tanks of the same resource?
<taniwha>
I don't see why not
<Virindi>
like in that scenario, you would have one lf tank that was for the "lf only" entry, and one that is for the "lfo" entry
<Virindi>
it doesn't even have to be "real" tanks anyway
<Virindi>
once you are in flight who cares, it can be one tank
<taniwha>
however, could possibly make MFT keep track of such
<Virindi>
the mod just needs to separate it out as if it was two in the ui
<Virindi>
well
<Virindi>
having actual separate tanks is better
<Virindi>
because what if you want to partially fill a tank, but with the proper ratio.
<taniwha>
a sensible transfer mod would help
<xShadowx>
what so you can force a tank part to be 25% LF minimum?o.o
<xShadowx>
oh nvm
<xShadowx>
but thats an idea too
<taniwha>
TAC fuel balancer is a good start, but you still can't do accurate transfers
<Virindi>
like say my spaceplane, I didn't want to reduce the lfo capacity, but just reduce it at launch and then refill to above launch capacity at a station
<Virindi>
so I want to have "full" of the lf that I have dedicated to lf
<Virindi>
but, say, "half" of the lf I have dedicated to lfo
<Virindi>
so I whip out my calculator :)
<Virindi>
if the plugin just acted like each mix was its own fuel type and added separate tanks for each mix it would solve all that
<xShadowx>
so......just add LFO fuel type to the tank option, and a partmodule that at launch, replaces LFO to LF+O :P
<Virindi>
well there are other fuel mixes, I don't play them, but there are :)
<xShadowx>
yep RF
<xShadowx>
and trouble is ratios change by engine
<Virindi>
wut
<xShadowx>
ratio of A to B, isnt always 1:1
<Virindi>
I figured it was always the stoichiometric ratio :(
<xShadowx>
see RO, every engine is freakin different :(
<Virindi>
too much realism!! :D
<xShadowx>
nah
<Virindi>
does it also change with your THROTTLE LEVEL :P
<Virindi>
...it should
<Virindi>
I mean we are going for realism aren't we.
<xShadowx>
i made like 200 failures for testflight, so everything on my ship could fail :P realism ftw
<Virindi>
having structural pieces fail seems like it would just be not a lot of fun
<xShadowx>
uhh i seem to recall that was atleast wanted in RO, i forget if it got made, main argument for it was boiloff, on the way up you could trade a bit off ISP so when you're done sdoing whatever, both fuels hit 0
<xShadowx>
cuz 2 fuels have diff boiloff rates, and changing ratio changes isp, yada yada
<Virindi>
I mean rich/lean is not the same at every throttle level, I mean, it's not in an internal combustion engine....
<taniwha>
actually, it is
<Virindi>
on a rocket?
<taniwha>
only difference is rocket: direct exhaust->thrust, car engine: exhaust pushes on piston
<xShadowx>
rockets want ratio X, differ and you can lose isp etc
<Virindi>
on a car, rich/lean is altered dynamically based on both throttle and delta throttle
<Virindi>
at least, it is on my vehicle where I RE'd the ECM
<Virindi>
on a rocket I imagine you have other considerations, like dealing with the nozzle cooling system, pump driving, etc
<taniwha>
any variation in a car's engine would be for tuning between efficiency and power
<taniwha>
(and heating)
<Virindi>
yes and emissions
<taniwha>
but the ideal mix doesn't vary with throttle
<Virindi>
leaner = more efficient but also = worse emissions
<Virindi>
well the software does vary it based on throttle, but like you said there are other considerations
<Virindi>
like emissions limits, "average fuel economy" requirements, whatever
<Virindi>
I don't know about rockets, I am just speculating, so :)
<taniwha>
rockets tend to be run a little rich because it results in lighter exhaust gasses
<taniwha>
H2 is much lighter than H2O, and CO is much lighter than CO2
<taniwha>
results in cooler combustion, so it's a bit of a balancing act
<taniwha>
but both temperature and mass affect Isp
<Virindi>
right but
<Virindi>
there isn't a situation where you are, say, pushing so much power that you need to change the ratio to keep it from getting too hot?
<taniwha>
most engines can't be throttled anyway
<Virindi>
I guess it is not worth it from a practical perspective to mess with it dynamically, even if there were some minor benefit
<Virindi>
on the other hand, a car is more of a pwm situation than a pump situation so it is easy to tweak things in software
Djohaal_ has quit [Ping timeout: 200 seconds]
<xShadowx>
going to space involves you sitting on 4 million pounds of fuel, and 270,000 parts built by the lowest bidder, and something throwing in a match
<Virindi>
lowest bidder?! more like the bidder who buys the most politicians
<Virindi>
space is too expensive a proposition to leave bidding to merit :P
<xShadowx>
Virindi: s/expensive/prestigious
<Qboid>
xShadowx thinks Virindi meant to say: space is too prestigious a proposition to leave bidding to merit :P
blowfish has quit [Quit: Leaving]
pap1723 has quit [Ping timeout: 204 seconds]
stratochief is now known as stratochief|away
blowfish has joined #kspmodding
xEvilReeperx has quit [Quit: Web client closed]
VanDisaster has quit [Ping timeout: 204 seconds]
blowfish has quit [Quit: Leaving]
Thorbane has joined #kspmodding
ferram4 has quit [Ping timeout: 200 seconds]
Olympic1 has quit [Ping timeout: 180 seconds]
* Sarbian
gets ready to move old web server to shiny new server
* Sarbian
finds old KSP mods jenkins from 2014
<Sarbian>
Damn, 2014. And I started moding this game way before
<Sarbian>
4 years...
<Virindi>
hah
<Virindi>
I just came out of a game that we had been modding since 2001
<Sarbian>
What game ? MC ?
<Virindi>
asheron's call
<Sarbian>
oh :)
<Sarbian>
So long ago
<Sarbian>
I played for a bit. But I was mainly an EQ player back then
<Virindi>
none of us played the game this decade
<Virindi>
but the modding continued
<Sarbian>
Interface stuff or does is allow more than that ?
<Sarbian>
err, does IT
<Virindi>
it allowed nothing. we hijacked the entire client, detoured hundreds of functions, injected code everywhere
<Sarbian>
lol
<Sarbian>
bots ?
<Virindi>
yes bots were allowed in the game :)
<Virindi>
that is, the rules allowed you to run what you want. but the client had no api.
<Virindi>
so we had to RE the whole thing
<Sarbian>
I have a vision of hordes of bots
<Virindi>
by 2010 bots outnumbered players like 10 to 1
<Virindi>
it was a lot of fun.
<Virindi>
the game was more about configuring your bot, which it turns out, is a really fun game
<Sarbian>
no doubt
<Virindi>
much more fun than mashing keys :)
<Virindi>
of course for me the real game was WRITING a bot but you know how that goes
<Sarbian>
Yeah. "Oh, let's try adding a small fix to MechJeb"
<Sarbian>
4 years later...
<Thomas>
I know what you mean, lol
<Virindi>
"here is a game binary do what you want but there is no api" is a good way to learn reverse engineering though :)
<Sarbian>
Is it pure x86 assembly or something easier to revere engineer ?
<Virindi>
pure x86, msvc
<Sarbian>
well, I ll stay on my Unity game ;)
<Virindi>
about half is singleton calls (easy) and half is vtables stacked a mile deep
<Virindi>
took years to map the binary and build a set of ida sigs to line things up whenever they updated
<Virindi>
after I started playing ksp I was like I wonder what it would be like to mod this, *looks* wow this is easy mode!!
Olympic1 has joined #kspmodding
<Virindi>
I miss detouring everything though, a few days ago I was frustrated and going "wait can I just overwrite this function inside kerbaleva, it would be way easier...but I guess that is frowned upon"
<Sarbian>
But it would be a nightmare fast if everyone start to detour :)
<Virindi>
yeah I have detoured managed stuff before, pretty simple compared to an x86 impl
<Virindi>
as long as you can trust the jit to not break you
Olympic1 has quit [Read error: Connection reset by peer]
<Virindi>
cool link.
<Virindi>
I used "method 1"
<Sarbian>
cities-skylines is modded 100% like that AFAIK
<Virindi>
see now I am going to be tempted to use that to solve my problems :P
<Sarbian>
I would advise against it, but you clearly know the risks
<Sarbian>
and benefits
<Virindi>
I mean honestly it's not like mod interactions aren't already an issue, like, if I had just been like "I will replace the whole class with a class derived from the original" it would break anyone who interacted with it nontrivially
<Virindi>
it's more a question of convention I think, if the goal is for every mod to play nice with every other mod in an environment where some devs are more familiar with the guts than others.
<Virindi>
detouring stuff can give nonsensical stack traces too which would even further frustrate the situation
<Sarbian>
The "problem" here is that not all KSP modders truly understand what they are doing already
<Virindi>
well hey, I couldn't make a pretty part in blender either :)
<Virindi>
some of the mod parts amaze me
<Sarbian>
There are a few modders out here that just spew mods and when you look at the code you kinde wonder how many tries it took to make it work
<Virindi>
.......yeah
* Sarbian
needs more coffee
<Sarbian>
(not that my code is flawless ;) )
<Virindi>
I am trying to call mechjeb to do maneuver planning and it is all tightly coupled with the ui
<Virindi>
*shakes fist*
<Virindi>
:D
<Sarbian>
It is ?
<Virindi>
maneuver planner
<Virindi>
every operation manages its ui elements.
<Virindi>
note I am not complaining :)
<Virindi>
I love mechjeb
<Sarbian>
ah yes. I had a large external contrib for that and the UI is a bit too much interlaced with the logic
<Sarbian>
I keep spewing insult at some of that code
<Sarbian>
but it solved an other problem...
<Virindi>
I just switched my plugin to gp3 and am copypastaing the operations and changing them to my different ui
<Sarbian>
I am slowly gathering idea for a MJ3 with a clearer UI / logic separation
<taniwha>
(note, none of my tests have gotten past detection of the fetus yet)
<Virindi>
that's not fair, we don't know enough about kerbal society to know the impact of nurture :P
<taniwha>
I made the genes select probability ranges
<Virindi>
are kerbals raised in one giant commune for youth kerbals? or are there families. and adoption, and parenting by one biological parent and one nonbiological parent...
<Virindi>
these are important questions that you must answer in your mod!!
<Virindi>
:D
<taniwha>
yeah, well, take a look at the progeny branch
<Virindi>
the fact that they are all named "kerman" seems to hint at the commune hypothesis
Olympic1 has joined #kspmodding
<taniwha>
you'll see why it's been a long project
<taniwha>
(I think I bit off a lot more than I can chew)
<taniwha>
main problem at the moment is facilities
<taniwha>
(medical, hab, creche etc)
<Virindi>
do they get old
<taniwha>
the concept is there, but nothing implemented yet (for aging effects)
<Virindi>
kerbals seem to be immortal, with their primary means of population control being the sending of kerbals on suicide missions in space
<taniwha>
however, they do have a juvenile stage (forced NPC (beyond tourists)) before they become adults (can become PC)
<Virindi>
are baby kermans a scaled down model!
<Virindi>
that would be so cute.
<taniwha>
it would, but I imagine I'll just keep them invisible
<Virindi>
I want to take the youth kermans on a school field trip to minmus
<taniwha>
also want to do mesh deformations to give variety to kerbals
<taniwha>
hehehe
<taniwha>
man, scatterer+eve+predawn at KSC
<Virindi>
I think I need to make a "booster seat" mod so that female kerbals have the same eye level in iva as male kerbals. this is ridiculous, female kerbals cannot fly aircraft.
<Virindi>
I'm sure that was not intended.
<Virindi>
guess I could add it to throughtheeyes, the guy running that seems to not like me changing it though
<Virindi>
I didn't want to step on any toes there, I just wanted to fix the mod :(
<Virindi>
oh female eye offset is in gamesettings...
stratochief|away is now known as stratochief
<Virindi>
taniwha: are you aware that in modular fuel tanks, if you alt-click a part to make a copy it does not duplicate the custom tanks
<taniwha>
yeah, kinda
<taniwha>
one of those things I knew, then forgot
Ezriilc has joined #kspmodding
VanDisaster has joined #kspmodding
ferram4 has joined #kspmodding
egg|zzz|egg is now known as egg
<xShadowx>
taniwha: progeny - kid engineers randomly blow up a part if in vessel, kid pilot randomly stage or throttle, then 1 in X (in cfg) chance per second, say default 3600 (once per hour) to trip it ;3
<xShadowx>
Virindi: well its been long established that explosions is a part of the kerbal reproduction cycle
VanDisaster has quit [Ping timeout: 180 seconds]
VanDisaster has joined #kspmodding
regex has joined #kspmodding
regex has quit [Remote host closed the connection]
egg is now known as egg|nomz|egg
egg|nomz|egg is now known as egg
Thorbane has quit [Ping timeout: 186 seconds]
<xShadowx>
do i remember a thing where you can assign an attribute to a field, and when the field is changed, the attribute runs code / fires an event?
<xShadowx>
or i was dreamin o.O
<Virindi>
if that were the case it would likely be compile time
<Virindi>
even if you managed to add the attribute later how would it apply to the old code?
<Virindi>
jit would have to know to rerun
<Virindi>
sounds like a nightmare
<Virindi>
and adding attributes at runtime isn't even really "allowed"
<Virindi>
(I'm assuming you want to assign this dynamically to a ksp field to create a 'changed' event)
<Virindi>
adding an attribute at runtime can only be done by hacking up the CLR anyway
<Virindi>
so it would not be a designed-for scenario
<Virindi>
and thus, your call would not happen.
<Virindi>
detours would be cleaner :)
<Virindi>
(since you are not "allowed" to add an attribute at runtime it wouldn't make sense for the jit to even check for this magic attribute, instead it would make sense for the compiler to emit the event call at compile time)
<Virindi>
(since it "would always be known")
<Virindi>
MS does seem to like adding compile-time magic crap like that to c#, they ran out of real ideas for the language years ago
<Thomas>
xShadowx: Thats called a property
<xShadowx>
yaya :P
<xShadowx>
just thought i remembered something in ksp did it and got it stuck in my head
<Thomas>
xShadowx: Or a field, with a custom type that has implicit conversion to another type
<Thomas>
But that would be.. wonky
<Virindi>
but you still couldn't change the field type at runtime if stuff that used it was already jitted, and only by hax
<Virindi>
well you could but it wouldn't call your conversion
<Virindi>
the CLR might just crash instead :)
<Thomas>
Noone talked about changing the field type, or did I miss something?
<xShadowx>
ah i remember what i was seeing, kspfield and UI_Control
<Virindi>
I was assuming he was talking about a way to be notified when ksp changes a field inside ksp.
<Virindi>
which would be changing something already in place
<Thomas>
xShadowx: UI_Control fetches the fields value every frame IIRC