| RanXerox  Master
 
   
   Posts: 550
 Likes Given: 1
 Likes Received: 12 in 9 posts
 Joined: Dec 2010
 Reputation: 19
 
 
 
 ![]() 
 | 
			| Lumberjacking log types based on the type of tree 
 
				Here is an alternative lumberjacking system that returns logs based on the kind of tree you are chopping... 
First, the Region and Resource related stuff:
 
Code:
 [REGIONRESOURCE mr_tree]SKILL=1.0,80.0
 AMOUNT=9,30
 REAPAMOUNT=3,9
 REAP=i_log
 REGEN=60*60*10
 ON=@ResourceFound
 FOR <SRC.TARGP.STATICS>
 OBJ=<ARGO>
 LOCAL.TreeType=<SRC.TARGP.STATICS.<EVAL <LOCAL._FOR>-1>.DEFNAME>
 IF (<LOCAL.TreeType>==i_tree_cedar1_trunk) || (<LOCAL.TreeType>==i_tree_cedar2_trunk)
 OBJ.f_setresource mr_tree_cedar
 ELSEIF (<LOCAL.TreeType>==i_tree_oak1_trunk) || (<LOCAL.TreeType>==i_tree_oak2_trunk) || (<LOCAL.TreeType>==i_tree_oak3_trunk) || (<LOCAL.TreeType>==i_tree_oak4_trunk)
 OBJ.f_setresource mr_tree_oak
 ELSEIF (<LOCAL.TreeType>==i_tree_walnut1_trunk) || (<LOCAL.TreeType>==i_tree_walnut2_trunk)
 OBJ.f_setresource mr_tree_walnut
 ELSEIF (<LOCAL.TreeType>==i_tree_willow1_trunk) || (<LOCAL.TreeType>==i_tree_willow2_trunk) || (<LOCAL.TreeType>==i_tree_willow3_trunk)
 OBJ.f_setresource mr_tree_willow
 ELSEIF (<LOCAL.TreeType>==i_tree_cyprus1_trunk) || (<LOCAL.TreeType>==i_tree_cyprus2_trunk) || (<LOCAL.TreeType>==i_tree_cyprus3_trunk) || (<LOCAL.TreeType>==i_tree_cyprus4_trunk)
 OBJ.f_setresource mr_tree_cyprus
 ELSEIF (<LOCAL.TreeType>==i_tree_trunk_yew_1)
 OBJ.f_setresource mr_tree_yew
 ELSEIF (<LOCAL.TreeType>==i_tree_bamboo)
 OBJ.f_setresource mr_tree_bamboo
 ELSEIF (<LOCAL.TreeType>==i_tree_trunk_cherry)
 OBJ.f_setresource mr_tree_cherry
 ELSEIF (<LOCAL.TreeType>==i_tree_trunk_maple)
 OBJ.f_setresource mr_tree_maple
 ELSEIF (<LOCAL.TreeType>==i_tree1_trunk)
 OBJ.f_setresource mr_tree_regular
 ELSEIF (<LOCAL.TreeType>==i_tree2_trunk)
 OBJ.f_setresource mr_tree_regular
 ELSEIF (<LOCAL.TreeType>==i_tree3_trunk)
 OBJ.f_setresource mr_tree_regular
 ELSEIF (<LOCAL.TreeType>==i_tree4_trunk)
 OBJ.f_setresource mr_tree_regular
 ELSEIF (<LOCAL.TreeType>==i_tree5_trunk)
 OBJ.f_setresource mr_tree_regular
 ELSEIF (<LOCAL.TreeType>==i_tree6_trunk)
 OBJ.f_setresource mr_tree_regular
 ENDIF
 ENDFOR
 
 [FUNCTION f_setresource]
 FORITEMS 0
 IF (<BASEID>==i_worldgem_bit) && (<TYPE>==t_tree)
 MORE1=<ARGV[0]>
 AMOUNT={4 9}//This may not be necessary...
 RETURN 0
 ENDIF
 ENDFOR
 RETURN 1
 
 [REGIONRESOURCE mr_tree_regular]
 SKILL=80.0,100.0
 AMOUNT=4,9
 REAP=i_log
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_cedar]
 SKILL=80.0,100.0
 AMOUNT=4,9
 REAP=i_log_cedar
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_oak]
 SKILL=80.0,100.0
 AMOUNT=4,9
 REAP=i_log_oak
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_walnut]
 SKILL=70.0,95.0
 AMOUNT=4,9
 REAP=i_log_walnut
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_willow]
 SKILL=70.0,95.0
 AMOUNT=4,9
 REAP=i_log_willow
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_cyprus]
 SKILL=70.0,95.0
 AMOUNT=4,9
 REAP=i_log_cyprus
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_yew]
 SKILL=70.0,95.0
 AMOUNT=4,9
 REAP=i_log_yew
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_bamboo]
 SKILL=70.0,95.0
 AMOUNT=4,9
 REAP=i_log_bamboo
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_cherry]
 SKILL=70.0,95.0
 AMOUNT=4,9
 REAP=i_log_cherry
 REGEN=60*60*10
 
 [REGIONRESOURCE mr_tree_maple]
 SKILL=70.0,95.0
 AMOUNT=4,9
 REAP=i_log_maple
 REGEN=60*60*10
 
Now the log and board items...
 
