1. 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

[SOLVED]Help with halls

Discussion in 'Modding Help' started by makmoud98, Aug 26, 2013.

  1. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    I wan't to make a map that I can place a hall for a specific team. for example: color code: 24, 95, 255 will make a hall for team 3.. i think it has something to do with BasePNGLoader.as
     
  2. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    I want to make that too for RP lol, right now I made it so, so the builder can build their own hall for 3k coins and 2k wood, now! If he changes to another team, your problem is fixed.
    --- Double Post Merged, Aug 30, 2013, Original Post Date: Aug 30, 2013 ---
    If you are talking about map making, not sure maybe ask inferdy.
     
  3. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    thanks for the help... im gonna try your idea
     
  4. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    In buildersinventory.as
    Code:
        BuildBlock b( 0, "hall", "$hall$", "Hall" );
            AddRequirement( b.reqs, "blob", "mat_wood", "Wood", 800 );
            AddRequirement( b.reqs, "blob", "mat_stone", "Stone", 1000 );
            AddRequirement( b.reqs, "blob", "mat_gold", "Gold", 300 );
    And you must make halls destroy-able, not sure where somewhere in the hall.as,I need to take a look as well soon, we can't have 10 indestructable halls on the map and their numbers still growing, well you can limit this by the amount of gold so, I guess it is okay.
     
  5. Inferdy

    Inferdy Arsonist

    Messages:
    246
    guy! i rly have idea!
    you can use commands to make halls on map, so make it in test mode and save your map as .kag file
    I can try to test this
    --- Double Post Merged, Aug 31, 2013, Original Post Date: Aug 31, 2013 ---
    So, it is your working plan:
    1)Making map with Red/Blue and Neutral halls.
    2)Loading this map

    3)Setting Test mode on
    4)Changing team and entering in every hall as green/yellow/pink/etc. team
    5)Saving map as .kag (not as .png)
     
  6. Tsilliev

    Tsilliev Haxor

    Messages:
    414

    So you can save it? How do you do that?
     
  7. Inferdy

    Inferdy Arsonist

    Messages:
    246
    wait
    I will answer
    --- Double Post Merged, Aug 31, 2013, Original Post Date: Aug 31, 2013 ---
    Type in console: /savemap [name] *It will be saved as .kag* (so all blobs will stay alive)
     
  8. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    We put it in the maps folder and include in the maplist?
     
  9. Inferdy

    Inferdy Arsonist

    Messages:
    246
    yep
    in map list or in mapcycle
     
  10. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Thanks.
     
  11. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    wow great idea thanks for the help
     
  12. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    It should work. Tell us what happened.
    --- Double Post Merged, Sep 9, 2013, Original Post Date: Sep 2, 2013 ---
    Nope, everything except grass dirt water and stone disappears. Halls are gone and trees are invisible. I made 5 teams, and with each one I captured a hall, so at the end 5 races have 5 different of colors halls, I saved the map got the kag file then I included it at the mapcycle and when loaded empty. ::D:
     
  13. Metaphoenix

    Metaphoenix Shark Slayer

    Messages:
    46
    Based on reading the scripts in the folder, I agree that yes, it has something to do with BasePNGLoader but you will have to make your own custom maps and if someone wanted to make maps for you, you would have to share the PNGloader you edited. Anyways, you would state the color you want your png to be.

    Code:
    const SColor color_hall(255, 211, 249, 193);
    Color is set as alpha, RGB, at least, i think its alpha for the first number but anyways, you would take the name color_hall and place it in here

    Code:
            if (pixel == color_hall)
            {
                spawnBlob( map, "hall", offset, -1 );
                offsets[autotile_offset].push_back( offset );
            }
    but instead of the -1, being neutral, you would change it into something like 2 or 3. 0 is blue and 1 is red. Those codes i took was from LoadWarPNG. I have no idea what everything else means btw :D
     
    makmoud98 likes this.
  14. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Thanks, I begin to understand how to edit already existing map and change the color of the halls, I will try that, so I will search for the png loader.
    the pngloader just aligns the blobs :D
    How can I open a map and put the halls according to the different teams or ingame capture the halls with different teams and save it that way?
    I red your post again and will try that putting the color under hall 0 1 2 3 4 and 6
    I tried and lol in the cmd it says map was never loaded
     
    Last edited: Sep 10, 2013
  15. Metaphoenix

    Metaphoenix Shark Slayer

    Messages:
    46
    Works for me, If it says that the map was never loaded, then it can't find the map off of the directory you specified. Double check that you put in the right path for the map and then check if you actually have a map named that
     
    makmoud98 likes this.
  16. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Inferdy how did you place those halls and cant you place them with different colors on your map?
    So you made a certain hall purple and another hall green or yellow? Send me your png loader ::D:
    What I did was
    const SColor color_hall(255, 211, 249, 193);
    const SColor color_hall2(128, 211, 249, 193);
    And
    Code:
    else if (pixel == color_hall)
            {
                spawnBlob( map, "hall", offset, 1 );
                offsets[autotile_offset].push_back( offset );
            }
    else if (pixel == color_hall2)
            {
                spawnBlob( map, "hall", offset, 2 );
                offsets[autotile_offset].push_back( offset );
            }
    At another thread I understood that I can put sv_test 1 and back to 0 with rcon so I have a solution but it must be run every time at the start of the game.
     
  17. Metaphoenix

    Metaphoenix Shark Slayer

    Messages:
    46
    It looks like you changed the Alpha color of things and made a second color_hall. rename your color_hall to 3 and change the Red Green Blue values (last 3 numbers), not the alpha. and remember that 0 is blue and 1 is red.
     
    makmoud98 likes this.
  18. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Okay, I need for red,blue,purple,yellow and green, i think its 0.1.2.3.4
    --- Double Post Merged, Sep 11, 2013, Original Post Date: Sep 11, 2013 ---
    So, can you give me an example? Is it like
    Code:
    else if (pixel == color_hall)
            {
                spawnBlob( map, "hall", offset, 0 );
                offsets[autotile_offset].push_back( offset );
            }
    else if (pixel == color_hall3)
            {
                spawnBlob( map, "hall", offset, 1 );
                offsets[autotile_offset].push_back( offset );
            }
    else if (pixel == color_hall4)
            {
                spawnBlob( map, "hall", offset, 2 );
                offsets[autotile_offset].push_back( offset );
            }
    else if (pixel == color_hall5)
            {
                spawnBlob( map, "hall", offset, 3 );
                offsets[autotile_offset].push_back( offset );
            }
    else if (pixel == color_hall6)
            {
                spawnBlob( map, "hall", offset, 4 );
                offsets[autotile_offset].push_back( offset );
            }
    And at top
    Code:
    const SColor color_hall(255, 211, 249, 193);
    const SColor color_hall3(255,193, 249, 211);
    const SColor color_hall4(255, 249, 211, 193);
    const SColor color_hall5(255, 193, 211, 249);
    const SColor color_hall6(255, 211, 193, 249);
     
  19. Metaphoenix

    Metaphoenix Shark Slayer

    Messages:
    46
    Yeah so then when you create a map, you would use the RGB colors that you defined at the bottom.
     
  20. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    I'll try that and write.
    --- Double Post Merged, Sep 11, 2013, Original Post Date: Sep 11, 2013 ---
    Ah how do I create a map?
    /savemap map1?
    --- Double Post Merged, Sep 11, 2013 ---
    Same map cannot load, when I start the server, so I can edit the map, but I cant.