The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lumberjacking log types based on the type of tree
Author Message
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #2
RE: Lumberjacking log types based on the type of tree
I like this way since a DEFLIST is easier to understand and update in this case. Posting for reference and because we each have some trees the other lacks. This isn't a complete script, just the function and DEFs for the trees.

Code:
[REGIONRESOURCE mr_tree]
// lumberjacking default
// t_tree
SKILL=0.0,70.0
AMOUNT=9,30
REAP=i_log_birch
REAPAMOUNT=1,8
REGEN=60*60*24

on=@resourcefound
obj=<argo.uid>
call f_findtree
if <def.logs.<var.tree>>
    obj.more1=<def.logs.<var.tree>>
endif

[function f_findtree]
for x 0 <eval <obj.p.statics>-1>
    if (<obj.p.statics.<local.x>.type>==t_tree)
        if (<def.logs.<obj.p.statics.<local.x>.baseid>>)
            var.tree=<obj.p.statics.<local.x>.baseid>
        endif
    endif
endfor

Code:
[defname lumberjacking_constants]

logs.i_tree_trunk=mr_tree_dead //gives dead wood (reagent)
logs.i_tree_trunk_2=mr_tree_dead
logs.i_tree_trunk_3=mr_tree_dead

logs.i_tree_cedar=mr_tree_cedar
logs.i_tree_cedar2=mr_tree_cedar

logs.i_tree_oak=mr_tree_oak
logs.i_tree_oak2=mr_tree_oak

logs.i_tree_walnut=mr_tree_walnut
logs.i_tree_walnut2=mr_tree_walnut

logs.i_tree_trunk_willow=mr_tree_willow
logs.i_tree_trunk_willow2=mr_tree_willow

logs.i_tree_cyprus=mr_tree_cyprus
logs.i_tree_cyprus2=mr_tree_cyprus
logs.i_tree_cyprus3=mr_tree_cyprus
logs.i_tree_cyprus4=mr_tree_cyprus

logs.i_tree_trunk_part_1=mr_tree_mahogany
logs.i_tree_trunk_part_2=mr_tree_mahogany
logs.i_tree_trunk_part_3=mr_tree_mahogany
logs.i_tree_trunk_part_4=mr_tree_mahogany

logs.i_tree_trunk_2_part_1=mr_tree_mahogany
logs.i_tree_trunk_2_part_2=mr_tree_mahogany
logs.i_tree_trunk_2_part_3=mr_tree_mahogany
logs.i_tree_trunk_2_part_4=mr_tree_mahogany
logs.i_tree_trunk_2_part_5=mr_tree_mahogany

logs.i_tree_trunk_3_part_1=mr_tree_mahogany
logs.i_tree_trunk_3_part_2=mr_tree_mahogany
logs.i_tree_trunk_3_part_3=mr_tree_mahogany
logs.i_tree_trunk_3_part_4=mr_tree_mahogany
logs.i_tree_trunk_3_part_5=mr_tree_mahogany

logs.i_tree_trunk_4_part_1=mr_tree_mahogany
logs.i_tree_trunk_4_part_2=mr_tree_mahogany
logs.i_tree_trunk_4_part_3=mr_tree_mahogany

logs.i_tree_yew_1=mr_tree_yew

logs.i_tree_3=mr_tree_birch
logs.i_tree_4=mr_tree_birch
logs.i_tree_5=mr_tree_birch

(Birch is just normal wood in this system BTW, I wanted a specific default the way iron is for metal and birchs are common and basic.)



Also for those wondering, these systems will still find other resources if you like.
Code:
[REGIONTYPE r_default_tree t_tree]
// All tress produce wood by default.
RESOURCES=50.0 mr_tree
RESOURCES=1.0 mr_frostwood
RESOURCES=1.0 mr_bloodwood
RESOURCES=1.0 mr_sunwood
RESOURCES=1.0 mr_heartwood
With this t_tree region def you'll occasionally get rare woods from any tree, otherwise it'll default to the species. Chaga mushrooms could go here. (Yes I know that doesn't match EA but it makes more sense than some of their harvestables, look up actual Chaga mushrooms)

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
09-27-2012 02:59 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Lumberjacking log types based on the type of tree - Anarch Cassius - 09-27-2012 02:59 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)