You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Sebastien, Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.16 replies
Age of Kings Heaven » Forums » AI & RM Scripting » Project: HyperRandom
Bottom
Topic Subject:Project: HyperRandom
Zetnus
Squire
posted 02-09-17 05:08 PM CT (US)         


Background



As a random map scripter, there comes a time when you want to attempt something more than just a map, you want to make a whole randomizer or map-pack. This is that time. The problem is, what can you still do in an age where we have something like MegaRandom? Just make something even bigger?.. call it GigaRandom?.. oh wait! That's been done already

So, let's talk about randomization for a moment.
At one end of the spectrum, you basically take a set of individual maps, put them all into 1 script and set it up to choose one of them at random (a prime example of this would be the built-in "blind random" in the game). The problem is that players can just learn to recognize the individual maps that are in the pack. At the other end of the spectrum you go and randomize every single command, every clumping distance, every border fuzziness, everything, in a single cohesive map (take ES@The_Unknown_v2 as an example). The problem here is that the maps generated are often not very balanced.

MegaRandom is definitely the first kind of randomizer - it's several hundred maps in one script, although the resources are randomized separately from the maps, which makes it a bit of both. What I'm going for is a "The_Unknown" type of randomizer - one script, absolutely filled with conditionals and hopefully both fairer and at the same time more random than The Unknown. This brings us to...

HyperRandom

Get hyped!


A customizable randomizer. Don't like water? Just un-comment the /* #define NO_WATER_BASED_MAPS */ line and the rest will be done for you!
Want to allow michi-style maps? No problem!
HyperRandom is based on the observation that the majority of standard map types can be generated by simply varying a few key parameters - the base terrain of the map, the land percentage, the zone assignment, and the zone avoidance distances. Set these up properly and you can get an impressive array of map layouts, most of which are surprisingly balanced and fair. Add in biome and unit variations and support for new DLC and Definitive Edition content and you have the recipe for a successful randomizer.

Planned features
>Easy customization options to make the script suit your needs by just commenting out or commenting in a few lines DONE! (can add more as requested)
>~20 different biomes (sets of terrains and animals to match different geographic regions and climactic zones of the world) DONE!
>Use of all the new HD/UP/DE scripting commands DONE!
>Content from the DLC Expansions on Steam DONE!
>Content from the Definitive Edition DONE!
>Balanced (yet completely random) map layouts that should be fair to all players DONE!



Current Customization Options

ALLOW_UP_WEATHER
- Let it rain or snow, if you are using the UserPatch (Status: enabled)

ALLOW_UP_TERRAIN_SHADING
- Allow the UserPatch to render terrain shading. This looks bad on streams or recordings, but looks fine if you are playing. (Status: disabled)

ALLOW_UP_BUILDABLE_SHALLOWS
- Allow the UserPatch to potentially make shallows buildable (Status: enabled; disabled in Lite version)

USE_NOMAD_SETUP
- Start without a town center (Status: 10% chance)

USE_TEAM_GROUPING
- If the "team together" box is ticked, there is a chance of being grouped very closely to team members in one part of the map (Status: 5% chance)

ALLOW_FULL_RANDOM_PLACEMENT
- A (DE-only) exploit that allows fully random placement ignoring the normal circle/oval (Status: disabled)

NO_WATER_BASED_MAPS
- Prevents maps where water is the base terrain (ie. islands, rivers, continental etc.) (Status: disabled)

NO_LAKES
- Prevents maps with a lake in the center or the corners (ie. baltic, cross, acropolis etc.) (Status: disabled)

NO_SMALL_PONDS
- Prevents small ponds (ie. arabia, gold rush, black forest etc.) (Status: disabled; enabled in Lite version)

ALLOW_RANDOM_ZONES
- You might share islands with allies/enemies/nobody; also allows unequal corner lands (Status: enabled; disabled in Lite version)

ALLOW_WATER_ELEVATION
- You might get hilly water (Status: enabled; disabled in Lite version)

USE_STANDARD_STARTING_UNITS
- Start with a town center, scout and the standard number of villagers, just like you would on a standard map. Disable to allow non-standard scouts, variable villager counts, starting boats, multiple town centers etc. (Status: disabled; enabled in Lite version)

ALLOW_RANDOM_SCOUT
- This enables the chance to choose a scout entirely at random, from all possible land units in game. Will only happen when standard starting units are disabled. Some units are incredibly over-powered! (Status: enabled; disabled in Lite version)
ALLOW_RANDOM_BUILDINGS
- This enables a wider selection of possible bonus starting buildings. Will only happen when standard starting units are disabled. (Status: enabled; disabled in Lite version)

