speth / planetary-annihilation-db

Unit Database for Planetary Annihilation
MIT License
5 stars 4 forks source link

Doesn't load icons for server mod units #8

Closed Quitch closed 8 years ago

Quitch commented 8 years ago

All icon spots are blank.

clipboard01

Quitch commented 8 years ago

Deployed latest version, but icons are still missing.

speth commented 8 years ago
Quitch commented 8 years ago
  1. Double-click webunits.py
  2. Go to localhost:8080 in Chrome
  3. Load mod
  4. Click vehicles title
Bottle v0.11.6 server starting up (using WSGIRefServer())...
Listening on http://localhost:8080/
Hit Ctrl-C to quit.

loading DB for current
Unhandled ammo source 'factory' for /pa/units/land/anti_nuke_launcher/anti_nuke_launcher_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/nuke_launcher/nuke_launcher_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/unit_cannon/unit_cannon_tool_weapon.json
Unknown spawn layer: WL_Underwater
Unknown spawn layer: WL_Underwater
unclassified tool for tutorial_ai_commander: {'aim_bone': 'bone_turret', 'spec_id': '/pa/units/commanders/tutorial_ai_commander/tutorial_ai_commander_arm.json', 'count': 1}
unclassified tool for tutorial_ai_commander_2: {'aim_bone': 'bone_turret', 'spec_id': '/pa/units/commanders/tutorial_ai_commander_2/tutorial_ai_commander_2_arm.json', 'count': 1}
unclassified tool for tutorial_player_commander: {'aim_bone': 'bone_turret', 'spec_id': '/pa/units/commanders/tutorial_player_commander/tutorial_player_commander_arm.json', 'count': 1}
Unhandled ammo source 'factory' for /pa/units/land/anti_nuke_launcher/anti_nuke_launcher_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/nuke_launcher/nuke_launcher_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/titan_structure/titan_structure_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/unit_cannon/unit_cannon_tool_weapon.json
Unknown spawn layer: WL_Underwater
127.0.0.1 - - [24/Feb/2016 17:02:56] "GET / HTTP/1.1" 200 18651
loading DB for current:com.pa.legion-expansion.server
Unhandled ammo source 'time' for /pa/units/air/L_fighter_adv/L_fighter_adv_rocket_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/L_scout_bot/L_scout_bot_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/L_scout_bot/L_scout_bot_radar_mode_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/anti_nuke_launcher/anti_nuke_launcher_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/anti_nuke_launcher/anti_nuke_launcher_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/L_bot_artillery/L_bot_artillery_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/L_bot_artillery/bomb/bomb_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/nuke_launcher/nuke_launcher_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/L_nuke_launcher/L_nuke_launcher_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/L_hover_tank_adv/L_hover_tank_adv_tool_weapon.json
Unhandled ammo source 'factory' for /pa/units/land/unit_cannon/unit_cannon_tool_weapon.json
Unknown spawn layer: WL_Underwater
Unknown spawn layer: WL_Underwater
Unhandled ammo source 'time' for /pa/units/sea/L_attack_sub/L_attack_sub_tool_weapon.json
Unknown spawn layer: WL_Underwater
Unhandled ammo source 'time' for /pa/units/sea/L_missile_ship/L_missile_ship_rocket_tool_weapon.json
Unknown spawn layer: WL_Underwater
Unhandled ammo source 'time' for /pa/units/land/L_titan_bot/L_titan_bot_rocket_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/titan_structure/titan_structure_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/L_tank_swarm/L_tank_swarm_tool_weapon.json
Unhandled ammo source 'time' for /pa/units/land/titan_structure/titan_structure_tool_weapon.json
127.0.0.1 - - [24/Feb/2016 17:03:05] "GET /?version=current:com.pa.legion-expansion.server HTTP/1.1" 200 42346
127.0.0.1 - - [24/Feb/2016 17:03:07] "GET /table/vehicles?version=current:com.pa.legion-expansion.server HTTP/1.1" 200 17586

