August 07, 2022, 08:07:43 pm

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1]

Author Topic: [Plugins] - [Heenok and Bullets] - [Host Only] - [RMG]  (Read 1650 times)

bullets (obviously)

  • Seasoned Member
  • *****
  • Karma: 40
  • Offline Offline
  • Posts: 1962
[Plugins] - [Heenok and Bullets] - [Host Only] - [RMG]
« on: August 07, 2015, 10:08:07 pm »

Random Map Generator
Based RNGesus please make Bullets host better maps on his server.
Download

It takes a bunch of puzzle pieces (predrawn map sections) and randomly arranges them into maps.
A pretty large number of maps can be generated.
This plugin only needs to be used by the server host. Generated maps are uploaded to clients like normal maps.

The actual map generation python script is written by Heenok.
The gml plugin that runs the script and modifes maprotation is written by Bullets.
Map seeds were created by Heenok but we're probably gonna make a bunch of changes to them.

Use it by dumping everything from the zip into your GG2.exe folder. The plugin RMG.gml is in the Plugins folder, which you merge with your existing plugins folder and/or copy over to DSM_Plugins if you use DSM.

To host a random map put koth_random in your maprotation. (RMG only does koth at the moment)
The plugin will automatically run the map generator before each koth_random, and replace koth_random with the generated map's name.
You cannot start a maprotation with koth_random unless you actually have a koth_random.png in your Maps folder (any valid map will do) or the map checking script will fatal error.

Examples of RMG maps (these are all playable as is):








Expect updates as we refine the map seeds, fix bugs, maybe do other gamemodes, improve art, etc.

2018 necro: fixed link
« Last Edit: January 07, 2018, 08:25:32 am by bullets (obviously) »
Logged

notarctic

  • just arctic, what gives?
  • ******
  • Karma: 8
  • Offline Offline
  • Posts: 4904
  • 👎👀 bad aim ba̷̶ ԁ aIm 👎 thats❌ some bad 👎👎aim
    • arcticland
Re: [Plugins] - [Heenok and Bullets] - [Host Only] - [RMG]
« Reply #1 on: August 07, 2015, 10:39:25 pm »

wow heenok knows python?
anyways, my suggestion is to have a few lists of words and generate mapnames randomly with those words
Logged
[1:37:51 PM] Derpduck: arctic u need to quote ppl that make shit posts in case they edit them
[4:20:15 PM] Rubeus Hashgrid: i cant discover anything fuck you imageshack

Heenok

  • 2013 Haxxy Award Winner
  • *
  • Karma: 8
  • Offline Offline
  • Posts: 289
Re: [Plugins] - [Heenok and Bullets] - [Host Only] - [RMG]
« Reply #2 on: August 07, 2015, 11:12:00 pm »

how it works is that all the map parts are either connected with 2 small doors or 1 small and 1 large door the algorithm simply pick map segments that fit until the map is long enough then add a central piece which is the control point.
if you want to do your own map pieces, just use the same layout of doors and file name prefix i am using in RMG_resource, i'll try to add some documentation later but basically the script locate where it needs to add entities or connect parts together using the color coded pixels.
i don't know if i need to do any legal disclaimer on anything since i don't have any programming background but i used python because i needed something that could handle image editing (the PILLOW module) and i've compiled the script using py2exe which use visual basic so you might need additional dlls if the script doesn't work.
source:
(click to show/hide)
there's probably a lot of place where the code is inefficient but it works so i don't think it's a problem
the only thing i couldn't figure out is why walkmask compressed using garrison builder are much more smaller than the one made by my script.

wow heenok knows python?
anyways, my suggestion is to have a few lists of words and generate mapnames randomly with those words
guide how 2 code 4 pros in any language:
-model the solution to your problem in small steps
-open gooogle and type "the programming language you're using" + the thing you want to accomplish, repeat until you're done
Logged

notarctic

  • just arctic, what gives?
  • ******
  • Karma: 8
  • Offline Offline
  • Posts: 4904
  • 👎👀 bad aim ba̷̶ ԁ aIm 👎 thats❌ some bad 👎👎aim
    • arcticland
Re: [Plugins] - [Heenok and Bullets] - [Host Only] - [RMG]
« Reply #3 on: August 07, 2015, 11:51:04 pm »

guide how 2 code 4 pros in any language:
-model the solution to your problem in small steps
-open gooogle and type "the programming language you're using" + the thing you want to accomplish, repeat until you're done
couldnt have said it better


Quote
the only thing i couldn't figure out is why walkmask compressed using garrison builder are much more smaller than the one made by my script.
did you try just upscaling the wallmask by 6
« Last Edit: August 07, 2015, 11:57:31 pm by penguinlord »
Logged
[1:37:51 PM] Derpduck: arctic u need to quote ppl that make shit posts in case they edit them
[4:20:15 PM] Rubeus Hashgrid: i cant discover anything fuck you imageshack

Pages: [1]
 

Page created in 0.023 seconds with 36 queries.