USE_STANDARD_RESOURCES
- Start with the standard number of gold/stone/berries/sheep/boar/deer etc. Disable to have resource amounts randomized, including the amount of resource per node. (Status: disabled; enabled in Lite version)

ALLOW_MODIFIED_STARTING_RESOURCES
- Allow modified starting resource stockpiles - requires DE/UP (Status: enabled; disabled in Lite version)

ALLOW_CENTER_RUSH_RESOURCES
- Allow the chance of getting a bunch of bonus resources in the center (Status: enabled)

ALLOW_CORNER_RUSH_RESOURCES
- Allow the chance of getting a bunch of bonus resources in the all 4 corners (Status: enabled, disabled in Lite version)

ALLOW_RELIC_RUSH
- Allow the chance of getting a bunch of relics in the center, with map revealers (Status: enabled)

ALLOW_NEUTRAL_MARKET
- Allow the chance of getting a neutral gaia market in the center, with map revealers. Currently only in DE. (Status: enabled)

USE_RANDOM_RELIC_COUNT
USE_DE_RELIC_BALANCE

USE_5_RELICS
USE_EVENLY_SPACED_RELICS
- Pick one of the above to choose the relic distribution (status: random relic count; Lite version uses DE relic balance)

ALLOW_PERSONAL_RELIC
- There is a chance you start with a relic right by your starting position. This setting is independent of what you choose above (Status: enabled, disabled in Lite version)

ONLY_STANDARD_WALL_TYPES
- Only use stone and palisade wall. This setting is intended for AI battles, since AIs might have issues with non-standard walls (Status: enabled when the game has AIs)

More switches like this can be added!
Just let me know what you want to see.

Progress


Testing - in progress ... please share any comments you might have. The more detail the better!

Current status:
Complete.
More content may be added based on feedback or when DE opens up new possibilities.

Here are some links to get it:
Age of Empires Website (Definitive Edition): https://www.ageofempires.com/mods/details/829/
Steam Workshop (HD Edition 2013): https://steamcommunity.com/sharedfiles/filedetails/?id=1940139270
Age of Kings Heaven Blacksmith (manual download): https://aok.heavengames.com/blacksmith/showfile.php?fileid=13407
AoE2Map (manual download): https://aoe2map.net/map/39db0813-3550-40fa-8a8b-c0a074362066




Thanks for stopping by!

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.

[This message has been edited by Zetnus (edited 10-21-2020 @ 01:40 PM).]

AuthorReplies:
Leif Ericson
Seraph Emeritus
posted 02-10-17 08:43 PM CT (US)     1 / 16       
Looking nice, Zetnus. This sounds cool!

~`o~|\  Join the fresh and exciting AI Ladder for its fourth season!
 `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-
local boi
Squire
(id: dragon14)
posted 06-29-17 06:12 PM CT (US)     2 / 16       
Dead Project? 404 error

