gametechmods

Robot Arena => General Support => Topic started by: Resetti's Replicas on November 07, 2010, 03:00:35 PM

Title: Salvage a chassis shape from a corrupted bot file?
Post by: Resetti's Replicas on November 07, 2010, 03:00:35 PM
I think I might have ****ed up my Not Perfect replica, I put a skin on it and now it won't load in the botalab.  Please please please help me I don't have a backup.  Can I edit the bot file to get rid of the skin?

Many thanks.
 
UPDATE: Does anyone know how to make a new bot with an empty chassis using the bot file?  If I can salvage the shape, that would be the next best thing.
Title: Re: Using BFE to remove a skin?
Post by: G.K. on November 07, 2010, 03:01:24 PM
How did you apply the skin?
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 07, 2010, 03:03:29 PM
I had a 256x256 PNG, renamed the extension to .bmp, and applied it as normal.  But it just gave me a blank skin, so I quit out of the program.  Now I'm trying to get back into Not Perfect's bot lab, but it never stops loading.
Title: Re: Using BFE to remove a skin?
Post by: G.K. on November 07, 2010, 03:08:14 PM
Could you send me the bot file?
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 07, 2010, 03:14:59 PM
Sure thing:
https://gametechmods.com/uploads/files/NP.zip (https://gametechmods.com/uploads/files/NP.zip)



It's got custom components, so I'll make you a zip with those if you need
Title: Re: Using BFE to remove a skin?
Post by: G.K. on November 07, 2010, 03:16:51 PM
If my idea works, I won't need to open the bot file.
Title: Re: Using BFE to remove a skin?
Post by: G.K. on November 07, 2010, 03:19:19 PM
DP: It seems that the problem is not that there is a bad skin, it is that there is no skin whatsoever, not even the default one. Could you send the components please? I'll have a go at fixing it.
Title: Re: Using BFE to remove a skin?
Post by: NFX on November 07, 2010, 03:26:12 PM
Could you not BFE a skin on, like light_metal.bmp or something?
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 07, 2010, 03:28:33 PM
Did you download that pack in my sig with all the components and replicas?  If so, then you'll only need this one:
https://gametechmods.com/uploads/files/3718components.zip (https://gametechmods.com/uploads/files/3718components.zip)
Title: Re: Using BFE to remove a skin?
Post by: Badnik96 on November 07, 2010, 05:06:02 PM
I think you have to resave it as a BMP, just adding .bmp at the end isn't enough.Did you check the file properties? (the skin)
Title: Re: Using BFE to remove a skin?
Post by: Clickbeetle on November 13, 2010, 05:24:09 PM
Back before we discovered Notepad++, me and FB had to do all our BFE in regular Notepad by removing the skin and preview picture (which are the parts that cause the file to become corrupted if you save in Notepad).  The bots still work with no skin or preview, it just makes a new one when you go in the bot lab.  This glitch is caused by something else, probably to do with the fact that you tried to apply a png.


Best solution is probably to copy/paste the skin from another bot into Not Perfect's bot file.  This will ensure you get rid of any bad characters.  The skin is easy to find, just look for the word "Chassis" followed by a bunch of numbers, and finally a "true".  Right after the true is where the skin starts.  Then there's a bunch of compressed jargon, ending with a false.  Just copy/paste the stuff between the true and the false.  It would probably help to compare the surrounding areas of Not Perfect's bot file with another working bot file to be sure there are no other errors.
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 14, 2010, 12:30:14 AM
How do I copy the "jargon?"  When I try to paste it into Not Perfect's bot file, it just comes out as a blank.
Title: Re: Using BFE to remove a skin?
Post by: somestrangeguy on November 14, 2010, 04:58:19 AM
Also for me atleast, whenever I paste inside a botfile, the bot becomes corrupted and unusable ingame...
Title: Re: Using BFE to remove a skin?
Post by: Serge on November 14, 2010, 08:26:16 AM
Also for me atleast, whenever I paste inside a botfile, the bot becomes corrupted and unusable ingame...

Because you use Notepad (which sh**s its electro-pants when it sees non-printable ASCII data).
Title: Re: Using BFE to remove a skin?
Post by: Clickbeetle on November 14, 2010, 05:15:27 PM
How do I copy the "jargon?"  When I try to paste it into Not Perfect's bot file, it just comes out as a blank.


Using Notepad++?


Possible Alternative: Remake Not Perfect's chassis, then copy and paste all of the component and wiring data from the old one into the new one.  That ought to work too, though it will be a bit more work.
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 14, 2010, 06:16:51 PM
How do I copy the "jargon?"  When I try to paste it into Not Perfect's bot file, it just comes out as a blank.


Using Notepad++?
 
  Yes.  It can be done in Notepad++ right?
Title: Re: Using BFE to remove a skin?
Post by: Clickbeetle on November 14, 2010, 08:55:02 PM
Well I've never tried it but it should work.


