[Mod] [no code yet] Change Player Model

User avatar
Worldblender
Member
 
Posts: 48
Joined: Tue Jun 30, 2015 22:12
GitHub: RQWorldblender
In-game: Worldblender

[Mod] [no code yet] Change Player Model

by Worldblender » Sat May 25, 2019 07:02

Finally I decided that I should create instead of just talking about making my mod chchar. Continuing from an older post, I decided that I will structure this mod to make it easier to separate code and models. For sample models, I will reuse characters from kart models shipping with SuperTuxKart so that people can use this mod OOTB. After completion of the code the first time around, the Super Smash Bros. fighters will be placed in a separate repository that has to be downloaded separately.

Everything I did so far is at (this will be the place to download this mod once I have working code): https://gitlab.com/Worldblender/chchar
From the README:
Allows players to change the default character model for another one, optionally with different animations. While using this mod, skins for the default player model cannot be used unless it is switched back to. Basically a frontend to the built-in player_api mod shipping with Minetest Game.

Directory structure:
|-- init.lua (required) - Runs when the game loads.
|-- mod.conf (recommended) - Contains description and dependencies.
|-- models
| |-- <model name> - code name of a model.
| |-- model.ini - Information about this model, including name, costumes available, where to play animations, etc.
| `-- costumes - Different versions of a model. Can contain alternate versions with different models, textures, and/or sounds.
| |-- default - The default costume to load if no alternate versions of a model are available.
| |-- textures (optional)
| | `-- ... any textures or images for the default model.
| |-- sounds (optional)
| | `-- ... any sounds for the default model.
| |-- model.b3d/model.obj - Model file that will be rendered in-game by default.
| `-- icon.png - Image representing this model overall.
| |-- <costume name> - Name of an optional costume. It can also be represented by a number, where the ordering is based alphabetically \(a - 0 to z - 25\).
| |-- textures (optional)
| | `-- ... any textures or images for the alternate version of this model.
| |-- sounds (optional)
| | `-- ... any sounds for the alternate version of this model.
| |-- model.b3d/model.obj - Model file that will be rendered in-game for this particular version.
| `-- icon.png - Image representing the alternate version of this model.
| |-- ... any other models can be added here
|-- textures - other images used in places such as formspecs. Not part of any model.
`-- ... any other files or directories

I have determined that I need to make use of the built-in player_api from Minetest Game at https://github.com/minetest/minetest_game/tree/master/mods/player_api to complete this mod. However, I'm having a hard time determining if the directory layout I outlined above will cause problems with the player_api and/or Minetest engine. I don't want to waste time writing code that ultimately doesn't work, so I need guidance on where I should go from here, based on whatever is in my repository and the outline above.
 

User avatar
Inocudom
Member
 
Posts: 3063
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] [no code yet] Change Player Model

by Inocudom » Sat May 25, 2019 21:36

Miku Miku Dance and VRChat have a vast number of models for them.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
Worldblender
Member
 
Posts: 48
Joined: Tue Jun 30, 2015 22:12
GitHub: RQWorldblender
In-game: Worldblender

Re: [Mod] [no code yet] Change Player Model

by Worldblender » Sat May 25, 2019 21:39

Inocudom wrote:Miku Miku Dance and VRChat have a vast number of models for them.


It's okay, I already have my own repository set up for the Smash fighters: https://gitlab.com/Worldblender/smash-ultimate-models-exported

I'm still seeking for help on the code, at least with understanding how to use the player_api mod, as this mod I'm writing will be a frontend to that. I can fall back to doing everything on my own, but that could potentially consume a huge amount of time.
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 5 guests