Modifying the Engine on Windows

All development conversation and discussion takes place here

Moderator: Moderator

Message
Author
paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Modifying the Engine on Windows

#1 Post 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!

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Modifying the Engine on Windows

#2 Post 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?
<DarkGod> lets say it's intended

paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Re: Modifying the Engine on Windows

#3 Post 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!

paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Re: Modifying the Engine on Windows

#4 Post by paboperfecto »

Ha, darkgod is overriding the print function in the file that I was editing so it didn't do anything.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Modifying the Engine on Windows

#5 Post by yufra »

You know what, that explains EXACTLY something I was seeing too. Thanks! :D
<DarkGod> lets say it's intended

paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Re: Modifying the Engine on Windows

#6 Post 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.....

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Modifying the Engine on Windows

#7 Post 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 ?
[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 ;)

paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Re: Modifying the Engine on Windows

#8 Post 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.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Modifying the Engine on Windows

#9 Post 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?
<DarkGod> lets say it's intended

paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Re: Modifying the Engine on Windows

#10 Post 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.

paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Re: Modifying the Engine on Windows

#11 Post 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.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Modifying the Engine on Windows

#12 Post 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.
[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 ;)

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Modifying the Engine on Windows

#13 Post 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.
<DarkGod> lets say it's intended

paboperfecto
Wyrmic
Posts: 216
Joined: Tue Mar 31, 2009 7:45 pm
Location: New Mexico

Re: Modifying the Engine on Windows

#14 Post by paboperfecto »

I'll check that out, I know that my modified npcs are getting added to the zone npc_list.

Graziel
Wyrmic
Posts: 234
Joined: Wed Sep 15, 2010 10:32 am

Re: Modifying the Engine on Windows

#15 Post 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?
You are likely to be eaten by a grue

Post Reply