Author Topic: Is Lua use for coding weapons entities possible with Blockland?  (Read 1863 times)

I've designed a weapon for Blockland via google sketchup, and I have installed Lua coding software (for windows), and I am wondering whether or not it would be possible or even practical, or if there's an easier to use or more reliable software for the gaming physics for Blockland. Fair chance I might figure it out soon, but I figured I'd better get the question out so you more experienced coders (I'm hella new to the concept), can review and hopefully share some advice.

Blockland uses TorqueScript. You can look at existing/default add-ons to get an idea. They can be opened with any basic text editor, like notepad, notepad++, etc.

for weapons? probably not

thing is, Port just made this https://github.com/portify/BlocklandLua
pretty sure it requires impractical things and you couldn't really use it effectively if you wanted anyone to use your mod/weapon

thing is, Port just made this https://github.com/portify/BlocklandLua

It doesn't let you directly create objects (and thus datablocks) or create TorqueScript functions yet so even with that you'll still need to do something like..

ts.eval[[
  datablock ShapeBaseImageData(MyImage)
  {
    ...
  };

  function MyImage::onState(%this, %obj, %slot)
  {
    luaCall("MyImage__onState", %this, %obj, %slot);
  }
]]

function MyImage__onState(this, obj, slot)
  this = ts.obj(this)
  obj = ts.obj(obj)
  slot = tonumber(slot)
  ...
end
« Last Edit: September 25, 2015, 01:30:00 PM by portify »

I also used 7zip instead of winrar when preparing to script a modeled addon I have, since they are pretty much the same thing.

Just for future reference, when developing an add-on, just work on it as a folder, not a zip. This makes it easier to make changes to it. Once it's ready to be posted or given to other people, that's when you zip the contents of the folder (not the folder itself) and do make sure it's absolutely a .zip file. Not a .rar or .7z file renamed to a .zip.

Just for future reference, when developing an add-on, just work on it as a folder, not a zip. This makes it easier to make changes to it. Once it's ready to be posted or given to other people, that's when you zip the contents of the folder (not the folder itself) and do make sure it's absolutely a .zip file. Not a .rar or .7z file renamed to a .zip.

I definately see your mindset here, but do know that (as far as I know) 7zip is not a .zip file, though, to be fair. I was unable to find it when re-saving Notepad++, so I could be wrong. I was just suggested to use 7zip instead of the winrar program that was stated as a requirement in the torque script link in Elm's post in this genre As far as I can tell, you can set it on your desktop as anything you wish, the main focus is making it scriptable through Notepad++.

I definately see your mindset here, but do know that (as far as I know) 7zip is not a .zip file, though, to be fair. I was unable to find it when re-saving Notepad++, so I could be wrong. I was just suggested to use 7zip instead of the winrar program that was stated as a requirement in the torque script link in Elm's post in this genre As far as I can tell, you can set it on your desktop as anything you wish, the main focus is making it scriptable through Notepad++.
The point is that add-ons NEED to be in either a folder or a .zip to work.

Which of Elm's posts are you talking about?

I definately see your mindset here, but do know that (as far as I know) 7zip is not a .zip file, though, to be fair. I was unable to find it when re-saving Notepad++, so I could be wrong. I was just suggested to use 7zip instead of the winrar program that was stated as a requirement in the torque script link in Elm's post in this genre As far as I can tell, you can set it on your desktop as anything you wish, the main focus is making it scriptable through Notepad++.
You just need a plaintext .cs file to make it scriptable.

the main focus is making it scriptable through Notepad++.

http://tsforblockland.weebly.com/set-up.html

Edit: Wait are you unable to edit your extensions?