Chopping Wood Fix v0.1

Discussion in 'Sahrani' started by Torndeco, Feb 9, 2013.

  1. Torndeco

    Torndeco Valued Member!

    Joined:
    Oct 30, 2012
    Messages:
    286
    Likes Received:
    32
    Its pretty much the chopping wood fix from tavianna.com, just altered the strings for the trees used in sara map...

    Basicly instead of dayz standard chop wood check floor surface = forest...
    The fix checks all objects within 30 metres + if they match the string for tress.
    If it find 3 matchs, u get some firewood...

    Download file attached file +
    The usual entry in your init.sqf is needed aswell
    Code:
    player_chopWood =            compile preprocessFileLineNumbers "player_chopWood.sqf";
    Servers IE #10 + IE #11 have the fix as usual if u want to try it out.
     

    Attached Files:

  2. beowolfschaefer

    beowolfschaefer Administrator Staff Member

    Joined:
    Oct 19, 2012
    Messages:
    209
    Likes Received:
    23
    I was playing on IE10 and couldn't chop wood anywhere.
     
  3. Torndeco

    Torndeco Valued Member!

    Joined:
    Oct 30, 2012
    Messages:
    286
    Likes Received:
    32
    Just add the chop fix @ last restart like 30 mins ago
    Before that it was broken for like 12 hours on the server :p

    edit:- If u found an area with 3 or more tress that u can't harvest give me a shout. Did a quick test & looks good
     
  4. beowolfschaefer

    beowolfschaefer Administrator Staff Member

    Joined:
    Oct 19, 2012
    Messages:
    209
    Likes Received:
    23
    ok, yeah seems to be working now. Thanks!
     
  5. Jaimbo

    Jaimbo Member

    Joined:
    Oct 28, 2012
    Messages:
    78
    Likes Received:
    17
    Anyone else tried this? I seem to have broken chopping wood on my server?
     
  6. Torndeco

    Torndeco Valued Member!

    Joined:
    Oct 30, 2012
    Messages:
    286
    Likes Received:
    32
    Works fine

    Also there is debug info in the file i linked i.e
    If u look @ clients rpt logs appdata/local/arma oa/rpt log u will see
    a bunch of xxxxxxx.p3d or something similar each time u try to chop wood...

    It is basicly listing all the objects within 30 meters of player, when u try to chopwood.
    It will also print out Tree Found + next line = Tree (when it matchs the string to a model)

    -------------------
    -------------------

    Note if u are using on a different map u will need to alter the strings it searchs for...
    Since different maps may use different models for trees.....

    U should also check for errors in your rpt logs incase u have a typo in your init.sqf

    -------------------
    -------------------


    What is the ip / port to your server + i hop on & have a look @ mission file to see what is wrong
     
  7. Jaimbo

    Jaimbo Member

    Joined:
    Oct 28, 2012
    Messages:
    78
    Likes Received:
    17
    IP and port are 151.236.42.70:2412
     
  8. Torndeco

    Torndeco Valued Member!

    Joined:
    Oct 30, 2012
    Messages:
    286
    Likes Received:
    32
    The fix above is only for sahrani....
    Different maps may use different tree models

    To make it work on cherno u will need to find the forest / trees...
    Find some trees not near any buildings to make your life easier..
    Try to chop wood + look @ client's rpt logs

    Look up the listed models +
    Do some google searching +
    Figure out which models = trees +
    Alter the chopwood to search for the string for the tree models.

    player_chopWood.sqf
    Its on line 12
    i.e for sahrani i have it look for " str_" + " str " that way it detects all the trees...
    For tavi u just look for " t_" to detect the trees, i have no clue about cherno map + don't have 1.7.5.1 downloaded atm.
     
  9. Jaimbo

    Jaimbo Member

    Joined:
    Oct 28, 2012
    Messages:
    78
    Likes Received:
    17
  10. Jaimbo

    Jaimbo Member

    Joined:
    Oct 28, 2012
    Messages:
    78
    Likes Received:
    17
    Ok anyway, as an update, these are the tree files for chernarus :p
    If you could explain how to stick em in there I'd be very grateful!
    Code:
    ca\plants2\tree\t_acer2s.p3d
    ca\plants2\tree\t_alnus2s.p3d
    ca\plants2\tree\t_betula1f.p3d
    ca\plants2\tree\t_betula2f.p3d
    ca\plants2\tree\t_betula2s.p3d
    ca\plants2\tree\t_betula2w.p3d
    ca\plants2\tree\t_carpinus2s.p3d
    ca\plants2\tree\t_fagus2f.p3d
    ca\plants2\tree\t_fagus2s.p3d
    ca\plants2\tree\t_fagus2w.p3d
    ca\plants2\tree\t_fraxinus2s.p3d
    ca\plants2\tree\t_fraxinus2w.p3d
    ca\plants2\tree\t_larix3s.p3d
    ca\plants2\tree\t_malus1s.p3d
    ca\plants2\tree\t_picea1s.p3d
    ca\plants2\tree\t_picea2s.p3d
    ca\plants2\tree\t_picea3f.p3d
    ca\plants2\tree\t_pinusn1s.p3d
    ca\plants2\tree\t_pinusn2s.p3d
    ca\plants2\tree\t_pinuss2f.p3d
    ca\plants2\tree\t_populus3s.p3d
    ca\plants2\tree\t_pyrus2s.p3d
    ca\plants2\tree\t_quercus2f.p3d
    ca\plants2\tree\t_quercus3s.p3d
    ca\plants2\tree\t_salix2s.p3d
    ca\plants2\tree\t_sorbus2s.p3d
    ca\plants2\tree\t_stub_picea.p3d
     
  11. Torndeco

    Torndeco Valued Member!

    Joined:
    Oct 30, 2012
    Messages:
    286
    Likes Received:
    32
    Use the player_chopWood.sqf from tavi.com version.. (Attached file)
    That will do the trick for u

    All Hicks work...

    edit:U just need 3 trees within 30 metres of u for it to work
     

    Attached Files:

  12. Jaimbo

    Jaimbo Member

    Joined:
    Oct 28, 2012
    Messages:
    78
    Likes Received:
    17
    Awesome, will try that out, thanks :D
     
  13. Jaimbo

    Jaimbo Member

    Joined:
    Oct 28, 2012
    Messages:
    78
    Likes Received:
    17
    Hmm still doesn't work :/
     
  14. Kalti

    Kalti New Member

    Joined:
    Feb 17, 2013
    Messages:
    8
    Likes Received:
    0
    Thanks for sharing.

    Now, I still need to find out the trees used but where exactly in the init.sqf file do I put the above code?
     
  15. m1lkm8n

    m1lkm8n Member

    Joined:
    Jan 18, 2013
    Messages:
    94
    Likes Received:
    7
    if my tree filenames start with W do I just change the _x to W?
     
  16. Heavy

    Heavy Member

    Joined:
    Jul 9, 2013
    Messages:
    82
    Likes Received:
    1
    Torndeco,

    Worked flawless on my Tavi. Props to you given on my site. Keep it up!
     
  17. Will695

    Will695 Member

    Joined:
    Mar 31, 2013
    Messages:
    88
    Likes Received:
    2
    Does this need to be whitelisted in _dayzactions in an antihack?
    and would it be s_player_chopWood ?

    EDIT
    It's ok working now
     
  18. termy

    termy Member

    Joined:
    Aug 4, 2013
    Messages:
    78
    Likes Received:
    3
    Torndeco said: ↑
    ...
    The usual entry in your init.sqf is needed aswell
    Code:
    player_chopWood = compile preprocessFileLineNumbers "player_chopWood.sqf";
    ...​
    Thanks for sharing.

    Now, I still need to find out the trees used but where exactly in the init.sqf file do I put the above code?

    Anyone know where the above line needs to go in the init.sqf ?
     
  19. Nonov Urbizniz

    Nonov Urbizniz OpenDayZ Rockstar! Staff Member

    Joined:
    Jan 20, 2013
    Messages:
    798
    Likes Received:
    166
    This fix is completely irrelevant to the current release, I would highly recommend not messing with the wood chopping..



    We have a defined array that lists the trees that can be chopped... it's missing a few, but allows for chopping wood almost always if you are looking at a tree.


    I might polish it off and make it 100percent but I doubt it at this point.

    I would not use this fix though if I were you.
     
  20. Seven

    Seven Moderator Staff Member

    Joined:
    Dec 16, 2012
    Messages:
    277
    Likes Received:
    86
    If there is trees missing I blame M1lkm8n. My code was full proof :)
     

Share This Page