Definitely running latest version. Deleted old folder, downloaded latest ZIP from code page and extracted.

Images are as before, white squares.

padb.json

{
    "pa_root": "C:/Program Files (x86)/Steam/steamapps/common/Planetary Annihilation Titans/media",
    "expansion": "pa_ex1",
    "mods_root": "C:/Users/paulm/AppData/Local/Uber Entertainment/Planetary Annihilation/server_mods",
    "versions": []
}
speth commented 8 years ago

Can you try checking out the quitch-debug branch, running webunits.py, visiting http://localhost:8080/unit/L_mortar_tank?version=current:com.pa.legion-expansion.server and posting the output of the lines that start with DEBUG? I'm hoping this will shed some light on the issue (because this works just fine on my system).

Quitch commented 8 years ago
DEBUG: checking for icon in "C:/Users/username/AppData/Local/Uber Entertainment/Planetary Annihilation/server_mods\Legion-Expansion-Server/pa_ex1/units/land/L_mortar_tank/L_mortar_tank_icon_buildbar.png": False
DEBUG: checking for icon in "C:/Users/username/AppData/Local/Uber Entertainment/Planetary Annihilation/server_mods\Legion-Expansion-Server/pa/units/land/L_mortar_tank/L_mortar_tank_icon_buildbar.png": False
DEBUG: checking for icon in "C:/Users/username/AppData/Local/Uber Entertainment/Planetary Annihilation/server_mods\Legion-Expansion-Server/ui/main/game/live_game/img/build_bar/units/L_mortar_tank.png": False
DEBUG: checking for icon in "C:/Users/username/AppData/Local/Uber Entertainment/Planetary Annihilation/server_mods\Legion-Expansion-Server/ui/alpha/live_game/img/build_bar/units/L_mortar_tank.png": False
DEBUG: checking for icon in "C:/Program Files (x86)/Steam/steamapps/common/Planetary Annihilation Titans/media/pa_ex1/units/land/L_mortar_tank/L_mortar_tank_icon_buildbar.png": False
DEBUG: checking for icon in "C:/Program Files (x86)/Steam/steamapps/common/Planetary Annihilation Titans/media/pa/units/land/L_mortar_tank/L_mortar_tank_icon_buildbar.png": False
DEBUG: checking for icon in "C:/Program Files (x86)/Steam/steamapps/common/Planetary Annihilation Titans/media/ui/main/game/live_game/img/build_bar/units/L_mortar_tank.png": False
DEBUG: checking for icon in "C:/Program Files (x86)/Steam/steamapps/common/Planetary Annihilation Titans/media/ui/alpha/live_game/img/build_bar/units/L_mortar_tank.png": False
127.0.0.1 - - [25/Feb/2016 21:19:56] "GET /unit/L_mortar_tank?version=current:com.pa.legion-expansion.server HTTP/1.1" 200 11165
Quitch commented 8 years ago

Ah, I think I see why it might work for you and not me. The Legion mod is split into a client and server mod using the split_into_mods.py script found in the root folder (which I assume you don't run). The icons padb is looking for are not in the server mod but rather in the client mod.

speth commented 8 years ago

Indeed, that would do it. I'm not sure how PADB would know to look in some other directory. It doesn't appear that this information is contained in modinfo.json (or anywhere else?)

Quitch commented 8 years ago

modinfo.json should link to the client mod via a dependency.

Again, the modinfo.json in the root folder should be ignored, it's the ones in the modinfo subfolder that are real.

speth commented 8 years ago

So then this would require PADB to:

I think a simpler alternative, at least for the time being, would be to just keep copies of the icons in the server mod as well (by modifying split_into_mods.py).

Quitch commented 8 years ago

Unfortunately that would be another 3MB of information for upload to the server and download by the clients, so it seems unlikely that will be done, but at least I have a workaround if needed.