Jump to content

ConditionMax & Result: Help


vonVile

Recommended Posts

In my code I want to have my craft item to have 50% of it's normal health when created. I thought setting ConditionMax to 5 would do it, but it instead doubles the life bar. Is there a way to do this?

 

The reason I want it at 50% is that the item is a weapon that wears out pretty quickly.

 

When it comes to Result: in recipes is there a way to give out more than 1 item. I'm not talking multiple of the same item, but 2 different items. I tired to put in 2 items, but it only recognized the first item listed. I was thinking about putting in a second Result: line. Will that work?

 

Thanx!

Link to comment
Share on other sites

both problems will involve adding some lua code to your crafting script.

 

the first question will involve modifieng the current item in creation

 

the other will be to add an item to the inventory after crafting the fist one.

this is actually not a really right form, cause you will get the recipe for item A while that crafting recipe will add also item B while that will not be seen in the crafting recipe.

Link to comment
Share on other sites

You would use this tag "ConditionLowerChanceOneIn    =    3," That way it has a one in three chance of being worn. If you need it to wear out faster use 2, using 1 makes it go down one durability notch each use. The ConditionMax is how many durability notches it has, so if you use ConditionMax 10, CLCOIN 1(the above tag), it will break after 10 zombie smacks.

 

 

Edit: For the two items in recipes, the only way I can think to do that would be to add ReplaceOnUse=SecondItem, That way when you use that item with that tag in a crafting recipe, it will give you the result in the recipe, and the second item from being replaced on use in recipe.

 

Edit2: Does that make since? Let me know if not. I tend to over-complicate things :P.

 

Edit3: If you need help making your weapons, I'll answer what I can, you can also look at my bats mods. I use tags from other weapons in them to enhance them better than a bat.

Edited by kinyoshi
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
×
×
  • Create New...