Pbl dependencies?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Pbl dependencies?

Post by Gwledig »

I have been exporing DATAURI to embed images in MP games to avoid players joining seeing blank units etc. I have given up on this as DATAURI doesn't work for most WML apart from [option]image= due to conflicting way the commas are interpreted for comma-separated lists of images in places like image= and overlays=

So after adding in some special graphics to my MP mod, I am wondering if I can force the add-on to be downloaded for players joining a MP game, I am testing the following in PBL file:

Code: Select all

dependencies=Conquest+ Space/Ranged
ie the dependency is the name of the add-on itself...

I know the addon-server will show dependencies when installing an add-on, does anyone see a problem declaring a dependency in this way and should this be a reliable way to force the addon to be downloaded? The addon is 1.98 MB there are only 30 PNG images added so hopefully not too demanding on resources for players joining games....
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Pbl dependencies?

Post by Ravana »

Spaces are not allowed in addon paths, so it cant be correct dependency id.
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Pbl dependencies?

Post by Gwledig »

I was wondering that, the name= is actually -
title="Conquest+ Space/Ranged"
type="map_pack"
there is no ID= in the PBL or main.cfg, do I just need a unique ID like

ID="conquest_plus_space"

then declare this in dependencies="conquest_plus_space"

or does the dependencies= need to be the root directory/folder of the mod? e.g. "Conquestplus_space"

?
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Pbl dependencies?

Post by Ravana »

Addon id is its folder name.
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Pbl dependencies?

Post by Gwledig »

ah not seen this anywhere in PBL etc... but do you need this e.g. ID="Conquestplus_space" (this is root folder) declared in main or plb files?
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Pbl dependencies?

Post by Ravana »

Dependency works as suggestion to user that he should also install another addon.
User avatar
Gwledig
Posts: 569
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Pbl dependencies?

Post by Gwledig »

Ah
you don't need to put anything in PBL the dependencies= is only for the addon-server to prompt user to install other required add-ons in the actual add-on interface, to force DL of the add-on within the game lobby, i.e player must install the scenario themselves you have to add some things into [multiplayer] to declare require-scenario and optionally the version number required e.g.

Code: Select all

[multiplayer]
id=Conquest+_Ysk
name=_"Conquest+ Space Ysk REQUIRES DOWNLOAD"
description=_ "Conquest+ Space/Ranged: Ysk! Defeat your opponents in this Risk-inspired game. 
Factions used: Imperium, Eldor, Chaoz, Zygons, Pioneers.
For 2-6 players"
map_data="{~add-ons/Conquestplus_space/maps/ysk.map}"
require_scenario="yes"
addon_min_version="3.9.8"
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Pbl dependencies?

Post by octalot »

There's a specific set of keys for a self-dependency:
  • [era]'s require_era,
  • [multiplayer]'s require_scenario,
  • [modification]'s require_modification (probably works for [resource] too)
  • multiplayer [campaign]'s require_campaign
(I see you've just posted this, but thought I might as well post the whole list)
Post Reply