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

Saverous' Modding Guide for Newbies

Discussion in 'Modding [KAG Classic]' started by Saverous, Jun 5, 2012.

?

Which Mods have you attempted from this guide?

  1. Spawning Bisons

    13.3%
  2. Making Nukes

    13.3%
  3. Get Builders in Swordfight

    8.9%
  4. Get other classes into sandbox

    11.1%
  5. New shops in Zombie Survival

    8.9%
  6. Saverous! make another guide! i've done this already!

    44.4%
  1. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Hello ladies and Gentlemen and those gentlemens pretending to be ladies and in the rear occasion, ladies pretending to be gentlemen.

    It has recently come to my attention that I noticed the flexibility of KAG's files. By Simply playing around with them, i've managed to put builder into RTDM, add bots to Sandbox, create custom sounds and implement them and more. So if your looking to stuff around and impress your friends please read this simple guide.
    Feel free to give some comments or constructive criticism, or if you would like to add something, simply post it.

    What is modding:
    Mod, stands for Modification, it is usually used in games to allow gamers to gain better experiences by changing files or such.

    Contents:
    Basic Modding Vocab.
    Basic modding
    Modding Challenge!


    A basic modder's vocab you'll find in your KAG folder.
    .CFG: config file
    .BAT: Windows Batch file, created by using notepad, you'll see a lot of these.
    .PNG: Image file, used for sprite sheets
    Sprite sheet: The Sprite sheet is usually where all movements of a "sprite" is recorded.
    GUI: Graphical User Interface, just the interface where you do stuff in.


    Basic Modding:
    The files in which you want to Mod are located in your Local Disk or C drive. In C drive, you should find the "KAG" folder, inside there is a lot of other folders which aren't as important. The main stuff is in "Base" here you will find:
    Entities
    GUI
    Maps
    Rules
    Scripts
    Sounds
    Sprites
    Stringtables
    Juxta (dll file, just leave this alone)
    It is reccommended that you open all .CFG files with Notepad as this will make it easier.

    To start off some modding, we're giong to make bombs in Swordfight singleplayer. To do this:
    Go into your "Base" folder, then into "Scripts" and "swordfight". In here you'll find the following files: archer, builder, gamemode, knight, swordfightmapcycle, team1, team 2.
    What your looking for is the "knight" folder, click on the file (remember to open this with notepad).
    You will see several lines of information. Your looking for:
    bombs_default = xxx
    bombs_warmup = xxx
    These two lines allows "xxx" bombs on knights. (xxx is really a pronumeral, you change it for you liking) To change the bomb count, simply change the "xxx" into what ever you want!
    Remember to save the file and go into KAG, click solo and go into swordfight, you'll find yourself with some bombs! Enjoy endless demolition fun!
    If you want, you can modify other traits like the health and armour stat. However, if you put the knight health to, for example, 4.0 all knights will get 4.0 hearts.

    Modding Challenge!
    After experimenting with lots of things I managed to mod the following:
    Spawning Bisons (their files are in the KAG Folder, just not officially ingame me thinks)
    Making Nukes (actuall Nukes with Kegs)
    Get builders into Swordfight
    Get other classes into Sandbox.
    Add new shops into Zombie Survival, some don't work :-(

    These are just some of the Modification i've done. So to keep a long guide short, i'm going to briefly explain how i Did each of them. If you want me to tell you in more detail on how to do each of them, just ask me.

    Spawining Bisons. Diff. xxx
    I went into the Bison files and found that the spawn, death and some other sounds were missing, so i replaced the sounds with some other sounds, then i went into the "zombie Director" file and added the Spawn Bison script.
    Making Nukes. Diff. x
    This one is easier, all i did was go into the "Keg" file in the Items folder and increased a lot of the damage and tile radius.
    Get Builders in Swordfight. Diff. xxxx
    This one may be slightly difficult. What I did was go into "Swordfight" and went into the "gamemode" from there, I found out that the game uses a set of rules from files: "team 1" and "team 2". In this, I found out that in both teams, there was only .CFG files for Knights and Archers. So I coppied the builder file from sandbox into the "swordfight" folder and went back into the team1 and 2 folders and made it load the Builder.cfg files.
    Get other classes into Sandbox. Diff. xxx
    this one is like the above one, instead of adding just the builder, you go into the sandbox folders and put knights, archers config files and make the game load that.
    Add new shops into Zombie Survival (although this may not work) Diff.xxxxx
    This may be the harderst i've attempted. Whilst going through the Zombie survival folders, i found that it loaded the shops in a particular order, so whilst comparing the scripts the computer wrote for the bombshops, arrowshops....etc, i tried to format the script into adding a custom shop. If you look in Entities, then Rooms then sprites, you will see a bunch of Shops. Some of them are not used in the Zombie Survival game mode for singleplayer. Like many pro modders, (BC), they managed to create custom shops and customs animals. If you want to see the awesome BC at work, go to his thread on modding in this section. Anway, so I managed to format the shops and make it load, however, I have yet to create any viable items to actually "buy". So far I have managed to add a "nursery shop" from the pictures and "Smithshop", however I haven't added items in that. So there it is.

    Well there it is, the basic modding guide to modding KAG, i've spent a few hours on this and I hope you guys enjoy this, I may be making an Intermediate modding guide depending on the time I have (exams coming up!). Good luck on your modding adventures!

    Saverous,
     
  2. arsenal

    arsenal Catapult Fodder

    Messages:
    36
    Cool modding thread it is really helpful
     
    Saverous likes this.
  3. Antman

    Antman Base Burner

    Messages:
    344
    Hey, do you know if it's possible to use the 'class modding' (Found in "base/rules/CTF/gamemode.CFG") in RTDM or other gamemodes?
    I tried just moving it out of the CTF gamemode file and into RTDM one but it didn't work.

    But I'm also not entirely sure if it works in CTF yet :P
     
  4. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    yup you can, Thanks to BC:

    Code:
     # class modding
    # builder
    build_speed = 7
    builder_hitspeed = 12
     
    # knight
    knight_drawtime = 1
    knight_maxthrow = 120
    knight_maxpower = 28
    knight_speed = 13
    shield_stomp_velocity = 5.25
    max_bombs = 3
     
    # archer
    build_arrow_speed = 25
    archer_dig_speed = 30
    archer_drawtime = 12
     
    archer_maxpower = 66;
    archer_nodamage_vel = 1.0
    archer_max_vel = 15.0
    archer_slow_arrow_damage = 0.5
    archer_normal_arrow_damage = 1.0
    archer_charged_arrow_damage = 1.5
     
    # knockdown
    sword_knockdown = 12
    small_sword_knockdown = 0
    arrow_knockdown = 0
    charged_arrow_knockdown = 12
     
    # misc
    arrows_buy_amount = 20
    resupply_time = 180
    # end class modding
    
     
    Oscar355 and Antman like this.
  5. Antman

    Antman Base Burner

    Messages:
    344
    Thank you heaps :D

    And this is a nice modding guide, tried and completed all your challenges though, more please?
     
  6. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    hehe, ok i will try to make more, now that wood and water is out. Stay tuned for more challenges!
     
  7. Bunnyninja

    Bunnyninja Bison Rider

    Messages:
    91
    saverous, how do you change the name of the bot???
     
  8. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Do you mean swordfight or anygame, cause in swordfight you can. Or Zombie suvival if you have premium, anyway, here's swordfight:

    Go into KAG folder, Base, Maps, then Swordfight.
    you will see something like this:
    Code:
    
    print(`Config loaded from swordfight.gm`);
    
    sleep(4.0);
    
    addBotX( 1, 0, "Henry");
    sleep(30.0);
    addBotX( 0, 0, "Henry");
    addBotX( 1, 0, "Henry");
    sleep(40.0);
    addBotX( 0, 0, "Henry");
    addBotX( 1, 0, "Henry");
    
    sleep(40.0);
    addBotX( 0, 0, "Henry");
    addBotX( 1, 0, "Henry");
    sleep(40.0);
    addBotX( 0, 1, "Lance");
    addBotX( 1, 1, "Lance");
    
    You just change the name in the "xxxxx" and when you go into swordfight, ta da!!!
    </br>--- merged: Jun 7, 2012 11:36 AM ---</br>
    FANKS!;)
     
  9. Bunnyninja

    Bunnyninja Bison Rider

    Messages:
    91
    thanx saverous, anyway if i dont understand i can always ask you at school!!!
     
  10. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    ya!
     
  11. Bunnyninja

    Bunnyninja Bison Rider

    Messages:
    91
    dont worry, i awesome so i figured it out :r_flex::B)::flex:
     
  12. Bunnyboy

    Bunnyboy Haxor

    Messages:
    599
    just because your now into all the moding... stuff. Do you know where you can find the water files. I want to make a new game type.

    If any one has played worms here they will probably be familiar with the fact that when you run out of time the water level rises. I want to try and create a game type like this where the water level slightly rises every once in a while.
     
  13. Terrytop

    Terrytop Catapult Fodder

    Messages:
    3
    Hey, I have a question... have you ever been told your "hacking" because of modding? People do that to me all the time, and it really pisses me off :(
    Anyway, I'm curious, how do you spawn bison? :yes:
     
  14. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    There is a difference between modding to hacking, if your hacking, your doing it to help yourself to gain an unfair advantage over others, when your modding, you affect all aspects of the game. Modding changes the game's attributes for everyone on a server.

    How to spawn Bison: its quite easy, there is something in Zombie Suvival which spawns all the zombies, this guy is called "zombie Director" you can't see him or kill him, its just a passive guy. In his file, there are:
    Code:
    @$_entitys = Entities/Actors/Zombie.cfg, 2;
    Entities/Actors/Skeleton.cfg, 1;
    Entities/Actors/Wraith.cfg, 15;
    Entities/Actors/ZombieKnight.cfg, 40;
    Entities/Actors/Greg.cfg, 26;
    
    I just added another line to spawn Bisons:
    Code:
    Entities/Actors/Bison.cfg 1;
    
    What i've just done it make it spawn Bisons.
    </br>--- merged: Jun 7, 2012 9:05 PM ---</br>
    After looking at the new build, i found this new line in some gamemodes.

    Code:
    water_levelchange_time = 0    # X > 0 raise water level every X secs ; 0 - no raising ; X < 0 lower water level every X secs
        water_suddendeath = no    # start raising water level on unit counter depleted   
    [CODE]
    I'm guessing that this sets the water level. In the first line, if you read the #, you cant change the water level every few seconds. If your looking to create a new gamemode, you can start from scratch and type in all the scripts or base it off another gamemode and change some settings. Anway good luck!
     
  15. Bunnyboy

    Bunnyboy Haxor

    Messages:
    599
    where exactly is it? I can't find it anywhere.
     
  16. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Its in KAG-Base-Rules then in Full CTF theres an example of one.

    off to school, show you there
     
  17. YEAH_NAH

    YEAH_NAH Shipwright

    Messages:
    84
    Hey, nice tutorial saverous.
    Was just wondering if maybe you could do a tunnels tutorial?:)
     
  18. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Thanks!
    Guide:
    In KAG-Base-Entities-Rooms and go into Zombie_room. In here you will see some stuff, scroll down and you will see something like this:

    Code:
     #TUNNEL; Entities/Rooms/Sprites/Tunnel.png; Press $KEY7$ to travel quickly; travel_right, travel_left; s50; 
    This code was probably meant to be implemented later on in updates. However, I just removed the "#" to make it work. Now when you go into Zombie Survival, tunnels should work. You may have to make the tunnel function so that you can travel left or right. For me, the function to travel left and right was already there so i didn't have to change anything.

    If you want to get more shops into Sandbox or Swordfight, you just copy the script and add it into other Rooms such as the Sandbox Room.

    Hoped this helped.
     
    Rayne and YEAH_NAH like this.
  19. YEAH_NAH

    YEAH_NAH Shipwright

    Messages:
    84
    Its really that simple? :huh?:
    Thanks man, I couldn't figure this one out. :)
     
    Saverous likes this.
  20. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Your welcome:-)