shoemod

Author Topic: shoemod  (Read 9361 times)

what the forget are you talking about
paper mario ttyd repainted

i actually contributed to it with the middle finger on the hammer hand

paper mario ttyd repainted

i actually contributed to it with the middle finger on the hammer hand
is this what the kids find funny these days



I have made a buggy edit of  a hatmod that does this.
Will release when I fix the bugs. Itll take a while because I have no idea whats causing them.
« Last Edit: November 14, 2017, 11:07:44 AM by soldier101@ »

Hatmod won't work with this. You can't have two separate images mounted to the shoe slots without using up the item or emitter slots. Literally the only way to do this is with bot mounting

images aren't really intended for the scope of a shoe mod- instead, make a bot that uses the shoe model, then mountObject(); it to the two foot slots (need to look that up)
« Last Edit: November 13, 2017, 06:34:30 PM by PhantOS »

Code: [Select]
datablock ShapeBaseImageData(TestHatImage)
{
shapeFile = "./head.dts";
emap = true;
        /// I think its here?
mountPoint = $HeadSlot;
offset = "0 0 0";
eyeOffset = "0 0 10";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "1.000 1.000 1.000 1.000";
};

/// I changed all of this too.
function serverCmdTestHat(%client)
{
%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(TestHatImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
%player.unhideNode("headskin");
}
else
{
%player.unmountImage(2);
%player.mountImage(TestHatImage,2);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
}
}
}
}
This was the code before I edited it.
EDIT:
images aren't really intended for the scope of a shoe mod- instead, make a bot that uses the shoe model, then mountObject(); it to the two foot slots (need to look that up)
Thanks, Now i know what the bugs are... Ill fix em soon.

images aren't really intended for the scope of a shoe mod- instead, make a bot that uses the shoe model, then mountObject(); it to the two foot slots (need to look that up)
how the forget do i do this
i swear to god phantos posted the code on how to do it one time
« Last Edit: November 20, 2017, 05:42:30 PM by Kidalex90 »

why do I like this idea

bump needs to make stan from american dad rocket boot

make president business's really loving long shoes


how the forget do i do this
i swear to god phantos posted the code on how to do it one time
STEP ONE: model the playertype

for this step, simply model what you want (in this case a shoe) and export it as a .dts file. playertypes just use .dts files but attach .dsqs to them manually, we'll be doing that later. there's a method to coloring the shoes in a way that will allow you to recolor them ingame

forget what you know about traditional .dts texturing; don't color them and then add a tiny .png file of that color on the same filepath. instead, separate all the colored parts into their own groups (or object, essentially groups can be made by ctrl p i think in blender). name those groups after the 'nodes' you'll be recoloring in-game (example of node names: shoebody, shoelaces, shoebottom, but make sure you remember the name, because you'll need to put those down in the code later)

so an example of what i describe above, say i have a shoe model with a red body and black laces, i'll select all the red parts (google blender - select by texture) and then i'll make them into a group by selection, name it 'shoebody'. then i'll do the same to the black laces, and name it 'shoelaces'. now all your nodes are separate.

in-game, each node can be colored using setNodeColor('nodename',"R G B A"); so they will be re-colorable. once you're done with all the separating of nodes, you can export to .dts



STEP TWO: Initializing

what i do is i copied a generic ass root.dsq from the mutalid playertype and moved it along with the .dts file. The reason for this is that torque has a bullstuff method of initializing player models, and if you don't have some sort of .dsq file it'll throw errors at you.

look at the top of the mutalid playertype code, it will show you how to initialize Dts files through the code, and then create the playertype. you'll only need like root.dsq for your shoe, and it will usually be an empty ass animation.

you need two things: the dts initialization and the armor. the armor is the playertype datablock.




STEP THREE: mounting

this part takes a lot of personal touch to it; you'll need to create a system for reading and initializing shoes in your own way, similar to how hatmod initializes hats simply. if you aren't good at coding, you should give up here because you won't get anywhere.

if you are good at coding, you'll only need a few functions, you should know what to do with them.

- player is the user who will be wearing the shoes
- aiplayer is the shoe


new AiPlayer('shoebot') { datablock = AirJordansArmor; };
AiPlayer.hideNode('ALL');
AiPlayer.unhideNode('shoebody');
AiPlayer.unhideNode('shoelaces');
AiPlayer.setNodeColor('shoebody',"1 0 0 1");
AiPlayer.setNodeColor('shoelaces',"0 0 0 1");
Player.mountObject(whatevertheshoenodeiscalled,AiPlayer);


you'll ideally want to create two shoe objects in the game and mount each one to the player's feet nodes (there's a left and a right one) and from there they will stick to the feet until someone shoots them off of you.


a lot of this is patchwork and requires tons of asking around as well as trial and error. if you make something like this be prepared to develop a modular system for adding shoes/hats/etc because 99% of modders won't actually understand how to add their own custom stuff to it. It's more complex than hatmod and requires more custom functions and routines to ensure that all the shoebots are mounted, then deleted when the player dies, etc.

the best candidate for this project would be someone like conan or pompmaker2, since they understand playertypes pretty well and tend to take on larger projects. if you want to tackle this yourself, at least get in contact with them and be ready to ask a ton of questions

also keep in mind that mounted bots cannot be rotated, so you might have to adjust the model's rotation before exporting

someone needs to make this