Sign in to follow this  
Fidooop

Modded Characters In Main Menu (TUTORIAL)

Recommended Posts

Fidooop    2592

Hey, everyone! I wanted to announce that I've finally made mods show up in the main menu without even enabling the mods!

That's right! And you can do it too! With the new Mods In Menu mod!
http://steamcommunity.com/sharedfiles/filedetails/?id=880465230

With this you'll be able to get your modded characters to show up in the main menu and even put your modded skins in a special modded skin inventory!

Special thanks to @PanAzej and @spiderdian for helping out with the assets! You guys are awesome!

How to use:

Spoiler

--Tutorial--
Add a table variable named "menu_assets" to your mod's modinfo.

To make a character's assets show up in the menu add a table in menu_assets labeled "characters".
Within that table you can make a table labeled by your character's prefab name. Within that table you will have 3 options:
'gender' Put "MALE", "FEMALE", etc.
'skins' This will be a table that you can fill with skin names. "formal", "survivor", etc. (To get a skin's string name to show up there is an extra needed step)
'nopuppet' Set this to true to force your character not to show up at the portal in the main menu area.

NOTE: When adding a character you MUST have the following assets within your mod's folder: (with 'charactername' replaced with your character's prefab name)
"bigportraits/charactername.xml"
"bigportraits/charactername.tex"
"bigportraits/charactername_none.xml"
"bigportraits/charactername_none.tex"
"images/avatars/avatar_charactername.xml"
"images/avatars/avatar_charactername.tex"
"images/saveslot_portraits/charactername.xml"
"images/saveslot_portraits/charactername.tex"
"anim/charactername.zip" --This is not needed if you have 'nopuppet' set to true.
And for each skin you MUST have the following assets within your mod's folder: (with 'charactername' replaced with your character's prefab name and 'skinname' replaced with the skin's name)
"bigportraits/charactername_skinname.xml"
"bigportraits/charactername_skinname.tex"
"anim/charactername_skinname.zip" --This is not needed if you have 'nopuppet' set to true.


If you want to make your modded skins show up in the special modded inventory (and also give your character skins a string name) then make a new table in menu_assets labeled "skins".
Within this table you will be able to add a new table for each skin you want to show up. (each table needs to be labeled after the skin it will hold info for) Inside of each of these tables the following options are:
'name' This is the name of the skin.
'desc' This is the description of the skin.
'atlas' This is the directory path to the .xml of the skin's icon.
'image' The tex file for the skin's icon.
'item' Set this to true if this is an item and/or structure skin.
NOTE: When listing a skin there MUST be an icon xml and tex with the same name as the skin present within your mod for this mod to pick up on. (recommended dimensions are 128x128 pixels)


If you've made any symbol modifiers (BASE_TORSO_TUCK, BASE_ALTERNATE_FOR_BODY, BASE_ALTERNATE_FOR_SKIRT, BASE_LEGS_SIZE, or BASE_FEET_SIZE, ExcludeClothingSymbolForModCharacter) for your characters and/or character skins then don't worry. There's a way to do that too!
Make a table in menu_assets labeled "character_symbol_tuning". Within this table you'll be able to place a new table for each symbol modifier. (make sure that the table is labeled after the modifier you want to use)
Inside of one of these tables all you have to do is put a character's prefab name or put 'charactername_skinname' and the tuning value for that modifier!
BASE_TORSO_TUCK only accepts "full", "untucked", and "untucked_wide"
BASE_ALTERNATE_FOR_BODY only accepts true or false
BASE_ALTERNATE_FOR_SKIRT only accepts true or false
BASE_LEGS_SIZE only accepts numbers
BASE_FEET_SIZE only accepts numbers
ExcludeClothingSymbolForModCharacter only accepts tables (fill the table with a list of symbols you want to exclude)

EXAMPLE:


menu_assets = {
    characters = {
        erik = { gender = "MALE", skins = { "formal" }, nopuppet = false }
    },
    skins = {
        erik_formal = { name = "Guest of Honor", desc = "Erik seems to look rather displeased, but he's secretly enjoying himself.", atlas = "images/skinicons/erikskins.xml", image = "erik_formal.tex" },
        racquet_glintedgold = { name = "Ornamental Racquet", desc = "This racquet might look flashy, but using it is a real workout.", atlas = "images/skinicons/erikskins.xml", image = "racquet_glintedgold.tex", item = true }
    },
    character_symbol_tuning = {
        BASE_ALTERNATE_FOR_BODY = {erik = false, erik_formal = false},
        BASE_LEGS_SIZE = {erik = 1},
        BASE_FEET_SIZE = {erik_formal = 1},
        ExcludeClothingSymbolForModCharacter = {erik = {"arm_upper", "arm_upper_skin"}, erik_formal = {"torso"}}
    }
}

 

 

Original post:

Spoiler

 

I just spent a good 2 or so hours toying with the code and found a rather hacky way to get this to work! (...Hacky but it works flawlessly so shhh)

