Mai jos va voi invata cum sa mutati blend.txt --> sa fie pe JSON (blend.json)
Nota: Aveti nevoie de asta ca sa mearga json: https://github.com/nlohmann/json
Exemplu de blend.json dupa modificari:
Code:
{
"50821": {
"type": "CRITICAL_PCT",
"value": [ 8, 10, 12, 15, 20 ],
"duration": [ 60, 120, 180, 300, 600 ]
},
"50822": {
"type": "PENETRATE_PCT",
"value": [ 8, 10, 12, 15, 20 ],
"duration": [ 60, 120, 180, 300, 600 ]
},
"50823": {
"type": "ATTACK_SPEED",
"value": [ 2, 3, 4, 5, 8 ],
"duration": [ 60, 120, 180, 300, 600 ]
},
"50824": {
"type": "RESIST_MAGIC",
"value": [ 8, 10, 12, 15, 20 ],
"duration": [ 60, 120, 180, 300, 600 ]
},
"50825": {
"type": "ATT_BONUS",
"value": [ 30, 50, 70, 90, 120 ],
"duration": [ 60, 120, 180, 300, 600 ]
},
"50826": {
"type": "DEF_BONUS",
"value": [ 40, 70, 100, 150, 200 ],
"duration": [ 60, 120, 180, 300, 600 ]
},
"51002": {
"type": "ENERGY",
"value": [ 1, 3, 5, 7, 10 ],
"duration": 1800 // It is possible to use only one duration (and value).
}
}*Poze / Video:
*Link download / Code:
Modificati blend_item.cpp asa:
Modificati blend_item.h asa:
Acum modificam in comanda de reload pt GM ca sa isi dea refresh. Deschidem cmd_gm.cpp si adaugam:
Code:
#include "blend_item.h"Code:
case 'c': // cube
Cube_init ();
break;Alte tutoriale pentru a trece fisiere pe JSON:
- item_proto pe json: tutorial-item-proto-json-client-t5526.html
- fish loading pe json: fish-loading-renewal-json-t1199.html
- common_drop_item pe json: common-drop-item-json-t5139.html
- special_item_group pe json: special-item-group-json-t5146.html


la acest mesaj și conținutul se va afișa automat.

