Allowing players to upload their own maps into bots temporarily



  • Some players have issues at opening host in the lobby. I think it would be the best solution.


  • Donators Moderators Admin

    @schulz not possible unless you upload to GitHub and it is then downloaded to the bot by admin. Other option is share through sendspace or whatever equivalent and then host.


  • Moderators

    Actually, at the developers, why do the bots need to have the map at all?

    The skin, for sure there is no reason for the bot to need it, as the bot doesn't need to see the map and play it.

    The games (xml), it is good they have them, but one could just load a game you have, just as you can load a savegame (really, no difference).

    There is really no reason at all for the bot itself to have to have the map or to crash for not having it or to need the map for loading a savegame, either. But I know this is the way it works now.

    Or am I missing something?


  • Moderators

    @schulz Me and @wirkey are (as I write) playing your "European War" game in Bot102_NEWARK_NJ (that doesn't have the map, of course).


  • Moderators

    This is how it was done (thanks @wirkey for testing):

    Cernel: download this
    Cernel: https://files.fm/u/qxgr24zw#_
    Cernel: it's novalland map
    Cernel: tell me when you have it
    Cernel: don't put it inside downloaded maps yet
    Cernel: ok so you have it downloaded?
    wirkey: y
    Cernel: cool
    Cernel: so now do that
    Cernel: take 270bc from your downloaded maps folder and move it out
    Cernel: or delete it
    wirkey: don't have it
    Cernel: ok good
    Cernel: be sure you don't have it either zipped or unzipped
    Cernel: unzip the navalland map
    wirkey: where?
    Cernel: outside downloadedmaps for now
    Cernel: wherever you prefer
    Cernel: once you have it unzipped, go into it until you reach the folder called "map"
    wirkey: aye
    Cernel: cut paste it outside
    Cernel: rather
    Cernel: cut paste the "map" folder inside the downloadedMaps folder
    Cernel: and rename the "map" folder to "270bc" (lowercase)
    wirkey: y
    Cernel: so you have this 270bc folder that inside has the other folders called "games" etc. and it is in downloadedMaps right?
    wirkey: y
    Cernel: ok
    ...
    Cernel: ok can you play it?
    wirkey: it's ugly
    Cernel: see? we are able to play a map that is not available in repository
    Cernel: you want to actually try 1 round?
    Cernel: I woudn't mind to try it
    wirkey: seriously or just for testing?
    Cernel: seriously
    Cernel: testing we already did

    I sacrificed 270bc, but it could have been whatever map nominally available in the bot.

    Since, obviously, the bot doesn't need to see the game (because, you know, it is a bot: it doesn't really have eyes and stuff), you just need the map to have the same name of a whatever map the bot have, and it will work.

    Here you go: you can play whatever games you wish in whatever bot, as long as you and your mate do what I told @wirkey to do, mutatis mutandis.

    That is why I said that it is senseless that the bots are required to have maps, meaning the skins (and don't really need the xml either, by the way).

    @redrum I don't know if we want to make an official post "how to hack your map to play into any bots", but that's possible. I'll let you decide, since it is a ghetto hack.


  • Moderators

    Actually, that is what the ones in the bot with you must do. You must do that too, plus also (the others don't need to do the following):

    • Renaming the "mapName" value in the xml of the game you want to play the same way as the map was renamed, as per above.
      In the case above, to property name="mapName" value="270bc" editable="false".
    • Loading a savegame of that game, in the bot (for example, a savegame you took at start game on local, as per what I did).

  • Admin

    @cernel Yeah, my understanding is essentially the bot just needs the game XML either by having it loaded on the bot or by the player providing a save game (as save games have the game XML in it essentially). The rest of the map assets are only used locally by the players actually viewing the map. I believe in theory that we could do a number of different things to bots so that it is easier to update maps and allow players to bring their own maps. The rest of the stuff is essentially just 'checks' that happen because bots load similar to local so it checks that it has the map folder, the right map name, etc. How much effort it would be to do something like that I'm not really sure without looking at the code.


  • Admin

    @redrum Yeah, the bots shouldn't really need anything other than the xml.
    Ideally we'd change the bot code so it only checks for xml files in the bot directory.
    But this needs to be coordinated with @LaFayette so the bot scripts can handle this.


  • Donators Moderators Admin

    @cernel good point yes it can be hacked in. This will only work if the skin for that map is already loaded in the bot tho as you pointed out. Thus any "new" map that used it's own new skin would have to be loaded.


  • Donators Moderators Admin

    @prastle I would also like to add that since CG uploaded it and did the map skin I guess you should talk to him eh?