Jump to content

Creating and Exporting Models from Unity for use in 7D2D


xyth
 Share

Recommended Posts

In Unity, a block and an item is the same except for two things. First, you do not need to add a collider or a tag on an object that will be used as an item in game. The second difference is the positioning of the object. Blocks need to be at 000 (xyz coords) but items need to be aligned with a position dictated by the handhold position in xml. The best way to align an item is to extract an item's mesh from the games resource file, one that uses the handhold that you plan to use with the new item, and use that mesh as an alignment tool.

Link to comment
Share on other sites

Thank you, i got the Kukri Model into the game but can´t get the handheld position right...

 

but items need to be aligned with a position dictated by the handhold position in xml. The best way to align an item is to extract an item's mesh from the games resource file, one that uses the handhold that you plan to use with the new item, and use that mesh as an alignment tool.

 

I did it like in your video about weapon positioning, but after the export its always the same in the game.

Some idea what i get wrong?

Edited by Fluix (see edit history)
Link to comment
Share on other sites

Likely you are moving the top parent object rather than the child object. The top parent object must remain at 000.

 

Thanks for your input but I checked it again and the parent object (meleeKukriPrefab) has 000 and i aligned the child object too the melee iron barbed club (holdtype 2).

Maybe i have some troubles with my unity assets bundle extractor (cause the stable 2.2 version is not working for me (plugin is not working) so i use beta3 32 bit...

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

 

The export C# script asset: https://github.com/7D2D/Templates-and-Utilities

Right click on the ExportAssetBundles.cs script and then right click and select save link as. Save it to your desktop then open unity and drag the script into your asset folder.

 

Now onto the videos.

 

https://www.youtube.com/user/xythq/playlists?shelf_id=0&view=1&sort=dd

 

 

So I have to do drag the script into every new project?

 

Edit:

I opened a new project and dragged the script into my asset folder. I got tons of errors in the bottom window. I dragged the sound file I want to use to change existing sounds in the game to assets. I right clicked on it and did not get the option to Build Asset bundle.

Edited by Winterhart
Add info (see edit history)
Link to comment
Share on other sites

ANY script error causes unity to not load any scripts. Sounds like you have more than one copy of the builder script in unity.

 

OK I have Xyth's Fun With Flags Tutorial and it has the script in it. That's were I imported and exported the sound file from for my zombie sound changing mod. I was thinking that might be the problem so I wanted start a blank project to work from but I'm having the issues I mentioned above. I'm not looking for hand holding and have been trying to research everything I can on my own, but I haven't got a clue what to do next. Where do I look for this extra copy of the builder script go get rid of it. How do I get that script into my project?

 

Thank you for your time.

Link to comment
Share on other sites

The script from the fun with flags video should work. If you start a new project, you need to add the script file into that project. Just go into the fun with flags project, find the script file in the asset folder. Right click on it and select show in explorer. Than in explorer amke a copy and then open your new project and drag the script into that projects asset folder.

Link to comment
Share on other sites

The script from the fun with flags video should work. If you start a new project, you need to add the script file into that project. Just go into the fun with flags project, find the script file in the asset folder. Right click on it and select show in explorer. Than in explorer amke a copy and then open your new project and drag the script into that projects asset folder.

 

I got the script out of your 2nd tutorial and it worked. Thanks

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

Hello. Help me please. I just can’t understand what’s wrong with me, and how can I add model as a block. When I pick up the unit, the console shows these 6 errors. My English is weak, but it seems like you need to add scripts for the block. How to do it? A model appeared above the character, but nothing can be done.[ATTACH=CONFIG]28923[/ATTACH]

https://sun9-43.userapi.com/c858136/v858136885/45237/wM6f8JT6Zh8.jpg

 

The referenced script (MMDEngine) on this Behaviour is missing!

The referenced script (ExpressionManagerScript) on this Behaviour is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script (MMDEngine) on this Behaviour is missing!

 

Model transferred from mmd format to Unity

Edited by Smile Rumia (see edit history)
Link to comment
Share on other sites

Hello. Help me please. I just can’t understand what’s wrong with me, and how can I add model as a block. When I pick up the unit, the console shows these 6 errors. My English is weak, but it seems like you need to add scripts for the block. How to do it? A model appeared above the character, but nothing can be done.[ATTACH=CONFIG]28923[/ATTACH]

 

The referenced script (MMDEngine) on this Behaviour is missing!

The referenced script (ExpressionManagerScript) on this Behaviour is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Mmm') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script on this Behaviour(Game Object 'Expression') is missing!

The referenced script (MMDEngine) on this Behaviour is missing!

 

Model transferred from mmd format to Unity

 

FYI your attachment is coming as invalid. Also have you followed Xyth's tutorial on custom blocks?

 

Not sure what your "block" is either or what you're trying to do. Blocks don't generally require scripts...

Link to comment
Share on other sites

Ответ

 

FYI your attachment is coming as invalid. Also have you followed Xyth's tutorial on custom blocks?

 

Not sure what your "block" is either or what you're trying to do. Blocks don't generally require scripts...

 

Attachment updated.

I want to add a block. But it seems the script requirement is specified in the Mmm.unity3d file

In the Block.xml file appears:

<block name="Mmm">

<property name="CustomIcon" value="BKing"/>

<property name="Extends" value="Chess BBishop"/>

<property name="Model" value="#@modfolder:Resources/Mmm.unity3d?MmmPrefab" param1="main_mesh"/>

</block>

Edited by Smile Rumia (see edit history)
Link to comment
Share on other sites

Attachment updated.

I want to add a block. But it seems the script requirement is specified in the Mmm.unity3d file

In the Block.xml file appears:

<block name="Mmm">

<property name="CustomIcon" value="BKing"/>

<property name="Extends" value="Chess BBishop"/>

<property name="Model" value="#@modfolder:Resources/Mmm.unity3d?MmmPrefab" param1="main_mesh"/>

</block>

 

This was the link I meant to share:

 

There is a script you need to import in unity to export blocks, unrelated to mmd. You can find the script here:

 

https://github.com/7D2D/Templates-and-Utilities/blob/master/ExportAssetBundles.cs

Link to comment
Share on other sites

Ответ

 

This was the link I meant to share:

 

There is a script you need to import in unity to export blocks, unrelated to mmd. You can find the script here:

 

https://github.com/7D2D/Templates-and-Utilities/blob/master/ExportAssetBundles.cs

 

Thank you very much. But the problem was not solved. To make it clear, I will show my actions in order in the screenshots.

 

https://sun9-45.userapi.com/c858432/v858432177/43fe8/x6Dvkh20JDw.jpg

https://pp.userapi.com/c858432/v858432177/43ff2/OB-yOENSZ1A.jpg

https://sun9-29.userapi.com/c854224/v854224984/c409f/zOH45640K8w.jpg

https://sun9-44.userapi.com/c857416/v857416984/4298f/FT9GzBdoghk.jpg

https://sun9-20.userapi.com/c851236/v851236984/18e45d/I9hzX2TXwiw.jpg

https://sun9-18.userapi.com/c858424/v858424984/44ad7/rBXDfsNnu94.jpg

https://sun9-3.userapi.com/c855036/v855036984/c2dca/kCaP6UOTAzk.jpg

https://pp.userapi.com/c851028/v851028536/18d844/c6MGw7Lhrzg.jpg

https://sun9-37.userapi.com/c854224/v854224536/bf0a4/oOTtKu60xUM.jpg

https://sun9-54.userapi.com/c852032/v852032536/186b37/T5osSLcEDbg.jpg

https://sun9-2.userapi.com/c855732/v855732536/c14fe/FMv0y_PP_Kw.jpg

https://sun9-33.userapi.com/c858024/v858024984/4455c/uE6LDUahpFU.jpg

https://sun9-38.userapi.com/c858024/v858024984/44578/Y_uvDFKhS14.jpg

https://sun9-40.userapi.com/c858024/v858024984/445b8/ofXAlRr1esE.jpg

https://sun9-24.userapi.com/c852120/v852120536/19e062/nxw4LFl5sKg.jpg

https://sun9-43.userapi.com/c858024/v858024984/445d5/ZQkgfq9Mevw.jpg

https://pp.userapi.com/c855420/v855420536/b52b4/kkewFlxbDyk.jpg

https://pp.userapi.com/c852036/v852036536/19bf4f/N1cZnloBCKI.jpg

https://sun9-38.userapi.com/c850728/v850728536/18f261/rAT36scX8P4.jpg

https://pp.userapi.com/c854224/v854224536/bf125/iFNLfaCyLhk.jpg

https://sun9-7.userapi.com/c857628/v857628536/439eb/iuHfiOggKVU.jpg

 

Foto in my googleDrive for comfortable view, and some files

https://drive.google.com/drive/folders/1UGV41jX1WVQHQO_KiVtNQNa8A-QG3asw?usp=sharing

 

At the moment, I continue to look for a solution.

I will be glad to any advice.

Edited by Smile Rumia (see edit history)
Link to comment
Share on other sites

According to the error there's an issue in your recipes xml. Somewhere you have a block named Soccer Ball that doesn't exist. Remember to be case sensitive. "This" is different that "this" There should also only be a Parent Folder and child folder.

 

Also what Guppy just said. Forgot about that since I don't use any scripts except the export script.

Link to comment
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
 Share

×
×
  • Create New...