Anyone got a quick start guide for debugging/compiling on Windows, preferably with an IDE?
I checked the source out, downloaded ZeroBrane Studio (which seems like a sensible IDE), but haven't figured out how to run Tome interactively in the IDE.
There are some excellent resources:
https://te4.org/wiki/Debugging
https://te4.org/wiki/Tales_of_Maj%27Eyal_Wiki
But the latter seems Linux focused. Maybe I should be using Linux and vim and all the old school goodies, but I'm too lazy. I find it super cool this game allows players to fix/add stuff (e.g., https://git.net-core.org/tome/t-engine4/merge_requests), and just wanted to see if there was a recent guide for making, testing, and submitting quick fixes. I'm retired from software dev, but this game has sparked an interest I thought was dead in me, and I'd love to learn more about Lua, but I've always hated the process of dev environment setup (usually so many gotcha's that you go through once and never deal with again).
For example, I wanted to update frost-alchemy.lua BODY_OF_ICE talent to have a more accurate tooltip so that 'info' reflects the same calculation in 'activate':
local resist = t.getResistance(self, t) * 0.6
But I don't like to make changes without testing, so if there's an easy way to get a windows dev environment started without much hassle, please let me know. Thanks!!
Windows development
Moderator: Moderator
Re: Windows development
You don't need an IDE or compiler as Lua just compiles on runtime. Most of us just use Notepad++ or Vim.
I suggest trying to make an addon first, as its simpler in setup needs.
I suggest trying to make an addon first, as its simpler in setup needs.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Windows development
Thanks HousePet! And you're right, I should start with an addon.
I suppose I just got spoiled with basic IDE functionality (stepping through execution, inspecting/altering variables on the fly, jumping to functions, etc). When approaching a new code base, sometimes stepping through helps me quickly understand the flow (combat, etc.). Unless much of it is async. I'm kind of assuming single threaded (even sync bind hook events), but I don't know much about lua or the engine yet, so I'm probably wrong on that assumption.
In absence of being able to debug with an IDE, I suppose a tail on the log file would be the next best/easiest way to learn the flow -- not ideal for lazy bum like myself, but it's something.
Thanks again!
I suppose I just got spoiled with basic IDE functionality (stepping through execution, inspecting/altering variables on the fly, jumping to functions, etc). When approaching a new code base, sometimes stepping through helps me quickly understand the flow (combat, etc.). Unless much of it is async. I'm kind of assuming single threaded (even sync bind hook events), but I don't know much about lua or the engine yet, so I'm probably wrong on that assumption.
In absence of being able to debug with an IDE, I suppose a tail on the log file would be the next best/easiest way to learn the flow -- not ideal for lazy bum like myself, but it's something.
Thanks again!
Re: Windows development
The game does multi thread, but its just for the internet functionality and particles, so its not that complex.
The engine will give you an error message, file and line number, and a stack trace when it hits an error (automatically written to the log file as well, just in case), and it is usually able to continue running. So you may discover you don't miss the IDE functionality too much.
Also if you enable developer mode, you can access the Lua Console which allows you to check/change any variable (once you know where to find them). There is also a debug menu with a variety of useful features.
If you are familiar with the use of Git, you sound like you have the experience to jump straight into direct source code tampering. I suggest the addon route to anyone who hates setting up development environments or is unfamiliar with Lua, as its the easiest way to learn about how the game/engine/lua works, with minimum tedium. A properly made addon is also a very easy way for other people to test out your new code/feature/whatever you'd like to do.
For getting started with addons, I tend to suggest grabbing one of my own addons and pulling it apart to see how it ticks. I bugged DarkGod quite a lot earlyish in the games development about how to do various things and have tried to use the best practice as far as compatibility is concerned. I'm not great with remember to write comments, but non-coder people have been able to follow my code well enough to see how to do their own thing. All the addons are actually zip files with no compression, so you just have to rename the extension and unpack it.
If you need any help, you can usually get help on the IRC channel.
The engine will give you an error message, file and line number, and a stack trace when it hits an error (automatically written to the log file as well, just in case), and it is usually able to continue running. So you may discover you don't miss the IDE functionality too much.
Also if you enable developer mode, you can access the Lua Console which allows you to check/change any variable (once you know where to find them). There is also a debug menu with a variety of useful features.
If you are familiar with the use of Git, you sound like you have the experience to jump straight into direct source code tampering. I suggest the addon route to anyone who hates setting up development environments or is unfamiliar with Lua, as its the easiest way to learn about how the game/engine/lua works, with minimum tedium. A properly made addon is also a very easy way for other people to test out your new code/feature/whatever you'd like to do.
For getting started with addons, I tend to suggest grabbing one of my own addons and pulling it apart to see how it ticks. I bugged DarkGod quite a lot earlyish in the games development about how to do various things and have tried to use the best practice as far as compatibility is concerned. I'm not great with remember to write comments, but non-coder people have been able to follow my code well enough to see how to do their own thing. All the addons are actually zip files with no compression, so you just have to rename the extension and unpack it.
If you need any help, you can usually get help on the IRC channel.
My feedback meter decays into coding. Give me feedback and I make mods.