Code:
 [DEFNAME colors_resources_wood]color_o_ash        0157
 color_o_bamboo     098
 color_o_bloodwood  04aa
 color_o_cedar      0157
 color_o_cherry     0676
 color_o_cyprus     0235
 color_o_frostwood  04ab
 color_o_heartwood  04a9
 color_o_maple      06c0
 color_o_oak        04a6
 color_o_sunwood    04ac
 color_o_walnut     0473
 color_o_willow     02e9
 color_o_yew        04a8
 
 [ITEMDEF i_log_ash]
 ID=i_log
 NAME=ash log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Ash Log
 ON=@Create
 COLOR=color_o_ash
 
 [ITEMDEF i_board_ash]
 ID=i_board
 NAME=ash board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1.0
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Ash Board
 ON=@Create
 COLOR=color_o_ash
 
 [ITEMDEF i_log_cedar]
 ID=i_log
 NAME=cedar log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Cedar Log
 ON=@Create
 COLOR=color_o_cedar
 
 [ITEMDEF i_board_cedar]
 ID=i_board
 NAME=cedar board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Cedar Board
 ON=@Create
 COLOR=color_o_cedar
 
 [ITEMDEF i_log_oak]
 ID=i_log
 NAME=oak log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Oak Log
 ON=@Create
 COLOR=color_o_oak
 
 [ITEMDEF i_board_oak]
 ID=i_board
 NAME=oak board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Oak Board
 ON=@Create
 COLOR=color_o_oak
 
 [ITEMDEF i_log_walnut]
 ID=i_log
 NAME=walnut log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Walnut Log
 ON=@Create
 COLOR=color_o_walnut
 
 [ITEMDEF i_board_walnut]
 ID=i_board
 NAME=walnut board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Walnut Board
 ON=@Create
 COLOR=color_o_walnut
 
 [ITEMDEF i_log_willow]
 ID=i_log
 NAME=willow log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Willow Log
 ON=@Create
 COLOR=color_o_willow
 
 [ITEMDEF i_board_willow]
 ID=i_board
 NAME=willow board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Willow Board
 ON=@Create
 COLOR=color_o_willow
 
 [ITEMDEF i_log_cyprus]
 ID=i_log
 NAME=cyprus log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Cyprus Log
 ON=@Create
 COLOR=color_o_cyprus
 
 [ITEMDEF i_board_cyprus]
 ID=i_board
 NAME=cyprus board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Cyprus Board
 ON=@Create
 COLOR=color_o_cyprus
 
 [ITEMDEF i_log_yew]
 ID=i_log
 NAME=yew log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Yew Log
 ON=@Create
 COLOR=color_o_yew
 
 [ITEMDEF i_board_yew]
 ID=i_board
 NAME=yew board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Yew Board
 ON=@Create
 COLOR=color_o_yew
 
 [ITEMDEF i_log_bamboo]
 ID=i_log
 NAME=bamboo
 TYPE=t_log
 VALUE=2
 WEIGHT=1.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Bamboo Log
 ON=@Create
 COLOR=color_o_bamboo
 
 [ITEMDEF i_board_bamboo]
 ID=i_board
 NAME=bamboo board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Bamboo Board
 ON=@Create
 COLOR=color_o_bamboo
 
 [ITEMDEF i_log_cherry]
 ID=i_log
 NAME=cherry log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Cherry Log
 ON=@Create
 COLOR=color_o_cherry
 
 [ITEMDEF i_board_cherry]
 ID=i_board
 NAME=cherry board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Cherry Board
 ON=@Create
 COLOR=color_o_cherry
 
 [ITEMDEF i_log_maple]
 ID=i_log
 NAME=maple log%s
 TYPE=t_log
 VALUE=2
 WEIGHT=2.0
 CATEGORY=Resources
 SUBSECTION=Wood
 DESCRIPTION=Maple Log
 ON=@Create
 COLOR=color_o_maple
 
 [ITEMDEF i_board_maple]
 ID=i_board
 NAME=maple board%s
 TYPE=t_board
 VALUE=5
 WEIGHT=1
 CATEGORY=Resources
 SUBSECTION=Boards
 DESCRIPTION=Maple Board
 ON=@Create
 COLOR=color_o_maple
 
Note: If there are problems, check the DEFNAME's for your tree trunks...
			 |  | 
	| 09-27-2012 02:43 PM |  | 
	
	| ![[+]](images/collapse_collapsed.gif) The following 1 user Likes RanXerox's post:1 user Likes RanXerox's post Feeh (06-15-2014)
 | 
	
		| Anarch Cassius  Master
 
   
   Posts: 273
 Likes Given: 19
 Likes Received: 10 in 9 posts
 Joined: Mar 2012
 Reputation: 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 |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 | 
	
		| Extreme  Grandmaster Poster
 
    
   Posts: 1,141
 Likes Given: 217
 Likes Received: 90 in 77 posts
 Joined: May 2012
 Reputation: 20
 
 SphereCommunity
 
  
 |  | 
	| 09-28-2012 05:52 AM |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 | 
	
		| Extreme  Grandmaster Poster
 
    
   Posts: 1,141
 Likes Given: 217
 Likes Received: 90 in 77 posts
 Joined: May 2012
 Reputation: 20
 
 SphereCommunity
 
  
 |  | 
	| 09-28-2012 10:29 AM |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 | 
	
		| Extreme  Grandmaster Poster
 
    
   Posts: 1,141
 Likes Given: 217
 Likes Received: 90 in 77 posts
 Joined: May 2012
 Reputation: 20
 
 SphereCommunity
 
  
 |  | 
	| 09-29-2012 03:25 AM |  | 
	
	| ![[+]](images/collapse_collapsed.gif)  
 |