Sign in to follow this  
Nappy

Changing starter items

Recommended Posts

When you first arrive on a server you are provided with certain starter items. Is this a simple thing to change like updating a database table or does it actually require a code change?

 

If a table can someone point me in the right direction please?

If a code change, has anyone created a mod to allow simple changing of starter items?

 

Thanks!

 

~Nappy

Share this post


Link to post
Share on other sites

I thought I read a response to this question (maybe steam forums) that said it was in the code and requires a code change or mod to make different. But I don't personally know.

Share this post


Link to post
Share on other sites

The only way to add or remove items is in the code. The db does not have the option. You can change the item's at start in the Player.class if that helps you any.

 

original code: c = createItem(277, ql);

you can do something like this if you want to make it more challenging by doing a random so the items are random.

c = createItem(277, (float) (99.0 * Math.random()));

Which will take the item 277 and pick a random flaot between 0 to 99.0 and add it to the item. This way no one knows what ql of item they get. You could end up getting a 80.364758 ql item or a 0.473945 ql item.

 

I personally have took random NPCs and done this random gen and added a ton of other weapon abilities and fight skills to there tree and added in a random armor set and weapon to them and turn them loose in the world.

You could do this to animals as well so every animal can be very unique and can present a challenge.

 

I might do a video later and explain how to do this with intelliJ. Hope the video helps.

 

 

Edited by Arkonick
Video
  • Like 2

Share this post


Link to post
Share on other sites
8 hours ago, Arkonick said:

The only way to add or remove items is in the code. The db does not have the option. You can change the item's at start in the Player.class if that helps you any.

 

original code: c = createItem(277, ql);

you can do something like this if you want to make it more challenging by doing a random so the items are random.

c = createItem(277, (float) (99.0 * Math.random()));

Which will take the item 277 and pick a random flaot between 0 to 99.0 and add it to the item. This way no one knows what ql of item they get. You could end up getting a 80.364758 ql item or a 0.473945 ql item.

 

I personally have took random NPCs and done this random gen and added a ton of other weapon abilities and fight skills to there tree and added in a random armor set and weapon to them and turn them loose in the world.

You could do this to animals as well so every animal can be very unique and can present a challenge.

 

I might do a video later and explain how to do this with intelliJ. Hope the video helps.

 

 

Thank you very much for the info! I'm wondering if this could be applied to what loot creatures carry? If not, could you provide a tutorial on that? I'm sure you have little time for such things, but it would be greatly appreciated.

Share this post


Link to post
Share on other sites
17 hours ago, Meteor_Freak said:

Thank you very much for the info! I'm wondering if this could be applied to what loot creatures carry? If not, could you provide a tutorial on that? I'm sure you have little time for such things, but it would be greatly appreciated.

I will try to make some time in a few hours to make a video on how to have animals drop new items upon butchering and some more detailed info on the code detailing it. If I have the time I'll even show how to milk a lion or shear him as well for wool, but have fun shearing the beast.

 

Edited by Arkonick
video

Share this post


Link to post
Share on other sites

That video is perfect, thanks this was something that I just needed to see done to be able to do it. This is much appreciated, and hopefully more folks can find it as I know this subject is asked often in       forums. Both of these videos should be pinned in this forum.

 

Thank you very much for your time, and effort!

 

Also milking lions, classic!

Edited by Meteor_Freak

Share this post


Link to post
Share on other sites
On 3/15/2016 at 3:34 AM, Arkonick said:

I will try to make some time in a few hours to make a video on how to have animals drop new items upon butchering and some more detailed info on the code detailing it. If I have the time I'll even show how to milk a lion or shear him as well for wool, but have fun shearing the beast.

 

I thank you for the information. I'm trying to figure out how to do a custom random list for loot, similar to the ValreiItem = 683 used with spirit eagles... and probably some other mobs. I am in the process of searching to find the actual list, but so far no dice. I'm thinking along the lines of making an item called GobblinItem = 1033 then have it grab something at random from the list for that item. Hopefully that makes sense. Then further on maybe make an item list that has a low % drop for a rare item on certain mob. Anyway if you have time, and want to point me in the right direction that would be helpful. Thank you.

Share this post


Link to post
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
Sign in to follow this