I'm not sure if it was on here or reddit or facepunch forum but I had a discussion with someone about how the legacy stacks promoted exploration and player contact, essentially "forcing" you to leave the general area of your base in order to you know, play the game, instead of just farming wood 100' from your base.
So I had this idea where trees could have variable loot rates and amounts to replicate what we had in legacy, all while keeping the trees idea from Experimental.
I'd like others input on this.. Here are some ideas I have so far:
1. Keep a list of all trees and keep track of their age, increasing the yield as they age.
2. Have a random element to it.. Some trees might give a bit more, some a bit less... perhaps even on each hit.
3. Tie base values to tree types. There are about 20 tree models (didn't look just guestimating) and each of them could have a different base yield.
4. I don't know if the game does that, but progressively replace smaller trees with bigger ones as they age so players can identify them ("oh! big tree I need to go farm this it's gonna be good loot!")
5. Have different hardness based on type, climate and age. Each tree would affect tool condition in a slightly different way. Bigger/harder/better yield trees would break your tools faster than a smaller tree.
[DOUBLEPOST=1435786969,1435682617][/DOUBLEPOST]So I started work on this to see what could be done. I've hit a problem. Trees of the same type have different sizes (scales).
Now this is an opportunity more than a problem, means I could take each type of tree and have them scale in size with age (server might be doing that already?). I found where the scale is and managed to change it, but it has no effect on the client side.
Anyone know how I can make these changes actually show up client-side?
Rethinking Tree gathering, need your input (brainstorm!)
Discussion in 'Rust Development' started by Deicide666ra, Jul 1, 2015.
-
Calytic Community Admin Community Mod
You might try
If that does not work - spawn new tree in same location and delete old tree.Code:entity.SendNetworkUpdate();
-
Tried that and it doesn't seem to have any effect.
That's plan B, but I haven't figured how to create a new tree. It's a rather complex structure and I have a feeling just instancing a new instance and setting all values is not the right way to do it. Anybody have any idea how to create a new tree? -
Calytic Community Admin Community Mod
The build mod has the ability to spawn trees, review the code here:
http://oxidemod.org/plugins/build.715/ -
Thanks, I can now delete and replace a tree but I'm back to square one on the scale... Seems I can't change the scale of the new tree either. Whatever I set it just resets back to the original value UNLESS I only affect the Z component which doesn't affect scale at all, it just changes the location of the tree downwards a little bit...
My current test code is triggered when I try and gather stuff from a tree.. It deletes the tree and places a new instance of the same prefab in the same location... so basically each time I hit the tree, it sinks into the ground a wee bit (well, it's copy does).
I've read the unity doc and a lot of forum posts and I can't figure out what I'm doing wrong.. -
Calytic Community Admin Community Mod
I don't think you are doing anything wrong. Rust simply doesn't support what you are trying to do.
You might consider looking at all the existing tree models and finding the appropriate models to simulate growing and shrinking trees.
IE. replace the tree with the smaller or larger version of the same (or similar) tree
Obviously you'll be hard limited to the existing models, but it is plausible that more trees will become available as the landscape becomes more diverse. -
Yeah just playing on the tree models was my idea until I saw that the same tree model can largely vary in size.
It makes no sense that it would not be supported. Obviously the trees are generated by the server AND the server has a value for their scale (i can read this and see that the values make sense) so it must be possible to generate different tree sizes. Even the rock nodes have different sizes now...
It could be that the scale is a factor of the entity's age but I can't find any code to back that up, the tree entity is pretty straightforward and doesn't seem to have an age.
