What's new
  • Most issues reported these days stem from users not enabling their emulators to use the required amount of RAM.
    We also tend not to use the search feature but post our issues within the texture pack release page.
    Failure to load a texture pack should not be posted in the release thread unless you have already patched the emulator.

    If you don't have the resources to use Large/HD texture packs please do not attempt to do so.
    Users should have a minimum amount of System RAM not less then 4GB's.
    If you have less then 4GB's of RAM do not post about how your emulator crashes,
    RAM is dirt cheap so invest some money into your PC.

    I would like to say thanks to squall_leonhart
    for posting this Solution.

Coding Help, a tool to quickly replace images

Weatherton

New member
Hey all, I spent about an hour yesterday renaming files based on how I had arranged them in a grid Macromedia dreamweaver. After having done this, I realized that what I was doing could be easily automated if I had the skills to write the code. I am going to look into doing so but I'm not exactly a l33t coder so it will be difficult for me... maybe someone on here will hear my cry and help me.

Here's how I described it to a friend over AIM:

NG Dru: you browse and direct it to a textfile
NG Dru: in that textfile it searches for a special character
NG Dru: maybe "@" or something
NG Dru: that will be at the beginning of every new file I want it to perform a function on
NG Dru: but it doesn't have to have the whole filename after it, just a differentiating piece, like a unique number
NG Dru: under that at sign/number I would have the name of the file (this time exact) I want it to rename it to
NG Dru: by rename, I mean either actually rename the file or make a copy of the file and name it that name
NG Dru: I think the copy may actually be a better option since sometimes I would want multiple copies with different names of the same file
NG Dru: so, an example file:

@271
mariokart64##64646#46.png

@285
mariokart64##64646#56.png

NG Dru: I think I may want the original to stick around, that's the differentiation I was referring to
NG Dru: that due to the possibility of
NG Dru:
@271
mariokart64##64646#46.png

@285
mariokart64##64646#56.png

@300
mariokart64##64646#58.png
mariokart64##64646#54.png
mariokart64##64646#53.png

NG Dru: so, something like the 300
NG Dru: would look for a file with '300' in the name (I know there would only be one file like that so once it finds it, it stops)
NG Dru: and then makes a new copy for each name
NG Dru: listed before the next special character (or the end of the file)
 
Last edited:

Poobah

New member
I don't know how other people found it, but I found it too confusing to work out exactly what you wanted this program to do.
 

Vanit

New member
To be honest, I can't really understand it either and I still think your problem can be solved with a little bit of organization.
 
OP
Weatherton

Weatherton

New member
My problem = man hours of sorting/renaming. I've already creatively organized to the best of my ability... I will try to more clearly explain.
 
Last edited:
OP
Weatherton

Weatherton

New member
The following will be a description of my process of image replacement:

The first step I took was to play the game for about an hour and doing as much crazy movement with Yoshi in timetrials as I could. AB spinning, hopping, ride in the shade, crashing… everything I could think of in every situation. Through this I was able to get what is likely the vast majority of pngs to be dumped (the rate at which they were accumulating had slowed significantly by the time I stopped). As you can see, I have over 1100 pngs to replace at this time.

Magikoopa_Replacement_Step7.JPG


Kerber and I have done some dirty work and organized these images into crashes, regular top images and regular bottom images. The top and bottom are then also organized a bit further into mostly front, mostly side and mostly back. One thing we learned from this is that the animations are only of turning left; the game flips the image over to turn right. This means that my kart must be symmetric, so I had to remove my gear shifter and re-render L


Now, to further organize the images using windows explorer would be cumbersome and impossible due to the extremely small differences between images. So, I came up with using Macromedia Dreamweaver to put them in a table next to eachother. This way I can scrutinize the differences and still have the luxury of knowing the original file name! All I have to do is double-click the image and its original name is highlighted. I then just hit ctrl+C and it’s on my clipboard.

Magikoopa_Replacement_Step1.JPG


As you can see in this next image, I sometimes find that there are multiple images that appear to be essentially identical. I stack these images on top of one another. The ones on the bottom are odd cases that I haven’t decided what to do with yet, they appear to be jump animations, I think I’ll organize them in another row.

Magikoopa_Replacement_Step2.JPG


