1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you have a problem and need help, create a new thread with a title that briefly describes the problem.
    Do not use titles like 'Help!' or 'I have a problem!'
    Dismiss Notice
  3. 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

Room Function?!

Discussion in 'General Help' started by YoungBL, Dec 15, 2012.

  1. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    I know this is not really a serious question but... What is the Room Function txt for BANK?! :huh?:
     
  2. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    Depends on what you want it to do.

    You could make it an upgradeable shop to buy stuff resources like this:
    Code:
    # 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 =
    SHOP; Entities/Rooms/Sprites/Bank.png; Buy Wood and Stone, yo, straight up.; buystone, buywood, buygold, upgrade CHEAP SHOP; w30, s30;
    CHEAP SHOP; Entities/Rooms/Sprites/Bank.png; Buy Wood, Stone, and Gold; buystone2, buywood2, buygold2, upgrade BEST SHOP; uSHOP;
    BEST SHOP; Entities/Rooms/Sprites/Bank.png; Buy Wood, Stone, and Gold; buystone3, buywood3, buygold3; uCHEAP SHOP;
     
    ;
     
    # 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 =
    buystone; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 0; 16; Buy Stone; s-5, c10;
    buywood; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 3; 16; Buy Wood; w-5, c10;
    buygold; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 6; 16; Buy Gold; g-5, c10;
    buystone2; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 1; 16; Buy Stone; s-10, c10;
    buywood2; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 4; 16; Buy Wood; w-10, c10;
    buygold2; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 7; 16; Buy Gold; g-10, c10;
    buystone3; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 2; 16; Buy Stone; s-20, c10;
    buywood3; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 5; 16; Buy Wood; w-20, c10;
    buygold3; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 8; 16; Buy Gold; g-20, c10;
    upgrade CHEAP SHOP; -;-;Entities/Rooms/Sprites/Bank.png; d; 0; 24; Upgrade for better exchange rate; g10, c60;
    upgrade BEST SHOP; -;-;Entities/Rooms/Sprites/Bank.png; d; 0; 24; Upgrade for even better exchange rate; g30, c120;
    ;
    You can make it a place to sell gold like this:
    Code:
    # 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 = GOLD STORAGE; Entities/Rooms/Sprites/Bank.png; Sell Gold; sellgold; g10;
    ;
     
    # 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 = sellgold; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 15; 16; Sell Gold; g20, c-5;
    ;
    There are a million other things you can do with it, just configure it yourself :)

    Read the wiki on workshops: https://wiki.kag2d.com/wiki/Workshop_Modding
     
  3. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    Thanks! :) ill ask more room and stuff here. maybe later.
    </br>--- merged: Dec 15, 2012 3:36 AM ---</br>
    How are you suppose to know the icon frame number?!
     
  4. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
  5. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    How do you break stone blocks in sandbox faster like in zombies? I speed the builders buildspeed and hitspeed. But it says its hacking!?
     
  6. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
  7. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    Thanks :)
    </br>--- merged: Dec 18, 2012 12:24 AM ---</br>
    Whats this? I dont get this!? "d; 15; 16;"?
     
  8. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    read the wiki on MAKE_SOUND_PATH and ICON_FRAME. I dont really know why the sound is d but I guess that's some default sound.
     
  9. YoungBL

    YoungBL Reigning Supreme Donator

    Messages:
    81
    I really dont get it... :huh?::argh:
     
  10. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    # 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 = sellgold; -; -; Entities/Items/Sprites/MaterialStacks.png; d; 15; 16; Sell Gold; g20, c-5;
    ;
    so
    function name = sellgold
    function actor name = nothing
    function config file = nothing
    function icon = Entities/Items/Sprites/MaterialStacks.png
    function make sound = d
    function icon frame = 15
    function icon frame size = 16
    function help text = Sell Gold
    costs = g20, c-5

    function icon frame: open Entities/Items/Sprites/MaterialStacks.png, just pick the icon you want to show, and count what icon that is.
    function icon frame size: "is the size, in pixels, of the icon frame for the sprite displayed in the item selection wheel. Icon sizes are always the same width and height, so you only need to enter one number here. To calculate the icon frame size, find out how wide the image size is in pixels and divide that number by the number of sprites on a row. For MaterialStacks.png, the width is 48 pixels and there are 3 sprites per row. 48 / 3 = 16, therefore the icon frame size is 16.?