Map Questions
- Gichtenlord
- Howdah
- Posts: 1437
- Joined: Nov 15, 2015
Re: Map Questions
Ok, ok, I somehow made it work, no idea how but... yeah.
Now I have a different problem, the map is really, really high! Like, the map has some rivers and those are at the normal altitude, but the rest of the map is really high up.
I tried fixing it by changing the map type from "grass" to "water" and by using "rmSetMapElevationParameters" but it didn't really work.
Help.
Edit: Oh, so... Apparently, if I put ", 0" after "baseTerrain" it works... It's not high anymore.
I have no idea what I'm doing. I will probably be back with more questions.
Now I have a different problem, the map is really, really high! Like, the map has some rivers and those are at the normal altitude, but the rest of the map is really high up.
I tried fixing it by changing the map type from "grass" to "water" and by using "rmSetMapElevationParameters" but it didn't really work.
Help.
Edit: Oh, so... Apparently, if I put ", 0" after "baseTerrain" it works... It's not high anymore.
I have no idea what I'm doing. I will probably be back with more questions.
Re: Map Questions
If you are editing a map that originated from my code, then what most likely was happening is you were declaring the mix before the section of text that writes textures on the map. I initialize the maps and then change the height later when I draw the large continent, so if that is removed then that's probably where you could get the issue.
Check out my Custom Map Workshop here!
http://eso-community.net/viewtopic.php?p=98718#top
http://eso-community.net/viewtopic.php?p=98718#top
Re: Map Questions
I require assistance once again.
There's this awesome map made by Neuron called Mosquito Coast. But it has this big problem where the map takes A LOT of time to load. I think it actually kinda gets stuck for some reason, then resumes progress after a while.
Now, initially, I looked at the progress bar, saw where it got stuck (at what percentage) then opened the map and looked what could be causing it. It was getting stuck at around 60%. So I opened it and while I didn't spot anything that caused the problem, the codes which spawns player TC, units and stating stuff were there.
So I started removing them one by one to see if the problem disappears and it did not, HOWEVER, the part where the game gets stuck moved, from 60% to around 30% and this really left me without any idea what could cause it.
I think there's some kind of codes making the game go "wait, what?" for a while until it figures it out, but I simply cannot find them by my self.
If anyone could help it would be highly appreciated. Thanks.
There's this awesome map made by Neuron called Mosquito Coast. But it has this big problem where the map takes A LOT of time to load. I think it actually kinda gets stuck for some reason, then resumes progress after a while.
Now, initially, I looked at the progress bar, saw where it got stuck (at what percentage) then opened the map and looked what could be causing it. It was getting stuck at around 60%. So I opened it and while I didn't spot anything that caused the problem, the codes which spawns player TC, units and stating stuff were there.
So I started removing them one by one to see if the problem disappears and it did not, HOWEVER, the part where the game gets stuck moved, from 60% to around 30% and this really left me without any idea what could cause it.
I think there's some kind of codes making the game go "wait, what?" for a while until it figures it out, but I simply cannot find them by my self.
If anyone could help it would be highly appreciated. Thanks.
- Attachments
-
- Mosquito Coast.xs
- (67.28 KiB) Downloaded 40 times
-
- Mosquito Coast.xml
- (1.03 KiB) Downloaded 20 times
Re: Map Questions
This is strange, it's not taking time for me when it loads. Are you sure you aren't running any process behind that takes a lot of memory in your comp or that you comp is a bit hold ?
- Gichtenlord
- Howdah
- Posts: 1437
- Joined: Nov 15, 2015
Re: Map Questions
It has several loops with 40*cNumberPlayers and 20*cNumberPlayers, but these loops are still too small to notice, imo.
r]
Re: Map Questions
@Rikikipu
@Gichtenlord
Hm... The thing is, I just loaded the original map again, the one I gave you above, and it does indeed load faster. The one modified by me however, has the problem.
But I only changed the visuals of the map, as I did to many other maps, and none had this problem before.
I could add the modified version but you will not be able to load it without my mod, as it uses custom terrain.
But you could look at the codes again, if it's not too big of a request. Thank you.
Yes, I am very sure it's not because of PC performance as it happens to the players of my mod as well, players with far better computers than mine.Rikikipu wrote:notification
@Gichtenlord
I tried looking for 40*cNumberPlayers and 20*cNumberPlayers and nothing pops up, can you tell me I code I can look for or where to look exactly?Gichtenlord wrote:notification
Hm... The thing is, I just loaded the original map again, the one I gave you above, and it does indeed load faster. The one modified by me however, has the problem.
But I only changed the visuals of the map, as I did to many other maps, and none had this problem before.
I could add the modified version but you will not be able to load it without my mod, as it uses custom terrain.
But you could look at the codes again, if it's not too big of a request. Thank you.
Re: Map Questions
If the map loads normally on the unmodded game but loads very slowly on the modded game then there must be some incompatibility between something in the map and your mod.
Unless you modified the map and added some modded objects which take more time to load (textures).
You can always enable Debug mode and check how the map loads step by step, if it's worth the effort.
Unless you modified the map and added some modded objects which take more time to load (textures).
You can always enable Debug mode and check how the map loads step by step, if it's worth the effort.
Re: Map Questions
@Dolan
How do you enable it?
Debug mode? I remember seeing something about that somewhere but can't remember.Dolan wrote:notification
How do you enable it?
Re: Map Questions
Download reyk's editor
Re: Map Questions
@Rikikipu
There I see 2 things:
1. When you load a map you have the option Start under debugger.
2. Under Options there's XS Debugger.
Now, I loaded my map but can't see anything else, no loading history/log thing, XS Debugger is empty and I don't know how to use it.
Help.
Ok so, I got New AoE3 Editor XY (version 3), installed it and opened the editor.Rikikipu wrote:notification
There I see 2 things:
1. When you load a map you have the option Start under debugger.
2. Under Options there's XS Debugger.
Now, I loaded my map but can't see anything else, no loading history/log thing, XS Debugger is empty and I don't know how to use it.
Help.
Re: Map Questions
mandosrex wrote:@DolanDebug mode? I remember seeing something about that somewhere but can't remember.Dolan wrote:notification
How do you enable it?
Erm, I think you modify an xml file you find in the User3 folder in your game documents folder.
There's an option in there, I think it was called "EnableRandomMapsDebugging" or something similar. In fact, there must be three of them, for each game mode (RM, campaign and scenario). You need to set all of them to "true". Then restart the game.
Then, when you load a map you should see a step-by-step execution of the map, which will point out any issues the game compiler has with the map script.
Re: Map Questions
@Dolan
I managed to make the debug appear and something does popup but it still makes no sense. It points to something which has no problem at all AND if i completely remove those lines the problem is still present but the debug doesn't appear anymore because everything "apparently" works well for it...
And if I click run then it stops at this:
Again, even after completely removing those the problem persists and the debug doesn't show anything else.
What is with those Heap things? It says INVALID SYMBOL but I don't know where it is.
Aaaaalright, so, after spending an entire day on this I am still no closer to figure it out...Dolan wrote:notification
I managed to make the debug appear and something does popup but it still makes no sense. It points to something which has no problem at all AND if i completely remove those lines the problem is still present but the debug doesn't appear anymore because everything "apparently" works well for it...
And if I click run then it stops at this:
Again, even after completely removing those the problem persists and the debug doesn't show anything else.
What is with those Heap things? It says INVALID SYMBOL but I don't know where it is.
Re: Map Questions
I don't have the game installed anymore so I can't test it.
But have you tried disabling the code for map clusters on the bottom of the script?
You could also try commenting out everything except for the basic stuff that the map needs to load:
- a main function
- mapsize and terrain initialisation
- players' placement
- players' areas
- a starting unit
Then gradually re-enable everything, piece by piece, to see where it's getting stuck.
But have you tried disabling the code for map clusters on the bottom of the script?
You could also try commenting out everything except for the basic stuff that the map needs to load:
- a main function
- mapsize and terrain initialisation
- players' placement
- players' areas
- a starting unit
Then gradually re-enable everything, piece by piece, to see where it's getting stuck.
Re: Map Questions
Dolan wrote:But have you tried disabling the code for map clusters on the bottom of the script?
Map clusters? What are those? How do the codes look?
Dolan wrote:Then gradually re-enable everything, piece by piece, to see where it's getting stuck.
That's wht I tried for a while but there's just so much...
I suspect there's something with the codes at the start of the map which build the map or something, those above void main(void), they are rather unusual.
Talking about these:
Code: Select all
float PI = 3.1415926535897932384626433832795;
float pow(float x = 0,int p = 0) {
float x2 = 1; float x4 = 1; float x8 = 1; float x16 = 1; float x32 = 1; float x64 = 1;
if(p>=2) x2 = x*x;
if(p>=4) x4 = x2*x2;
if(p>=8) x8 = x4*x4;
if(p>=16) x16 = x8*x8;
if(p>=32) x32 = x16*x16;
if(p>=64) x64 = x32*x32;
float ret = 1;
while(p>=64) { ret = ret * x64; p = p - 64; }
if(p>=32) { ret = ret * x32; p = p - 32; }
if(p>=16) { ret = ret * x16; p = p - 16; }
if(p>=8) { ret = ret * x8; p = p - 8; }
if(p>=4) { ret = ret * x4; p = p - 4; }
if(p>=2) { ret = ret * x2; p = p - 2; }
if(p>=1) { ret = ret * x; p = p - 1; }
return (ret);
}
float atan(float n = 0) {
float m = n;
if(n > 1) m = 1.0 / n;
if(n < -1) m = -1.0 / n;
float r = m;
for(i = 1; < 100) { int j = i * 2 + 1; float k = pow(m,j) / j;
if(k == 0) break;
if(i % 2 == 0) r = r + k;
if(i % 2 == 1) r = r - k;
}
if(n > 1 || n < -1) r = PI / 2.0 - r;
if(n < -1) r = 0.0 - r;
return (r);
}
float atan2(float z = 0,float x = 0) {
if(x > 0) return (atan(z / x));
if(x < 0) { if(z < 0) return (atan(z / x) - PI);
if(z > 0) return (atan(z / x) + PI);
return (PI);
}
if(z > 0) return (PI / 2.0);
if(z < 0) return (0.0 - (PI / 2.0));
return (0);
}
float fact(float n = 0) {
float r = 1;
for(i = 1; <= n) { r = r * i; }
return (r);
}
float cos(float n = 0) {
float r = 1;
for(i = 1; < 100) {
int j = i * 2; float k = pow(n,j) / fact(j);
if(k == 0) break;
if(i % 2 == 0) r = r + k;
if(i % 2 == 1) r = r - k;
}
return (r);
}
float sin(float n = 0) {
float r = n;
for(i = 1; < 100) {
int j = i * 2 + 1;
float k = pow(n,j) / fact(j);
if(k == 0) break;
if(i % 2 == 0) r = r + k;
if(i % 2 == 1) r = r - k;
}
return (r);
}
float LocX = 0;
float LocZ = 0;
float wAngle = 0;
float getLocX(float xOrigin=0, float rad=0, float MyAngle=0) {
wAngle = (2*PI*MyAngle)/360;
LocX=cos(wAngle)*rad + xOrigin;
return(LocX);
}
float getLocZ(float zOrigin=0, float rad=0, float MyAngle=0) {
wAngle = (2*PI*MyAngle)/360;
LocZ=sin(wAngle)*rad + zOrigin;
return(LocZ);
}
I have no idea what they do and how they work but they look messy and deleting them could cause god knows what other problems.
I don't even know what or in what order to delete without breaking the map.
And unfortunately I have to work on other maps as well so that's why I need help.
Re: Map Questions
I know what each line in the map does but it's a lot to explain.
Maybe I get the time to re-install the game in the weekend and have a look at the map.
The math equations above are just an implementation of trigonometric functions in AOE3 XS. Since XS lacks trig functions, you can't place objects in a perfect circle (or arc) without some kind of algebraic implementation of cosine, sine and arctangent. The power and factorial functions are needed to build the trig ones.
Maybe I get the time to re-install the game in the weekend and have a look at the map.
The math equations above are just an implementation of trigonometric functions in AOE3 XS. Since XS lacks trig functions, you can't place objects in a perfect circle (or arc) without some kind of algebraic implementation of cosine, sine and arctangent. The power and factorial functions are needed to build the trig ones.
Re: Map Questions
The trig functions are used to create player areas in FFA, IIRC.
Who is online
Users browsing this forum: No registered users and 6 guests