HM3: Major Save/Load code change now LIVE

I have just uploaded a fairly major change to the way HeroMachine 3 handles saving and loading characters, and how it masks and layers items. Details after the jump, but the take-away is that going forward you should have a lot fewer problems loading and saving. And hopefully the “stuck item” bug will go away too.

All of your previously saved characters should still be there, so you won’t lose anything. It all ought to just work better.

I also want to give a special shout-out to everyone who contributed in the last thread on this subject, you all helped a lot. Particular thanks go to Violet, who sent me her saved-character .sol file, and Panner, who gave some exceptionally helpful, detailed, and specific bug reports that were incredibly helpful for tracking down all this. Thanks a ton!


Here’s a list of what all is included in this update:

  • Usability tweaks to the save/load screen itself:
    • Larger save/load screen so you can see more of your characters at once.
    • Save/load scroll bar now works more like every other one on the planet (i.e. clicking the down arrow makes the list scroll up and vice versa).
    • List of saved characters now stops scrolling in the appropriate direction once you hit the top or bottom of the list.
  • Updated code for layering items when you add them to the character.
  • Updated code for masking items.
  • Updated code for how patterns are applied to loaded characters.
  • Major code changes to how saved characters are loaded, how their items are layered, and how their items are masked.
  • Changed how the program tracks which set of items is active, to fix the bug where you’d click on an item from one set and a totally different set would appear.
  • “Multiples” vs. “Singles” setting now works for loaded characters — if you have more than one item loaded for a particular slot, that slot will now by default be set to “multiples” so you won’t accidentally wipe out all your existing selections by adding a new one.
  • Clicking on an item directly now resets the “current set and slot” menus correctly.

Previously, saved characters would often load with their layering all messed up (so the head would be behind the background, for instance). Or the masking would be broken. Or there would be items on the stage you couldn’t move any more once the character loaded. Or you’d click to add an item from one set, and suddenly a completely different set would be active.

Hopefully all that is fixed now, and the characters you load will look just like the one you saved.

Here’s an example. This is how a quick test character I created is supposed to look, and how he appears when loaded from the save file with the new HM3 version:

And here’s the same character from the same save file, loaded under the previous HM3 version:

Note how the leopard-skin pattern is missing from the leggings, and how the chain is masked to the legs instead of the hand? That’s fixed now.

Hopefully some of your previously saved characters that were hosed up will now load correctly. But, if you loaded them up and they were hosed, and then you RE-saved the character, then it’s going to have saved the incorrect data and you’re still hosed.

I also am hopeful that the “stuck item” bug will mostly be resolved as a side-effect of the rewrite.

Please let me know ASAP if you encounter any problems with the new version.

I’m not 100% sure what part of the code I am going to tackle next, so if you have a request in that regard, please speak up in comments.

