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] crates

Discussion in 'Modding [KAG Classic]' started by Chaoticredux, Apr 30, 2013.

  1. Chaoticredux

    Chaoticredux Shopkeep Stealer

    Messages:
    84
    Anyone know how I can add crates to the mason shop? They are coded into the shop correctly , but the default crate.cfg crashes the game and throws an exception when you try and use the shop.
     
  2. Inferdy

    Inferdy Arsonist

    Messages:
    246
    I'll try to help you now:

    1. Change:
    To:
    2. Next step will be adding new line at down of the @$room_functions =
    You also can change some scripts of crate:
    I) cost: change c10 to smth another (g gold, s stone, w wood, c coins - none)
    II) sound of making: d to folder, where sound standing is (d - default) (starting from folder in Base, like this: Entities/Rooms/Sounds/BombMake.ogg)
    </br>--- merged: May 2, 2013 1:38 PM ---</br>
    I think this page can help you more: https://forum.kag2d.com/threads/how...-boulders-lanterns-zombies-etc-per-map.10477/
     
    Chaoticredux likes this.
  3. Chaoticredux

    Chaoticredux Shopkeep Stealer

    Messages:
    84
    thanks , but no luck still , still results in a crash. I still think the problem lies in the crate.cfg and not the room.cfg
     
  4. Inferdy

    Inferdy Arsonist

    Messages:
    246
    If you wanna test it,
    Copy (ctrl+c) and paste (ctrl+v) this in console (home key in game):
    [server need to be GOLD!] [on standard map this crate will spawn in skyes on blue base]
    [if you wanna to change coordinates change 8: 1st to (blocks from left)x8, 2nd to (blocks from top)x8
    IF GAME WILL CRUSH: SCRIPTS WITH CRATE ARE WRONG!
    </br>--- merged: May 2, 2013 5:03 PM ---</br>
    GUY! SORRY!
    MY SCRIPTS WAS WRONG!
    I TESTED SOME FEATHURES!
    SORRY FOR USELESS HELP!
    Change something:
    it:
    to:
     
  5. Chaoticredux

    Chaoticredux Shopkeep Stealer

    Messages:
    84
    Ok like I said before the crate.cfg is broken ( which is a script )

    Code:
    # Treasure Chest config file
    # $ string
    # @ array
     
    # sprite
     
    $sprite_factory = chest_sprite
     
    $sprite_texture = Entities/Items/Sprites/Crate.png
    s32_sprite_frame_width = 13
    s32_sprite_frame_height = 12
    $sprite_sound_death_hit =
    $sprite_sound_flesh_hit = Sounds/hit_wood.ogg
    $sprite_sound_die =
    $sprite_sound_spawn =
    $sprite_sound_gib = Sounds/destroy_ladder.ogg
    $sprite_sound_emit =
     
        $sprite_gibs_start = *start*
     
        $gib_type = static_particle
        $gib_file = Entities/Rooms/Sprites/RoomGibs.png
        u8_gib_count = 5                    #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 =
        f32_gib_mass = 2.5
        u8_gib_emit = 255                    #nothing
        f32_velocity = 4.0
        f32_offset_x = 0.0
        f32_offset_y = 0.0
       
        $sprite_gibs_end = *end*
       
    f32_blood_multiplier = 3.0
    clr_blood_color = 255; 155; 95; 0
     
      $sprite_animation_start = *start*
     
      # closed
      $sprite_animation_closed_name = close
      u16_sprite_animation_closed_time = 3
      u8_sprite_animation_closed_loop = 0
      @u16_sprite_animation_closed_frames = 3; 2; 1; 0;
     
      # open
      $sprite_animation_closed_name = open
      u16_sprite_animation_closed_time = 4
      u8_sprite_animation_closed_loop = 0
      @u16_sprite_animation_closed_frames = 1; 2; 3;
     
      $sprite_animation_end = *end*
     
    #light
    f32_light_radius = 28.0 
    clr_light_color = 255; 205; 160; 0 
    1_light_default_on = 0
    #treasurechest
    $sprite_sound_open = Entities/Items/Sounds/ChestOpen.ogg
    $sprite_sound_close = Entities/Items/Sounds/ChestClose.ogg
     
      # probability; actor factory; actor config;
    @$secrets = 9; zombie; Entities/Actors/Skeleton.cfg;
                13; zombie; Entities/Actors/Zombie.cfg;
                5; genericitem; Entities/Items/Lantern.cfg;
                9; keg; Entities/Items/Keg.cfg;
     
    # ball
     
    $ball_factory = block_collider
     
    f32_ball_width = 13.0
    f32_ball_height = 12.0
    f32_ball_radius = 6.0
    f32_ball_max_upspeed = 5.0
    f32_ball_max_fallspeed = 8.0
    f32_ball_max_airspeed = 6.0
    f32_ball_max_groundspeed = 0.7
    f32_ball_max_actionspeed = 1.0
    f32_ball_gravity = 0.4
    f32_ball_ground_slide = 0.5
    f32_ball_wall_slide = 0.92
    f32_ball_ladder_slide = 0.5
    f32_ball_ground_bounce = 0.2
    f32_ball_wall_bounce = 0.2
    1_ball_opens_doors = 0
    1_ball_opens_bridges = 0
    f32_ball_hit_momentum = 0.1
     
    $movement_factory = block_test_movement
    f32_movement_airacc = 0.1
    f32_movement_groundacc = 0.05
    f32_movement_actionacc = 0.01
    f32_movement_ladderacc = 0.5
    f32_movement_jumpacc1 = 0.1
    f32_movement_jumpacc2 = 0.15
    f32_movement_jumpactiondec = 0.69
    f32_movement_groundslide = 0.5
    u16_movement_jump2start = 3
     
    $weapon_factory =
    $brain_factory =
    $attachment_factory =
     
    # general
     
    $name = door
    f32_health = 2.0
    f32 gib_health = 20
    
     
  6. Inferdy

    Inferdy Arsonist

    Messages:
    246
    Sorry I am retyped. F****** crashs of sistems
    >:(
     
    Chaoticredux likes this.
  7. Chaoticredux

    Chaoticredux Shopkeep Stealer

    Messages:
    84
    ok thanks for the help , its working now :):thumbs_up:
     
  8. Inferdy

    Inferdy Arsonist

    Messages:
    246
    how did you tested?
    single zombies?
    ---
    you are welcome :)
     
  9. Chaoticredux

    Chaoticredux Shopkeep Stealer

    Messages:
    84
    i use sandbox +
     
  10. Inferdy

    Inferdy Arsonist

    Messages:
    246
  11. Chaoticredux

    Chaoticredux Shopkeep Stealer

    Messages:
    84
    ahh ok , and about the color messages thing , afaik its not possible yet to change the color of the messages. i believe we have 4 hardcoded colors , team 1/2 , server , and spec . maybe the new update will allow you to change it