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

Adding new sprites

Discussion in 'Game modes' started by Darkeris, Mar 4, 2012.

  1. Darkeris

    Darkeris Catapult Fodder

    Messages:
    10
    Hello. I just saw [!] clan server got new sprites - how ? I tried to create my own ones, uploaded them to server but workshop is still invisible.
     
  2. Patrox

    Patrox Builder Stabber

    Messages:
    24
    What program have you used?
     
  3. BlueLuigi

    BlueLuigi :^) Forum Moderator Donator Tester

    Messages:
    3,620
    Hi, these are not new, they are files that are in the game already, I believe the game still uses a whitelist for files that you can use, so basically you can only reference files already in the game. All I did was basically enable shops that were previously disabled.

    This should help if you know what you're doing, it's my current files for some of the things, sorry but kinda too... much to upload it all right now, maybe at a later date, very tired and heading to bed.

    Basically for lanterns I copied the Lantern.cfg and changed the lighting it's Alpha Red Green Blue channels.
    Then you just edit the script as so, here's an example of mine:
    # 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

    # unused

    $movement_factory =
    $weapon_factory =
    $brain_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; Press $KEY7$ to buy bombs; bomb, upgrade DEMOLITION WORKSHOP; w30, s50;
    DEMOLITION WORKSHOP; Entities/Rooms/Sprites/DemoShop.png; Press $KEY7$ to buy explosives; bomb, keg; uBOMB WORKSHOP;
    QUARTERS; Entities/Rooms/Sprites/Quarters.png; Heal up nigga.; heal; w50;
    ARROW WORKSHOP; Entities/Rooms/Sprites/ArrowShop.png; Press $KEY7$ to make arrow; arrow; w50, s30;
    SIEGE WORKSHOP; Entities/Rooms/Sprites/SiegeShop.png; Press $KEY7$ to build catapult; catapult; w30, s50, g30 ;
    MECHANICS WORKSHOP; Entities/Rooms/Sprites/MechanicShop.png; Press $KEY7$ to make lantern; lantern, bluelantern, greenlantern, redlantern, faggotlantern; w50, s30 ;
    SHOP; Entities/Rooms/Sprites/Library.png; Buy wood or Stone; buywood, buystone; c10;
    #TUNNEL; Entities/Rooms/Sprites/Tunnel.png; Press $KEY7$ to travel quickly; travel_right, travel_left; s50;
    #MASONRY WORKSHOP; Entities/Rooms/Sprites/MasonryShop.png; Press $KEY7$ to make\na boulder; boulder; w50;
    ARCHERY RANGE; Entities/Rooms/Sprites/ArcheryRange.png; Archer, press $KEY7$; class 0, class 2; w30;
    KNIGHT ARMORY; Entities/Rooms/Sprites/Armoury.png; Knight, press $KEY7$; class 0, class 1; w30;
    ;

    # 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 20 coins; c20;
    arrow; -; -; Entities/Items/Sprites/MaterialStacks.png; Entities/Rooms/Sounds/ArrowsMake.ogg; 10; 16; Arrow cost 1 coin; c*10;
    catapult; -; -; Sprites/catapult.png; d; 0; 32; Wreck shit dawg.; w120, c20;
    #outpost; -; -; Sprites/outpost1.png; d; 0; 32; Construct an Outpost; w120, g60;
    heal; -; -; -; Sounds/heart.ogg; 0; 0; Healing; -;
    keg; keg; Entities/Items/Keg.cfg; Entities/Items/Sprites/Keg.png; Entities/Rooms/Sounds/BombMake.ogg; 0; 16; Buy me to demolish castles!; w10, c50;
    #boulder; boulder; Entities/Items/Boulder.cfg; Entities/Items/Sprites/Boulder.png; d; 0; 16; Make me to crush your foes!; s50;
    #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; -;
    #tree_seed; -; -; GUI/MenuItems.png; d; 17; 32; Collect tree seeds; c10;
    #grain_seed; -; -; GUI/MenuItems.png; d; 17; 32; Collect grain seeds; c10;
    lantern; genericitem; Entities/Items/Lantern.cfg; Entities/Items/Sprites/Lantern.png; Entities/Rooms/Sounds/BombMake.ogg; 0; 8; See in the dark; c5, w5;
    bluelantern; genericitem; Entities/Items/BlueLantern.cfg; Entities/Items/Sprites/Lantern.png; Entities/Rooms/Sounds/BombMake.ogg; 0; 8; Blue Light (like Green for Europeans).; c5, w5;
    greenlantern; genericitem; Entities/Items/GreenLantern.cfg; Entities/Items/Sprites/Lantern.png; Entities/Rooms/Sounds/BombMake.ogg; 0; 8; Green Light.; c5, w5;
    redlantern; genericitem; Entities/Items/RedLantern.cfg; Entities/Items/Sprites/Lantern.png; Entities/Rooms/Sounds/BombMake.ogg; 0; 8; Red Light.; c5, w5;
    faggotlantern; genericitem; Entities/Items/FaggotLantern.cfg; Entities/Items/Sprites/Lantern.png; Entities/Rooms/Sounds/BombMake.ogg; 0; 8; Vanguarde Likes This; c5, w5;
    buywood; -; -; Entities/Items/Sprites/MaterialStacks.png; Entities/Rooms/Sounds/ArrowsMake.ogg; 5; 16; Buy Wood; w-20, c10;
    buystone; -; -; Entities/Items/Sprites/MaterialStacks.png; Entities/Rooms/Sounds/ArrowsMake.ogg; 2; 16; Buy Stone; s-20, c10;
    upgrade DEMOLITION WORKSHOP; -; -; Entities/Rooms/Sprites/DemoShop.png; d; 0; 24; Upgrade to DEMOLITION WORKSHOP; g30;
    class 1; -; -; GUI/MenuItems.png; Entities/Rooms/Sounds/SwitchArcher.ogg; 16; 32; Archer; -;
    class 2; -; -; 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
    # d default build sound

    # LAntern config file
    # $ string
    # @ array

    # sprite

    $sprite_factory = light_sprite

    $sprite_texture = Entities/Items/Sprites/Lantern.png
    s32_sprite_frame_width = 8
    s32_sprite_frame_height = 8
    $sprite_sound_death_hit =
    $sprite_sound_flesh_hit =
    $sprite_sound_die =
    $sprite_sound_spawn = Sounds/lightup.ogg
    $sprite_sound_gib = Sounds/hit_wood.ogg
    $sprite_sound_emit =

    $sprite_gibs_start = *start*

    #fire in here later...

    $sprite_gibs_end = *end*

    f32_blood_multiplier = 3.0
    clr_blood_color = 255; 255; 245; 0

    $sprite_animation_start = *start*

    # fire
    $sprite_animation_fire_name = fire
    u16_sprite_animation_fire_time = 3
    u8_sprite_animation_fire_loop = 1
    @u16_sprite_animation_fire_frames = 0; 1; 2;

    $sprite_animation_end = *end*

    f32_light_radius = 72.0
    clr_light_color = 255; 0; 0; 255 # To change color, it's ARGB.
    1_light_default_on = 1

    # ball

    $ball_factory = generic_ball

    f32_ball_width = 8.0
    f32_ball_height = 8.0
    f32_ball_radius = 4.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

    $movement_factory =
    $weapon_factory =
    $brain_factory =

    # general

    $name = lantern
    f32_health = 0.75
    f32 gib_health = 0.0
     
    Noburu likes this.