Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about aion-germany-master5.8 #1

Open
VincentUnity opened this issue Oct 13, 2019 · 11 comments
Open

about aion-germany-master5.8 #1

VincentUnity opened this issue Oct 13, 2019 · 11 comments

Comments

@VincentUnity
Copy link

the data can't be loaded !

@zzsort
Copy link
Owner

zzsort commented Oct 14, 2019

This program is for loading client data only, it can't load server data. The 5.8 client data loads just fine for me.

@VincentUnity
Copy link
Author

I build the data for the server! I parse the data by using your logic,but it don't work for the geo

@zzsort
Copy link
Owner

zzsort commented Oct 14, 2019

You'll need to make some modifications to the server to load this format. The new format is similar but the data needs to be loaded exactly or it won't work.

Per the aiongermany/aion-germany repo, here are some changes that need to be made:

In GeoWorldLoader.java:
Find:
int vectorCount = (geo.getShort()) * 3;
Replace with:
int vectorCount = (geo.getInt()) * 3;

Find:

		if (geo.get() == 0) {
			map.setTerrainData(new short[] { geo.getShort() });
		}
		else {
			int size = geo.getInt();
			short[] terrainData = new short[size];
			for (int i = 0; i < size; i++) {
				terrainData[i] = geo.getShort();
			}
			map.setTerrainData(terrainData);
		}

Replace with:

        if (geo.get() == 0) {
            // no terrain
            map.setTerrainData(new short[]{geo.getShort()});
            /*int cutoutSize =*/ geo.getInt();
        } else {
            int size = geo.getInt();
            short[] terrainData = new short[size];
            for (int i = 0; i < size; i++) {
                terrainData[i] = geo.getShort();
            }
            map.setTerrainData(terrainData);
            
            // read list of terrain indexes to remove.
            int cutoutSize = geo.getInt();
            if (cutoutSize > 0) {
                int[] cutoutData = new int[cutoutSize];
                for (int i = 0; i < cutoutSize; i++) {
                    cutoutData[i] = geo.getInt();
                }
                map.setTerrainCutouts(cutoutData); 
            }
        }

Find:
float scale = geo.getFloat();
Replace:

float scale = geo.getFloat();
geo.get(); // TODO : use the data: EventType eventType = EventType.fromByte(geo.get());

In GeoMap.java:

Add this code:

    private int[] terrainCutoutData;
    public void setTerrainCutouts(int[] cutoutData) {
        int[] arr = cutoutData.clone();
        Arrays.sort(arr);
        this.terrainCutoutData = arr;
    }

Find:

	p1 = terrainData[(yInt + (xInt * size))] / 32f;
	p2 = terrainData[((yInt + 1) + (xInt * size))] / 32f;
	p3 = terrainData[((yInt) + ((xInt + 1) * size))] / 32f;
	p4 = terrainData[((yInt + 1) + ((xInt + 1) * size))] / 32f;

Replace with:

                int index = yInt + (xInt * size);
                p1 = terrainData[index] / 32f;
                p2 = terrainData[index + 1] / 32f;
                p3 = terrainData[index + size] / 32f;
                p4 = terrainData[index + size+ 1] / 32f;
                
                // check if the terrain quad is removed.
                if (terrainCutoutData != null) {
                    if (Arrays.binarySearch(terrainCutoutData, index) >= 0) {
                        return false;
                    }
                }

@VincentUnity
Copy link
Author

ths!I get it!

@VincentUnity
Copy link
Author

how to parse the doors?

@VincentUnity
Copy link
Author

About parsing the door.dat and door.geo

@zzsort
Copy link
Owner

zzsort commented Oct 23, 2019

I haven't added the new door data to my server yet. The server I began with doesn't actually load door models and only uses the bounding boxes in static_doors.xml, so you might not need updated door models anyways. If your server does load and use door models, this format generated by my program will not be compatible.

@VincentUnity
Copy link
Author

ths!

@Lunatic2018
Copy link

dont work for aion 7.5 create geo but meshes then smaller as from 7.2 version this is not possible XD

@PhantomKNA
Copy link

no funciona para aion 7.5 crear geo pero mallas y luego más pequeño a partir de la versión 7.2 esto no es posible XD

Hey bro, if not working for you, you to be modified file server, i tested in versions 5.8-7.2 no problem with geoengine

@kimkyunghwan1202
Copy link

Excuse me, but can you explain in more detail how the geodating monono2 works??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants