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

Roleplay Server

Discussion in 'Gamemodes' started by Tsilliev, Sep 9, 2013.

  1. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Yeah so as the title says, what about we have a very simple RP server, just different teams and/or without a custom map.

    Unfortunately I have hosting problems this is why I suggest it so others can host and I will help them do that if they are interested.
    To give you an idea here is a pic I used sv_test 1 only to include the bots.
    [​IMG]

    Same configuration 5 races and halls cannot be raided and captured like in classic RP. Download
    Roleplay Invasion Mode - Download (spawns immediately after dead, looking for a fix atm)
    Here halls can be raided and captured, players spawn at the end of the map, even without halls. Can be played right now without any modifications.


    Well, I made it so you can change to another team with a different color.

    Here are pics when I was making the mod.

    [​IMG]
    [​IMG]
    [​IMG]
    Sorry that I am not using spoilers, but they are missing, anyway.
    It is really easy to mod this actually.
    At \Base\Rules\WAR
    You will see there is team1.cfg and team2.cfg, you need to copy team2.cfg and paste it in the same folder and rename the copy to team3.cfg for a third team and if you want more teams/races add more team4.cfg,team5.cfg etc.
    Now edit team3.cfg and the others where you rename the name to the name of the team or race that you wish to name that and also the color at teamcolor.
    Code:
    # rules for game team
    # description:
            
        name = Green Team
        teamcolor = 0; 255; 0
    
    
    After you do that you need to edit gamemode.cfg and add the team3.cfg,team4.cfg at teams = team1.cfg team2.....
    Code:
    # config file for game rules
    # rules name: WAR
    # rules description:
    
        teams                              = team1.cfg; team2.cfg; team3.cfg; team4.cfg;
    
        gamemode_name                      = TTH
        gamemode_info                      = Take the Halls
    
        scripts                            = WAR.as;
                                            WAR_Interface.as;
    And this is all done without sv_test 1, like in the classic RP.

    Names of teams are displayed properly now and I will explain how .
    [​IMG]
    At TeamMenu.as which is located at \Base\Rules\CommonScripts
    You will find the void ShowTeamMenu (.....) and here is what I edited
    Code:
    void ShowTeamMenu( CRules@ this )
    {
        if (getLocalPlayer() is null) {
            return;
        }
    
        getHUD().ClearMenus(true);
    
        CGridMenu@ menu = CreateGridMenu( getDriver().getScreenCenterPos(), null, Vec2f((this.getTeamsCount() + 0.5f) * BUTTON_SIZE, BUTTON_SIZE), "Change team" );
    
        if (menu !is null)
        {
            CBitStream exitParams;
            menu.AddKeyCommand( KEY_ESCAPE, this.getCommandID("pick none"), exitParams );
            menu.SetDefaultCommand( this.getCommandID("pick none"), exitParams );
    
            string icon, name;
    
            for (int i = 0; i < this.getTeamsCount(); i++)
            {
                CBitStream params;
                params.write_u16( getLocalPlayer().getNetworkID() );
                params.write_u8(i);
    
                if (i == 0)
                {
                    icon = "$BLUE_TEAM$";
                    name = "Blue Team";
                }
                else if (i == 1)
                {
                    // spectator
                    {
                        CBitStream params;
                        params.write_u16( getLocalPlayer().getNetworkID() );
                        params.write_u8( this.getSpectatorTeamNum() );
                        CGridButton@ button2 = menu.AddButton( "$SPECTATOR$", "Spectator", this.getCommandID("pick spectator"), Vec2f(BUTTON_SIZE/2, BUTTON_SIZE), params );
                    }
                    icon = "$RED_TEAM$";
                    name = "Red Team";
                }
    
                else if (i == 2)
                {
                    icon = "$$";
                    name = "Green Team";
                }
                else if (i == 3)
                {
                    icon = "$$";
                    name = "Purple Team";
                }
                else if (i == 4)
                {
                    icon = "$$";
                    name = "Yellow Team";
                }
                else
                {
                    icon = "$TEAMGENERIC$";
                    name = "Generic";
                }
    
                CGridButton@ button =  menu.AddButton( icon, name, this.getCommandID("pick teams"), Vec2f(BUTTON_SIZE, BUTTON_SIZE), params );
            }
        }
    }
    If you want to add icons, you can see at the top
    Code:
    AddIconToken( "$BLUE_TEAM$", "GUI/TeamIcons.png", Vec2f(96, 96), 0 );
        AddIconToken( "$RED_TEAM$", "GUI/TeamIcons.png", Vec2f(96, 96), 1 );
        AddIconToken( "$TEAMGENERIC$", "GUI/TeamIcons.png", Vec2f(96, 96), 2 );
    So what you do is copy a line change TeamIcons.png to a picture that you want to put and change the number at the end, here they are 0,1 or 2, I think they are used at else if (i == 0), else if (i == 1), and at icon = "$$"; you put whatever you have written before GUI/TeamIcons.png. If you leave them empty or only $$ or anything else instead of $BLUE_TEAM$,$RED_TEAM$,$TEAMGENERIC$ question mark icon will appear as in the picture.

    If you want me to edit files and send them to you, write here or PM me.
    I hope some RP servers pop up this week ::D:

    Needs some testing but in my opinion when you run the server you dont need the red barrier so you can rename redbarrier.as to redbarrier2.as and it will not be active.

    So we have the files but we dont have a map, I am not good at map making, but it would be easy if I knew, landscape 5, halls according to the teams , team 0,1,2,4 and 6 for purple? And there you go ::D: The /savemap map231 doesnt work, when I load it blobs are invisible, like halls and trees.
     
    Last edited: Sep 12, 2013
    Asu, BlueLuigi, BC and 3 others like this.
  2. Galen

    Galen Haxor Staff Alumni Donator

    Messages:
    1,262
    Moved to appropriate section.
     
    Atheon and Tsilliev like this.
  3. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    An update about today, I made it so halls cannot be raided anymore, so the current race haves a permanent spawn at that location just like in the classic RP.
    The way to do it is to go to Base\Entities\Industry\Hall and open Hall.as
    And you need to comment line 150 which is raiding = true;
    Code:
    CBlob @b = blobsInRadius[i];
                    if (b !is this && b.hasTag("player") && !b.hasTag("dead") && !b.hasTag("migrant"))
                    {
                        bool attacker = (b.getTeamNum() != this.getTeamNum());
                        if(not_neutral && attacker)
                        {
                        //    raiding = true;
                        }
    
                        Vec2f bpos = b.getPosition();
                        if (bpos.x > pos.x - this.getWidth()/2.0f && bpos.x < pos.x + this.getWidth()/2.0f &&
                            bpos.y < pos.y + this.getHeight()/2.0f && bpos.y > pos.y - this.getHeight()/2.0f)
                        {
    Same configuration 5 races and halls cannot be raided and captured like in classic RP. Download

    Edit: At another thread, with the help of AsuMagic I understood that I can use the rcon so I can sv_test to 1, capture the halls with the needed color and then sv_test back to 0, and people will spawn normally. So you can use the mod right now with default maps.

    I will test this. But meanwhile I will search for a better solution like enable spawn even if there is no hall, but this is no classic RP its invasion RP for classic RP we either need a map with already existing spawn points for the races or you set those spawn points yourself at the beginning with sv_test by changing to other teams and capturing but you can also add halls as well and after you are finished sv_register to 1 and sv_test to 0.
    --- Double Post Merged, Sep 12, 2013, Original Post Date: Sep 10, 2013 ---
    Update
    Roleplay Invasion Mode - Download
    Here halls can be raided and captured, players spawn at the end of the map, even without halls. Can be played right now without any modifications, you spawn and you go and capture a hall, thats all if there is enemy at the edge, tough luck going around him or instead capture his hall.But! People spawn immediately after dead, not sure how to fix that yet.
     
    Last edited: Sep 12, 2013
    Atheon, MrError and Asu like this.
  4. MrError

    MrError Ballista Bolt Thrower

    Messages:
    112
    lol, i want server with this mod.
     
    Atheon likes this.
  5. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Do you know how to host? I can help.
     
    Atheon likes this.
  6. MrError

    MrError Ballista Bolt Thrower

    Messages:
    112
    Sorry, but i never host server :QQ:
     
    Atheon likes this.
  7. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Ah you ment another server, soon enough. ::D: I will try to host again with another internet provider next week.
     
    Asu, Atheon and MrError like this.
  8. MortalZappy

    MortalZappy Catapult Fodder

    Messages:
    2
    I am able to host if you are interested?
     
  9. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Oh my goodness people were crying that they get lag and so on, if you have a good host that would be great, here are the files overwrite base and host :D, but it is CTF roleplay not TTH anymore, and right now all players are spawned at the left side of the map, nirvana is working on a map, meanwhile it will be like this.

    https://www.dropbox.com/s/3x0jlh6zlbv95kx/RPC3.rar
     
    Last edited: Oct 6, 2013
    Asu and kaizokuroof like this.
  10. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Just so you're aware, the dropbox file, says the rar files is RPC3, when you unzip it though, the folder says RPC2, not sure if it's just an outdated name or you actually forgot to update it, but figured you should know :D
     
  11. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    I have even newer with bomber,stone,gold,bison,shark factories lol, I just played a moment ago, I got like idk 30 kills from crushing with falling wooden blocks? :D :D @AdrianC knows what I mean :D:D:D:D
    Anyway here is the newest version up to date: Download Put in Mods and host, if it gives any errors, then you need the loader as well.
    It would be nice if someone hosts with a good net connection, there would be no lags like atm, and more then 16 ppl for sure.
     
    Asu and kaizokuroof like this.
  12. Xicoxide

    Xicoxide Shark Slayer

    Messages:
    2
    Can someone help me im trying to get on the server but it has to download one file that i already downloaded but it keeps asking me to download the file called RPC_21
     
  13. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    Try deleting the mod from kag/mods and try to join.
     
    Asu likes this.
  14. capnbishop

    capnbishop Shipwright

    Messages:
    2
    I'm having the same problem. Deleting the mod folder(s) didn't help.
     
  15. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    hmm lets write that in the bug section :D Because I dont have a fix, sinnertie told me, that he had the same problem but joined after a while.
     
    Asu likes this.
  16. Eleos

    Eleos Builder Stabber

    Messages:
    15
    I want to host your Gamemode on my server but I don't know how do I create spawnpoint for team in my map...

    How do I do it ?

    What is the colour for the spawnpoint in my map editor ?

    Blue team : #00FFFF
    Red team : #FF0000
    Green team : ???
    Purple team : ???
     
  17. Tsilliev

    Tsilliev Haxor

    Messages:
    414
    You will find it in rpc/scrpts/maploader and use the loader as well.
     

    Attached Files:

    Asu likes this.
  18. Eleos

    Eleos Builder Stabber

    Messages:
    15
    Ok but when I modify my map.. and restart the server..... this one replace all block of my map by a air bloc XD !

    I use Gimp and Paint for modify my map
     
  19. Bint

    Bint Haxor

    Messages:
    536
    @Eleos I think Gimp is the problem, it bugs out the maps when you do so much as create a second layer and merge it or a number of other things.
     
  20. Yagger

    Yagger Kouji's bitch 5eva Staff Alumni Tester
    1. SharSharShar - [SHARK]

    Messages:
    646
    When I tried to join the first time it constantly tried to make me redownload one of the loaders, but it worked eventually.

    PS HUMAN RACE = MASTER RACE
    [​IMG]

    [​IMG]
     
    Apronymous and BlueLuigi like this.