Ballistic Mystix APIs
Character rendering
https://api.bmsite.net/char/render?race=fy&gender=m
https://api.bmsite.net/char/render/:type/:width?race=fy&gender=m
This will allow to render character with items (no particle effects)
If no type is selected and 3d rendering fails, then HTTP status code 203 with 2d rendered images will be
returned.
Optional parameters:
Avatar appearance
- race - fy (fyros), ma (matis), tr (tryker), zo
(zorai)
- gender - m (male), f
(female)
- age - number 0 (young), 1, 2 (old)
- eyes - eyes color
- hair - hair index and color, (hair=index/color)
- tattoo - facial tattoo
- gabarit - body attributes, 5 comma separated numbers (height, torso, arms, legs, breast)
- morph - head attributes, 7 comma separated numbers (morph target 1 to 8)
Armor, contains sheetid and item color (eg, chest=iczalv_3.sitem/1)
- head - helmet
- chest - vest
- arms - sleeves
- hands - gloves
- feet - boots
- legs - pants
Items, contains sheetid (eg, handl=icmm1ss_2.sitem)
- handl - item in left hand (weapon)
- handr - item in right hand, (shield, dagger)
If requested item or haircut is not found (or possibly can't be used by race), then default item is used
instead.
Advanced parameters
Normal parameters will override these.
- vpa - SPropVisualA
- vpb - SPropVisualB
- vpc - SPropVisualC
Rendering service code is available on github (php
client, c++ server).
Examples
2d rendered image
3d rendered image (45deg angle)
Maps (icon)
https://api.bmsite.net/maps/icon/:size/:color/:name.png
- :size - optional, size of the icon, 16, 24 or 32, default 24
, ,
- :color - optional, colorize icon if possible, color in hex number RGB, if color
is not set, show icon as is
, ,
- :name - name of the icon
- building
- camp
- dig
- lm_marker
- map_event
- mektoub
- npc
- op_townhall
- portal
- spawn
- tp_kami
- tp_karavan
Maps icon code is available on github.
Maps javascript
map.js requires leaflet.js to be loaded separately.
https://api.bmsite.net/maps/:version/map.min.js
https://api.bmsite.net/maps/:version/map-areas.min.js
Where
- :version - request specific version, if not set the latest branch is used.
- v1 - latest v1.3.1
- v1.3.1 - use specific tagged version.
If version is not set, then latest version is provided automatically.
Non-minified version is available if map.min.js is replaced with map.js and map-areas.min.js with map-areas.js.
map-areas.js is only needed if you want to use Ryzom.findIngameAreas(x,y) function, otherwise it does not need to be included
Tagged versions
Tagged versions do not change. Downloading and hosting yourself is recommended. Using subresource integrity is recommended.
Example
var map1 = Ryzom.map('maps-example1');
map1.addControl(new L.Control.MousePosition());
var fh = [17162, -32906];
var marker = L.marker(fh, {icon: Ryzom.icon('npc', 'FF9', 24), title: 'Hello!'}).addTo(map1);
marker.bindPopup('Hello!');
map1.setView(fh, 8);
var map2 = Ryzom.map('maps-example2', { rzMode: 'server' });
map2.addControl(new L.Control.MousePosition());
var map3 = Ryzom.map('maps-example3', { rzSatellite: false });
map3.addControl(new L.Control.MousePosition());
Maps javascript code is available on github.
Maps tiles
https://api.bmsite.net/maps/:mode/:name/:z/:x/:y.jpg
Where
- :mode - Selects world or server coordinates
- :name - Use ingame maps (atys) or rendered maps (atys_sp)
- :z - zoom level from 1 to 11
- :x and :y - tile coordinates
Translated text tiles are in png format so change .jpg to .png
- :name - lang_en, lang_de,
lang_fr, lang_es, lang_ru
All images are 256x256px. Base zoom level is 10 where 1px = 1meter
Maps tiles generator code is available on github.
Map renderer (c++) is available on github.
Static maps
https://api.bmsite.net/maps/static?parameters
Where parameters are
- center - X,Y - ingame coordinates for map center, ie
center=17200,-32970
- zoom, maxzoom - map zoom level, range 1 to 11, if not
set, then maxzoom sets limit to
automatic zoom
- size - WxH of output image size, maximum is 512x512,
default is 256x256
- language - en, fr, de, es, ru - if not set,
then area names
are not included
- format - jpg, png
- maptype - atys, atys_sp -
use ingame maps or rendered map tiles
- mapmode - world or server
coordinate tiles
- markers - define one or more markers
Format: markers=color:0x112233|label:example|icon:lm_marker|x1,y1|x2,y2
- x,y - one or more ingame coordinates
- color - set icon and text background color, format RRGGBB or RRGGBBAA
- label - custom text
- label_size - range 3 to 20
- label_color - text color
- label_outline - text outline color
- icon - icon name to use, see maps icon.
- circle - r or rx,ry
- draw ellipse/circle using radius in meters
- fillcolor - circle inner fill color
- weight - circle outer line width, default 1
- path - define one or more polygon/polyline
Format: path=color:0x112233|label:example|fillcolor:0xAABBCC50|weight:5|x1,y1|x2,y2
- x,y - two or more ingame coordinates
- label - custom text to draw in polyline/polygon centroid location
- label_size - range 3 to 20
- label_color - text color
- label_outline - text outline color
- color - polyline/polygon line color
- weight - polyline/polygon line width
- fillcolor - if set then draw closed and filled polygon. otherwise draw
polyline
Static maps generator code is available on github.
Weather
https://api.bmsite.net/atys/weather?continent=tryker,matis&cycles=5&offset=2
Parameters
- continent - comma separated continent names, if not set, then return all
continents.
- cycles - number of cycles to return starting from current cycle, range 0 to 40.
if 0, then only
return current.
- offset - weather from previous cycles, range 0 to 8.
Returns JSON
{
"version": "1.0",
"hour": "372877.079",
"cycle": 124292,
"continents": {
"zorai": {
"124292": {
"cycle": 124292,
"condition": "good",
"value": "0.225",
"text": "uiFair"
}
}
}
}
Where
- version - json format version info, currently 1.0
- hour - current hour from day 0 (spring)
- cycle - current weather cycle
- continents - one or more continent object with continent name as index.
Each continent object contains one or more weather object with weather cycle as index.
Weather object:
- cycle - weather cycle
- condition - deposit condition
- value - weather value
- text - weather text
Ryzom weather code is available on github.