- This topic has 11 replies, 4 voices, and was last updated 11 years ago by Vaughn “Drathy” Royko.
-
AuthorPosts
-
December 9, 2013 at 7:56 am #4188burakalkanMember
I’m make a mod but have 1-2 errors,
[1.6]
this is .json code
http://www.mediafire.com/view/h625qjq9l9a062u/Item%20Kit%20By%20Burakalkan.js
and download link
http://www.mediafire.com/download/h625qjq9l9a062u/Item+Kit+By+Burakalkan.js
Sorry My English is bad :-/
- This topic was modified 11 years ago by burakalkan.
- This topic was modified 11 years ago by burakalkan.
December 9, 2013 at 9:26 am #4192Grom PEModeratorSome item names are incorrect, that’s why you’re getting errors.
December 9, 2013 at 1:40 pm #4195burakalkanMemberyep, idk some item names; wooden door,wooden wall, wooden chest etc. where can i find correct names?
December 9, 2013 at 2:37 pm #4197Vaughn “Drathy” RoykoKeymasterIn your browser console, you can type in
console.log(items);
to get a proper listing.December 9, 2013 at 6:20 pm #4206JamesIIIModeratorIs there a way to do the same thing to get a list of the all the current monsters with proper names?
December 9, 2013 at 9:22 pm #4207Vaughn “Drathy” RoykoKeymasterNot sure what you mean by proper names, but you could do:
for (var i in npcs) { console.log(npcs[i].name); }
Otherwise, just:
console.log(npcs);
Should suffice.
December 10, 2013 at 8:18 am #4208burakalkanMemberHey what’s spawn monster command?
or pls how to find commands?
like
$("#optionswindow").on("click", '#carving', function(e) {itemGet("shale");});
December 16, 2013 at 10:34 am #4247Vaughn “Drathy” RoykoKeymasterThere’s no proper API or modding documentation as of yet, so it’s just mostly looking through the source to find em’ π
Spawn monster can be used like:
spawnMonster("", player.x+1, player.y);
spawnMonster("giantrat", player.x+1, player.y);
spawnMonster("pirateghost", player.x+1, player.y, true);
The last parameter “true” forces the spawn, even if the monster shouldn’t normally be spawned in that location.
December 18, 2013 at 12:58 pm #4263JamesIIIModeratorThe renderTiles function no longer seems to work, is there a new method of tile manipulation that was implented? If so, could you give me an example of how to render a specific tile now?
December 18, 2013 at 5:32 pm #4268Vaughn “Drathy” RoykoKeymasterIt’s now:
changeTile(change, changeX, changeY, stackBypass);
Parameters:
change: tile’s name, example “dirt”.
changeX: tile’s x value, example 244.
changeY: tile’s y value, example 244.
stackBypass: either true or false (or nothing), if true, it will place the tile on top of the stack of tiles at that x/y.You may also want to call
game.updateTiles = true;
so the change is shown immediately.December 18, 2013 at 10:39 pm #4271JamesIIIModeratorWould modifying the space 1 square above your current still be done as changeTile(dirt,x,y+1);?
I only ask because 244 seemed like a rather large number to use.December 20, 2013 at 10:21 am #4289Vaughn “Drathy” RoykoKeymasterUsing it like
player.x, player.y+1
for example would still work just fine with it. -
AuthorPosts
- You must be logged in to reply to this topic.