Need some help with coding - Leaves, wood,bark, fruit and honey

  • Hi Red


    I am working on the Prehistoric mod for Rising World and am needing some help with coding.


    When the game starts instead of chopping down a tree, which early caveman would not have been able to do, he would have pulled leaves, wood and bark from the tree.


    With apples and lemon trees you walk up to the tree and press F to pick the apples or lemons.


    Can you let me know if it is possible to put code in place so that fruit trees in the game will produce leaves, wood and bark instead of apples, lemons and cherries.


    Is there also a way via code to have the tree have fruit or honey say 10% of the time.


    I assume the coding is done for the specific tree that you walk up to.





    Also..... when the game starts the player has an axe. Can you let me know if there is a way that I can have the player start with nothing. I want the caveman to build the first tool.

    Prehistoric Rising World - 2019
    Dinosaurs existed 65 million years ago and Man evolved 700,000 years ago.
    But what if this was not the case and Dinosaurs and Man actually existed together?

    26th April Environment Files added to page 1
    22nd May Environment Sound V2
    added to page 1

    Edited once, last by DanielBoone ().

  • empty your inventory then type setinventory in the console. This should set your spawn inventory to what you are carrying .

    I am hoping to do this without going through the console.

    Prehistoric Rising World - 2019
    Dinosaurs existed 65 million years ago and Man evolved 700,000 years ago.
    But what if this was not the case and Dinosaurs and Man actually existed together?

    26th April Environment Files added to page 1
    22nd May Environment Sound V2
    added to page 1

  • You need to have a stone axe at least to start. Without it you can't create a tool? unless your starting inventory consists of stone and sticks.


    You may be able to ray trace hits onto a tree, then use some logic to determine if the tree yields bark, leaves, etc. Then use custom object insertion to add the items to the players inventory.

  • You need to have a stone axe at least to start. Without it you can't create a tool? unless your starting inventory consists of stone and sticks.


    You may be able to ray trace hits onto a tree, then use some logic to determine if the tree yields bark, leaves, etc. Then use custom object insertion to add the items to the players inventory.


    Thanks for the reply....... I am going through a couple of ideas on how to do this without having a stone axe to start with.


    I would leave the fruit trees alone as I would want them to have figs, grapes, olives, plums, and wild berries.


    Non-Fruit trees would be used for getting the leaves and bark from...... these could just be pulled off a tree without tools. Wood would come from trees at a later stage when more advanced tools are built.


    While I have modded several other games this is the first time I have looked at using java so I need to learn how to ray trace hits, use logic in java and use custom object insertion.


    I will eventually work it out as I get a better understanding of how to do all of this.


    The trick with modding is not to start with complex jobs first but to start small.

    Prehistoric Rising World - 2019
    Dinosaurs existed 65 million years ago and Man evolved 700,000 years ago.
    But what if this was not the case and Dinosaurs and Man actually existed together?

    26th April Environment Files added to page 1
    22nd May Environment Sound V2
    added to page 1

  • The trick with modding is not to start with complex jobs first but to start small.

    Amen.


    I need to learn how to ray trace hits, use logic in java and use custom object insertion.


    https://javadoc.rising-world.n…/utils/RayCastResult.html


    https://javadoc.rising-world.n…ts/custom/CustomItem.html


    Two very good working examples :)


  • Thanks for those links...... I will have a look at them when I get back from work later today.

    Prehistoric Rising World - 2019
    Dinosaurs existed 65 million years ago and Man evolved 700,000 years ago.
    But what if this was not the case and Dinosaurs and Man actually existed together?

    26th April Environment Files added to page 1
    22nd May Environment Sound V2
    added to page 1

  • With the game am I able to see the original source code showing how to pick apples, how to make an animal move,etc?


    As a programmer I always like to be able to look at existing code to see how something works.


    With Rising World I have not been able to find that yet.

    Prehistoric Rising World - 2019
    Dinosaurs existed 65 million years ago and Man evolved 700,000 years ago.
    But what if this was not the case and Dinosaurs and Man actually existed together?

    26th April Environment Files added to page 1
    22nd May Environment Sound V2
    added to page 1

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!