Page 1 of 2
Modifying the Engine on Windows
Posted: Thu Sep 30, 2010 9:45 pm
by paboperfecto
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!
Re: Modifying the Engine on Windows
Posted: Thu Sep 30, 2010 9:54 pm
by yufra
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?
Re: Modifying the Engine on Windows
Posted: Thu Sep 30, 2010 9:58 pm
by paboperfecto
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!
Re: Modifying the Engine on Windows
Posted: Fri Oct 01, 2010 1:22 am
by paboperfecto
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
Posted: Fri Oct 01, 2010 1:41 am
by yufra
You know what, that explains EXACTLY something I was seeing too. Thanks!

Re: Modifying the Engine on Windows
Posted: Fri Oct 01, 2010 3:45 am
by paboperfecto
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
Posted: Fri Oct 01, 2010 7:37 am
by darkgod
Hehe sorry about that, Zone.lua is a bit wordy and it slows things down if print is enabled
What are you doing BTW ?
Re: Modifying the Engine on Windows
Posted: Fri Oct 01, 2010 1:43 pm
by paboperfecto
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
Posted: Fri Oct 01, 2010 2:27 pm
by yufra
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.
Have you looked at the makeEntityByName function in Zone.lua?
Re: Modifying the Engine on Windows
Posted: Fri Oct 01, 2010 2:47 pm
by paboperfecto
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.
Re: Modifying the Engine on Windows
Posted: Fri Oct 01, 2010 2:54 pm
by paboperfecto
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
Posted: Fri Oct 01, 2010 3:26 pm
by darkgod
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):
Code: Select all
{type="weapon", subtype="trident", autoreq=true, special_rarity="trident_rarity"},
Tridents do not have a rarity field and thus are never generated normaly, but this filter uses the trident_rarity field instead.
Re: Modifying the Engine on Windows
Posted: Fri Oct 01, 2010 3:46 pm
by yufra
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.
Re: Modifying the Engine on Windows
Posted: Fri Oct 01, 2010 7:47 pm
by paboperfecto
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
Posted: Fri Oct 08, 2010 2:27 pm
by Graziel
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?