USA
katsup or mustard
Zetnus
Squire
posted 06-30-17 10:40 AM CT (US)     3 / 16       
The link is dead, although not specifically because the project is dead (that's partially true too), but because Dropbox axed the public folder a while ago, breaking all existing links.

In any case, I fixed the link if you want to take a look.

That being said, I haven't made any recent progress on this project. I've been prioritizing other things such as real life, modding for other games, and in the coming weeks, the PTC.

But the project is only hibernating; when the opportune time arises (ex. UserPatch 1.5 is released; my laptop breaks and I have to revert to using windows XP and only playing games that run on XP; I feel a sudden unexplained urge to work on this; lots of people start commenting on this thread; etc.) I will continue with it.

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.

[This message has been edited by Zetnus (edited 06-30-2017 @ 10:43 AM).]

Aleph
Squire
posted 07-01-17 05:55 AM CT (US)     4 / 16       
scripter64
Wolved
posted 07-01-17 11:26 PM CT (US)     5 / 16       
Aleph
Zetnus
Squire
posted 09-15-17 05:19 AM CT (US)     6 / 16       
Just a quick update:

>This project isn't dead - it's being worked on from time to time. Slowly

>I've added UP 1.5 weather and a framework to randomize it for the different biomes (still need to actually set up the biomes though)

>I've also added a few bits and pieces such as relics and player starting stuff

It's not yet playable because it still needs map resources. Also, it still needs quite a bit of polishing up various sections. I updated Dropbox with the current build.

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
Sebastien
Dark Samurai
posted 11-25-19 05:39 AM CT (US)     7 / 16       
Zetnus
Squire
posted 11-28-19 10:03 AM CT (US)     8 / 16       
So I did actually finish this project recently, by making a massive push in days before the DE release.
You can play it in DE right now: https://www.ageofempires.com/mods/details/829/

I do plan on adding another set of features (mainly additional DE terrains). Once I've done that, I'll release it on all the other platforms too.

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
Leif Ericson
Seraph Emeritus
posted 11-28-19 10:39 PM CT (US)     9 / 16       
Ooh, nice!

~`o~|\  Join the fresh and exciting AI Ladder for its fourth season!
 `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-
Zetnus
Squire
posted 12-18-19 10:23 PM CT (US)     10 / 16       
Released a major update to bring in the remaining DE content.
I've also uploaded it to all platforms now.
Hopefully it's relatively bug-free.

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
Zetnus
Squire
posted 01-05-20 12:55 PM CT (US)     11 / 16       
Small update to the DE terrain blending. Navigable ice should now be more blue than solid ice.

Also, I'm very sad that DE doesn't have a comment section. Makes it really hard to get feedback.

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
Zetnus
Squire
posted 02-05-20 07:40 PM CT (US)     12 / 16       
Updated to v2.3
-improved KoTH and CtR support with a large central land with map revealers and neutral outlaws, and resource trickle from controlling the monument
-added relic rush (relics on a KoTH-style hill)
-added the chance for ponds
-added options to pick which water types to allow
-improved circle placement support
-reworked nomad resources distribution
-tweaked standard resource distribution to match the changes in DE
-added cliff avoidance
-added more starting scout and building variation
-more stuff I don't remember

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
Zetnus
Squire
posted 04-05-20 10:19 AM CT (US)     13 / 16       
v2.4
-improved random resources to prefer picking less extreme values
-added new water mixing
-cleaned up spacing in the script itself

v2.5
-improved relic distribution
-improved starting unit and building positions
-fixed terrain and elevation scaling
-added the option of unequal corner lands
-fixed potential overflow issues with scaling 9999
-improved terrain masking
-increased chance of horse scouts
-add small chance to double relics
-fixed deep fish spawns

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.

[This message has been edited by Zetnus (edited 04-05-2020 @ 10:19 AM).]

Zetnus
Squire
posted 05-10-20 12:22 PM CT (US)     14 / 16       
v2.6
-reduced chance that predators have food
-reduced elevation on mangrove swamp biome
-tweaked elevation spacing
-added the chance to get wider connections
-added additional green and brown water masking for DE
-shortened constant names
-removed the workaround for invisible forage bushes in DE, since that is fixed now
-improved forest mixing and added new combinations
-added balanced elevation for DE
-added a low chance of higher base elevation in DE
-added support for a neutral market to trade with in DE (but its currently still bugged in DE)
-added the possibility of the getting almost any land unit as a scout (at a very low probability each)

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
Zetnus
Squire
posted 09-01-20 08:24 PM CT (US)     15 / 16       
v2.7
-fixed a few typos
-disabled dolphins, since they unfortunately are buggy (sorry about that, I honestly did not know that)
-removed duplicated resources on nomad starts

v2.8
-re-enabled dolphins, since they are fixed in DE now
-fixed monument resources being blocked by the TC
-fixed a 5% chance to be missing forests entirely on the Savannah biome
-filled in corners for walled starts, but only some of the time - also creates walls on water
-reduced chance of walled start from 20% to 10%
-reduced chance of packed town center from 50% to 10% of nomad starts
-removed battle royale start from standard starting units
-reduced chance of island-style start from 24% to 16%
-added chance of UP buildable shallows
-add koth resource trickle for UP
-increased connection width variability
-added the option to get randomly modified starting resource stockpiles (10% chance)
-reduced the chance of super-squished islands
-increased corner land variability

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.

[This message has been edited by Zetnus (edited 09-01-2020 @ 08:28 PM).]

Zetnus
Squire
posted 10-21-20 02:10 PM CT (US)     16 / 16       
v2.9
-added a wide selection of possible starting buildings
-removed the super-close relic when not on water or michi style maps
-fixed an issue where personal relics were always spawning
-lowered the chance of personal relics
-lowered the chance of central and corner resources
-adjusted resources and empire wars stuff to more closely match the current DE standards
-added in extra units not previously used such as the stormy dog and the relic cart

........//\
......./ / / \ Check out my Blacksmith submissions as well as my stuff in the Steam Workshop.
....../ / /\\ \
...../ /_/_\\ \ Proud guardian of the Definitive Random Map Scripting Guide
..../_____\\\ \
....\\\\\\\\\\\\\/ and the Random Map Scripting Links and FAQ thread.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames