Re: Durokan's Custom Map Workshop
Posted: 05 Jul 2017, 20:56
Well, Durokan, I still didn't understand fully how it works but I managed to get the spawns that I want and that's perfect.
Thank you again!
Thank you again!
The most active Age of Empires III community: hosting seasonal tournaments, live streams, replays, expert strategy, and fan-made content.
https://eso-community.net/
mandosrex wrote:Hey @Durokan !
I kept thinking about a map, looked around but didn't find any which matched what I wanted.
So the only solution left was to ask you. I'd like to request a water map similar to Ceylon, but with player islands bigger, placed more symmetrical and not so random like in Ceylon and the center island a bit smaller.
I will use the map as Hawaii in my mod. Here's a badly made drawing:
Ok, maybe the player islands should be a bit bigger than in the drawing.
I could maybe change Ceylon to match this, but I need help with that as well (island sizes, spawns and all that).
Thank you for all your help!
mandosrex wrote:@Durokan Alright, surprisingly, I made it work! Took some codes straight out of Caribbean for the islands but hey, it worked perfectly!
However, a big problem. Players won't spawn anymore, although their islands do appear.
I can do resource spawning and all that if players spawn. And it's gonna be pretty much perfect.
Code: Select all
rmSetAreaLocation(playerIslandID, rmPlayerLocXFraction(i), rmPlayerLocZFraction(i));
Code: Select all
int playerTiles = 22000;
if (cNumberNonGaiaPlayers >4)
playerTiles = 18000;
if (cNumberNonGaiaPlayers >6)
playerTiles = 20000;
Code: Select all
int playerTiles = 22000;
if (cNumberNonGaiaPlayers >4)
playerTiles = 20000;
if (cNumberNonGaiaPlayers >6)
playerTiles = 18000;
Code: Select all
int playerTiles = 15000; // 2 pl
if (cNumberNonGaiaPlayers >6)
playerTiles = 11000; // 7,8 pl
else if (cNumberNonGaiaPlayers >4)
playerTiles = 13000; // 5,6 pl
else if (cNumberNonGaiaPlayers >2)
playerTiles = 14000; // 3,4 pl
Code: Select all
int playerTiles = 20000;
if (cNumberNonGaiaPlayers >4)
playerTiles = 18000;
if (cNumberNonGaiaPlayers >6)
playerTiles = 16000;
int size=2.0*sqrt(cNumberNonGaiaPlayers*playerTiles);
rmSetMapSize(size, size);
mandosrex wrote:Alright, but how about the fact that some maps have a higher number for >4 and others for >6. Which is correct?
Code: Select all
int size = 350;
if(cNumberNonGaiaPlayers==3){
size = 375;
}else if(cNumberNonGaiaPlayers==4){
size = 400;
}else if(cNumberNonGaiaPlayers==5){
size = 425;
}else if(cNumberNonGaiaPlayers==6){
size = 450;
}else if(cNumberNonGaiaPlayers==7){
size = 475;
}else if(cNumberNonGaiaPlayers==8){
size = 500;
}
rmSetMapSize(size, size);
mandosrex wrote:So, I understood the equation, I did it myself and came to the same result. However, there are 2 other things I don't understand.
1. "playerTiles is an integer which is initially set to 20,000. If there are more than 4 players, it changes playerTiles to 18,000. If there are more than 6 players, it is set to 16,000. "
What I don't understand here is this, if when more than 4 players map is 18,000, and more than 6 map is 16,000, then when is 20,000, the first value, used? When it's 2 and 3 players? If yes, then... why do the numbers get smaller but the map gets bigger? I think my poor mathematical skills are getting in the way of this.
2. In the equation, you used "2*(sqrt(3*20,000))", 20,000 being the initial value, so then when working with 4 players, how do you do the equation? "2*(sqrt(4*18,000))"? "2*(sqrt(4*20,000))"? I just... don't understand the logic so I could work with it.
And why if I remove the codes for >4 and >6 entirely, and just leave "int playerTiles=20000", the map still loads and scales properly with players?
Are they even needed?
mandosrex wrote:Hey Durokan!
I didn't want to spam your maps thread (although I'll do it if double posting is not an issue and private messages bother you) but I need to ask you for a little bit of help with some maps.
Right now I have only one question, would it be possible to flip a map's orientation like in a mirror? The Florida map from the ESOC patch, for example, would it be possible to make it look like this:
Is this something easily achievable or does the entire map need to be remade?
I just want the water to be on the southwestern side so it fits as Guinea Coast for my mod.
Thank you for all of your work!
mandosrex wrote:I still think double posting might be an issue, as the last message on your maps thread is also mine.
But I will post the next topic there.
For now, regarding the issue I asked about earlier, I understand what I need to do but I am not sure what is a coordinate and what is not.
Are all coordinates the ones with "Location"? Is "Coherence" a coordinate? Does "Size" need to be changed?
Thank you.
mandosrex wrote:I am sorry for the noobish questions but this is rather complicated for me.
One more though, I guess "InfluenceSegment" also needs changing but it has 4 coordinates, (swampAreaID, 0.78, 1.00, 0.50, 0.85).
What numbers do I switch with which? Is it (1, 1, 2, 2) or (1, 2, 1, 2)?
mandosrex wrote:Ah, thank you very much for your help!
I will test it as soon as I can and I will look over the changes.
mandosrex wrote:I am sorry of bringing this up again but, I have to ask why doesn't the same method work for FFA spawns as well?
I tried every combination, even taking codes from other maps, but the spawns keep getting messed up, especially by that swamp in the north.
A simply circular spawn doesn't seem to work very well on this map either.
The rest of the map is perfect, but could you maybe help me out with FFA spawn as well?
I see how the rest work now what what needs changing.
Thank you!
mandosrex wrote:Your help is very appreciated. Only one small problem, you uploaded the name and load image file (does it have an actual name?) instead of the map file.
Code: Select all
//Chooses which natives appear on the map
int subCiv0=-1;
int subCiv1=-1;
int subCiv2=-1;
int subCiv3=-1;
int subCiv4=-1;
int subCiv5=-1;
// Choose which variation to use. 1=southeast trade route, 2=northwest trade route
int whichMap=rmRandInt(1,2);
// int whichMap=2;
// Are there extra meeting poles?
int extraPoles=rmRandInt(1,2);
extraPoles=1;
// int extraPoles=2;
if (rmAllocateSubCivs(6) == true)
{
subCiv0=rmGetCivID("Comanche");
rmEchoInfo("subCiv0 is Comanche "+subCiv0);
if (subCiv0 >= 0)
rmSetSubCiv(0, "Comanche");
subCiv1=rmGetCivID("Cheyenne");
rmEchoInfo("subCiv1 is Cheyenne "+subCiv1);
if (subCiv1 >= 0)
rmSetSubCiv(1, "Cheyenne");
subCiv2=rmGetCivID("Cheyenne");
rmEchoInfo("subCiv2 is Cheyenne "+subCiv2);
if (subCiv2 >= 0)
rmSetSubCiv(2, "Cheyenne");
subCiv3=rmGetCivID("Comanche");
rmEchoInfo("subCiv3 is Comanche "+subCiv3);
if (subCiv3 >= 0)
rmSetSubCiv(3, "Comanche");
subCiv4=rmGetCivID("Comanche");
rmEchoInfo("subCiv4 is Comanche "+subCiv4);
if (subCiv4 >= 0)
rmSetSubCiv(4, "Comanche");
subCiv5=rmGetCivID("Cheyenne");
rmEchoInfo("subCiv5 is Cheyenne "+subCiv5);
if (subCiv5 >= 0)
rmSetSubCiv(5, "Cheyenne");
}
in line 478
if (subCiv1 == rmGetCivID("Cheyenne"))
{
int cheyenneVillageAID = -1;
int cheyenneVillageType = rmRandInt(1,5);
cheyenneVillageAID = rmCreateGrouping("cheyenne village A", "native cheyenne village "+cheyenneVillageType);
rmSetGroupingMinDistance(cheyenneVillageAID, 0.0);
rmSetGroupingMaxDistance(cheyenneVillageAID, rmXFractionToMeters(0.1));
rmAddGroupingConstraint(cheyenneVillageAID, avoidImpassableLand);
rmAddGroupingToClass(cheyenneVillageAID, rmClassID("importantItem"));
rmAddGroupingToClass(cheyenneVillageAID, rmClassID("natives"));
rmAddGroupingConstraint(cheyenneVillageAID, avoidNatives);
rmAddGroupingConstraint(cheyenneVillageAID, avoidTradeRoute);
rmAddGroupingConstraint(cheyenneVillageAID, avoidStartingUnits);
if ( whichMap == 1 )
{
rmPlaceGroupingAtLoc(cheyenneVillageAID, 0, 0.7, 0.6);
}
else
{
rmPlaceGroupingAtLoc(cheyenneVillageAID, 0, 0.65, 0.15);
}
Code: Select all
//Chooses which natives appear on the map
int subCiv0=-1;
int subCiv1=-1;
int subCiv2=-1;
int subCiv3=-1;
int subCiv4=-1;
int subCiv5=-1;
// Choose which variation to use. 1=southeast trade route, 2=northwest trade route
int whichMap=rmRandInt(1,2);
// int whichMap=2;
// Are there extra meeting poles?
int extraPoles=rmRandInt(1,2);
extraPoles=1;
// int extraPoles=2;
if (rmAllocateSubCivs(6) == true)
{
subCiv0=rmGetCivID("Comanche");
rmEchoInfo("subCiv0 is Comanche "+subCiv0);
if (subCiv0 >= 0)
rmSetSubCiv(0, "Comanche");
subCiv1=rmGetCivID("Lakota");
rmEchoInfo("subCiv1 is Lakota "+subCiv1);
if (subCiv1 >= 0)
rmSetSubCiv(1, "Lakota");
subCiv2=rmGetCivID("Cheyenne");
rmEchoInfo("subCiv2 is Cheyenne "+subCiv2);
if (subCiv2 >= 0)
rmSetSubCiv(2, "Cheyenne");
subCiv3=rmGetCivID("Comanche");
rmEchoInfo("subCiv3 is Comanche "+subCiv3);
if (subCiv3 >= 0)
rmSetSubCiv(3, "Comanche");
subCiv4=rmGetCivID("Comanche");
rmEchoInfo("subCiv4 is Comanche "+subCiv4);
if (subCiv4 >= 0)
rmSetSubCiv(4, "Comanche");
subCiv5=rmGetCivID("Cheyenne");
rmEchoInfo("subCiv5 is Cheyenne "+subCiv5);
if (subCiv5 >= 0)
rmSetSubCiv(5, "Cheyenne");
}
in line 478
if (subCiv1 == rmGetCivID("Lakota"))
{
int lakotaVillageAID = -1;
int lakotaVillageType = rmRandInt(1,5);
lakotaVillageAID = rmCreateGrouping("lakota village A", "native lakota village "+lakotaVillageType);
rmSetGroupingMinDistance(lakotaVillageAID, 0.0);
rmSetGroupingMaxDistance(lakotaVillageAID, rmXFractionToMeters(0.1));
rmAddGroupingConstraint(lakotaVillageAID, avoidImpassableLand);
rmAddGroupingToClass(lakotaVillageAID, rmClassID("importantItem"));
rmAddGroupingToClass(lakotaVillageAID, rmClassID("natives"));
rmAddGroupingConstraint(lakotaVillageAID, avoidNatives);
rmAddGroupingConstraint(lakotaVillageAID, avoidTradeRoute);
rmAddGroupingConstraint(lakotaVillageAID, avoidStartingUnits);
if ( whichMap == 1 )
{
rmPlaceGroupingAtLoc(lakotaVillageAID, 0, 0.7, 0.6);
}
else
{
rmPlaceGroupingAtLoc(lakotaVillageAID, 0, 0.65, 0.15);
}