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

Can't load mods

Discussion in 'Modding Help' started by FranticIch, May 7, 2013.

  1. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    I've made a new gamemode.
    Nothing changed yet, but it's now called 'RP'.
    As the wiki said, I put the RP folder (a copy of TDM) into:
    Code:
    Mods/Roleplay/Rules/RP
    Then I opened "mods.cfg" and put
    Code:
    # Add mods (directory names) from /Mods directory to be used by this game
    # use line breaks between mods eg.
    # SuperNintendo
    # MyModXXX
    # BestModEvr
    Roleplay
    And in "autoconfig.cfg" I set the gamemode "RP".
    If I start the server, I get following error:
    Code:
    [17:56:53] Config file not found 'Rules/RP/gamemode.cfg'
    [17:56:53] Config file not found 'Rules/RP/mapcycle.cfg'
    [17:56:53] Failed to load map cycle file Rules/RP/mapcycle.cfg
    [17:56:54] File not found 
    What did I do wrong?
     
  2. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,914
    Is there a mapcycle and a gamemode.cfg in the map kag/base/rule/rp
    if no,
    [​IMG]
     
  3. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    It is now looking at /Base/Rules/RP/gamemode.cfg
     
  4. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    I know it is, but we are not supposed to put anything else than maps into /Base and the wiki says: https://wiki.kag2d.com/wiki/Creating_a_Mod
    If I put gamemodes into /Base they will be moved into /old on an update...
     
  5. Mazey

    Mazey Haxor Global Moderator Forum Moderator Staff Alumni Donator Official Server Admin

    Messages:
    1,914
    what did you fill in at sv_gamemode. leave it empty
     
  6. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    ok..? I will try.
    </br>--- merged: May 7, 2013 12:37 PM ---</br>
    Code:
    [14:36:23] Config file not found 'Rules//gamemode.cfg'
    [14:36:23] Config file not found 'Rules//mapcycle.cfg'
    [14:36:23] Failed to load map cycle file Rules//mapcycle.cfg
    [14:36:23] File not found
    
     
  7. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    How about renaming anything to RP
     
  8. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    You mean the "Rolplay" part? I already tryed that.
    I also tryed to do just "/mods/RP/<gammodestuff>"
     
  9. What you need to do:

    • In Mods/RP/gamemode.cfg, make sure "gamemode_name" is set to RP
    • Make sure you have a Mods/RP/mapcycle.cfg
    • Make sure you have the team1.cfg/team2.cfg files in your RP directory.
    • Set sv_gamemode = RP
    And that *should* work. If not, look at the latest console log in the Logs/ directory for debugging info.
     
  10. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    I've made sure that everyting is correct, but it still does not work.
    I've tryed to put the mod in:
    Code:
    /Mods/Roleplay/Rules/RP/<gamemodestuff>
    and
    Code:
    /Mods/RP/<gamemodestuff>
    But nothing worked... same error as before :huh?:
    Edit: And I enabled it correctly
     
  11. Anything in Logs? You should get stuff there.

    Also, it would help if you'd post the gamemode.cfg file.
     
  12. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Code:
    # config file for game rules
    # rules name: TDM
    # rules description:
     
        teams                              = team1.cfg; team2.cfg; team3.cfg; team4.cfg;
     
        gamemode_name                      = RP
        gamemode_info                      = Roleplay
     
        scripts                            = TDM.as;
                                            TDM_Interface.as;
                                            TimeToEnd.as;
                                            RestartAfterShortPostGame.as;
                                            RequestSpawnOnDeath.as;
                                            ChatCommands.as;
                                            Editor.as;
                                            TeamMenuJustSpectator.as;
                                            KillMessages.as;
                                            FanfareOnWin.as;
                                            SetCameraOnPlayer.as;
                                            DefaultScoreboard.as;
     
        daycycle_speed                    = 12            # 1 day = X minutes; / 0 no cycle
        daycycle_start                    = 0.3        # 0.0 midnight; 0.5 - midday; 1.0 midnight
     
        minimum_players_inteam            = 0
     
        autoassign_teams                  = no #team allocation is smart in this gamemode
     
        auto_bots                          = no
     
        playerrespawn_seconds              = 5.0
        nearspawn_multiplier              = 0.0
        switch_teams_onrestart            = no  # doesn't work yet
     
        death_points                      = 0
        kill_points                        = 10
        selfkill_points                    = -25
     
        attackdamage_modifier              = 0.5
        friendlydamage_modifier            = 0.0
     
    # map resources
        mapresource_thickstone            = 4
        mapresource_stone                  = 2
        mapresource_tree                  = 6
        mapresource_arrow                  = 1
        mapresource_gold                  = 2
    # end map resources
     
        restartmap_onlastplayer_disconnect = no
        mirrormap                          = no
     
        coins_death_drop_percentage        = 30
        coins_damage_enemy                = 5
        coins_build_percentage            = 10
        coins_bomb_cost                    = 20
        coins_arrows_cost                  = 1
        coins_heal_cost                    = 2
        coins_unit_cost                    = 50
     
        room_config                        =
     
        waiting_for_respawn_message        = "Wait to spawn on your team-mates...";
     
        support_factor                    = 24
        support_added_vertical            = 1
        support_cost_castle                = 4
        support_cost_wood                  = 3
     
        map_fire_update_ticks              = 7
    



    [19:43:06] Config file not found '../Security/ignorelist.cfg'
    [19:43:06] Loading ignorelist from Base/../Security/ignorelist.cfg
    [19:43:06] Loading ignorelist failed - file missing or corrupt. A blank ignorelist file will be generated for you.
    [19:43:06] Loading mod: RP
    [19:43:06] Creating video device...
    [19:43:06] Checking driver support...
    [19:43:06] Initializing new video device...
    [19:43:06] Irrlicht Engine version 1.8.0-alpha
    [19:43:06] Precaching files...
    [19:43:06] ...Precaching files.
    [19:43:06] Creating world from file ''
    [19:43:06] Initializing Game Script
    [19:43:06] Loading rules ./../Mods/RP//gamemode.cfg
    [19:43:06] Loading game rules from ./../Mods/RP//gamemode.cfg...
    [19:43:06] Loaded team 0 'Vikings'
    [19:43:06] Loaded team 1 'Barbarian'
    [19:43:06] Loaded team 2 'Mercenarys'
    [19:43:06] Loaded team 3 'Angels'
    [19:43:06] Loading ../Mods/RP/Scripts/TDM.as
    [19:43:06] Script: Compiling void TDMSpawns::DoSpawnPlayer(PlayerInfo@)
    [19:43:06] Script: Signed/Unsigned mismatch
    [19:43:06] [line 94 char 37] if (player.getTeamNum() != p_info.team)
    [19:43:06] in file '../Mods/RP/Scripts/TDM.as':
    [19:43:06] Script: Compiling void RulesCore::ChangePlayerTeam(CPlayer@, int)
    [19:43:06] Script: Signed/Unsigned mismatch
    [19:43:06] [line 158 char 20] TDMTeamInfo@ team = cast<TDMTeamInfo@>(TDM_core.teams[info.team]);
    [19:43:06] in file '../Mods/RP/Scripts/TDM.as':

    [LOADING STUFF]
    [19:43:09] Script: Compiling bool isInventoryAccessible(CBlob@, CBlob@)
    [19:43:09] Script: Signed/Unsigned mismatch
    [19:43:09] [line 116 char 21]for (uint i = 0; i <this.getInventory().getItemsCount(); i++)
    [19:43:09] in file 'Entities/Items/Crate/Crate.as':
    [LOADING STUFF]
    [19:43:12] Loaded team 0 'Vikings'
    [19:43:12] Loaded team 1 'Barbarian'
    [19:43:12] Loading Rules/WAR/Scripts/WAR.as
    [19:43:12] Script: Compiling void WarSpawns::updatePlayerSpawnTime(WarPlayerInfo@)
    [19:43:12] Script: Signed/Unsigned mismatch
    [19:43:12] [line 122 char 44]war_core.rules.set_bool( propname, (time > getGameTime()) );
    [19:43:12] in file 'Rules/WAR/Scripts/WAR.as':
    [19:43:12] Script: Compiling Vec2f WarSpawns::getSpawnLocation(int)
    [19:43:12] Script: Signed/Unsigned mismatch
    [19:43:12] [line 199 char 27] for (int i = 0; i < map.tilemapheight; i++)
    [19:43:12] in file 'Rules/WAR/Scripts/WAR.as':
    [19:43:12] Script: Compiling void WarCore::UpdatePlayerCounts()
    [19:43:12] Script: Signed/Unsigned mismatch
    [19:43:12] [line 464 char 33]if (teamNum >= 0 && teamNum < teams.length) {
    [19:43:12] in file 'Rules/WAR/Scripts/WAR.as':
    [19:43:12] Script: Signed/Unsigned mismatch
    [19:43:12] [line 487 char 29]if (player.getTeamNum() == enemyTeam &&//enemy
    [19:43:12] in file 'Rules/WAR/Scripts/WAR.as':
    [LOADING STUFF]
    [19:43:13] Loading Rules/Solo/BuilderTut/BuilderTutRules.as
    [19:43:13] Server created on 0:50123 (BUILD 749)
    [19:43:14] Server is identified as to the API as 2a01:238:4227:e00:cce5:46bf:5389:ce42
    [19:43:14] Whitelist inactive.
    [19:43:14] Config file not found '../Security/blacklist.cfg'
    [19:43:14] Loading blacklist from Base/../Security/blacklist.cfg
    [19:43:14] Loading blacklist failed - file missing or corrupt. A blank blacklist file will be generated for you.
    [19:43:14] Config file not found '../Security/ignorelist.cfg'
    [19:43:14] Loading ignorelist from Base/../Security/ignorelist.cfg
    [19:43:14] Loading ignorelist failed - file missing or corrupt. A blank ignorelist file will be generated for you.
    [19:43:14] Loading default security levels
    [19:43:14] Config file not found 'Rules/RP/gamemode.cfg'
    [19:43:14] Config file not found 'Rules/RP/mapcycle.cfg'
    [19:43:14] Failed to load map cycle file Rules/RP/mapcycle.cfg
    [19:43:14] File not found
    [19:43:14] Generating map from seed 666; size 32768 bytes

    I don't see anything special in the log files, but the error at the end.:huh?:
     
  13. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    upload
    /Mods/RP/Scripts/TDM.as
     
  14. A few things:

    Code:
    [I][SIZE=12px][19:43:06] Loading rules ./../Mods/RP//gamemode.cfg[/SIZE][/I]
    [I][SIZE=12px][19:43:06] Loading game rules from ./../Mods/RP//gamemode.cfg...[/SIZE][/I]
    [I][SIZE=12px][19:43:06] Loaded team 0 'Vikings'[/SIZE][/I]
    [I][SIZE=12px][19:43:06] Loaded team 1 'Barbarian'[/SIZE][/I]
    [I][SIZE=12px][19:43:06] Loaded team 2 'Mercenarys'[/SIZE][/I]
    [I][SIZE=12px][19:43:06] Loaded team 3 'Angels'[/SIZE][/I]
    [I][SIZE=12px][19:43:06] Loading ../Mods/RP/Scripts/TDM.as[/SIZE][/I]
    ...
     
    
    Near the top tells me your mod is actually loading. However, this after it:

    Code:
    [19:43:06] Script: Compiling void TDMSpawns:oSpawnPlayer(PlayerInfo@)
    [19:43:06] Script: Signed/Unsigned mismatch
    [19:43:06] [line 94 char 37] if (player.getTeamNum() != p_info.team)
    [19:43:06] in file '../Mods/RP/Scripts/TDM.as':
    [19:43:06] Script: Compiling void RulesCore::ChangePlayerTeam(CPlayer@, int)
    [19:43:06] Script: Signed/Unsigned mismatch
    [19:43:06] [line 158 char 20] TDMTeamInfo@ team = cast<TDMTeamInfo@>(TDM_core.teams[info.team]);
    [19:43:06] in file '../Mods/RP/Scripts/TDM.as':
    
    Tells me you have some syntax errors in your TDM.as script, which might be causing the prevention of it loading.
     
  15. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    It's there.
    </br>--- merged: May 7, 2013 7:25 PM ---</br>
    Ok, thanks. I did not see that, but I just copyed the TDM stuff and it works when putting it in /Rules.
    Edit: No, it does not :huh?: ... but it did on my windows :huh?:
     
  16. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    The weird thing is that your /Mods/RP//gamemode.cfg has 2 //'s
     
  17. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    Yes... hm...
    Do I actually have to put it into:
    Code:
    /Mods/Roleplay/RP/<gamemodestuff>
    or
    Code:
    /Mods/RP/<gamemodestuff>
    The wiki says way 1, if I'm correct.
     
  18. Downburst

    Downburst Mindblown Global Moderator Forum Moderator Donator Tester

    Messages:
    1,813
    if you put Roleplay as mod and RP as gamemode then /Mods/Roleplay/Rules/RP/gamemode.cfg right?
     
  19. FranticIch

    FranticIch Let me be your tank... Donator

    Messages:
    234
    That was my thought, yes. But it says it can not find it + the error in TDM.as ... but I didnt modify it...
    </br>--- merged: May 7, 2013 7:45 PM ---</br>
    Ok, I removed that TDM.as error, but it stall can't find the gamemode :QQ:
    Creating world from file ''
    [21:42:18] Initializing Game Script
    [21:42:18] Loading rules ./../Mods/Roleplay//Rules/RP/gamemode.cfg
    [21:42:18] Loading game rules from ./../Mods/Roleplay//Rules/RP/gamemode.cfg...
    [21:42:18] Loaded team 0 'Vikings'
    [21:42:18] Loaded team 1 'Barbarian'
    [21:42:18] Loaded team 2 'Mercenarys'
    [21:42:18] Loaded team 3 'Angels'
    [21:42:18] Loading ../Mods/Roleplay/Rules/RP/Scripts/TDM_Interface.as
    [21:42:18] Loading Rules/CommonScripts/RequestSpawnOnDeath.as
    [21:42:18] Loading Rules/CommonScripts/ChatCommands.as
    [21:42:18] Loading Rules/CommonScripts/Editor.as
    [21:42:18] Loading Rules/CommonScripts/TeamMenuJustSpectator.as
    [21:42:18] Loading Rules/CommonScripts/KillMessages.as
    [21:42:18] Loading Rules/CommonScripts/FanfareOnWin.as
    [21:42:27] Loading default security levels
    [21:42:27] Config file not found 'Rules/RP/gamemode.cfg'
    [21:42:27] Config file not found 'Rules/RP/mapcycle.cfg'
    [21:42:27] Failed to load map cycle file Rules/RP/mapcycle.cfg
    [21:42:27] File not found
    [21:42:27] Generating map from seed 666; size 32768 bytes
     
  20. Hm, might be something to ask Verra on IRC. We've had some troubles in the past in testing with custom gamemode.cfg files. Might be a bug.
    </br>--- merged: May 7, 2013 8:25 PM ---</br>
    FWIW, I wrote the wiki article on this a ways back; I know MM and Geti have done some reworking on how mods/files are loaded since then, so the wiki might be a bit out of date.

    I'll press the guys and see if they can get us more info on this.
    </br>--- merged: May 8, 2013 3:27 AM ---</br>
    Ok, confirmed with some testing, and then with Geti - loading custom gamemodes currently *does not work* if loaded from the Mods/ directory.

    The only way you can do this properly is to place the gamemode files in Base/...which means, of course, they'll get erased on upgrade.

    So, the answer is, "wait". Geti/MM/et al are aware it's broken and will get to it before final release.