OH WAIT I just got another (good) idea!


Use Dummy's Bot Editor to reskin the bot.  You can get it from the "Tools" section on the main page.


Just open the bot in the Bot Editor, then click and drag a new .bmp skin onto the skin area in the editor.
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 14, 2010, 09:29:41 PM
Ok, so I've got the bot file in the bot editor, but even after I paste a new skin on, the "Save Changes" button in still greyed out, and I can't save changes.  Help?
Title: Re: Using BFE to remove a skin?
Post by: Clickbeetle on November 14, 2010, 09:35:01 PM
Hmm... that's weird.  Try changing the preview picture too.  Use a 128x128 .tga file with no transparency for that.


Or maybe the skin needs to be a .tga?  I can't remember.
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 14, 2010, 09:38:02 PM
I tried both; no dice.
Title: Re: Using BFE to remove a skin?
Post by: Clickbeetle on November 14, 2010, 09:40:56 PM
The bot still crashes, or the bot editor won't let you save?


Hmm... at this point, I would start thinking about whether it's more effort to try and fix the problem, or just rebuild the bot.
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 14, 2010, 09:47:42 PM
The bot editor still won't let me save.

Regard rebuilding, are there any tricks I can use to make it easier?  I have the old skin, but it's still difficult to get it to line up.
Title: Re: Using BFE to remove a skin?
Post by: Clickbeetle on November 14, 2010, 09:50:10 PM
I suppose you could try copying the grid coordinates and the height from your old chassis.  There's some other numbers involving the collision mesh and the skin map that you have to change too, but I'm not sure where those are.
Title: Re: Using BFE to remove a skin?
Post by: Resetti's Replicas on November 15, 2010, 10:33:56 AM
That would be great, if I can get the empty chassis back then puttign all the components back would be pretty easy.  I've changed the topic title; does anyone know how to get the grid and height coordinates?
Title: Re: Salvage a chassis shape from a corrupted bot file?
Post by: G.K. on November 15, 2010, 10:35:36 AM
What, the bot editor didn't work? D: That's what I was going to do all along.
Title: Re: Salvage a chassis shape from a corrupted bot file?
Post by: Resetti's Replicas on November 15, 2010, 10:38:33 AM
No, but don't let that stop you, it's probably just one of those things where the error disappears as soon as I get an expert to look at it.  Humour me?
Title: Re: Salvage a chassis shape from a corrupted bot file?
Post by: Naryar on November 15, 2010, 10:40:44 AM
If you didn't read that already, read it again :

https://gametechmods.com/forums/index.php/page,page2187.html (https://gametechmods.com/forums/index.php/page,page2187.html)

I self-taught all the BFE I know (that is not much) from that,
Title: Re: Salvage a chassis shape from a corrupted bot file?
Post by: Resetti's Replicas on November 15, 2010, 10:55:38 AM
Truth be told I'd never seen that before, good to know.  Do I need to take the "3D model of bot with 'buckling' points" portion of the file in addition to the chassis section?
Title: Re: Salvage a chassis shape from a corrupted bot file?
Post by: JoeBlo on November 15, 2010, 08:28:16 PM
How much effort is a rebuild? I could redo the whole skin for you.... just make sure you save the format of it instead of just changing extensions. Or I will give you a .bmp
Title: Re: Salvage a chassis shape from a corrupted bot file?
Post by: Resetti's Replicas on November 15, 2010, 09:04:35 PM
Nary, I've got half a mind to reach through the computer and french kiss you!  It worked!  I have my chassis back, and the components were no trouble at all to replace.  I can't tell you all how grateful I am; thank you so much everyone who helped, all of my rebuilds were crap, and I would never truly be at peace had I not recovered the file.  If anyone wants some replicas as a thank you, please let me know, that's pretty much the best thing I can offer.

If in the future anyone else has this problem, you can fix it by transplanting the shell onto another robot.  Here's how

1) Create your sacrificial bot (We'll call it a Dummy-bot").  Make it roughly the same shape as the corrupted bot.  Give it a paintjob and some components (one control board and one wired motor minimum); try your best to place the components so that they won't end up outside the chassis when you replace the shell.
2) Make a backup of the Dummy-bot and open it in Notepad++.  Open up the corrupted file in Notepad++ too.
3) In the corrupted file, find the word "Chassis."  There will be a one line gap, then about 200 lines of numbers, then the word "true."  Copy all 200-odd lines of numbers and paste them over the 200-odd lines in the Dummy-bot's file.
4) In the corrupted file, find the word "false" followed by about 100-odd lines of numbers.  Again, copy them and paste over those in the Dummy-bot's file.

If you did it all correctly, you should end up with your old chassis on your Dummy-bot.
Title: Re: Salvage a chassis shape from a corrupted bot file?
Post by: Clickbeetle on November 15, 2010, 10:12:15 PM
Good to know you fixed it.  Note to self: do not attempt to skin bots with .png's, EVER.