Assasans / protanki-server

An open-source reimplementation of the ProTanki Server.
MIT License
31 stars 20 forks source link

Server unable to load maps #114

Closed Cavebrute closed 2 years ago

Cavebrute commented 2 years ago

I know this project focuses on remaking Protanki exactly, and my problem is that I cannot load a replaced map, but this happened to maps that are included with the server, so I thought I would make this issue anyway. Replacing maps used to work in the past, but it doesn't now. The server is stuck at this line forever [jp.assasans.protanki.server.client.UserSocket/TRACE]: Sent command Battle::InitBonuses [[]] and nothing happens afterwards. Is there a way to get around this?

Thanks.

Londxd commented 2 years ago

Did you do it right? Are the Proplibs normal? Maybe wrote something wrong.

Assasans commented 2 years ago

Have you added your map.xml and proplibs.xml files to the local resource server? If yes, did you configured client to use your resource server?

but this happened to maps that are included with the server

Can you please tell which maps are not loading?

Cavebrute commented 2 years ago

Yes, the client does connect to the local server, and I did replace both map.xml and proplibs.xml files. I also added the same proplibs in the summer-day.json file for the map, because if I don't, it gives me an error when I try to play the battle.

The map that wasn't loading for me was Atra or Arena, but that was a few weeks ago and it works now.

I was able to load an old version my custom map which was 3314kb, but when I put in the finished map, 4379kb in size, it doesn't load. Does the server have a problem with loading maps over 4000kb?

Assasans commented 2 years ago

Does your finished map uses any proplibs/props that old version doesn't?

Does the server have a problem with loading maps over 4000kb?

The server just reads resource files as a byte stream, so there should be no problems. The biggest official map is 2329 KB, so maybe the client has troubles with loading big maps. Try to check client logs by pressing Ctrl + Shift + K and typing log.info, log.error when the client gets stuck.

Assasans commented 2 years ago

Could you send me the old and the new version of the map, if you don't mind. I'll be able to check them tomorrow.

Cavebrute commented 2 years ago

Yes there are many more proplibs needed, i'm trying to replace Parma with a remake of Chernushka from TO. I have added every single proplib in the proplibs.xml file, because I was did not know which one the map uses. Not sure if this can cause a problem, but I thought I would mention it.

I checked log.info, and this was the last line: INFO [network] [18:03] init_bonuses. log.error did not give back any text.

Should I sent the maps here?

Assasans commented 2 years ago

I have added every single proplib in the proplibs.xml file, because I was did not know which one the map uses.

If they are in sync with proplibs in the $theme.json file - that should be ok.

Should I sent the maps here?

Yes, you can zip map.xml, proplibs.xml and $theme.json files and send the archive here.

Cavebrute commented 2 years ago

pvutljsut.zip Here it is, take your time, I can wait a few days/weeks, if it's something that cannot be fixed i am fine with it.

Assasans commented 2 years ago

I found out the problem, you have one prop broken - Steel tower from Industrial Elements. It should have <texture-name>Steel tower 1</texture-name> but in your new map it is empty (<texture-name/>), so the client was throwing ArgumentError: Diffuse data is null.

Here is fixed map: fix.zip, I also cleaned proplibs both in proplibs.xml and summer-day.json

image

Cavebrute commented 2 years ago

That's awesome! Thanks so much for the help!