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 Custom Colours for PNG Maps

Discussion in 'Modding [KAG]' started by jackitch, May 19, 2013.

  1. jackitch

    jackitch :(){ :|: & };: Global Moderator Donator Tester
    1. SharSharShar - [SHARK]

    Messages:
    249
    Hey everyone,

    Basically, I've created a list of colours for blocks / objects that aren't currently supported by Scripts/MapLoaders/BasePNGLoader.as. I will continue to add new colours when I figure out how to add new blocks / objects.

    Basically the objective is to create a KAG Beta PNG Encyclopedia. It will include a colour for every possible block and object, so that you can spawn anything you want.

    Please post suggestions for new items / blocks to add to the list. Any help is appreciated. I'll add any useful information to this OP so everyone can benefit from it.

    Updated October 28th, 2013

    This update adds:
    -all of the other colored team flags for multiCTF and/or RP
    -rotated wooden platforms (all directions)
    -rotated doors (wood and stone)
    -hearts

    Coming Soon:

    -specific trees (deciduous or coniferous)
    -?

    Updated September 21st, 2013

    This update adds:
    -all of the other colored team tents for RP
    -neutral CTF shops
    -neutral mines
    -burgers
    -steaks

    Updated August 9th, 2013

    The mod adds:
    -waterbombs
    -water arrows
    -bomb arrows
    -mines
    -minikegs [removed]
    -may have forgot something

    Steps to add additional map colours:

    1. Download BasePNGLoader.as
    2. Replace the above file in your KAG/Base/Scripts/MapLoaders/ directory.
    3. Make maps using one of these and spawn stuff at map start!
     

    Attached Files:

    Last edited: Oct 29, 2013
    kaizokuroof, Guitarman, JacKD and 3 others like this.
  2. Jackard

    Jackard Base Burner

    Messages:
    852
    Tried this with below modification, all it did was crash the server. Why does this not work:
    Code:
    if (sv_gamemode == "WAR" || sv_gamemode == "Sandbox")
            // RegisterFileExtensionScript( "Scripts/MapLoaders/LoadWarPNG.as", "png" );
            RegisterFileExtensionScript( "Scripts/MapLoaders/LoadTestPNG.as", "png" );

    Why did you name this two different things:
    </br>--- merged: May 19, 2013 3:48 PM ---</br>
    Turns out this doesn't work because the game is an asshole and keeps moving my files to Old:

    [​IMG]
    This needs a Mod folder or something.
     
  3. jackitch

    jackitch :(){ :|: & };: Global Moderator Donator Tester
    1. SharSharShar - [SHARK]

    Messages:
    249
    I effed up, lemme fix it and it'll work.... I have a more complicated test version for myself, and I got the filenames mixed up. I'll fix it in 5 mins

    EDIT: It should work now. I'll have to figure out a way for it to work permanently, ie Mods/ folder, but for now it works temporarily just fine. Just keep a backup and you'll be safe
     
  4. Jackard

    Jackard Base Burner

    Messages:
    852
    Seems to work. Not sure how often KAB decides to delete unrecognized files.

    [​IMG]
     
  5. jackitch

    jackitch :(){ :|: & };: Global Moderator Donator Tester
    1. SharSharShar - [SHARK]

    Messages:
    249
    Awesome! I'm working on an actual 'Mod' for the mod folder that won't get deleted on an update, but it requires use of a custom server_autostart.as file, which I'm having trouble with atm. I'll upload it as soon as I can get it to work.
     
    Froghead48 and nkChehov like this.
  6. Jackard

    Jackard Base Burner

    Messages:
    852
    I wonder, is it possible to make a neutral trap block?
     
  7. jackitch

    jackitch :(){ :|: & };: Global Moderator Donator Tester
    1. SharSharShar - [SHARK]

    Messages:
    249
    Afaik, it should be, but I never bothered because I figured it'd be pointless..

    But I think you're on to something there. If you could recode the .as file to make it have a dirt / stone / wood block sprite, you could make it an actual trap block that worked against any team (I'd be famazing for adventure/parkour maps)
     
  8. Jackard

    Jackard Base Burner

    Messages:
    852
    Yea, I was thinking, there was this really annoying Castlevania 2 dungeon with illusionary platforms... or you could use them as secret doors, even
     
  9. nkChehov

    nkChehov Ballista Bolt Thrower
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    172
    Its will be very useful if you decide this problem! :thumbs_up:
     
  10. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    Awesome!
     
  11. SirLoading

    SirLoading Bison Rider

    Messages:
    22

    Code:
    else if (pixel == color_neutral_trap_block)
    {
    spawnBlob( map, "trap_block", offset, -1, true );
    offsets[autotile_offset].push_back( offset );
    }
    I don't know if it will work but I have added other things this way some days ago and they were neutral.
    EDIT:
    You probably don't have to put this to Mods. Just create "autoupdate_ignore_custom.cfg" file and add there line:
    Code:
    BasePNGLoader.as
     
  12. Jackard

    Jackard Base Burner

    Messages:
    852
    By the way, you have the values for Red Stone Door and Blue Stone Door mixed up. Once you fix those, this works properly:

    [​IMG]
     
    Hawxx and Froghead48 like this.
  13. jackitch

    jackitch :(){ :|: & };: Global Moderator Donator Tester
    1. SharSharShar - [SHARK]

    Messages:
    249
    Updated OP with new PNG Loader
     
  14. Fernegulus

    Fernegulus Bison Rider

    Messages:
    400
    If there are some major mods evolving we could add swatches for them too...
     
    Hawxx and VanHuek like this.
  15. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    could anyone possibly make a block for a hall for each specific team.. not just a blank hall. ex: hall for team 0, 1, 2,... ect.
     
  16. jackitch

    jackitch :(){ :|: & };: Global Moderator Donator Tester
    1. SharSharShar - [SHARK]

    Messages:
    249
    OP updated.


    Changelog:

    Updated September 21st, 2013

    This update adds:
    -all of the other colored team tents for RP
    -neutral CTF shops
    -neutral mines
    -burgers
    -steaks

    Coming Soon:

    -90 degree (rotated) ladders
    -90 degree (rotated) doors
    -all angles of platforms (up down left right)
    -specific trees (deciduous or coniferous)
    --- Double Post Merged, Oct 29, 2013, Original Post Date: Sep 22, 2013 ---
    OP updated.


    Changelog:

    Updated October 28th, 2013

    This update adds:
    -all of the other colored team flags for multiCTF and/or RP
    -rotated wooden platforms (all directions)
    -rotated doors (wood and stone)
    -hearts

    Coming Soon:

    -specific trees (deciduous or coniferous)
    -?
     
    VanHuek and kaizokuroof like this.
  17. VanHuek

    VanHuek KAG Guard Tester

    Messages:
    751
    Annoying that there is no more Jackard to make the palette :( May have a go at doing it. Also have some specifics (for once) for ours too, so talk on IRC some time