With the filname on my clipboard, I currently go to an excel file where I have made a formula that calculates what image I should be replacing out of my 1,000 Magikoopa renders. This formula is simply my number of images divided by my number of images to replace (in this case I only have 38 unique images right now for the head but I can almost guarantee that number will be a bit larger). I then paste the filename under corresponding to it based on the order I had in my Macromedia file. So, if it was the the 28th image from the right in my macromedia table, paste it in the 28th column, meaning it should replace image number 606 (according to my division formula).

Magikoopa_Replacement_Step3.JPG


Now, it is from this point that the program would do the dirty work, instead of pasting into this excel document, I would paste into notepad in this type of format:


@579
MARIOKART64#DB4D3B19#2#1#7E452C61_ciByRGBA.png

@592
MARIOKART64#F89CF8E4#2#1#7E452C61_ciByRGBA.png
MARIOKART64#039F8B4D#2#1#7E452C61_ciByRGBA.png

@606
MARIOKART64#A59FC4F6#2#1#B7C037F6_ciByRGBA.png
MARIOKART64#BB3AF15C#2#1#B2E8D3FB_ciByRGBA.png
MARIOKART64#A36A33D9#2#1#B7C037F6_ciByRGBA.png

@619
MARIOKART64#AD67460B#2#1#B2E8D3FB_ciByRGBA.png
MARIOKART64#AD67460B#2#1#B2E8D3FB_ciByRGBA.png
MARIOKART64#C88AC741#2#1#B2E8D3FB_ciByRGBA.png
MARIOKART64#50A6529A#2#1#7E452C61_ciByRGBA.png

@633
MARIOKART64#70FE92F2#2#1#B2E8D3FB_ciByRGBA.png
MARIOKART64#D5BDA1DE#2#1#B2E8D3FB_ciByRGBA.png


The program would then search a folder containing images with the above numbers (they could be all of my renders and the program would know from the above input to only deal with the files that contain the number after the @ sign).

Here is a folder containing only those 38 images that my excel formula told me I needed:

Magikoopa_Replacement_Step4.JPG


So, instead of having to handpick these images each time the number changes (maybe I discover that it should be 40 images instead of 38, and I would have to go repack the necessary images if I were doing this by hand without the program).


The program would also do the dirty work of renaming my rendered files as necessary. Right now I use a program called “flexible renamer” so I can easily rename the above images with copies in a new folder:

Magikoopa_Replacement_Step5.JPG


After using this program, my files have been renamed (atleast with the first matches from Macromedia, I didn’t bother to replace the same image with multiple names because it would be a bit more difficult and I was just trying to see if I got a decent result).

Magikoopa_Replacement_Step6.JPG


Of course, the problem with this is that, not only is it boring, but it’s error prone. If I miscopy an image or something like that I could screw up bad enough to cause the error to ripple through my entire renaming process. Also, if I see, in the end, that I need to make a small change, it could mean doing the whole process over again. If I had a program to do the dirty work for me though, I could just make changes to the notepad document and have the changes performed quite easily.

Hopefully this was clear…
 

Mollymutt

Member
Let me get this straight. Are you actuallly remodeling Mario Kart? This would be a HUGE breakthrough that noone has done before, and could usher in all kinds of new projects. Just think what a skilled modeler could do with OOT using Djipi's textures!
 
OP
Weatherton

Weatherton

New member
I'm remodeling mariokart, yes, but it's an unusual opportunity because the characters are all just images. I'm not actually importing any models, if you can think of other games that have characters based on images, the same could be done for them (though this is a heck of a lot of work).
 
Last edited:
OP
Weatherton

Weatherton

New member
OK, Alex Penev (of Mariokart 64 fame... one of the best players in the world) helped me out and whipped up a program in less than an hour :) I'll post more about it here later on... :D
 

mdtauk

Zelda Hi-Res Texturer
Perhaps if you save all your 3d files, you could render the characters in a cartoon style and they could be used for a cartoony version of the game. I always thought a cartoony (not just cell shaded) style with outlines and so on would be a great look for Mario Kart 64, Mainly because you have so much freedom with the characters.
 

Vanit

New member
I think Weatherton will be lucky if he can pull this off without going insane. I'm sure he has suffered A LOT of agrivation for this is a very scrutinous process. But I suppose once he's got all the images organised it wouldn't be too hard to edit them. However, I think making them cartoony would be a waste of time because its only a minor preference. A better goal would be to make a completely different set of characters to the original game.
 

The Dave

New member
The best possible thing will be for him to get all the original characters done, and that in itself is an assload of work I don't even want to think about. Magik Koopa alone is a ton of work, and I wish him the best of luck on just that one guy.
 

Top