51 Responses to HM3: Major Save/Load code change now LIVE

  1. Captain Kicktar

    Custom color saving would be nice.

  2. Great job on the patches Jeff. I’ve got a couple of requests:

    1) When working in widescreen, having all items clicked on, you can move everything up and down but not left and right.

    2) Pattern shading items. This happens mostly with BACKGROUND items. You can’t shade the entire item. Example, the fallen tree in this pic,

    http://forums.ugo.com/attachment.php?attachmentid=75687&d=1298488547

    I even added a smaller tree to show you can’t shrink the item first then add the pattern. Comes out the same way.

    3) Also on the same example pic, I added a circle with the pattern to have a gradual shade on both sides. Anyway the lin down the middle can be blended better?

    That’s all I got for now. Hope this helps. Cheers!

  3. Reverse-mask option to be used at will instead of being used with hand+item only? Of course it would be nice to have normal masking that could be used with hands too… Or is that getting a bit too complicated?

  4. AMS (2): Good suggestions, thanks.

    Dionne Jinn (3): That would be too complicated, yes. I’d have to re-edit every single item and that’s honestly not something I want to do.

  5. The only problem I’ve had since using the new version of HM3 you posted the other day is that whenever I use two different body types, save them and load them, some of the time it loads it from a different catagory. This hasn’t happened as much by far as when I was using the old version of HM3.

  6. Jeff, do you think you could fix the wizard hat? This isn’t so much a code error, but it is extremely annoying. The way that it currently is, the hat fits around the head and casts a shadow over the face. I like this idea, but it doesn’t give room to add ears. For the ears to show up, you have to layer them in front of the hat. This looks weird because it the shadow ignores the ears. I was thinking that if you either split the hat into two different sections or make little cut outs for the ears, then this item would be much easier to use.

    I can provide pictures if my explanation is confusing.

  7. Jake, I’d need pictures, yes. I have no plans to add any items that have cutouts for ears, though — what if you want no ears, or different ones than the shape’s cut out for?

  8. Has anyone else seen the body problem Fyzza is reporting? I just tried it a couple of times and couldn’t get it to fail.

    That sounds like the set error I thought I had fixed in the latest rounds.

  9. http://i50.photobucket.com/albums/f349/singalongsong/WizardHat.png

    Here is the problem. The shadow doesn’t currently carry over to the ears. I propose that the item be split into items. The first would be the bulk of the hat with the shadow. The second item would be the inside of the hat. That way, you could place it far in the back and you could use any ears you want. The item doesn’t really work right now.

  10. And I just discovered what I think might be a bug – when I was using the cartoon-style body from body male alternate, and the third-to-last eyebrow, the body refused to go down any layers, and when I clicked the send to back button, it went straight to the top, and kept on doing so even when I used new layers.

  11. Hey Jeff, great to see this latest update, it’s going to be great saving characters now without worries.

    Regarding your next issue to tackle.

    How about saving the .png files to a better quality? It would be great to be able to save them to a much higher quality. I normally save them as .pdf files then convert them as the quality is great, but the problem i have with that is for some reason items with shading on (i.e. the hoods)do not come out shaded, instead it is a solid black, which is stopping me using all the shaded items. (I have attached an example of the blacked out shaded area of the hoods. It also happend on any item with shading).

    http://forums.ugo.com/attachment.php?attachmentid=58209&d=1242338220

    So if you could get the .png files to save much higher (around 400kb – 500kb), or even an option like low/medium/high quality, that really would be great.

    Cheers and keep up the great work.

    Scorp

  12. The same thing just happened with the stubble beard on facial hair standard.

  13. Fyzza: Well shoot. That is basically a version of the “sticky item” bug I had hoped was squashed. Are these from previously saved characters or are you starting fresh?

  14. I was starting fresh on the http://www.heromachine.com/heromachine-3-lab/ version of HM3. I haven’t come across this issue at all before.

  15. Jake: If you want the ears to have the same shading you can either make them a custom color that matches the one on the body, or you can add a simple black insignia set to 30% alpha, masked to the ear in question. If I edit the hat item itself to accommodate one specific set of ears, then it’s going to be broken for every other set of them.

  16. Scorp, I do at some point want to add more “export” options so you can save at various sizes and resolutions. I’ll have to look into why the PNG output module doesn’t save alpha settings, I assume maybe it’s saving as 24-bit without alpha but I don’t know how to change that off-hand — it’s an off-the-shelf module.

  17. Fyzza, can you save the problem character, then send me your .sol file along with the name of the character in question? I can then open it and see what the problem is since I can’t replicate it.

    The saved Flash shared object library files (.sol for you Windows users) are LIKE cookies, but they are NOT actual cookies. They are not stored in the shared internet data files and will not be deleted if you erase all your cookies. You can only remove them by right-clicking on the movie, and going to Flash Settings, removing them there.

    Violodion found them in his Windows installation at %AppData%MacromediaFlash Player#SharedObjects\www.heromachine.comhm3

    He was able to copy those and move them to another computer in the same directory and load his characters there.

    On my Mac they are in HD / User / / Library / Preferences / Macromedia / Flash Player / #SharedObjects / / http://www.heromachine.com / hm3 / heromachine3.swf / hmcharacters.sol

    Thanks!

  18. I’ve tested a lot of items from random sections and around 50% no longer want to move layers after I change their layer order up, or they move down to around a middle layer.

    The attachment is basically what the bug does. I’ve scaled the items down so they don’t obscure the face.
    http://i.imgur.com/reKt6.png

  19. I’ll send them as soon as I can find them, Jeff.

  20. Great to see the saving working well: I fixed all my save files and they open right every time.

  21. Fyzza, I can’t make this happen at all.

    Is anyone else seeing this?

  22. Jake (9): The other easy fix is to use the top shading pattern on the ears, which shades them to the same extent as the hat provides to the face.

    http://i685.photobucket.com/albums/vv217/Myrowire/ears.png

    In this picture I have the correct pattern highlighted, with an example picture to show how it shades the ears.

    Hope it helps

  23. Hey Jake(6&9) Try just using the pattern shading items on the ears. It’s a pretty close match!

  24. Yeah, what Myro and ams said!

    Scorp, I just uploaded a new version of heromachine3 with a tweaked “Save as PNG” setting that should now support alpha — give it a shot. I tried it and it appears to be working (here’s the lame sample image I made, check out the cowl and glasses).

  25. Thanks guys. That kind of works. Anyone figure out a way to shade the ears without that white line still being there?

  26. I’ve tried looking throughout pretty much all of my computer files but I can’t seem to find the .sol files anywhere. I’ll continue to look and I’ll send them when/if I find them.

  27. Jake (25): I said it was an easy fix, not a perfect one. If you want something more thorough, then your options are to create multiple copies of the hat, one for each item you need shaded (each ear, hair, facial hair) that lies outside the actual head. Then you mask a seperate hat to each item. Or you can try to use one of the techniques Jeff said.
    I say keep them in, though. It looks anomalous, but once you color everything, it should seem like a natural reflection highlight.

  28. Hi Jeff. Thanks for having an attempt at that for me. I am not actually having problems if i click on the .png file, the shadows come out fine.

    It’s when i click on “print” and save it as a pdf file that the shadows become solid colurs.

    I like to always save it that way (the pdf way) as the quality is great with a huge size, it just has this mysterious shading problem. It won’t be anything on your side mate, it must be a problem with the pdf settings, and I just can’t get around it.

    That’s why it would be ideal for the bigger sized png files.

    On a side note, how easy would it be be to have the items without shading? Is there any chance to make this a kind of option that can be switched on or off?

    Regards

    Scorp

  29. Ok, I’ve been looking into the layering bug in live hm3c. I only encounter the bug with old characters, created in hm3, but the bug exists for all those characters. First and foremost, the fix, because that’s what people want.

    === FIXING OLD SAVES ===

    -Load the old character you want to work on.
    -Arrange the layering the way you like it. Do not attempt to add new items.
    -Save your character as a new file. The ‘OK’ button will appear not to work, but it does. Just click it once, then click ‘Cancel’.
    -Fully reload hm3c by closing the browser tab and restarting it in a new one (other ways of forcing the page to reload work just as well, but beware that Flash may eat a F5 keypress).
    -Load the new save. You will find your character unbugged and happy.

    === FIX ENDS HERE ===

    Ok, so now to what this bug actually does. It reverts the character to the saved state whenever new data is loaded. To reproduce it, you need such a character. This is a bit tricky, so let’s go slow.

    Peeling the onion
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    -Start hm3c clean.
    -In the Slot dropdown menu, choose any category.
    -Do not pick anything from the Set dropdown menu. Swirl the mouse around until it disappears and you can access the Load button.
    -Load the old character. When the loading has finished, you’ll notice that the dropdown menu texts and the preview boxes don’t match.
    -Make any changes you want to the character. Change colors, rotate things, add new items FROM ALREADY LOADED SETS, rescale stuff, mess with layers, anything you want.
    -Load any set that is not already loaded. Sets from ItemLeft are good candidates. As soon as it has finished loading, the character will revert to the way it looked before your changes (ie how it was saved).

    I have not seen this bug in characters resaved from hm3, or in characters created from scratch in hm3c.

    Fyzza: Are you on Windows XP? My savefiles are in

    C:Documents and SettingsAdmin2Application DataMacromediaFlash Player#SharedObjects2PGVG8CJwww.heromachine.comhm3heromachine3c.swf

    where ‘2PGVG8CJ’ can be any random letter combination (there is most likely only one folder).

  30. I derped, the name of the last folder should be ‘heromachine3.swf’ (no c) of course.

  31. Hey Jeff, just a thought that popped into my head. Might I suggest a “warning window” whenever someone wants to delete a character? Would that be possible in Flash?

  32. Tim, that’s already on “The List”, yep.

  33. Glad to help! I just use this thing so damn much, I got a vested interest in it, you know, functioning. :)

    Can’t wait to try out the new fixes, especially now that my masking won’t come undone. It got so bad that I was scared to close the file before it was finished, lest it come back unrecognizable.

  34. I am having a major problem. When I try to go to item right, I get insignia instead.

  35. @Jeff #32: Ah okay, I wasn’t sure if it was or not.

  36. @Panner #29: Thank you so much for that fix, I just came across that bug and it struck me with major confusion haha.

  37. LoneWolf: Was this with a fresh, all-new creation or had you previously loaded a saved one?

  38. @ Jake try this Hat x=93 y=100, ears 967e69,face color 1 e9659b, color 2 e3ccae
    http://forums.ugo.com/attachment.php?attachmentid=75690&d=1298507814

  39. Nicholas/GtaMythMaster43

    Oh thank the lord! Oh thankyouthankyouthankyou Jeff!
    :D
    I sooooo, needed this! I almost got so infuriated with the svae files I stoped, now, now it works great! Thank you!
    Man-squeeee! :D :D :D

  40. @Nicholas/GtaMythMaster43 (#39) I am SO gonna start using the phrase “Man-squee.”
    @Jeff and Panner and Violet and everybody who helped out, THANK YOU. This rocks.

  41. Nick Hentschel

    Dear Jeff:

    So far, so good! I’m just starting with the new feature, and iI’m VERY glad that we get a bigger window of saved projects, with less scrolling! It seems to be saving reliably, although the window doesn’t close when you do so; go figure.

    I’ll fire up some more old drawings, and we’ll see how they come up!

  42. Not sure if this has already been requested, but unblocking the “load saved character” button when first starting HM3 would be an added convenience. Thanks.

  43. a saved one

  44. @Panner – Sorry for the late reply. I’m using Windows 7 and I’ve looked through practically every folder and can’t find any of the .sol files.

  45. Jeff,

    Is there a way to allow us to load saved characters without having to choose a category first to have the save/load button give us access? It’s a minor pain in the rear.

  46. Paul, yes that is a pain in the rear, and yes, that will be changed in the relatively near future. Specifically, the plan is to have a “welcome” screen that comes up first, with various options like “Load a saved character”, “Load a template (Brick, Male, Female, Dwarf, etc.)”, “Start from scratch with a blank canvas”, etc.

    While I was getting the paper this morning I also resolved that I really, really want to have an online repository that anyone can load characters from, where I’d put editable character examples. I think it would be really cool, for instance, to have each Contest Winner there, so you could load ‘em up and go from there.

  47. Also none of the changes you implemented seem to apply to a recently saved (prior to these changes) character. LAyers are still screwedup, items I never picked get loaded, items I picked don’t get loaded, things are unmasked…..

  48. Also everything gets reset back to single instead of mutiple.

  49. Yeah, I think something got screwed up between the two releases. I am really hoping I didn’t accidentally wipe out all the bug squashing I did.

  50. Nicholas/GtaMythMaster43

    Jeff 46] That sounds awesome!
    :D

  51. Nicholas/GtaMythMaster43

    Oh yeah, and Spidercow, I’m glad a added a word to your vocabulary.