1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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] Add more class

Discussion in 'Modding [KAG Classic]' started by Clemo7, Sep 3, 2013.

  1. Heyo, I need your help because i had try to add more class in my CTF server, but it doesn't really works. (I see the class on the server, but when I swap to it's like a default knight class, and much bugs to re-swap into the knight armory)
    I want to add a knight with 4 hearts in addition to the default knight class.
    That what I done:
    knight+1.cfg #knight class with 4 hearts
    Code:
    # rules for game class
    # description:
    
        inventory =
                                             
        name = Knight+1
        tool = Knight
        emblem = GUI/knight_icon.png
        allowed_at_tent = no
    
        actor_name = runner
        actor_config =
        actor_sprite_size = 32
        actor_sprite_male = Sprites/knightMale.png
        actor_sprite_female = Sprites/knightFemale.png
        actor_heads_size = 16
        actor_heads_male = Sprites/MaleHeads.png
        actor_heads_female = Sprites/FemaleHeads.png
    
        default_health = 2.0
        default_armor = 0.0
    
        stone_default = 0
        wood_default = 0
        gold_default = 0
        arrows_default = 0
        bombs_default = 0
       
        stone_warmup = 0
        wood_warmup = 0
        gold_warmup = 0
        arrows_warmup = 0
        bombs_warmup = 0  
    room.cfg
    Code:
    # Workshop config file
    # $ string
    # @ array
    
    # sprite
    
    $sprite_factory = room_sprite
    
    $sprite_texture = Entities/Rooms/Sprites/EmptyRoom.png
    s32_sprite_frame_width = 24
    s32_sprite_frame_height = 24
    $sprite_sound_death_hit =
    $sprite_sound_flesh_hit = Sounds/pick_wall?.ogg
    $sprite_sound_die = Sounds/destroy_wall.ogg
    $sprite_sound_spawn = Entities/Rooms/Sounds/ConstructShort.ogg
    $sprite_sound_gib = Entities/Rooms/Sounds/DestroyRoom.ogg
    $sprite_sound_emit =
    
        $sprite_gibs_start = *start*
    
        $gib_type = static_particle
        $gib_file = Entities/Rooms/Sprites/RoomGibs.png
        u8_gib_count = 9                    #number of gibs
        u8_gib_style = 0                    #column
        u8_frame_width = 8;
        u8_frame_height = 8;
        @u8_gib_frame = 1; 2; 3; 4; 5; 6; 7;    #row
        $gib_collide_sound = Sounds/rock_hit?.ogg
        f32_gib_mass = 2.5
        u8_gib_emit = 255                    #nothing
        f32_velocity = 12.0
        f32_offset_x = 0.0
        f32_offset_y = 0.0
    
        $sprite_gibs_end = *end*
    
    f32_blood_multiplier = 8.0
    clr_blood_color = 255; 50; 40; 30
    
      $sprite_animation_start = *start*
      # default
      $sprite_animation_default_name = default
      u16_sprite_animation_default_time = 1
      u8_sprite_animation_default_loop = 0
      @u16_sprite_animation_default_frames = 0;
      $sprite_animation_end = *end*
    # light
    f32_light_radius = 50.0
    clr_light_color = 255; 255; 240; 171
    1_light_default_on = 0
    # room
    $sprite_sound_build = Entities/Rooms/Sounds/Construct.ogg
    
    # ball
    
    $ball_factory = room_ball
    
    f32_ball_width = 24.0
    f32_ball_height = 24.0
    f32_ball_radius = 12.0
    f32_ball_max_upspeed = 0.0
    f32_ball_max_fallspeed = 0.0
    f32_ball_max_airspeed = 0.0
    f32_ball_max_groundspeed = 0.0
    f32_ball_max_actionspeed = 0.0
    f32_ball_gravity = 0.0
    f32_ball_ground_slide = 0.0
    f32_ball_wall_slide = 0.0
    f32_ball_ladder_slide = 0.0
    f32_ball_ground_bounce = 0.0
    f32_ball_wall_bounce = 0.0
    1_ball_opens_doors = 0
    1_ball_opens_bridges = 0
    f32_ball_hit_momentum = 0.0
    
    # unused
    
    $movement_factory =
    $weapon_factory =
    $brain_factory =
    $attachment_factory =
    
    # general
    
    $name =
    f32_health = 3.0
    f32 gib_health = -2.5
    $help_text = Hold $KEY7$ and\nselect workshop\nto build
    
    u8_default_room = 0
    
    # room syntax - room name; room level (0 menu - 1... upgrade); room sprite; room help text; room items/functions, item2, item3 ...; costs , , , (g gold, s stone, w wood, c coins, l level, u upgrades_from, r requires_roomname- none) ...
    @$rooms = BOMB WORKSHOP; Entities/Rooms/Sprites/BombShop.png; $KEY7$ to buy bombs; bomb; w30, s20;
             ARROW WORKSHOP; Entities/Rooms/Sprites/ArrowShop.png; $KEY7$ to make arrow; arrow; w30, s20;
             QUARTERS; Entities/Rooms/Sprites/Quarters.png; Wait inside to heal; heal; w30, s20;
             SIEGE WORKSHOP; Entities/Rooms/Sprites/SiegeShop.png; $KEY7$ to build\ncatapult or outpost; catapult, outpost; w30, s20, g50;
             TUNNEL; Entities/Rooms/Sprites/Tunnel.png; Press $KEY7$ to travel quickly; travel_right, travel_left; w50, s50, g15;
             ARCHERY RANGE; Entities/Rooms/Sprites/ArcheryRange.png; Archer $KEY7$; class 0, class 2; w30, s20;
             KNIGHT ARMORY; Entities/Rooms/Sprites/Armoury.png; Knight $KEY7$; class 1, class 3; w30, s20;
             ;
     
    # room_function syntax - function name; function actor name; function config file; function icon; function make sound; function icon frame; function icon frame size; function help text; costs , , , (g gold, s stone, w wood, c coins - none) ...
    @$room_functions = bomb; -; -; Entities/Items/Sprites/MaterialStacks.png; Entities/Rooms/Sounds/BombMake.ogg; 12; 16; Bomb costs 15 coins; c15;
                            arrow; -; -; Entities/Items/Sprites/MaterialStacks.png; Entities/Rooms/Sounds/ArrowsMake.ogg; 10; 16; Arrow cost 1 coin; c*10;
                            travel_left; -; -; GUI/MenuItems.png; Entities/Rooms/Sounds/Travel.ogg; 1; 32; Travel Left; -;
                            travel_right; -; -; GUI/MenuItems.png; Entities/Rooms/Sounds/Travel.ogg; 1; 32; Travel Right; -;
        catapult; -; -; Sprites/catapult.png; d; 0; 32; Construct a Catapult; w120, c20;
        outpost; -; -; Sprites/outpost1.png; d; 0; 32; Construct an Outpost; w120, c50;
                    heal; -; -; -; Sounds/heart.ogg; 0; 0; Healing 2 coins per 1/2 heart; c2;
                    class 3; -; Rules/CTFU/knight+1.cfg; GUI/MenuItems.png; Entities/Rooms/Sounds/SwitchKnight.ogg; 12; 32; Knight [4 hearts]; c-30;
                    class 2; -; -; GUI/MenuItems.png; Entities/Rooms/Sounds/SwitchArcher.ogg; 16; 32; Archer; -;
                    class 1; -; -; GUI/MenuItems.png; Entities/Rooms/Sounds/SwitchKnight.ogg; 12; 32; Knight; -;
                    class 0; -; -; GUI/MenuItems.png; Entities/Rooms/Sounds/SwitchBuilder.ogg; 8; 32; Builder; -;
                      ;
                 
    # - nothing
    # - in room_functions as texture = don't add to menu - collide function
    # d default build sound             
    # c*10 - buy as much as possible, max 10
    
    

    Any help is welcome!
     
    Last edited: Sep 3, 2013
  2. Harrygiel

    Harrygiel Catapult Fodder

    Messages:
    3
    After thousand of test, I m pretty sure than we can't have more than 1 ACTIVE class for all three first class type
    We can easily use more class for bot, not this is impossible for human. Only 1 solution found at the moment, use seclevs files, and allow only 1 knight type by security level.

    For example, a VIP cam have the 4 hearts knight, and can t become the other knight class, and vice-versa for a normal player.