Getting Started/Tutorials?
Moderator: Moderator
Getting Started/Tutorials?
This is my first time using Lua but I'm feeling pretty comfortable with it. I'm familiar with basic programming principles and Lua seems pretty simple.
The real thing I'm trying to find is tutorials and documentation on making your own modules.
The How-to guides on the site seem sparse and serve as basic reference material.
http://te4.org/wiki/t4modules-module-howto-guides
The "Getting Started" page just tells you how to take the example folder and setup the init file, which basically just changes the name of your module and not much else.
I can't seem to find any guides on module making on google and the how to section on the site doesn't even seem to go over how to implement your own graphics.
I would like to do something simple for starters, taking the example module and turning it into a graphic RL where you go down x levels, obtain "amulet of yendor", then escape out of the dungeon, i.e. your basic roguelike.
At some point, I'd like to implement crafting and recipes using this engine but I'd like to do a simple RL for starters to get a hang of the engine but even something as simple and straightforward as that seems to be lacking documentation.
I've read articles on the website, I've tried googling...am I missing something here? Can some kind soul point me in the right direction?
The real thing I'm trying to find is tutorials and documentation on making your own modules.
The How-to guides on the site seem sparse and serve as basic reference material.
http://te4.org/wiki/t4modules-module-howto-guides
The "Getting Started" page just tells you how to take the example folder and setup the init file, which basically just changes the name of your module and not much else.
I can't seem to find any guides on module making on google and the how to section on the site doesn't even seem to go over how to implement your own graphics.
I would like to do something simple for starters, taking the example module and turning it into a graphic RL where you go down x levels, obtain "amulet of yendor", then escape out of the dungeon, i.e. your basic roguelike.
At some point, I'd like to implement crafting and recipes using this engine but I'd like to do a simple RL for starters to get a hang of the engine but even something as simple and straightforward as that seems to be lacking documentation.
I've read articles on the website, I've tried googling...am I missing something here? Can some kind soul point me in the right direction?
Re: Getting Started/Tutorials?
Unfortunately there is very little documentation on how to make a module. There have been only a few modules actually made. One that would work that you can use as an example is broken bottle (a 7drl). This will demonstrate some basic functionality like inventory. So for the most part just be prepared to pick apart and module you can find. Also if you need help the tome irc is a good place to go (irc.rizon.net #tome).
Those who complain are just Volunteering to fix the problem
<yufra> every vault designer should ask themselves exactly that: What Would Grey Do?
<yufra> every vault designer should ask themselves exactly that: What Would Grey Do?
Re: Getting Started/Tutorials?
I'll second joining the IRC channel, we are a friendly bunch. In regards to writing tutorials, documentation is definitely an area that needs improvement. Most of the devs are quite busy doing the "fun" stuff, though, and what little documentation there is has been done by people first digging in and learning a specific portion of the code (I did the chat how-to and a few others when first joining ToME). If you come by IRC and get help there and then take that and improve the documentation that would be fantastic. Cheers!
<DarkGod> lets say it's intended
Re: Getting Started/Tutorials?
I would definitely be game for documenting the process of making a simple module.
I had a feeling that ripping apart someone else's module and sifting through the code page by page would be the answer, which isn't exactly ideal... :S
But, I'll give it a go.
I had a feeling that ripping apart someone else's module and sifting through the code page by page would be the answer, which isn't exactly ideal... :S
But, I'll give it a go.
-
- Posts: 4
- Joined: Sun Apr 01, 2012 3:57 pm
- Contact:
Re: Getting Started/Tutorials?
I am just starting work on my own module.
Well, I've been planning the game for decades but I am looking into learning Lua now!
I am beyond eager to see even a very basic walkthrough so I will be watching this thread.
Thanks!
Well, I've been planning the game for decades but I am looking into learning Lua now!
I am beyond eager to see even a very basic walkthrough so I will be watching this thread.
Thanks!

-
- Posts: 4
- Joined: Sun Apr 01, 2012 3:57 pm
- Contact:
Re: Getting Started/Tutorials?
*bump*
Any updates?
Tutorials?
A path to follow for those hoping to make their own module?
Any updates?
Tutorials?
A path to follow for those hoping to make their own module?

Re: Getting Started/Tutorials?
I've just started work on my own module, and I thought about blogging how it's going. Really, though, the wiki is pretty good (at least, for as far as I've gotten); it doesn't cover everything, but the topics there are pretty close to the order you'd want to follow for making your own module.
Are there particular questions you have?
Are there particular questions you have?
Re: Getting Started/Tutorials?
I agree that there are some things left undocumented, which makes me ask all sorts of questions over at #tome...
Re: Getting Started/Tutorials?
I would suggest making a list of the things you struggle with so we can try as a community to get some suitable documentation in place.
Re: Getting Started/Tutorials?
Problems I ran into when trying to create a (working) PlayerDisplay:
What do x, y stand for? Are they measured in pixels?
What does self:resize do and what are the arguments?
Why can't I have PlayerDisplay work the same way as LogDisplay, i.e. with parameters in load.lua?
Some others:
Why can't I call dam = rng.dice(x,y) ? Since it doesn't work, how do I randomize damage?
How do I get the game to display x if a function returns something else (ie. I have a value of 5 and want the sheet to display 18 (+5), for example?
What do x, y stand for? Are they measured in pixels?
What does self:resize do and what are the arguments?
Why can't I have PlayerDisplay work the same way as LogDisplay, i.e. with parameters in load.lua?
Some others:
Why can't I call dam = rng.dice(x,y) ? Since it doesn't work, how do I randomize damage?
How do I get the game to display x if a function returns something else (ie. I have a value of 5 and want the sheet to display 18 (+5), for example?
Re: Getting Started/Tutorials?
Not sure what specific instance you mean, but yes it's pixels.Zireael wrote: What do x, y stand for? Are they measured in pixels?
Where is it?What does self:resize do and what are the arguments?
Because it's not a default part of the game module. Every module needs a log, but PlayerDisplay is something you have to add on yourself. And what's the difference anyway? You just change it in Game.lua instead.Why can't I have PlayerDisplay work the same way as LogDisplay, i.e. with parameters in load.lua?
The correct function is dam = rng.range(x,y). This returns a random value from x to y. Not sure if you want something else? You could always write your own dice function.Why can't I call dam = rng.dice(x,y) ? Since it doesn't work, how do I randomize damage?
Another useful one is rng.table({x,y,z}) - it chooses a random entry from a list of values. You can use this for randomised text, weighted randomisation of numbers, choosing a random enemy target, etc.
Could you be more specific? What's your code and what do you want it to show?How do I get the game to display x if a function returns something else (ie. I have a value of 5 and want the sheet to display 18 (+5), for example?
Re: Getting Started/Tutorials?
Quoted from your own PlayerDisplay topic.What does self:resize do and what are the arguments?
I'm trying to find out why copying your code from Shadow doesn't work (no errors in the log)local gw, gh = core.display.size()
self:resize(1, gh - 99, 234, 85)
Re: Getting Started/Tutorials?
I wish there was a howto or a reference in LuaDoc about engine.interface.Combat.
What's a projector?
What's a projector?
Re: Getting Started/Tutorials?
The stairs stuff isn't too hard - I can go through that with you whenever you feel ready.