Errors? Crashes? Questions?
We have a GitHub repository, where you can open Issues if you have any problems or questions
Issues
How to install

Multiplayer Server installation

Tick Dynamic is a Minecraft Forge mod, and therefore requires a Forge server to run.
You can download the latest Forge installer here. Remember to choose the correction version according to which Minecraft version you run. Currently the latest supported version is 1.7.10.
Then you just install the server and start the server to let it do the initial setup.

Once you have a Forge server running, you just download Tick Dynamic from the download page, and put into the mods folder on your Forge server.
Then you need to restart the server, and it will create a default config for you, and place it in the "config" folder, with the name "tickdynamic.cfg".
Read the "Configuration" section beneath this for more information about how to configure the mod.


Single-player Client installation

The client installation if pretty much the same as for the server
Just download the Forge installer, run it, and then place Tick Dynamic in the 'mods' folder.

Advertisement

When you first start up a world with this mod installed, it will create a new default configuration file.
It is commented, and should be pretty easy to understand, but there are some concepts we will go into more detail on.

                                        # Configuration file

##########################################################################################################
# general
#--------------------------------------------------------------------------------------------------------#
#
##########################################################################################################

general {
    # How many ticks of data to when averaging for time balancing.
    # A higher number will make it take regular spikes into account, however will make it slower to addjust to changes.
    I:averageTicks=20

    # Debug output. Warning: Setting this to true will cause a lot of console spam.
    # Only do it if developer or someone else asks for the output!
    B:debug=false

    # The default maxSlices for a new automatically added world.
    I:defaultWorldSlicesMax=100
    B:enabled=true

    ##########################################################################################################
    # entitydefaults
    #--------------------------------------------------------------------------------------------------------#
    # The default values for new Entity groups when automatically created for new worlds.
    ##########################################################################################################

    entitydefaults {
        # The minimum number of Entities to update per tick, independent of time given.
        I:minimumObjects=100

        # The number of time slices given to the group.
        I:slicesMax=100
    }

    ##########################################################################################################
    # tileentitydefaults
    #--------------------------------------------------------------------------------------------------------#
    # The default values for new TileEntity groups when automatically created for new worlds.
    ##########################################################################################################

    tileentitydefaults {
        # The minimum number of TileEntities to update per tick, independent of time given.
        I:minimumObjects=100

        # The number of time slices given to the group.
        I:slicesMax=100
    }

}


worlds {
    # The time allotted to a tick in milliseconds. 20 Ticks per second means 50ms per tick.
    # This is the base time allotment it will use when balancing the time usage between worlds and objects.
    # You can set this to less than 50ms if you want to leave a bit of buffer time for other things, or don't want to use 100% cpu.
    I:tickTime=50

    ##########################################################################################################
    # dim-1
    #--------------------------------------------------------------------------------------------------------#
    # Nether
    ##########################################################################################################

    dim-1 {
        I:slicesMax=100

        entity {
            I:minimumObjects=100
            I:slicesMax=100
        }

        tileentity {
            I:minimumObjects=100
            I:slicesMax=100
        }

    }

    ##########################################################################################################
    # dim1
    #--------------------------------------------------------------------------------------------------------#
    # The End
    ##########################################################################################################

    dim1 {
        I:slicesMax=100

        entity {
            I:minimumObjects=100
            I:slicesMax=100
        }

        tileentity {
            I:minimumObjects=100
            I:slicesMax=100
        }

    }

    ##########################################################################################################
    # dim0
    #--------------------------------------------------------------------------------------------------------#
    # Overworld
    ##########################################################################################################

    dim0 {
        I:slicesMax=100

        entity {
            I:minimumObjects=100
            I:slicesMax=100
        }

        tileentity {
            I:minimumObjects=100
            I:slicesMax=100
        }

    }

}


                                    

The configuration is structured such that you have a main group, called 'worlds'.
Within this 'worlds' group, you have one group for each of the dimensions/worlds.
And then within each world, you have 'entity' and 'tileentity' groups.
There is always only ONE of each, and Tick Dynamic will automatically create the groups for new worlds as they are created or loaded on the server.
It's recommended that you do a first run, allowing the mod to automatically create the groups, go in to the config and adjust the settings you want, and then do the command 'tickdynamic reload' as op on the server.
In the future there will be a command to adjust the settings directly without doing a reload or editing the config.

slicesMax

