This is what I am doing currently, but it takes forever:
1. Rename tome-3.9.38-nomusic.team to tome-3.9.38-nomusic.zip
2. Unzip tome-3.9.38-nomusic.zip
3. Modify lua files
4. Rezip into tome-3.9.38-nomusic.zip
5. Delete unzipped files
6. Rename tome-3.9.38-nomusic.zip to tome-3.9.38-nomusic.team
This is hopeless for changing code and then running the game and then seeing how it works.
If I don't do it this way, the program crashses, even in cheat mode.
Is there a better way, where I could just change the code and then start the game?
That is, how can I unzip all the *.tea? files, and then modify them as I wish, and then simply run the program. I used to be able to do this on earlier betas.
How do I modify and test code?
Moderator: Moderator
How do I modify and test code?
MADNESS rocks
-
- Archmage
- Posts: 372
- Joined: Fri Jan 20, 2012 12:13 am
Re: How do I modify and test code?
One thing you could do is make an addon, copy everything you want to change over to the proper overload folder, and then edit them there.
<Ferret> The Spellblaze was like a nuclear disaster apparently: ammo became the "real" currency.
Re: How do I modify and test code?
ok - I"m modifying at this stage damage_types.lua and Actor.lua. Can you explain how to do this in more detail?
MADNESS rocks
-
- Archmage
- Posts: 372
- Joined: Fri Jan 20, 2012 12:13 am
Re: How do I modify and test code?
If you download an addon from the site, it should be a .teaa file. You can unzip this into a folder (in the game/addons folder), which you can rename and edit to make a new addon without having to make everything from scratch. The Darkwood UI is probably a good base for you. If you go looking through the addon's folder, you can see its structure. The important parts for you are the init.lua and the overload folder (which, as it happens, are all that Darkwood UI has).
The init.lua should tell you the addon's name, information, and what kinds of additional stuff to load it has. You'll want to edit this file to have your new addon's information; the Darkwood UI should have the proper setting for the overload, superload, hooks, and data variables.
The overload folder has a list of files that replace the module's default files. For example, whenever the game wants to load the image \data\gfx\ui\playerframe\back.png, Darkwood UI says "hey, I have an image at \overload\data\gfx\ui\playerframe\back.png, go load that instead." All you have to do is remove the Darkwood UI overload files and put in the files you want to change. (in your case, damage_types.lua and Actor.lua) Make sure to replicate their directory path so the game knows which damage_types.lua and Actor.lua to replace.
Addons should work even when they are unzipped, so after you go make your own testbed addon you won't need to zip it to test it out, I don't think.
The init.lua should tell you the addon's name, information, and what kinds of additional stuff to load it has. You'll want to edit this file to have your new addon's information; the Darkwood UI should have the proper setting for the overload, superload, hooks, and data variables.
The overload folder has a list of files that replace the module's default files. For example, whenever the game wants to load the image \data\gfx\ui\playerframe\back.png, Darkwood UI says "hey, I have an image at \overload\data\gfx\ui\playerframe\back.png, go load that instead." All you have to do is remove the Darkwood UI overload files and put in the files you want to change. (in your case, damage_types.lua and Actor.lua) Make sure to replicate their directory path so the game knows which damage_types.lua and Actor.lua to replace.
Addons should work even when they are unzipped, so after you go make your own testbed addon you won't need to zip it to test it out, I don't think.
<Ferret> The Spellblaze was like a nuclear disaster apparently: ammo became the "real" currency.
-
- Master Artificer
- Posts: 726
- Joined: Fri Feb 03, 2012 3:53 am
Re: How do I modify and test code?
Personally, I just told my computer to open .team files with Winrar.
Re: How do I modify and test code?
Thanks, I got this to work. I've started working on my first add on.
MADNESS rocks
Re: How do I modify and test code?
Doesn't it work to run it straight from the folder (instead of the .teaa file)?
Although, creating a custom addon is better, and it definitely works without compressing it.
Although, creating a custom addon is better, and it definitely works without compressing it.