#nuvie@irc.freenode.net logs for 31 May 2007 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage


[04:01:46] <-- laxdragon has left IRC (orwell.freenode.net irc.freenode.net)
[04:11:56] --> laxdragon has joined #nuvie
[04:18:21] <-- laxdragon has left IRC (orwell.freenode.net irc.freenode.net)
[04:18:49] --> laxdragon has joined #nuvie
[04:22:30] <-- laxdragon has left IRC (orwell.freenode.net irc.freenode.net)
[04:26:49] --> laxdragon has joined #nuvie
[04:29:56] <-- laxdragon has left IRC (orwell.freenode.net irc.freenode.net)
[04:40:13] --> laxdragon has joined #nuvie
[04:47:06] <-- laxdragon has left IRC (orwell.freenode.net irc.freenode.net)
[04:47:24] --> laxdragon has joined #nuvie
[04:52:42] <-- laxdragon has left IRC (orwell.freenode.net irc.freenode.net)
[04:53:23] --> laxdragon has joined #nuvie
[06:13:59] <-- Kirben has left IRC ()
[06:24:56] --> Kirben has joined #nuvie
[11:00:49] --> Yuv422 has joined #nuvie
[13:06:15] --> SB-X has joined #nuvie
[13:06:59] <Yuv422> hi SB-X
[13:07:35] <SB-X> Greetings!
[13:07:47] <Yuv422> :)
[13:08:07] <Yuv422> I'm just adding Object Containers to the magic system
[13:08:19] <Yuv422> I should say the scripting system.
[13:08:22] <SB-X> wow, that sounds familiar
[13:08:29] <SB-X> weren't we talking about that months ago?
[13:08:35] <Yuv422> yeah
[13:08:53] <Yuv422> I've made a few new spells too
[13:08:56] <SB-X> cool
[13:09:00] <Yuv422> harm, ignite, douse
[13:09:33] <SB-X> are those kinds of scripts easy to write?
[13:09:55] <Yuv422> they are a bit messy
[13:10:10] <Yuv422> obj = select_obj()
[13:10:10] <Yuv422> print(obj.name)
[13:10:10] <Yuv422> if obj ~= nil then
[13:10:10] <Yuv422> if obj.obj_n == 122 or --candle
[13:10:10] <Yuv422> obj.obj_n == 145 or --candelabra
[13:10:11] <Yuv422> obj.obj_n == 164 or --fireplace
[13:10:11] <Yuv422> obj.obj_n == 90 or --torch
[13:10:13] <Yuv422> (obj.obj_n == 206 and obj.frame_n == 0) then --brazier
[13:10:15] <Yuv422> if obj.frame_n == 0 or obj.frame_n == 2 then
[13:10:16] <SB-X> yes, i i mean, without overly complex syntax in the script
[13:10:18] <Yuv422> if obj.obj_n == 90 then
[13:10:19] <Yuv422> Obj.use(obj) -- we want to use usecode to handle multi-torch stacks.
[13:10:20] <SB-X> i meant*
[13:10:22] <Yuv422> else
[13:10:23] <Yuv422> obj.frame_n = obj.frame_n + 1;
[13:10:26] <Yuv422> end
[13:10:27] <Yuv422> return print("\nSuccess\n");
[13:10:29] <Yuv422> end
[13:10:31] <Yuv422> end
[13:10:33] <Yuv422> end
[13:10:36] <Yuv422> return print("\nNo effect\n");
[13:10:40] <SB-X> hehe
[13:10:41] <SB-X> i see
[13:11:18] <Yuv422> It's not that bad.
[13:11:23] <SB-X> no it really isnt
[13:11:39] <SB-X> i was thinking about the "select_obj" part, if that's all you have to type, that's pretty simple
[13:12:00] <Yuv422> that is another lua function
[13:12:16] <SB-X> similiar to how it's done in the engine too
[13:12:23] <SB-X> ah k
[13:12:33] <SB-X> part of the nuvie scripting framework, i see :)
[13:12:33] <Yuv422> select_obj = function()
[13:12:34] <Yuv422> print("On what: ");
[13:12:34] <Yuv422> local loc = get_target()
[13:12:34] <Yuv422> local obj = map_get_obj(loc)
[13:12:34] <Yuv422> if obj == nil then
[13:12:34] <Yuv422> print("nothing\n");
[13:12:35] <Yuv422> else
[13:12:38] <Yuv422> print(obj.name .. "\n");
[13:12:39] <Yuv422> end
[13:12:41] <Yuv422> return obj
[13:12:43] <Yuv422> end
[13:12:45] <Yuv422> yup
[13:13:08] <SB-X> heh, that's really cool
[13:13:19] <Yuv422> I have one for actor selection too
[13:13:20] <SB-X> i always plan for the next thing i work on in nuvie to be scripts
[13:13:37] <SB-X> or at least code related to the magic scripting engine
[13:13:54] <SB-X> what means "--fireplace"
[13:14:03] <SB-X> ?
[13:14:09] <Yuv422> hopefully I can get it to a stage where it can go back into the main tree
[13:14:15] <Yuv422> that's a comment
[13:14:26] <SB-X> ah k
[13:14:49] <Yuv422> otherwise I'd forget what all the magic numbers meant
[13:15:19] <SB-X> you could use some macros too
[13:15:43] <Yuv422> yes
[13:15:59] <Yuv422> they might go in the init scripts
[13:15:59] <SB-X> or better yet the engine and scripts should both be able to read the same list of defines
[13:16:11] <Yuv422> :)
[13:16:41] <SB-X> we might have to convert the magic number lists we have already from C++ headers to a generic text format then
[13:16:58] <SB-X> maybe not
[13:17:29] <Yuv422> if we can move the usecode into lua scripting we might not need the c scripts
[13:17:47] <SB-X> nope, but other parts of Nuvie still use those magic numbers
[13:17:57] <Yuv422> true
[13:18:36] <SB-X> it's not a big deal, there are more important things to work on first
[13:19:16] <SB-X> something to consider though
[13:19:26] <Yuv422> yeah
[13:19:30] <SB-X> eventually, like everything else i have planned :)
[13:20:52] <SB-X> i honestly do have a TODO list to get to eventually
[13:21:11] <SB-X> scripting is only one of many things listed
[13:21:16] <Yuv422> ;-)
[13:21:37] <Yuv422> even though we have implemented a lot of functionality it seems like there is still much to do.
[13:47:20] <Yuv422> time for bed
[13:47:21] <Yuv422> cya
[13:47:33] <-- Yuv422 has left IRC ()
[14:50:05] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[17:45:31] <-- SB-X has left IRC ("*casts gate travel*")
[20:09:54] <-- laxdragon has left IRC ("ZZZZZzzzzzzzzzzzzzzz")
[20:14:59] --> laxdragon has joined #nuvie
[23:18:14] --> Kirben has joined #nuvie