Jump to content

Aggressive persistent.sfs editing


Recommended Posts

I'm looking at doing some... aggressive persistant.sfs editing. I'm pushing things hard enough that welding (UbioZur Welding Ltd. Continued 2.2.0) and hyperedit (HyperEdit [v1.4.1]) are failing me... at least as I'm using the tool set.

So I'm going to alter the very fabric of kerbal-verse. <evil laugh> I figure this would be the best place to ask my questions.

The plan:

1. launch a marker probe to required location

2. use the marker probe data as a prototype, extracting orbit info, launchid, mid, thermal data, etc.

3. rebuild the module segments in the craft file to match persistant format, change attn. names to numbers, insert additional information from the prototype in step 2, etc.

4. paste and save

5. ???

6. prof^H^H^H^H kraken bait

Most of the stuff in the vessel section I can make some sense of. But I do have some questions:

- uid appears to be a random 8 hex-digit number. Is it based on anything or can I get away with an old fashioned rnd invocation?

- -1 in srfN and attn. appear to be nothing attached to the node. Correct?

- does the order of items matter? for example craft file goes istg, dstg, sidx, spor, sepl, attm. but the persistant.sfs goes istg, dstg, spor, sepl, sidx, attm. unless sidx has two different meanings

- is rotation in persistant the same as rot in craft or is it attRot0? similar for position. is it attPos0 or pos-pos of the root?

of course all of that having been said, am I replicating the wheel?

Link to comment
Share on other sites

Most of the stuff in the vessel section I can make some sense of. But I do have some questions:

- uid appears to be a random 8 hex-digit number. Is it based on anything or can I get away with an old fashioned rnd invocation?

- -1 in srfN and attn. appear to be nothing attached to the node. Correct?

- does the order of items matter? for example craft file goes istg, dstg, sidx, spor, sepl, attm. but the persistant.sfs goes istg, dstg, spor, sepl, sidx, attm. unless sidx has two different meanings

- is rotation in persistant the same as rot in craft or is it attRot0? similar for position. is it attPos0 or pos-pos of the root?

of course all of that having been said, am I replicating the wheel?

  1. yes, the UID is random, its a Guid. As long as there are no duplicate UID's in your persistence file, you should be fine.
  2. not sure
  3. no, the order does not matter
  4. no idea

Link to comment
Share on other sites

  1. yes, the UID is random, its a Guid. As long as there are no duplicate UID's in your persistence file, you should be fine.
  2. not sure
  3. no, the order does not matter
  4. no idea

Not quite. The Part UID is a uint, the Vessel ID is a GUID. But yes, a random number works for the part UID.

D.

Link to comment
Share on other sites

i figured the uid was some form of a guid.

okay that's two questions off the list.

so

step 3.1 scan p.sfs and list all uids. generate unique uids for all parts, range 10000000h to FFFFFFFFh.

step 3.2 hope ksp checks the list before it generates a new one.

--------------------

looking again at one of the attPos0 in the marker craft file. it looks like position is just relative to the root part... unless there is deeper mathamagic going on than I can see.

Edited by steuben
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...