1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Help with some mods for server

Discussion in 'Modding [KAG]' started by iskra, Feb 28, 2015.

  1. iskra

    iskra Catapult Fodder

    Messages:
    3
    I need some help...My buddy is making server and needs some help with
    some certain mods:
    - faster gathering resources (wood/stone/gold)
    - how to make more than 2 teams
    - how to make trading post/chest/teleport etc.
     
  2. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    Glad to hear someone interested in modding and hosting.

    There are a bunch of ways to accomplish this, one easy way would be to increase the amount of materials gained from hitting tiles(note this only affects stone, gold, and wood from wood blocks). You can do this by opening MaterialsFromTiles.as and editing a couple variables.
    Code:
    // snippet from MaterialsFromTiles.as
    
    // (tile) being a uint16 representing the type of tile
    if (map.isTileStone(tile))
    {
        if(map.isTileThickStone(tile))
        {
            // you can change this to give more materials by editing the last argument
            MakeMat(this, worldPoint, "mat_stone", 6 * damage);
    
            // example, MakeMat(this, worldPoint, "mat_stone", 12 * damage);
            // the above would double the amount of stone generated from thick stone
        }
        else
        {
            MakeMat( this, worldPoint, "mat_stone", 4 * damage );
        }
    }
    To change the amount of wood generated from logs you will need to open up WoodFromLogs.as and do the same.

    Let me know if you have any questions regarding the above. Once you've made your edits I will move on to the next question.
     
  3. iskra

    iskra Catapult Fodder

    Messages:
    3
    He says thanks, but has question, how can you activate mods? Do you need any program for that?
     
  4. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    Take a look at how I have Blowjob packaged and read through the installation process. It's pretty straight forward for making your own. If you're still stuck read through the instructions below.

    1. Create a folder and place it inside your Mods folder.
    2. Edit your Mods.cfg to include the name of your newly created folder.
    3. If you want to overwrite existing scripts or textures, just use the same file structure.

    Example of overwriting files

    King Arthur's Gold/Base/Entities/Characters/Scripts/RunnerHead.as
    *file you want to overwrite

    King Arthur's Gold/Mods/Blowjob/Entities/Characters/Scripts/RunnerHead.as
    *file you're replacing it with
     
  5. iskra

    iskra Catapult Fodder

    Messages:
    3
    He did all those things but still isnt running...maybe he has done something wrong? He also did what you wrote, but still doesent work.
     
  6. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    I need more information then, doesn't work. Let me know exactly what isn't working, and if possible include console logs.
     
  7. AlyooHD

    AlyooHD Catapult Fodder

    Messages:
    2
    ok.. i'm the one that's looking for help, imma show you what i've done[​IMG]
     
  8. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    Since your goal is to overwrite MaterialsFromTiles.as in base with your mod, you must use the same file structure as shown below.
    example.png
     
    blackjoker77777 likes this.
  9. blackjoker77777

    blackjoker77777 Haxor Tester
    1. Zen Laboratories

    Messages:
    441
    also remeber to include your mod name in "mods.cfg" file
    PS: the mod name should NOT contain spaces or it won't work.
    exp: The Best Mod=====>won't work
    The_Best_Mod====>will work
     
  10. AlyooHD

    AlyooHD Catapult Fodder

    Messages:
    2
    Ok thanks :D
    It works now..
    Now can i change the speed when im mining materials? because on a couple of servers you can mine stuff really quick.