Jump to content

SD2DX: How To Make Mods...


TheDroktarr

Recommended Posts

What the hell? I'm trying to import this one

<configs>
<config name="recipes">
	<append xpath="/recipes">
		<recipe name="scrapBrass" count="24" scrapable="False" craft_area="campfire" craft_tool="cookingPot" craft_time="60" craft_exp_gain="2" learn_exp_gain="20">
			<ingredient name="copperOre" count="1" />
			<ingredient name="coalOre" count="1" />
			<ingredient name="calamineOre" count="1" />
		</recipe>

		<recipe name="coal" count="2" scrapable="False" craft_area="campfire" craft_tool="cookingPot" craft_time="60" craft_exp_gain="2" learn_exp_gain="20">
			<ingredient name="trunkPine" count="1" />
		</recipe>

		<recipe name="coalOre" count="1" scrapable="False" craft_time="1" craft_exp_gain="1" learn_exp_gain="1">
			<ingredient name="coal" count="1" grid="0, 2" />
			<ingredient name="coal" count="1" grid="0, 1" />
			<ingredient name="coal" count="1" grid="0, 0" />
			<ingredient name="coal" count="1" grid="0, -1" />
			<ingredient name="coal" count="1" grid="0, -2" />
		</recipe>

	</append>
</config>
</configs>

But I get an error

Error: There are multiple root elements. Line 1, position 290.

Link to comment
Share on other sites

Well...yes. But when I substitute the whole e.g. recipes.xlm it works. I don't get...HOW?

Or it works because there is one <recipes> </recipes> with many inner <recipe> </recipe>?

If such a situation is a limitation, that's OK. I thought that I was doing something wrong.

Link to comment
Share on other sites

  • 7 months later...

Well I've tried a few models and items now and I'm reasonably sure I have the sizes right but nothing I do is working. I get a null ref every time after I pick-up a modded item. I think it must be something I'm doing wrong in unity when exporting the prefab. I'm using free assets from the store for my models.

Link to comment
Share on other sites

Okay I downloaded unity 5.0 I was using the latest version as soon as I switched to 5.0 the models started showing up and the null ref error was gone. Only problem now is position, the model is nowhere near the players hands and nothing I do in unity of blender seems to move it.

Link to comment
Share on other sites

you need to set up a game object at the zero position in unity like this:

https://gyazo.com/bf63fe86f614b2915eef48d5d3c822d0 here its called BottlePrefab it´s just a simple empty gameObject at 0,0.

then the bottle mesh had a transfrom like this:

https://gyazo.com/b58c7f16256448c9cfac1a0b1b56950d

If you try to move the BottlePrefab in the room nothing happens in game because it always get´s loaded at position zero. So best youmake an empty game object, reset his position, and put your mesh (with the right transform) on the Prefab Game Object.

Hope this is understandable

Link to comment
Share on other sites

Thanks! Using what you told me I managed to get one of the models into my hand but I'm still having trouble rotating it to face the right way. I got a block in and working well it's just items I'm I'm having issues with now. Item textures aren't showing up, only block textures for some reason, even know I can see them in the prefabs in unity.

 

Edit:

I think I might have both the above problems sorted out too. I've got a new gun model in and facing the correct way with it's textures in place. I'm still trying to set the sights.....Thanks for your help, I would of given up days ago without it :friendly_wink:

Link to comment
Share on other sites

You need to put it more to the stock (back of the weapon) If the scope "touch" the player face when aiming, it should dissapear in the overlay. The overlay is as it's called just a overlay over the normal aiming animation..... Wich means if the scope is in the line of the aiming screen it will be shown.

Link to comment
Share on other sites

Hmm, I'll give that a try later. I've been trying to do it by adding a camera for the sights and it works well when zoomed, I just cant work out how to get it to only use the camera when the right mouse button is held down. Right now it starts using the new camera as soon as you put the rifle in your hand.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...