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

A Kinda more better guide for kinda better modders.

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

  1. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Well hello again!
    This guide is for slightly more better modders than newbies. Since there isn't much of a "ranking" in modding society, i'm just going to write a more complex guide on more complex operations. After a few weeks of theory and modding, I've found out that if you mod any further than this guide, your going to start hacking the game. There isn't much left to mod after the previous guide but anyway, here goes. (i haven't much time lately to test these theories so it would be appreciated if you could try them out)

    Contents:
    Whats new
    Why Saverous is da best Complex operations on map configuration
    *theory* Playing as Zombie knight
    A quick explanation on how to put in texture packs
    *theory* GUI editing
    More Theory Challenges!

    Whats new?
    In the new update, build 415, water and wood (structures) was released, this provided KAG modders more hacking opportunities (yay!). However, water and wood structures were restricted to Premium Players. This means that you cannot put water into Singleplayer Sword fight or Sandbox. You can put water in Zombies but its not recommended because water does not affect zombies. If you interested anyway heres the code:(found in FullCTF)
    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  
    The first line is how many secs for every change in water going upwards.
    the second line is how many seconds for it to lower.
    the last one is the option to change the water into a mass murder, if on yes, anyone who hits the water, as the name suggests, dies instantly.

    Complex operations on map config.
    I'm going to show you how to configure map generators. First off, go into the "map" folder and you'll see a lot of "GM" and "CFG" files. There will be a file called "zombie Fortress", if you want to, you can add bots into Zombie fortress, just copy this line:
    Code:
    sleep(4.0);
     
    addBotX( 1, 0, "Neah Neah Neah");
    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");
     
            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");
    [CODE]
     
     
    Make sure that the teams are 0, in this case just change the first ( x,x, "xxxxx");
    "x" to 0. You wouldn't want zombies getting the upperhand! What you've just added is bots into the game, they don't fight each other cause their on the same team, the script
    [CODE]Sleep(xx.x);
    is just about when the computer adds another bot. If you, say put 30.0, it will assume and input a bot after 30 seconds.

    More config: Go into any of the "generator" files and you'll see a whole bunch of variables. This part is kinda easy, what ever you want your map to be, just change the lines. However, to actually play on it, you have to load it. For example , if you want a specific gamemode in Sandbox, you go find the file in "maps". In this case, it would be the "sandbox.gm" file. Go into it and you'll something like:
    Code:
    LoadRules("Rules/Sandbox/gamemode.cfg");
    LoadMap( "Maps/generator_ctf_mountain.cfg" ); 
    The Load map one is the most important, change the second line into whatever .CFG file you've just modified. Now it will load the map. In some cases, the Mapcycle is already in the gamemode file. In that case, just go into the mapcycle file and change it like above.

    *theory* playing as Zombie knight
    I haven't really tried this one out yet, but if it worked, it would be awesome. After playing around with the knight.cfg files, I found out that their movements is shown by a sprite sheet. I changed that sprite sheet into a Zombie Knight one but it wouldn't work. For simple reasons, the sprite sheet for the knight had tons more "movements" compared to the Zombie Knight. Because the Zombie Knight was a "bot" it only played specific and generated movements. Compared to knights, which are controlled by us, the zombie knight sprite sheet simply didn't have enough pictures to display all the actions humans would commit. So I thought, what if we could make a new sprite sheet in the exactly same format, but with Zombie Knight pictures! I'm guessing this would be quite similar to making texture packs but if we could change the "powerslash" of a knight to the "whip" of the Zombie Knight, it would be a great achievement. If you want more about this topic, just ask, i'll try to answer

    A quick explanation on installing texture packs
    When you see all those texture packs and think: WOW! I wan't to install it, but I don't want to ruin my KAG game.
    SUCK IT UP!!!!!! Modding is about taking risks to find new functions! Anyway, texture packs don't ruin the game, they change how the game looks. To simply install a texture pack, most of them will be in "sprite sheets" so right click on every single sprite sheet and save it. Then go into the textures you've just downloaded and put them in you "GUI" folder, next load it. (figure how to load it yourself, your good enough and i've explained loading enough).

    *theory* GUI editing.
    Similar to texture packs, after having a quick look on the GUI folders, I found out that numbers decide the color of the GUI panels. First off, there are three numbers, those three are mixed to make a color. What I think is that if you could edit those colours, then you can change the GUI looks! I've already tried experimenting with these colors by changing the "team" colors. By randomizing those numbers, you get a totally different color!

    MODDING CHALLENGES!!!!
    Well here we are again. Most of these challenges will be theory.

    CHALLENGES:
    1. I want to make Greg less destructive. I don't want him to pick me up and drop me. (Completed by BC on :13/06/2012)
    2. I want to run KAG without the launcher
    Trick question!
    Completed by Imawesome on: 16/06/2012!
    3. I want to view my chat logs from all my games
    Trick question!
    Completed by Imawesome on 17/06/2012!
    4. I want to create a new room!
    Start from scratch, don't use their rooms
    5. I want my face to be an emblem!
    Theory one, i've haven't really tried this one but if it works, :yes::thumbs_up:

    Well there it is, another installment of my guides. I hope you enjoyed this one cause I most likely won't be making another one for a long time. Feel free to post your ideas or questions, I will try to answer them to the best of my ability.
    Saverous out!
     
    acridstone, Specta, BC and 1 other person like this.
  2. CoD

    CoD Haxor

    Messages:
    481
    Another nice guide Sav, good work ;)
     
    Saverous likes this.
  3. YEAH_NAH

    YEAH_NAH Shipwright

    Messages:
    84
    May I ask where these numbers are? I'm interesting in this :p
     
  4. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    well so far:
    blue is: 29; 133; 171
    Red is: 183; 51; 51
     
  5. YEAH_NAH

    YEAH_NAH Shipwright

    Messages:
    84
    I mean which file is the GUI colour options are..
     
  6. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    oh sorry, The GUI file is in the map folder, called GUI. In there there will be colors for the panels in the game.
     
  7. Antman

    Antman Base Burner

    Messages:
    344
    Saverous likes this.
  8. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
  9. Kouji

    Kouji Cold, Uncaring, Sadistic, Evil and Cruel Meanie Administrator Global Moderator Forum Moderator Tester
    1. MOLEing Over Large Estates - [MOLE]
    2. REKINS OF SEAS: Super Crew of Ultimate Havoking 2: Return of King of KAG: Chapter 420blazeit - REKIN

    Messages:
    2,910
    goodyman8 likes this.
  10. BC

    BC Bison Rider

    Messages:
    70
    You could replace most of the Greg code with Skeleton code then increase the bounce and lower the gravity. It won't fly like a normal Greg, it will attack people much like a skeleton would.

    Here is my Greg.cfg for BC Zombie CTF:
    Code:
    $sprite_factory = zombie_sprite
     
    $sprite_texture = Entities/Actors/Sprites/Greg.png
    s32_sprite_frame_width = 32
    s32_sprite_frame_height = 32
    $sprite_sound_death_hit = Sounds/sword_kill_peasant.ogg
    $sprite_sound_flesh_hit = Entities/Actors/Sounds/ZombieHit.ogg
    $sprite_sound_die = Entities/Actors/Sounds/GregRoar.ogg
    $sprite_sound_spawn = Entities/Actors/Sounds/GregCry.ogg
    $sprite_sound_gib = Sounds/splat.ogg
    $sprite_sound_emit =
     
        $sprite_gibs_start = *start*
     
        #head or ribcage
        $gib_type = static_particle
        $gib_file = Entities/Actors/Sprites/ZombieGibs.png
        u8_gib_count = 1 
        u8_gib_style = 0 
        u8_frame_width = 8;
        u8_frame_height = 8;
        @u8_gib_frame = 0; 1;
        $gib_collide_sound = Sounds/bone_fall?.ogg
        f32_gib_mass = 1.5
        u8_gib_emit = 255
        f32_velocity = 8.0
        f32_offset_x = 0.0
        f32_offset_y = -5.0
     
        $gib_type = predefined
        $gib_style = bone
        u8_gib_count = 1                    #number of gibs
        @u8_gib_frame = 1; 2; 3;
        f32_velocity = 5.0
        f32_offset_x = 0.0
        f32_offset_y = 0.0
     
        $gib_type = predefined
        $gib_style = bone
        u8_gib_count = 5
        @u8_gib_frame = 4; 5; 6; 7;
        f32_velocity = 10.0
        f32_offset_x = 0.0
        f32_offset_y = 0.0
     
        $sprite_gibs_end = *end*
     
    f32_blood_multiplier = 8.0
    clr_blood_color = 255; 200; 0; 0
     
      $sprite_animation_start = *start*
     
      # stand
      $sprite_animation_stand_name = stand
      u16_sprite_animation_stand_time = 4
      u8_sprite_animation_stand_loop = 1
      @u16_sprite_animation_stand_frames = 0; 0; 0; 0; 0; 0; 0; 4;
     
      # walk
      $sprite_animation_walk_name = walk
      u16_sprite_animation_walk_time = 5
      u8_sprite_animation_walk_loop = 1
      @u16_sprite_animation_walk_frames = 0; 1; 2; 3;
     
      # attack
      $sprite_animation_attack_name = attack
      u16_sprite_animation_attack_time = 2
      u8_sprite_animation_attack_loop = 1
      @u16_sprite_animation_attack_frames = 4; 4; 4; 4; 5; 5; 6; 7;
     
      # dead - should always gib
      $sprite_animation_dead_name = dead
      u16_sprite_animation_dead_time = 4
      u8_sprite_animation_dead_loop = 0
      @u16_sprite_animation_dead_frames = 9; 9;
     
      # revive
      $sprite_animation_revive_name = revive
      u16_sprite_animation_revive_time = 4
      u8_sprite_animation_revive_loop = 0
      @u16_sprite_animation_revive_frames = 9; 9;
     
      # climb
      $sprite_animation_climb_name = climb
      u16_sprite_animation_climb_time = 4
      u8_sprite_animation_climb_loop = 1
      @u16_sprite_animation_climb_frames = 8; 9; 10; 11;
     
      $sprite_animation_end = *end*
     
    u16_attack_hit_frame = 6
    $sprite_sound_attack =
    $sprite_sound_spot = Entities/Actors/Sounds/SkeletonSayDuh.ogg
    $sprite_bloodsquirt_file =
    $sprite_bloodsmall_file =
     
     
     
    # ball
     
    $ball_factory = zombie_ball
     
    f32_ball_width = 16.0
    f32_ball_height = 16.0
    f32_ball_radius = 6.0
    f32_ball_max_upspeed = 4.0
    f32_ball_max_fallspeed = 6.0
    f32_ball_max_airspeed = 10.0
    f32_ball_max_groundspeed = 1.2
    f32_ball_max_actionspeed = 1.0
    f32_ball_gravity = 0.2
    f32_ball_ground_slide = 0.75
    f32_ball_wall_slide = 1.95
    f32_ball_ladder_slide = 0.21
    f32_ball_ground_bounce = 3.0
    f32_ball_wall_bounce = 0.0
    1_ball_opens_doors = 1
    1_ball_opens_bridges = 1
    f32_ball_hit_momentum = 0.1
    # zombie
    1_ball_climb_walls = 1
    1_ball_climb_ceiling = 0
    1_ball_collides_with_team = 0
     
    # movement
     
    $movement_factory = zombie_movement
     
    f32_movement_airacc = 0.1
    f32_movement_groundacc = 0.5
    f32_movement_actionacc = 0.01
    f32_movement_ladderacc = 0.5
    f32_movement_jumpacc1 = 0.95
    f32_movement_jumpacc2 = 0.35
    f32_movement_jumpactiondec = 0.69
    f32_movement_groundslide = 0.5
    u16_movement_jump2start = 3
     
    # weapon
     
    $weapon_factory = zombie_bite
     
    f32_attack_power = 0.6                # hearts
    f32_attack_radius = 1.26              # percentage of actor radius
    u8_hitter_type = 10
    @u8_destructible_blocks =
     
    # 0 - destroy always; 1 - destroy when stuck; 2 - destroy when angry
    u8_destruction_style = 0
    u8_destruction_power = 1                 
     
    # brain
     
    $brain_factory = zombie_brain
     
    u8_visible_distance_tiles = 205
    u8_attack_init_distance_tiles = 200
    u16_stuck_tolerance = 1000          # the lower he value the faster it acknowledges being stuck; 30 = second
    u8_path_search_style = 0
    #zombie
    u8_anger_tolerance = 5
     
    $attachment_factory =
     
    # general
     
    $name = skeleton
    f32_health = 2.0
    f32 gib_health = 0.0
    f32 heal_amount = 0.2
    f32_stun_health = -10.0
     
    Ghozt, Saverous and BeasterDenBeast like this.
  11. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    well thats one challenge down!
     
  12. ImAwesome

    ImAwesome Haxor

    Messages:
    496
    To run kag without the launcher:
    Go to ur kag folder,and click "nolauncher",
    and there u go,playin kag with no launcher!
     
  13. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Hehe you got the jist of it! nice
     
  14. ImAwesome

    ImAwesome Haxor

    Messages:
    496
    View ur chat logs from ur games:
    >Whereever u installed kag to\KAG\Logs
    And there u gope,click on a chat file!
     
    Saverous likes this.
  15. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    thats two from you! i should really make the trick one's harder....
     
  16. YEAH_NAH

    YEAH_NAH Shipwright

    Messages:
    84
    Please do :p
     
    Saverous likes this.
  17. TheWids

    TheWids Haxor

    Messages:
    327
    Is it possible to have a server where u spawn as archer and u can't switch to any other class. You can become a knight only if u go to an armoury. And if you try to switch back your option is to become an archer. So u can't become a builder at all, unless u go to an archer range. At archer ranges u can become a builder or archer. Is that possible?
     
  18. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Yes you can, you just take away the "knight".cfg file from the "team1" or Team 2 file. It is also possible to customize the classes, if you have premium, go into the zombiefortress folders and look at the armoury or archery range files. They say somethng on Class 0, class 1, and Class 2. These define the classes, you should have a look yourself and figure it out. This guid is for budding modders
     
  19. TheWids

    TheWids Haxor

    Messages:
    327
    Okay thanks, I didn't want to make a new post and I thought you would be qualified to answer. I have an idea brewing and I needn't to know something :]
     
  20. Saverous

    Saverous Shopkeep Stealer

    Messages:
    418
    Ok thats fine, ask anything and i'll try to answer to the best of my ability.