I need edited resources

blackeagle1122

Member
Member
Aug 4, 2015
26
1
8
34
Hi,
Is it possible to edit resources without multiplying it ? Like oxide, I want a woodpile to give 20 wood a hit.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Can you make a plugin for it please ? If you can do it I want to use fougerite on my server.
Try this.
It's untested, but It should work. It will give exactly the same number to the player what you set at the config area

Name: GatherChanger.py
Python:
__author__ = 'DreTaX'
__version__ = '1.0'

import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite

"""
    Config
"""

Wood = 1
Sulfur = 1
MetalOre = 1
Stone = 1
Leather = 1
Cloth = 1
Chicken = 1
AnimalFat = 1
Blood = 1

"""
    Class
"""

class GatherChanger:

    def On_PlayerGathering(self, Player, GatherEvent):
        if GatherEvent.Item == "Wood":
            GatherEvent.Quantity = Wood
        elif GatherEvent.Item == "Sulfur Ore":
            GatherEvent.Quantity = Sulfur
        elif GatherEvent.Item == "Metal Ore":
            GatherEvent.Quantity = MetalOre
        elif GatherEvent.Item == "Stones":
            GatherEvent.Quantity = Stone
        elif GatherEvent.Item == "Leather":
            GatherEvent.Quantity = Leather
        elif GatherEvent.Item == "Cloth":
            GatherEvent.Quantity = Cloth
        elif GatherEvent.Item == "Raw Chicken Breast":
            GatherEvent.Quantity = Chicken
        elif GatherEvent.Item == "Animal Fat":
            GatherEvent.Quantity = AnimalFat
        elif GatherEvent.Item == "Blood":
            GatherEvent.Quantity = Blood
 
  • Like
Reactions: chaochaoq9

blackeagle1122

Member
Member
Aug 4, 2015
26
1
8
34
Try this.
It's untested, but It should work. It will give exactly the same number to the player what you set at the config area

Name: GatherChanger.py
Python:
__author__ = 'DreTaX'
__version__ = '1.0'

import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite

"""
    Config
"""

Wood = 1
Sulfur = 1
MetalOre = 1
Stone = 1
Leather = 1
Cloth = 1
Chicken = 1
AnimalFat = 1
Blood = 1

"""
    Class
"""

class GatherChanger:

    def On_PlayerGathering(self, Player, GatherEvent):
        if GatherEvent.Item == "Wood":
            GatherEvent.Quantity = Wood
        elif GatherEvent.Item == "Sulfur Ore":
            GatherEvent.Quantity = Sulfur
        elif GatherEvent.Item == "Metal Ore":
            GatherEvent.Quantity = MetalOre
        elif GatherEvent.Item == "Stones":
            GatherEvent.Quantity = Stone
        elif GatherEvent.Item == "Leather":
            GatherEvent.Quantity = Leather
        elif GatherEvent.Item == "Cloth":
            GatherEvent.Quantity = Cloth
        elif GatherEvent.Item == "Raw Chicken Breast":
            GatherEvent.Quantity = Chicken
        elif GatherEvent.Item == "Animal Fat":
            GatherEvent.Quantity = AnimalFat
        elif GatherEvent.Item == "Blood":
            GatherEvent.Quantity = Blood
I think this will give what I assigned to variables with any item. Means if I hit with a rock it will give 5 wood and if I hit with a hatchet it will give the same. I want to change a woodpile's total amount of wood and gather rate. Like this plugin in oxide: http://oxidemod.org/plugins/gather-multiplier.974/
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Python:
    def On_ResourceSpawned(self, ResourceTarget):
        Server.Broadcast("RESOURCE SPAWNED")
@DreTaX I don't think OnResourceSpawned() does anything, It doesn't call the hook.
I even tried the ResourceSpawner plugin
No errors in console or logs