Proof? Here you go... Best I got to show...modsinmenu.png
As you can see, I'm at the collection screen and I'm able to see and change Erik's skins! (I know it can't be proven from this one screenshot but trust me... Erik is not enabled at all)

So where's the code? When can modders start getting their mods to show in the main menu? Well, I've still got a bit to go! I'm planning on implementing Modded Skins support as well so that modded character skins can be changed from the main menu! Also, I want to implement a "modded inventory". There'll be a new button in the collection screen that'll toggle back and forth between the official inventory and the modded inventory! Any mod that's made the skin assets available for this to pick up will end up populating this inventory and it all can be viewed from there! :D
(ORIGINAL WARNINGS ON SKINNING OFFICIAL CHARACTERS/ITEMS STILL APPLY)

I'll be updating this thread as I make progress! :p

Also, if you've got any questions feel free to ask!

 

 

Edited by Fidooop

Share this post


Link to post
Share on other sites
Fidooop    2592
1 minute ago, PanAzej said:

Amazing job, as I've said already.

Your API is getting better and better. This stuff should be a part of the game, imo.

cough cough cough hack cough @PeterA cough choke cough puke cough potatocups cough cough

I mean what? Yeah, totally! That'd be sick!

Share this post


Link to post
Share on other sites
Fidooop    2592
1 minute ago, PeterA said:

Cool stuff, does this also allow the modded characters to appear out of the portal on the main menu?

I've been trying to get an Erik to pop out but I think all my data has everyone set to Daniel atm so I'll just modify Daniel to work with this and I'll let you know if it works!

Share this post


Link to post
Share on other sites
Fidooop    2592
36 minutes ago, PeterA said:

Cool stuff, does this also allow the modded characters to appear out of the portal on the main menu?

Got to test it!


modsinmenu2.png

As of right now? No, they don't show up at the portal... I'll just have to update the menu code to do that! :p

Share this post


Link to post
Share on other sites
Zeklo    19409

Is it possible to have the little icon that appears on the server list, for modded characters, display unique per character? 

Share this post


Link to post
Share on other sites
Fidooop    2592
18 hours ago, Zeklo said:

Is it possible to have the little icon that appears on the server list, for modded characters, display unique per character? 

Yes, it fully puts in the modded character as if it were an official character! :p

Spoiler

(quick little note... Erik's save portrait was never properly done because there was no use for it and that's why it isn't set properly in these images)
modsinmenu6.pngmodsinmenu7.pngmodsinmenu8.png

 

Share this post


Link to post
Share on other sites
Cunning fox    673
On 14.01.2017 at 2:14 PM, Fidooop said:

Yes, it fully puts in the modded character as if it were an official character! :p

  Hide contents

(quick little note... Erik's save portrait was never properly done because there was no use for it and that's why it isn't set properly in these images)
modsinmenu6.pngmodsinmenu7.pngmodsinmenu8.png

 

That's right what I need! When you'll update your mod?

  • Like 1

Share this post


Link to post
Share on other sites
Fidooop    2592
On 1/13/2017 at 7:07 AM, Palecwsmalec1 said:

how do you keep outdoing yourself with each post!?

Like this!

 

1 hour ago, makar5000 said:

That's right what I need! When you'll update your mod?

Still working on it! Only just now got in some Modded Skins support!
modsinmenu10.png

Also, here's a little sneak preview at the new inventory! ;)

Spoiler

modsinmenu9.png

 

 

Oh yeah, and I managed to twist @SageOfLegend's arm and get him to sneak out some updates to his character mods! They will indeed be compatible with this automatically once it goes public! :D
modsinmenu11.png

Edited by Fidooop

Share this post


Link to post
Share on other sites
Arlesienne    8985
Just now, Fidooop said:

Still working on it! Only just now got in some Modded Skins support!
modsinmenu10.png

 

Also, here's a little sneak preview at the new inventory! ;)

  Hide contents

modsinmenu9.png

 

I SAW IT FIRST!

On Discord.

Share this post


Link to post
Share on other sites
Fidooop    2592

Quick update! Nothing really new to add to this but I have now fully and "properly" programmed the way for modded characters to show up at the portal! (The first images were just a cheap test run editing some local variables in the official files to see what I needed to get done)

modsinmenu12.png

 

What's left to do?
Getting the mod to shut itself up and do absolutely nothing when getting into the actual game.
Making the custom Modded Skin inventory.

Thank you all for being patient while I work on this to make sure it's perfect! :D

 

P.S. @PanAzej was kind enough to help out in making a custom frame to be used in the modded skin inventory specifically for the Modded Skin rarity! c:
Thx, dude!
moIhg7G.png

Edited by Fidooop

Share this post


Link to post
Share on other sites
Palecwsmalec1    944

That's a pretty sweet custom frame. In fact, i was JUST  thinking about modded rarity charts- like instead of common-elegant it could be regular-grand. But that's just an idea i had in the back of my head. Glad to see how rapidly this is evolving, i sure never expected to see an entire new inventory screen when i started playing :o

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this