Sign in to follow this  
Jerone0601

(WIP) Template for modding

Recommended Posts

Some of the community was asking for examples of modded items. This is a WIP and not an actual mod that should be used. This release gives examples on how to create custom Armor, Weapons, and furniture. It also provides examples on how to make existing tools/weapons craft able with other materials. There is no jar or property file, only source code. Just giving some players trying to learn an easy example to build from. If anyone wants to add things to it please do a pull request in GIT and I will merge in any changes. Custom wagons were requested, I did not provide those yet because of the way I have them implemented is not easy to follow for someone starting out in coding. I am looking at another more simple method and then I will release that. I also plan on adding in some creature templates in the next version.  

 

Again, this is example code for anyone to use to build there own mods. Nothing special here just examples with a decent amount of comments. I will slowly add to the master branch of the code with new examples. I will consider any requests. Only examples, not full mods, sorry cannot support full mod creation and support at this time. 

 

Some of the code was authored by Behemoth for a custom mod my server runs. Just giving credit where it is due. 

 

https://github.com/jerone0601/TemplateMod/releases/tag/V0.1

Edited by Jerone0601
  • Like 3

Share this post


Link to post
Share on other sites

Thank you very much Jerone =)

I believe you forget the link to the github ^^

 

Eject

Share this post


Link to post
Share on other sites

Woops, that I did.https://github.com/jerone0601/TemplateMod/releases/tag/V0.1 

 

Also put it in the main post. 

 

I tried adding comments on as many things as I could think of people might have questions about but if you are wondering what a certain line does feel free to ask. Once I find time between work and school I will try and do a simple youtube tutorial on how to get things setup and go over some of the basic code that is used in the mods. I tried using the modlauncher features as much as possible so it is easier to read then some code you might find. Example is itemtypes, once you get the hang of it you might just do the itemtypes with the shorts instead of adding each item type like we did in the example. None of the items I have setup in the example is setup for a property file. Its not hard to add these variables in but I rarely do it since I usually only make items that I want and don't release, so no need for variables. If someone wants to add these again feel free to give examples on setting up things like that as well. This is for the community to be able to grow the amount of people who can add things into the game. 

 

You do not have to push anything back to me, there is no license for the code, do whatever you like with it and get creative. 

Edited by Jerone0601
  • Like 2

Share this post


Link to post
Share on other sites

Thanks for taking the time to put this together. I am always up for seeing different code styles. Always learning something new. ?

  • Like 1

Share this post


Link to post
Share on other sites

I cant figure out how to import the source code. I make file new-->project from existing source. Here i jump to your template folder and click finish.

Now i just have 3 xml files in the project :/

 

Can anyone explain me (step by step for the first time) how to import correctly please?

 

Eject

 

ps. i am using intelliJ

 

 

Edited by Eject

Share this post


Link to post
Share on other sites

@Jerone0601Could you give an example how to reaload a properties file while server is running? with menu entry and function?

That would be awesome. Maybe sometime i am able to add the reload function to a handfull of mods they should not have fix values (like bountys in bountymod) and that i need for short events.

 

Eject

 

add:

My idea would be a menu in the ebony wand like:

  • Eventmanager
    • Bounty
      • Start double Bounty event
      • Stop Bounty event
    • Crops
      • Start more crops from fields
      • Stop crops event

 

If i explain now with the bounty mod and this feature, i think its possible to add 2 new entrys in the properties file with 2 messages, one for the beginning and one for the event ending.

 

start=The bounty event has started, you get now the double bounty from creatures

stop=The bounty event is stopped now

 

With the start and stop entry, you just load always the same properties file, but show the depending text as message in the event window. Before the event is ending, i just edit the properties file to the old values and upload it to the server before i use the stop entry.

Edited by Eject

Share this post


Link to post
Share on other sites
On 10.3.2018 at 7:06 AM, Eject said:

I cant figure out how to import the source code. I make file new-->project from existing source. Here i jump to your template folder and click finish.

Now i just have 3 xml files in the project :/

 

Can anyone explain me (step by step for the first time) how to import correctly please?

 

Eject

 

ps. i am using intelliJ

 

 

This problem is solved. Thanks to @bdew for this wonderful help in the modding discord, a perfect and understanding help :)

Edited by Eject

Share this post


Link to post
Share on other sites

Every time I click the link, I immediately get an error screen with a unicorn head. It says it's taking too long to load, but it happens instantly.

(working fine now)

 

 

Edited by Batta

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