Jump to content

markjustmark

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by markjustmark

  1. Hi mszegedy, sidx has nothing to do with symmetry. It is the index number of all the things that activate in a particular stage. So, if you have four rockets that activate in a stage, they will all have the same istg number, and an sidx of 0, 1, 2, & 3 respectively. Mark
  2. By the way, the asparagus staging script is coming along nicely. Finally got it to the point where it generates a valid, properly staged, correct fuel flowing, asparagus launch subassembly that doesn't explode on the launch pad. Needs a bit more refactoring so you can select which fuel tanks and which engines to use (it's limited to Jumbo-64s and Mainsails at the moment) Mark
  3. Thanks for that, Ryeesa. Yes, you are absolutely correct. dstg is everything to do with decoupling. 0 for the final module, 1 for the decouplers, 2 for the next stage parts, 3 for the next decouplers, 4 for the next stage parts, etc. Just to clarify, istg is only for parts with an activity like engines or decouplers - things that appear in the staging list in the VAB. With fuel tanks, struts and fuel lines, the istg is set to the dstg. Also, sidx is not to do with symmetry, but with staging. it is an index of all the things that activate in a particular stage. Mark
  4. Hi all, It turns out that the number after the target fuel tank does not relate to anything that I can work out. It has nothing to do with the fuel flow. As far as I can tell, you set where the fuel line attaches to the source tank, set the direction that it points, and the first part that it hits is the fuel destination. Mark
  5. Hi all, I'm still mucking around with the asparagus building script and have come up against another small problem. Fuel lines. The fuel lines that I create don't transfer fuel. I think the problem is with the cData field, specifically the tgt value. # central fuel tank part = fuelTank3-2_4294834092 # outer fuel tank part = fuelTank3-2_4294802408 #fuel line from outer tank to central tank part = fuelLine_4294798578 cData = tgt: fuelTank3-2_0; pos: -0.8595003,0.08103676,0.9263369; dir: -0.6787722,0.06399705,0.731555; rot: 0.5609854,-0.4304596,-0.4304598,-0.5609852 srfN = srfAttach,fuelTank3-2_4294802408 How is the number after the name of the target fuel tank (in the example above, _0) determined? I've seen all sorts of (very low) numbers there, but I don't know how that number corresponds to the _4294834092 of the target fuel tank. What I have tried is using the _4294834092 number in the cData tgt field, but that doesn't work - the physical connection is there between the two tanks, but no fuel flows. Only when I manually disconnect and reconnect the line does it work properly. Any ideas? Mark
  6. Yes, rot is a quaternion. I just read the wikipedia article on quaternions, then my brain fell out. Then I read the Unity doco about quaternions, and that said it is a vector [x,y,z,w] and "Don't modify this directly unless you know quaternions inside out." Then I read a bunch of other articles about calculating to/from rotations and quaternions. Then I remembered that I'm only working in 2D for the decouplers and tanks of my auto asparagus stager, so I can fudge it. (But I will probably have to work it out when I start connecting struts and fuel lines...) Mark So, I'm going to fudge it
  7. I think I've made a bit more progress. * "sidx" is the symmetry index, starting at 0 for the first symmetrically placed part and going up to n-1 for each part in the n-way symmetry. Interestingly, in my test of just a central fuel tank surrounded by radial decouplers connected to an outer layer of fuel tanks, only the decouplers had sidx numbers, even though outer tanks had sym links with each other as well. The outer tanks were all sidx = 0. * "rot" looks to be a unit vector at HALF the angle that the part is rotated to. (Unity engine weirdness? Someone using pi/360 instead of 2pi/360 to convert between degrees and radians?) I've only done rotations in 2D at this stage (x/z plane) and can confirm that the 2nd element of the rot vector is the x component and the 4th is the z. Mark
  8. Hi all, I'm mucking about with a script to write a sub-assembly .craft file so I can auto build an asparagus staged bunch of rockets of arbitrary size. Has anyone documented the .craft file format? My googling has not given me anything useful. What I have so far * the .craft file is a serialised file of heirarchical data * the main chunk is the PART which can contain EVENTS, ACTIONS, and MODULES * "part" is the unique name of the part, made up of the name from the appropriate part.cfg file plus a 32 bit unsigned number that starts near 4,294,967,295 (0xFFFFFFFF) and decreases by a random amount for each part * "pos" is the position coordinates in metres * "istg" is the inverse staging number (highest number triggers first) * "link" connects the PARTs with one one-way linked lists starting from the root PART and working outwards and downwards (usually) (no cycles, no two-way links) * "sym" is an n-way linked list with all the other PARTs that share symmetry with this part. All parts that share symmetry have a "sym" link to every other PART in that symmetry share. * "attN" is a link which includes a designation of "top" or "bottom" to the PART stacked on the top or bottom of this PART. The stacked part has a corresponding attN link with "bottom" or "top" respectively * "srfN" is a link to the PART that this PART is surface attached to (including a "srfAttch" designation) What I'm not so sure about * "rot" is the rotation of each part expressed as 4 components of a unit vector. I've been putting the x and z components of a unit vector pointing from one PART to its attached buddy in the 2nd and 4th components of this entry, and it seems to work out correctly most of the time. * "dstg" - something to do with staging... * "sidx" - some sort of index * "sqor" - simplified quality of rockets? * "attm" - something to do with attaching something Any hints? Mark
×
×
  • Create New...