One of the config options you'll see repeated over the config is 'slicesMax'.
Slices are the way you control the time allotment to each world, and within each world, to Entities and TileEntities.
Each tick the time(By default 50ms) will be distributed among all the worlds, according to how many slices they have.
If you have 3 worlds, each with 100 slices, then each world will get 100/300 = ~33% of the time.
So you can thus give the Overworld a maxSlices of 300, while giving the other two 100 each. This way the Overworld will get 60% of the time.

Of the time given to the world, this is further distributed to TileEntities and Entities according to their slices, the same way.
TileEntities and Entities are given a portion of the time first given to the world, so their slices are only relative to each other within that world.
If any group has unused time, then that time will be distributed to the remaining groups.
So even if you give 1000 slices to TileEntities and 100 to Entities, as long as as TileEntities aren't using it's full time, Entities will be able to use more than 100 slices of time.

So the formula for slices to time percentage is: (self.maxSlices/allSiblings.maxSlices)*100

Note: maxSlices = 0 has a special meaning. It means that the group's time usage is accounted for, but not limited.
Basically it can take all the time it needs, even if it goes above the parent maxTime, pushing its siblings down to minimumObjects.

minimumObjects

As the server goes more and more over the given 50ms tick time, it will reduce the number of updating Entities and TileEntites more and more.
Eventually it will get to a point where it just stops updating them, which is not always what you want.
Using minimumObjects you can set point below which it will not go, no matter how low TPS the server has.

/tickdynamic list [dimnames, time, entitiesrun, tps, maxslices, minimumentities] [page]

The list command will list all the world, and the requested data for them and the Entities & TileEntities in them.
If this list is longer than 6 rows, it will be put into multiple pages. By default it will show page one, but you can provide a page number as the last argument.

list dimnames

List the names of the dimensions and their dimension id.
Everything else in the list currently uses the dimension numbers(Like DIM0, DIM-1 etc.) so using 'list dimnames' you can get a list of the actual name bound to those numbers.
This is currently temporary, and will only list the names of dimension currently loaded and ticking.
The reason for only using DIM numbers to start with, is that the names often are so long that they cause the table to wrap around to multiple lines in chat.

list time [page]

List the average used, and average given time in milliseconds.
At the start of each tick, Tick Dynamic will take the average time used and slicesMax for each group, and redistribute the time. This command will show you this data, allowing you to see which world, and which group within that world is using the time.
This list also shows an 'World Data' column, which is the combined time used for Entities and TileEntities in that world.

One special entry here is '(Other)'.
This indicates any time used outside Entities and TileEntities, and when Tick Dynamic calculates the time distribution, it will have to remove this time from the pool.

Starting from version 0.1.3 there is also an "External" group.
This group will show the time used between Ticks, that causes the next tick to start late. You will notice this show a lot of time used if you have other things running on the same machine as the minecraft server.
If this uses a significant amount of time, it can indicate that you have something else using up a lot of CPU time.

list entitiesrun [page]

List the number of Entities/TileEntities which run on average each tick.
This gives you an overview of the number of Entities or TileEntities which run each tick, and can in combination with 'list time' give an good indication of what can be done to reduce time used in the different worlds.

list tps [page]

List the current Ticks Per Second of Entities and TileEntities in each world.
This gives you and indication of how much the specific group has been slowed down. For example, if Entities have a TPS of 10, that means only half of the Entities will update each server Tick.
Note: Some worlds may show the TPS as ',00'. This means that the world currently is not loaded and/or running.

list maxslices [page]

Essentially just lists the current slicesMax value from the configuration file.
Check out the slicesMax documentation for the config for more information.

list minimumentities [page]

Essentially just lists the current minimumObjects value from the configuration file.
Check out the minimumObjects documentation for the config for more information.

/tickdynamic tps

Print the current average server TPS

/tickdynamic value

This command is currently not implemented, but in the future it will allow you to directly change the configuration entries without having to manually edit the config file and running reload.

/tickdynamic reload

Reloads the configuration file, and applies the new configuration.

/tickdynamic enabled [yes, y, no, n]

Enabled or disabled Tick Dynamic. Note it will still in some cases gather data, but will no longer apply any limits.
Note: It does not write this change to the configuration file!

/tickdynamic help

For now it just prints the URL of this page.

Copyright © 2024 Kai Roar Stjern ( wildex999 )