Jump to content

Onchyophora

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by Onchyophora

  1. Clever man. Especially when I add one more trick. Once you mentioned inside folders indicating the extra kos could be anywhere at any depth in gamedata. I found it not inside itself. becuase my first trick was to reinstall but be 100% sure deleted first. So no not inside one another. At some poitn i dropped a KOS on partangle display folder (click and drag drop itis.) So NOTE for anyone else with the same symptoms the second insall can be anywhere in the game data tree. Search for the file kos.version to find it. Now tyo some how back out the changes to any craft and save files... Yuk. I think I might get source code control happening for my craft files.
  2. I just upgraded from 17.2 to 17.3 did I do something wrong i wound up with two copies of the part CX4181 available in the SPH/VAB I also have two name tags for each part... Its creeping into the craft files as the crafts have module definitions for two kos name tags. I am worried about going on and corrupting the save files.
  3. Question: I can ask vessel:isDead. because (as per the doc) i may have found vessel, waited a while (wait 10) and then it is dead. I have similar problem but with parts and my fuel management system. Before launch my code analyses the ship and automagically works out, what to do with tanks and establishes an enabling order. (order == bottom to top. comes in handy with biiiiiig lifters i want to fly later. or with these puppies that were light on reaction wheels when I had a 30 part limit) it remembers that order. Later during launch/staging. Some of the parts are now gone. Is there way to ask part if its dead ? I tried comparing what was the parts stage number, with the rockets current stage number... but some fuel parts on the first stage, had stage number 4.. when my rocket had 3 stages. I have even seen them i think reported as stage 6 on my 3 stage rocket. (cant reproduce now :\) My current plan is to store the UIDs as handles and refind the part every time i want to talk to it. it would be nice if I could. Is there way to ask part if its dead ? Question: Also does anyone know anything about the exact timing of when parts cease to exist when you stage them... Question: Also Stage Numbers on parts are weird. (see how both small tanks are stage 4 and the solids they are sitting on are stage 3. huh?) Is there some way in VAB to get the small fuel tanks to have the right numbers. (I have been looking at the craft file its a 'feature' of Thumpers.) // a slightly different ship had this in the file and then the attached small tanks were stage 6.... and the thumpers were 4. part = solidBooster1-1_4294535298 ...... istg = 4 dstg = 6 I had guessed the solids would have the wrong stage numbers too. But to have physically coupled objects having different stage number is how? sigh tree walking code here i come?
  4. Trying out if this the right thing to do. ? I dont know if its related, but i have been flying planes and seem worse at it than i think I am ... (yeah I know right) (I kept getting unexpected roll behaviors.)(Strong trendency to roll one way...) and just now i was flying plane with the aero forces on and i saw this. (tiny blue force vector up but only ever on right tank) (and hey that the way I felt my previous designed plane always wanted to roll. Hmmm) (also note it really is a visibly bigger effect than that it is just quite transient as you stall the plane and try and grab the image. http://i.imgur.com/v6ZuQM8.png Now that is a very hard pitch up, and there is small blue force vector BUT only ever in the right hand fuselage. Pitch down and i can see them in the left as down force. I built the pane symmetrically with mirror. The craft file has the the tanks attached as mirror. and yeah I >could< perhaps have been flying crooked and not pitched up or down evenly. But nope. I tried real hard to get the forces vectors from the left tank and no dice. Admission. I do have (some NON aero mods in the career game.. but no its not them. (Thats karbonite jet engine and KOS computer in the middle) (and a kerbal engineer chips attached somewhere. Alarm clock, blah blah.) I will see what i can do about replicating it in a pure stock sandbox sometime. Not sure whether or how you want the craft file attached. craft file available on request and instruction.
  5. Found a short cut (no VAB upgrade...) plant flag or name some ship ", search for flag vessel where ">" + avessel:name + avessel:name + "<" = ">""<". local dblquote to avessel:name. //dbltquote now holds the string " print (">""<"). // produces this as output >""< also something that would be nice to have is ... // TBMK function DoSomeFunctionyThingAsSideeffect { {...the useful bit...} return 0.} lock foo = DoSomeFunctionyThingAsSideeffect(). global event to list (when_i_want_it_to_happen, foo). // foo and side effect currently happens here. until false { if time:seconds> event[0] { set dummy to event[1]. // << it would be nice if event[1] was a reference to the lock and caused the side effect here... it does not. } wait 0.1. } // basically it would be nice to have any mechanism to store pointer to a function. Then execute it when associate data says it time. // locks get close but then you cant lump them into lists. {poor man structs/classes} {So I cant have an event /task queue} :{ // plausible new syntax? // local Thunk to function DoSomeFunctionyThingAsSideEffect. // later.... // Thunk(). //calls the function is was set to. // Thunk( parm1, parm2). // would be nice too. usecase. Not every rocket I build has the same fuel management requirements. Some need bottom up tank by tank fuel use or they flip/explode. Some, once, used fuel from stages I am not jettisoning yet/ever. Because i actually want the empty tanks in space... So being able to neatly bolt on fuel usage management would be nice. I have ways and means, aka which lib did i run. (dont change the function ptr change the code) but sometimes it can be dynamic? Its shiny.
  6. edit (deletia: sorry barking up a wrong tree) nvm This bit confuses me: >>> 2. Stabilizes the steering and performs a roll of several degrees. becuase: LOOKDIRUP( SteerVect, SHIP:FACING:TOPVECTOR). That specifically says never ever perform a powered roll.. as lookdirup( XXX ,SHIP:FACING:TOPVECTOR). is whatever way we happen to be pointing right now. ALSO LOL @ me. My cooked steering works much better now I leave SAS off. Way less overshoot.
  7. Previously I asked about this as for, nefarious (hacky) coding reasons, I wanted to have a string with " char in its body. ALA C str = "\""; It is really kinda hard to get one in kOS as print (">""<"). // produces this as output >""< print "X" + """" + "X". produces XX as output. always even numbers of quotes. I can has a possible solution! tag well known rare part type with the tag name " find the part, get the tag name, use + to build any string I want with single double quotes. Profit. Now all I have to do is write enough scripts with out it to fly enough missions to upgrade the VAB so I can set tags and see if my evil plan works. reminds me of the first machine code debugger I built, with basic & poke... V0 only debugged/single;stepped some instructions so I need to write the version 1,debugger only using those machine code instructions.(no jump relative etc). Bootstrap. signed: Jack Built Coding Enterprises. I love kOS. I have not laughed while coding for years.
  8. here but for the grace of god go us. I may have seen that. Did your craft run out of power? (mine does that when it runs out of power, although it may also on other occasions do that for code related reasons I have not got nailed down.) (normally I dont miss stuff like did my craft run out of power, but the programming is an added distraction.) (I am programmer IRL, so i am learning kOS while playing career, so i am writing code on parts and science challenged rockets. I have just enough... (maybe enough panels and batteries to fly my mission, and when I FUBAR, I run out of power. My newish rule of thumb is to periodically stop looking at the code. and play KSP again and make sure the bugs i am fixing are in the code not the rocket. )
  9. given this line prior code. (will already exist in fileName) global G_RunTasks to list(). is this line of code possible? ( the \" are C style escapes fro what i want. to happen) log "G_RunTasks:Add(\"RunStateInit\")." to fileName . Can I make literal string that contains a quote char. char(34). edit : WAT? print (">""<"). produces this as output >""< but print (">"P"<"). decides that is two strings with an unexpected P in the middle.... So I can get two "" sequential "" in string but not one? and print "X" + """" + "X". produces XX as output. Any chance of print (">""<"). being changed to produce this as output >"<
  10. Yeah i was hoping there was known new thing about local scope and life times of locks. As that didnt ring bell, it is likely something a bit gnarly. (or I just FuBarred. aka SNAFU) The in the example functions all return sensible values and stuff, as I was using vec draw to draw all the vectors and directions(forevetcor/topvector) another possibility is I drew so much dynamically updated VECDRAW stuff, that the locks simply didnt happen? if and when i can get it sorted into a neat/small this does X (no worky) and this Y does (worky) I will have i imagine solved my own dilemma. Ta for trying though. Currently, probably by programming in subset of available ways, I have got myself in a steering works paradigm. Now i am stuck in the tradeoff of disk space versus code clarity. Ahh the memories come flooding back. (switch to archive is my friend i shall not want. duh.) --------------------------------------------------------- edit: And that said i think 'switch to' produces "interesting" effects when combined with boot when also combined with quick save quick load. On my computer, when I have set my rocket to boot_foo it gets copied onto my rockets disk as boot. After reload, it reruns boot from the current volume. If I had switched to archive before the save it runs the boot from archive... oops? or maybe its a feature? ! As now reboots execute a slightly different code then I can have a one universal restart program on the archive, that can first do some kind of universal re init of rocket state. Then switch to local volume and runt he boot that is there. example code coming when i get my act together.
  11. Hmm. I have just been trying to do some steering. Somewhat surprisingly, all the geometry stuff is mainly sweet. I kinda like coordinate systems, basis vectors for spaces and affine transformations and I are old friends : ) My problem was it just didnt work. but I told it what i wanted it to do. :/ Being new to this... I told it lot. and often. Too often? I was issuing the lock command inside this loop... // basic turn with height test case. until ship:altitude >30000 { MyAxisPitch (GTurnAxis,10 + (Ship:Altitude - 10000)* 50/20000). // recomputes the steer to vector print ("FV" + steerTo:forevector ). lock steering to getSteering(). //simply returns the steerTo direction wait 0.5. } Question: is there something wrong with doing that inside an until loop? Yeah it works with it outside (now) Does the lock go out of scope or something and get cleaned up? or did I botch it somewhere else, and fix it without noticing and Just think the above is the problem? ALSO for my own edification. lock commands basically used to be poor mans function and bind things as one line call backs..? on commands work like they go put in an event queue? Also the gui part of setting the boot script doesnt work for me. I edit craft files to fix it. Is that a known thing or is something broken on my system. (I think it used to work for me in 0.9)
  12. In kerbal space you find super massive black hole with no accretion disk, in real space super massive black hole finds you! and accretes you.:cool:
  13. If I take a radial chute. Use tweak scale and reduce its size by half (1/8 vol) When I attach it to the craft it has one mass (changes mass of craft)(by reduced by 8 = 12kg) Put it in the inventory I get a different mass change (orig 100kg) Also Inventory lists its volume and cost as reduced but not its mass. Problem may or may not be in KIS, as Kerb engineer, and VAB also thinks its heavier... although that may just be because KIS told them it was... Oh well, no biggie jjust hurts my delta V, when I am dodging part count limits.
  14. I have question: and i think the authors might just know. Is it feasible to build(mod) a strut like the one you have but give it strength hysteresis. The force opposing it being stretched or squashed from its original length is larger than the force when it restoring. Force is a function of not only its delta from original length but direction of motion? OR (equivalently) force is function of position, but there is also second force opposing all lengthening or shortening (think oil shocker) Doing that will create a damper. yay! rationale The physics sim when in space, sometime gets the shimmy's then the station shakes itself to bits. The backend simulator does not impose a constraint that energy is conserved. and round off errors can accumulate. A part such as the above would allow you to dissipate energy (vibrational) by design. Eg of shimmkeis being a bleh, game experience gotcha (sneak attack of the drop bears) I know stuff blowing up is fun, the first few times, surprise shimmies gets a tad annoying.. I had an experience where I built thing (light weight tower/rack) from octo struts(massless) the added solar panels. When I extended the panels while parked on minmus surface it auto exploded when it got the shimmies. Even lots of KAS struts seemed just to change the resonant harmonics Some damper in the pipes would make them usuable in space. without insane close proximity parking and at least 1 light ships. (yeah winch ropes double zero force pipes, without a pump to here which is just fine) (as a game choice, auto explode from using pipes, which at first blush looks like how to do fuel transfer seems needlessly cruel to new players?) (perhaps space exploration is meant ot have such try and fail dead and as a game experience? I dunno. But i do want a damper.) (google was not friend. this was not the shocker/strut I was looking for. http://th100084453.fm.alibaba.com/product/100041419-0/Shock_Absorber.html)
  15. I have script that does this <code> // M1s are engines (monoprop ones FYI) print M1s[0]:ThrustLimit. // prints current manually set thrust limit eg 35 print M1s[1]:ThrustLimit. // prints current manually set thrust limit eg 54 set M1s[0]:ThrustLimit to 0.5. set M1s[1]:ThrustLimit to 22. print M1s[0]:ThrustLimit. // prints '0.5' print M1s[1]:ThrustLimit + "<<<WHAT!!!!". // prints '1<<<WHAT!!!!' </code> Seemingly the ThrustLimit is being range checked into the {0 <= T <= 1} range.... (I need more thrust than 0-1%) Is there a work around or did I do something wrong or bug? edit: appears to be a reported bug. Is there a work around? http://www.reddit.com/r/Kos/comments/2udqcn/possible_bug_in_setting_thrust_limiters/ will trying setfield and getfield? as my self help. update for those that google this: <code> //brick bat coding solution that works. set thrust limiter of second engine tagged "M1" to 44.5 set M1s to SHIP: PARTSDUBBED("M1"). set EF1 to M1s[1]:GetModule("ModuleEngines"). EF1:setField("thrust Limiter", 44.47). // possibly rounds this to 44.5 internally (or maybe but unlikely IMO for display). </code>
×
×
  • Create New...