#nuvie@irc.freenode.net logs for 21 Aug 2006 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage

[01:01:01] <-- Kirben has left IRC ("System Meltdown")
[01:11:53] --> Kirben has joined #nuvie
[01:32:27] <-- Kirben has left IRC ("System Meltdown")
[01:35:42] --> Kirben has joined #nuvie
[04:31:26] <luteijn> added some more objlist research results (blue moongates not connected to moonstones that are buried (at the shrines), and some smaller things)
[07:42:24] <-- wjp has left IRC (adams.freenode.net irc.freenode.net)
[07:43:00] --> wjp has joined #nuvie
[07:45:44] <-- Kirben has left IRC (adams.freenode.net irc.freenode.net)
[07:45:44] <-- luteijn has left IRC (adams.freenode.net irc.freenode.net)
[07:51:30] <-- exultbot has left IRC (signing off...)
[07:53:38] --> exultbot has joined #nuvie
[07:53:38] --- Topic for #nuvie is: Nuvie - New Ultima VI Engine (http://nuvie.sf.net)
[07:53:38] --- Topic for #nuvie set by ChanServ at Sun Jun 25 04:12:02 2006
[07:54:08] --> Kirben has joined #nuvie
[08:35:20] --> Yuv422 has joined #nuvie
[08:48:40] <-- Yuv422 has left IRC ()
[10:21:12] --> Yuv422 has joined #nuvie
[11:22:35] --> luteijn has joined #nuvie
[11:24:02] <Yuv422> hi luteijn
[11:24:08] <Yuv422> just the person I was looking for
[11:24:10] <Yuv422> :-)
[11:24:29] <Yuv422> I'm doing some work with magic
[11:25:03] <Yuv422> do we have _gt _lt commands in the magic script?
[11:26:50] <luteijn> I'd have to check myself (and I will), since I wrote that stuff a long time ago.
[11:28:05] <Yuv422> :)
[11:29:34] <luteijn> I don't see them. I think I did something the equivalent of "if (a - b) then .. else .." so far, but that won't work if a never exactly will be b. It would be easy to add them, wouldn't it?
[11:31:07] <Yuv422> I'll add the,
[11:31:12] <Yuv422> them
[11:32:37] <luteijn> what will you push back on the stack? 'success'/'failure' is what I used so far as result codes.
[11:33:00] <Yuv422> jmptrue looks like it uses 0,1
[11:33:25] <Yuv422> is that what you mean?
[11:34:33] <luteijn> but jmptrue isn't a called function though...
[11:35:16] <Yuv422> ?
[11:37:51] <luteijn> well _jmptrue is a primitive of the magic-script-language, (just like _end, _call, _jmp and _jmpfalse). all the other 'functions' actually are accessed via '_call', but because it is tedious to push the function name all the time and then _call it, _blah is a shortcut for writing blah _call .
[11:39:51] <Yuv422> shouldn't gt lt be primitive too?
[11:40:36] <luteijn> all the _call functions so far return 'success' or 'failure' if applicable. you then use that as a label to 'jmp' to.
[11:41:03] <luteijn> even _add and _sub aren't primitives...
[11:41:19] <Yuv422> ah k I see now
[11:42:23] <Yuv422> It's a bit different
[11:44:01] <luteijn> hmm looks like the current Magic.cpp doesn't have _pmj.. which is supposed to jump backwards. I wonder I never wrote it or if it got left out for some reason.
[11:46:15] <luteijn> Also, there needs to be some way for the script interpreter to suspend operation so the rest of nuvie can handle target selection, keyboard input etc. and then return to the script.
[11:47:44] <Yuv422> so 5 2 _gt _jmp :success _call blah :failure _call blahblah
[11:48:58] <Yuv422> wait would that fall through
[11:49:32] <Yuv422> 5 2 _gt _jmp :success _call b _end :failure _call c _end
[11:50:02] <luteijn> or you'd add a continue _jmp before :failure and a :continue at the end of the else branch
[11:50:27] <Yuv422> right
[11:51:22] <Yuv422> should it be s-1 > s where s == top of stack?
[11:51:43] <Yuv422> 5 2 _gt
[11:51:48] <Yuv422> 5 is greater than 2
[11:52:00] <Yuv422> or should it be the other way around?
[11:52:22] <luteijn> eh see my note on 'sub' (a b - -> a-b or b-a?)
[11:53:09] <Yuv422> right
[11:53:25] <luteijn> basically I'm not sure which makes more sense. probably depends on what is most useful in scripts. If you find yourself constantly using '_swap _gt' then you got the order wrong.
[11:53:59] <Yuv422> 5 2 _gt is more readable I think
[11:54:15] <luteijn> but _swap _gt use could also mean _le was never implemented.
[11:54:49] <luteijn> I think 5 2 _gt is best as it groups 2 and _gt.
[11:58:27] <luteijn> hmm, can you spot what I'm doing wrong with the quake effect in my earthquake spell?
[12:02:29] <Yuv422> quakes are more SB-X's department
[12:03:35] <Yuv422> what happens when you cast it?
[12:06:41] <-- Kirben has left IRC (Read error: 110 (Connection timed out))
[12:08:38] <Yuv422> is there a function call for getting the casters coords?
[12:10:19] <-- luteijn has left IRC (Read error: 104 (Connection reset by peer))
[12:12:03] --> luteijn has joined #nuvie
[12:12:12] <Yuv422> wb luteijn
[12:12:36] <luteijn> weird crash when I tried to run dosbox.. there goes my uptime ;)
[12:12:57] * luteijn reads back the bot-log
[12:13:35] <luteijn> when I cast the quake, and try to register the effect, it doesn't quake.
[12:17:19] <luteijn> there's nothing that gets the caster's coordinates yet. Probably could tie in with _string2npc, so after you get the pointer to 'caster', you can call things like 'location' _attributeget
[12:18:08] <Yuv422> I was going to add _player_x
[12:18:12] <Yuv422> _player_y
[12:18:16] <Yuv422> and _player_z
[12:19:13] <luteijn> what if you also wanted to get coordinates of the target, etc.? or some other attribute like if they are invis or protected?
[12:21:17] <Yuv422> yeah that would be more flexible
[12:21:25] <Yuv422> how would you store an actor on the stack?
[12:21:38] <Yuv422> id_n
[12:22:04] <luteijn> so far I just push their pointer, but the function that does the translation is not really finished (as many things).
[12:22:37] <Yuv422> couldn't you use their id number?
[12:22:38] <luteijn> see the function_string2npc function
[12:24:10] <luteijn> I only did just enough of the magic system to sort of profve the concept. It can all be changed of course
[12:24:22] <Yuv422> I think the ID number would be more flexible
[12:24:31] <Yuv422> then you could iterate through all the actors
[12:24:50] <Yuv422> eg kill all
[12:24:58] <Yuv422> brb irc update
[12:25:02] <luteijn> sounds good.
[12:25:07] <-- Yuv422 has left IRC ()
[12:25:46] --> Yuv422 has joined #nuvie
[12:26:11] <luteijn> would be nice to also be able to use some 'symbolic' names like 'caster' 'target'.
[12:42:14] <-- Yuv422 has left IRC (Read error: 110 (Connection timed out))
[12:44:02] --> Yuv422 has joined #nuvie
[12:44:33] <luteijn> wb
[13:00:56] <-- Yuv422 has left IRC (Read error: 110 (Connection timed out))
[13:02:33] --> Yuv422 has joined #nuvie
[13:15:53] --> SB-X has joined #nuvie
[13:17:46] <SB-X> hello
[13:19:51] <SB-X> luteijn: The only other place we use QuakeEffect (so far) is when a cyclops walks. Try to copy that call exactly.
[13:20:43] <SB-X> im not sure i properly implemented length and magnitude yet because I only had that one place to create earthquakes from
[13:21:44] <SB-X> if you're doing something with the effect ptr, it might have to do with the single effect protection
[13:23:21] <luteijn> I think I copied the cyclops call. I'll tkae another look at it all though.
[13:31:48] <-- Yuv422 has left IRC (Read error: 110 (Connection timed out))
[13:32:58] <luteijn> Ah, I think it was going wrong because I put the two
[13:33:03] --> Yuv422 has joined #nuvie
[13:33:30] <luteijn> 'pop' things directly in the call, but that depends on the order of evaluation..
[13:36:35] <Yuv422> hey SB-X
[13:49:58] <SB-X> hey
[13:52:31] <luteijn> (loks like we're all looking at our screens out of sync)
[13:54:01] <SB-X> ?
[13:54:08] <SB-X> i was just afk :)
[13:54:46] <Yuv422> luteijn: can you have more than one success name per script?
[13:55:03] <SB-X> I've been too sick to code lately but I may be getting better and will start working on Nuvie again soon. I have to finish some work I started on U6Actor, and then want to work on target selection and Event modes. I also plan to write a u6print function.
[13:57:49] <luteijn> Yuv422: yes.
[13:57:57] <Yuv422> righto
[13:58:06] <luteijn> jmp.* will just jump to the first one it finds.
[13:58:40] <Yuv422> cool
[13:58:44] <luteijn> there should have been a pmj too that searches backwards. I documented it, but don't seem to have actually added it.
[14:01:44] <luteijn> http://luteijn.xs4all.nl/~luteijn/magic.html probably needs a little updating. It's unsure if its documentation or design-document ;)
[14:03:20] <luteijn> SB-X: hope you get well soon.
[14:03:46] <SB-X> thanks
[14:04:00] <SB-X> im sure im getting better already
[14:04:02] <Yuv422> to many late night coding sessions SB-X
[14:04:06] <Yuv422> ;-)
[14:04:21] <SB-X> but my sore throat has come and gone so i dont know yet
[14:05:05] <Yuv422> do you have bad dreams when your sick?
[14:05:08] <Yuv422> I do
[14:05:16] <Yuv422> usually about programming. :-(
[14:05:26] <Yuv422> how nerdy is that
[14:05:35] <SB-X> heh too many game playing sessions actually... i could really use more of those coding sessions to get some work done
[14:05:39] <SB-X> lol
[14:05:40] <SB-X> not really
[14:05:52] <luteijn> hmm which category would I file a bugreport on drawbridges under? (opening drawbridge when person is standing on it..)
[14:06:07] <SB-X> usecode?
[14:06:07] <Yuv422> crunch!
[14:06:20] <Yuv422> use crank?
[14:06:49] <Yuv422> luteijn: thanks for the news report. :-)
[14:07:03] <SB-X> yeah thanks for that... i was going to write it if you didn't
[14:08:16] <luteijn> well there's no usecode category yet ;)
[14:08:26] <SB-X> oh
[14:08:32] <SB-X> objects or actions/commands or other
[14:08:39] <Yuv422> in the progress
[14:08:48] <Yuv422> there is a separate page for usecode
[14:08:52] <Yuv422> u6usecode
[14:09:18] <luteijn> I meant in the SF bug tracker ;).
[14:09:26] <Yuv422> oh sorry
[14:09:43] <SB-X> you dont file bugreports on the progress reports page
[14:09:59] <SB-X> Yuv422: have you thought about my suggested changes to progress reports? dates (you said it would be easy), extra comment blocks, more status indicators
[14:10:00] <Yuv422> you could change done to in progress
[14:10:10] <SB-X> oh yeah
[14:10:14] <SB-X> or broken ;)
[14:10:18] <Yuv422> yup
[14:10:26] <Yuv422> then write up what needs to be done
[14:10:46] <Yuv422> SB-X: yeah I'll probably add the date column tomorrow
[14:11:08] <SB-X> the reason i want extra comment blocks is so we can sort of talk to eachother, or add addenda notes, without deleting the previous notes
[14:11:43] <SB-X> an alternative would be to add something that puts a horizontal line between comments
[14:12:15] <SB-X> we can sign our comments as well
[14:12:15] <Yuv422> maybe we could have
[14:12:17] <Yuv422> ---
[14:12:25] <Yuv422> which put in a hr
[14:12:32] <SB-X> that's what wikipedia does (or close enough)
[14:12:55] <SB-X> whoever last updates the note would have to change the date
[14:14:02] <Yuv422> did you want machine readable data on each comment block?
[14:14:09] <luteijn> We might even turn this into a wiki.. makes it less work to update, so morelikely to stay up to date. drawback: another tool..
[14:14:12] <Yuv422> author,date etc?
[14:14:42] <SB-X> i wouldnt mind using your wiki too
[14:14:52] <SB-X> not necessarily on each comment block
[14:15:01] <SB-X> thats up to you i dont mind either way
[14:15:21] <SB-X> try to come up with some more status messages too :)
[14:15:23] <Yuv422> could we wrap the wiki in the nuvie website look and feel
[14:15:24] <Yuv422> ?
[14:15:26] <SB-X> please
[14:15:30] <Yuv422> hehe
[14:15:43] <SB-X> (referring to my previous request)
[14:15:48] <luteijn> it would be nice if we can host the wiki on SF though. In case I die, or join the dark side or whatever.
[14:16:20] <Yuv422> what's involved in hosting a wiki?
[14:16:25] <luteijn> I think it's quite possible to adjust wiki's look and feel.
[14:16:30] <Yuv422> perl,python
[14:16:33] <Yuv422> php
[14:16:35] <Yuv422> ?
[14:16:40] <luteijn> not much, the one I set up just uses python scripts.
[14:16:41] <SB-X> luteijn: if you join the dark side I will follow!
[14:17:03] <Yuv422> what about the virtues?
[14:17:25] <SB-X> wine,women,song?
[14:17:28] <luteijn> wine, women, song based ones :)
[14:17:32] <SB-X> yay
[14:17:37] <Yuv422> hehe
[14:17:44] <Yuv422> karma--
[14:17:45] <luteijn> evil minds think alike
[14:18:03] <SB-X> well first I thought of blackthorn's virtues but those are better
[14:19:21] <Yuv422> I don't think I would be comfortable with a freely editable wiki.
[14:19:33] <Yuv422> could we restrict it to just developers?
[14:19:40] <luteijn> anyway, I guess it depends a little bit on what software you use for the wiki, but it's not much more than a fancy forum.
[14:20:09] <luteijn> Again depending on the wiki, we could probably limit editing powers to trusted (more or less) people.
[14:20:47] <luteijn> but the idea of wiki is not to prevent the occasional vandalism, but to make it easy to revert.
[14:23:04] <luteijn> Yesterday I did some research on blue moongates, but I doubt filling in some previously unknown objlist.txt entries qualifies development of them to be 'in progress'
[14:33:41] <Yuv422> can you see anything wrong with this script
[14:33:45] <Yuv422> caster _string2npc _drop locx _get_actor_attrib _drop 8 _div _dup 38 _gt _jmp :success 38 _sub ++ _swap E finish _jmp :failure 38 _swap _sub ++ _swap W :finish
[14:34:42] <Yuv422> wait
[14:34:47] <Yuv422> I forgot a \
[14:37:58] <SB-X> luteijn: guess we need a "RESEARCH" message then
[14:39:32] <SB-X> Yuv422: did you think of any more status messages?
[14:39:56] <Yuv422> TESTING
[14:40:29] <Yuv422> NEED HELP
[14:40:34] <Yuv422> :-)
[14:40:40] <SB-X> cool
[14:40:43] <SB-X> those are good
[14:41:01] <SB-X> we can add those with the other two I suggested research and broken
[14:41:04] <SB-X> then we just need new colors for them
[14:42:07] <SB-X> started would mean just a little work was done on a feature so far
[14:42:20] <SB-X> feel free to think of better names
[14:42:22] <Yuv422> STUB
[14:43:02] <Yuv422> NEEDS REDOING
[14:43:05] <SB-X> ON HOLD
[14:43:07] <luteijn> that script is part of a larger ting isn't it? that will eventually put another ++ on and _display?
[14:43:18] <luteijn> I think we have ON HOLD already (MD and SE)?
[14:43:18] <Yuv422> yes
[14:43:24] <SB-X> yes
[14:44:55] <luteijn> btw ++ can be replaced by anything else you want to use as a message terminator.
[14:45:22] <Yuv422> righto
[14:45:33] <Yuv422> I also need a display without space
[14:45:43] <luteijn> _display just keeps popping until it finds whatever you passed it as its first argument.
[14:45:44] <Yuv422> maybe we could have displattop
[14:45:47] <Yuv422> displaytop
[14:46:42] <luteijn> what exactly are you trying to achieve? maybe join can help?
[14:46:53] <Yuv422> ah yes
[14:46:58] <Yuv422> join would do it
[14:51:10] <luteijn> but if it's going to be a frequently used thing, might aswell add another utility function. Or decide we need a better scripting language all together, that wil aslo do usecode..
[14:52:36] <Yuv422> it could be a bit cumbersome to do larger functions with the stack
[14:52:47] <Yuv422> but stack based programming is fun
[14:52:50] <Yuv422> :-)
[14:52:58] <Yuv422> It makes you think
[14:54:48] <luteijn> we can add a few general purpose variable/registers to avoid too much juggling. or just add arbitrary variables.
[14:57:09] <luteijn> I based the stack things on forth (good introduction here: http://home.iae.nl/users/mhx/sf.html ) adding more forth like features could be an option.
[14:57:14] <Yuv422> how does join work?
[14:57:42] <luteijn> probably you feed it a join character (which could be a null string )
[14:59:04] <Yuv422> so it is the same as display
[14:59:22] <Yuv422> except it takes a delimiter
[15:00:10] <luteijn> yes. you can use null to get an empty string to use as the join string on the stack
[15:10:59] <Yuv422> ok I've finished my Locate spell
[15:11:04] <Yuv422> script: caster _string2npc _drop locy _get_actor_attrib _drop 8 _div _dup 45 _gt _jmp :success 45 _swap _sub ++ _swap { S ++ _null _join ++ _swap continue _jmp :failure 45 _sub ++ _swap { N ++ _null _join ++ _swap :continue , ++ _null _join ++ _swap caster _string2npc _drop locx _get_actor_attrib _drop 8 _div _dup 38 _gt _jmp :success 38 _swap _sub ++ _swap { E ++ _null _join finish _jmp :failure 38 _sub ++ _swap { W ++ _null _join :finish ++ _di
[15:12:14] <Yuv422> I changed string2npc to push actor_num
[15:12:22] <Yuv422> added get_actor_attrib
[15:12:25] <Yuv422> and div
[15:12:30] <Yuv422> oh and gt
[15:13:00] <Yuv422> oh and it doesn't handle dungeons yet
[15:17:01] <luteijn> for dungeons I guess you don't just drop the Z coordinate but jmp to it? and then add labels :1 :2 :3 :4 :5 for the dungeon code and :0 for the surface code.
[15:20:58] <Yuv422> the dungeons have a different div value
[15:21:10] <Yuv422> I'll have a look at it tomorrow
[15:21:15] <Yuv422> now it's time for bed
[15:21:35] <luteijn> or you could make a jmp to a subroutine if z>0 and scale the coordinates or put a different value on the stack depending on Z.
[15:21:40] <SB-X> cya :)
[15:21:46] <luteijn> did you commit those so we can enjoy them?
[15:22:02] <Yuv422> not yet
[15:22:14] <Yuv422> I need to clean it/check it first
[15:22:21] <Yuv422> sorry
[15:22:33] <Yuv422> let me have a quick look
[15:36:53] <Yuv422> ok my changes are in cvs now
[15:36:58] <Yuv422> I'm going to bed now
[15:36:59] <Yuv422> cya
[15:37:18] <-- Yuv422 has left IRC ()
[19:19:21] --> jargon has joined #nuvie
[20:54:37] <-- jargon has left IRC (Read error: 104 (Connection reset by peer))
[20:59:28] --> Keal has joined #nuvie
[21:28:15] <-- Keal has left IRC (Client Quit)
[22:35:23] --> Kirben has joined #nuvie