Modifying the Engine on Windows
Moderator: Moderator
-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Modifying the Engine on Windows
I wanted to try some different code in the engine but it doesn't look like it's getting picked up. Is there any way to do this on Windows without downloading and compiling the source? I can modify .lua files in the module and those show up as soon as I restart, should it be the same with the engine?
Thanks in advance!
Thanks in advance!
Re: Modifying the Engine on Windows
You should pick up changes to the engine and module Lua files after restarting T-Engine. You can try a complete restart (close T-Engine and re-run it) and see if that helps. If you are hacking on the newer betas are you looking for the engine in game/engines/default/engine?
<DarkGod> lets say it's intended
-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Re: Modifying the Engine on Windows
Yes, I was trying to modify game/engines/default/engine/Zone.lua. Maybe I'm not calling the function I think I'm calling....I'll try some extra print statements and see if I can figure out what's going on. Thanks!
-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Re: Modifying the Engine on Windows
Ha, darkgod is overriding the print function in the file that I was editing so it didn't do anything.
Re: Modifying the Engine on Windows
You know what, that explains EXACTLY something I was seeing too. Thanks! 

<DarkGod> lets say it's intended
-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Re: Modifying the Engine on Windows
No problem. I thought I was going crazy for a sec...I know that function is getting called but my print statements are NOT DOING ANYTHING.....
Re: Modifying the Engine on Windows
Hehe sorry about that, Zone.lua is a bit wordy and it slows things down if print is enabled 
What are you doing BTW ?

What are you doing BTW ?
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Re: Modifying the Engine on Windows
I was playing with easier ways to create specific entities on a level. For example I wanted to try creating a cold drake hatchling clone that a big cold drake could summon that didn't have an escort but wouldn't appear on the level normally. The only problem with the current code is that with no rarity it doesn't appear in the brute force lists to pull out.
Re: Modifying the Engine on Windows
Have you looked at the makeEntityByName function in Zone.lua?paboperfecto wrote:I was playing with easier ways to create specific entities on a level. For example I wanted to try creating a cold drake hatchling clone that a big cold drake could summon that didn't have an escort but wouldn't appear on the level normally. The only problem with the current code is that with no rarity it doesn't appear in the brute force lists to pull out.
<DarkGod> lets say it's intended
-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Re: Modifying the Engine on Windows
Yes, it wasn't working for what I wanted for some reason (returning a nil value) but the last thing that I had time for was to figure out why my print statements weren't working. I'll get back to it in a bit and start where I left off which was with that function.
-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Re: Modifying the Engine on Windows
So I worded my above statements poorly. I am actually trying to modify the npc summon command in tome so that it is more efficient and allows you to summon monsters that may not appear randomly on the level.
Re: Modifying the Engine on Windows
Actually it's already possible to pass a parameter to a filter saying to create a list based on a specific field instead of rarity.
Check out how nagas get their tridents (which are never normaly randomly generated):
Tridents do not have a rarity field and thus are never generated normaly, but this filter uses the trident_rarity field instead.
Check out how nagas get their tridents (which are never normaly randomly generated):
Code: Select all
{type="weapon", subtype="trident", autoreq=true, special_rarity="trident_rarity"},
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Modifying the Engine on Windows
You do have to make sure that the objects are loaded through the zones object.lua file, though. If the objects are never added to the internal zone lists you will never be able to generate them, by name or by special rarity field.
<DarkGod> lets say it's intended
-
- Wyrmic
- Posts: 216
- Joined: Tue Mar 31, 2009 7:45 pm
- Location: New Mexico
Re: Modifying the Engine on Windows
I'll check that out, I know that my modified npcs are getting added to the zone npc_list.
Re: Modifying the Engine on Windows
ill join into this post
im looking for a way to change display char and color of actor while running engine, i tried removeEntity and addEntity, teleporting to same spot and only loading seems to work. Is there any way to do it using only lua?
im looking for a way to change display char and color of actor while running engine, i tried removeEntity and addEntity, teleporting to same spot and only loading seems to work. Is there any way to do it using only lua?
You are likely to be eaten by a grue