zzsort / monono2

Aion geo viewer
33 stars 42 forks source link

about aion-germany-master5.8 #1

Open VincentUnity opened 4 years ago

VincentUnity commented 4 years ago

the data can't be loaded !

zzsort commented 4 years ago

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 commented 4 years ago

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

zzsort commented 4 years ago

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 commented 4 years ago

ths!I get it!

VincentUnity commented 4 years ago

how to parse the doors?

VincentUnity commented 4 years ago

About parsing the door.dat and door.geo

zzsort commented 4 years ago

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 commented 4 years ago

ths!

Lunatic2018 commented 4 years ago

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

PhantomKNA commented 4 years ago

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 commented 2 years ago

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