Jump to content

Logans Moding Questions Thread


Recommended Posts

Figured I'd make a new thread for it since other questions have popped up, so here we go...

 

1. I made two arches from my previous thread but unsure how to get them into the game - I know how to set the XML up from looking at other mods I have but 7D2D doesn't recognise dae(collada) files.

 

2. Is it possible to add additional textures to the paintbrush, and if so, how would that be modded? I don't think their called from XML but not 100% sure.

 

 

Those two to kick this off. I'm sure I'll have others.

Thanks in advance, Logan

Link to comment
Share on other sites

1. You need to use Unity and a custom export script to prepare models for loading into the game. Check out my consolidated tutorial thread in the tutorial section for a link to the videos.

 

2. Not possible to do in A18.

Link to comment
Share on other sites

Thanks for that Xyth, that came in handy for converting the models and was surprised at how easy it was actually. However, on attempting to load the block ArchCorner, the console tells me in red text that It can't find ArchCorner.Unity3D in the resources folder even though it's clearly there. I thought I knew the XML but I have the feeling I'm missing something, just not sure what.

<configs>
<append xpath="/blocks">

<block name="ArchCorner">
<property name="Extends" value="pouredRConcreteMaster"/>
<property name="CustomIcon" value="ArchCorner"/>
<property name="CreativeMode" value="Player"/>
<property name="Shape" value="New"/>
<property name="Model" value="#@modfolder:Resources/ArchCorner.unity3d"/> <property name="Place" value="TowardsPlacerInverted"/>
<property name="SortOrder2" value="0500"/> <!-- SortShape -->
</block>
</append>
</configs>

 

-Logan

 

Link to comment
Share on other sites

For your model line, you need to reference the unity3d file, then the prefab name from in Unity.

#@modfolder:Resources/ArchCorner.unity3d?ArchCorner1.prefab"/>

 

Also a good idea to name the unity3d file and prefab something different, which is why I threw a 1 on the prefab name. Just to be safe.

Link to comment
Share on other sites

oh i see, interesting. Everything loaded as it should. I think I need to fiddle with it a bit more as the arch came into the game as a solid block, but that's something to fiddle with in unity I think.

 

EDIT: Adding the shape tag or removing the extends tag throws an exception and it fails to load.

Link to comment
Share on other sites

Looked at the model in unity and everything's good but for some reason, the game is still rendering it as a solid block. Adding a sort order does nothing. Removing the extends tag or attempting to define the shape with New or Model throws an exception and doesn't load. I did also comb through the items XML to see if there was anything there and there wasn't plus the rest of blocks.xml and nothing jumped out at me. I did change the XML so it loads simpler but this one has me baffled.

<configs>
<append xpath="/blocks">

<block name="LogansArchCorner">
<property name="Extends" value="rConcreteMaster" />
<property name="Model" value="#@modfolder:Resources/LogansArchCorner.unity3d?ArchCorner" />
<property name="CustomIcon" value="ArchCorner" />
</block>

</append>
</configs>

 

Link to comment
Share on other sites

Ok - I think I've got it now - the prefab clause needed to have a dash in it so it's arch-corner(had to find my dae file to see it). Only issue I'm having now is when I define the shape, my environment goes to the void which I think is from lack of a texture on the object, which I'll fix in the morning.

 

EDIT: I re-imported the dae file into unity with a texture and everything in-game loads except the shape :D it's acting like it's not even there anymore. This was using the shape tag with the value of new. Anyone have this issue before?

Link to comment
Share on other sites

Welp, I'm out of ideas - the icon loads, the block loads, but the block doesn't apply the shape from the model. Adding the tag shape with the value new or model comes back with shader not found, restoring to default and making my whole window invisible like I'm in the void. I've tried other clauses to no avail. I've reimported the model into blender, pulled all the sketchup lights and cameras off of it, re-saved it as a dae to convert in unity and still nothing. The model shows how it's supposed to in unity so I'm really confused what's going on. Is there something I'm missing to tell the game to apply the shape from the model?

Link to comment
Share on other sites

You cant use shape=new on a custom block. Shape = New is a block constructed out of planes by the game code at runtime. Use ModelEntity instead.

 

Here is an example of a block:

 

<block name="Vine">

<property name="Group" value="Building,Basics" />

<property name="Class" value="Ladder" />

<property name="Shape" value="ModelEntity" />

<property name="Model" value="#@modfolder:Resources/Vine.unity3d?VinePrefab"/>

<property name="Material" value="Mwood_ladders"/>

<property name="Collide" value="movement,melee,rocket"/>

<property name="CreativeMode" value="Player" />

<property name="UseGlobalUV" value="Local" />

<property name="Place" value="TowardsPlacer" />

<property name="ImposterDontBlock" value="true" />

<property name="ImposterExclude" value="true" />

<drop event="Harvest" name="yuccaFibers" count="2" tool_category="harvestingTools" />

<drop event="Destroy" name="yuccaFibers" count="1" />

<drop event="Fall" name="grass" count="1" prob="0" stick_chance="1" />

</block>

Link to comment
Share on other sites

Ok so aparently the model's been in the game the whole time, which was frustrating me. I just happened to look up at my ceiling and there were 10+ copies of the arch corner there, meaning there's a position error somewhere. I did attempt to correct this in blender setting the positions to all zeros and the scale to 1 but that hasn't done anything. I've also tried saving the model as both an fbx and a blend and neither have any effect. Suggestions?

Link to comment
Share on other sites

Up to this point I assumed you followed the tutorial on getting a block into the game using Unity. If so, make sure the parent object is set at 000 in Unity, and any child objects in Unity are positioned so when that parent is at 000 the block sits at 000.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...