Crafting recipes problem

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Crafting recipes problem

Post by oliverjanda »

Hi,
I'm working on a mod for crafting stronger drones.
It already works for 1 drone but i have a minor issue with this recipe:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<add sel="/wares">

		<ware id="inv_adv_drone_ai" name="{20201,92101}" description="{20201,92102}" transport="inventory" size="small" volume="1" tags="crafting inventory">
			<price min="171466" average="219372" max="267278" />
			<production time="10" amount="1" method="default" name="{20206,501}">
				<primary>
					<ware ware="inv_xenoncomponents" amount="25"/>
					<ware ware="inv_terranhightechgoods" amount="100" />
					<ware ware="inv_unidentifiedartifacts" amount="10" />
					<ware ware="inv_cartographyunits" amount="100" />
				</primary>
			</production>
			<container ref="props_sm_container_xs_wares_macro" />
			<icon video="inv_generic_macro" />
		</ware>
	</add>
</diff>
Ingame only 1 Xenon component is shown/used for the recipe. I have no idea whats wrong. Can anybody check that recipe (extensions/testmod/libraries/wares.xml)?
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Could be the "rare" tag.

Code: Select all

  <ware id="inv_xenoncomponents" name="{20201,14801}" description="{20201,14802}" transport="inventory" size="small" volume="1" tags="crafting inventory rare">
    <price min="870" average="1023" max="1176" />
    <container ref="props_sm_container_xs_rare_wares_macro" />
    <icon video="inv_generic_macro" />
  </ware>
Also noticed that it's only used in one vanilla crafting recipe, and that uses 1 xenon component.

Have you tried other rare components, like inv_weaponinterfacechips?
oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda »

I tried the vanilla thing u can craft with xenon components. Security decryption system or something similar (I'm at work and can't look it up).
Same problem!

I was not aware that the tag has an actual meaning.
I thought its more like a comment...
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

I'm not sure that it's anything more than a comment either. Just the only difference I could spot between that and the other stuff you used.
oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda »

Can you put the code in a mod and tell me the result?
This seems so weired, i'm not sure if it's something only i'm experiencing...
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Yup. Removing the "rare" tag allowed your recipe to use 25 xenon components. Not sure if there are any other effects, though. (Like maybe xenon components appearing in boxes on stations?)
oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda »

Thanks for your help. I never would have found that one.

I'm reluctant to mod the xenon component. :(
I will have to think of a different solution.

BTW where can I find a documentaion of the tags?
oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda »

It seems that it is only possible the set an amount of a inventory item once.
All other attempts to set a different amount in another recipe fail. :/
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hm. You're right. I just tested again, and didn't notice that the number of Xenon Components required for Security Decryption Systems also increased to 25. Sorry didn't notice that last time.
oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda »

w.evans wrote:Hm. You're right. I just tested again, and didn't notice that the number of Xenon Components required for Security Decryption Systems also increased to 25. Sorry didn't notice that last time.
No problem.
I hope that is not intended and easy to fix for ES.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Also tried changing the method:

Code: Select all

<add sel="/wares/production">
  <method id="oliverjanda_test_drone" />
</add>

...

<production time="10" amount="1" method="oliverjanda_test_drone" name="{20206,501}">
That caused the UI to glitch out when trying to access the inventory. (Sidebar completely unresponsive until "reloadui" is invoked in the console.)
oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda »

Should file a bugreport somewhere? Or is a thread here enough?
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

No idea. There's a "no mods" policy at the bugs section. Reasonable since without that policy, they'll probably be wasting a lot of time chasing after red herrings that people think are caused by the vanilla code, but are actually caused by mods or incompatibilities.

Return to “X Rebirth - Scripts and Modding”