Jump to content
  • Announcements

    • Freudian Noose

      Logging in   05/10/2017

      If you had an account and can't log in as of 5/9/17, this may be because of a change in logins with new forum software. You can log in using your publicly displayed name (not your username) or your email address and the password you used before.   If you have problems with this, please ask any of the mods or admins. 

Thralni

Member
  • Content count

    3,174
  • Joined

  • Last visited

About Thralni

  • Rank
    Eye of Avadon
  • Birthday 09/09/1989
  1. One of your 'crazier moments'? You do all this wizardry with scripted combat, and using two SDFs to store a number was something you did in one of your 'crazier moments'?
  2. Hi kelandon and Ess-Eschas, thanks once again for your help. This definitely makes sense, as 253 would be 1021 - (3 * 256). Thanks Ess for putting this in context, it helps me understand why things are the way they are. Though it doesn't make me any less annoyed This will be a huge pain, as I'll have to recode some bits scattered all over the scenario... Splitting the number up might work. I have one particular example where that would probably be a viable alternative. Sort of. I would take the number and divide by 100, then store in SDF, and won't allow numbers over 25500 to begin with. Cumbersome, but whatever, I'll spin some story... Though for my specific purpose outlined here (character max health) I was wondering if I could do it as follows, as it might requires less SDFs: health = 1021 // in the actual script I'd just use get_health(ME), but just to stick with he example started in my OP. set_flag(x1,y1,health/256) // stores the number of full 256 blocks required to restore the number. I'm assuming BoA rounds down, based on prior experience. set_flag(x2,y2,health%256) // stores the remainder Recapitulating the number I could then do as follows: health = 256 * get-flag(x1,y1) + get_flag(x2,y2) That said, I haven't tested it yet. Just thinking out loud now... Really though, the best way to go about this is probably to just avoid using large numbers like these...
  3. I reckon this is another easy question to which I once again failed to find the answer in the Docs, but I've been beating my head against the wall for probably two hours now. I went with the assumption that maximum number that can be stored in a SDF would be around 32000, same as the max number that can be used in any script. Yet, I find myself wanting to the store the maximum HP of a creature (1021) in a SDF, and for whatever reason it keeps returning 253 instead. And when I fiddle around with it, it keeps giving different numbers from the actual HP of the creature. So confused. What's going on here? Any help would be appreciated.
  4. Groups

    my_number(), hm! Good to know. I might follow your example there. Thanks!
  5. Groups

    That's good news, and thank you for the suggestion you mentioned. It definitely sounds more simple than what i'm trying to do, but since it's already there I'll just leave it unless I find it doesn't work as well as I hoped. With regards to creatures only being 'dead' after the scripts stops running, the code that checks the group size is in the town's start state, so I'm assuming that when combat ends, or at a new turn, the code will be executed. Right...? By your words, I presume you can, in fact, use erase_char(ME) inside a script (also outside the DEAD_STATE). But perhaps you have to follow it with end(); in order to stop running the script?
  6. Groups

    A related question to an older topic. I have been fiddling around with groups, hoping to devise a way to quickly check for certain creatures having died so as to display a message upon the death of a group of enemies. And so I used the number of creatures in a group, and when this reaches 0, the message is triggered. And then it struck me that, when creature dies, I'm not even sure that this "deletes" a creature from a group at all... Anybody have any idea? Is it required that i specifically delete them upon death? And can I do this from within the DEAD state in the creature script (is it even possible to use erase_char(ME)?)? Many questions. I hope somebody can help me figure this out. Thanks in advance!
  7. Let's Play Blades of Avernum!

    Man, I never played Canopy to the end, and now I'm kind of glad I didn't. Honestly, this doesn't seem like it would have been the planned ending. It seems as though TM got tired of it and just wrapped it up then and there...
  8. Hm, I hadn't considered that. I'll see if I can use it to my advantage somewhere, somehow. Though I think it should be fine. I realized I left open a bunch of nodes along the script, just in case I need to go back to another character and add something. I could always use those (though having to renumber all the nodes will be a tremendous pain)
  9. Man I read over that chapter at least ten time and I still missed it. Thanks for pointing it out! I have this one town where I'm at dialog node 186, so I'm starting to push it. There also a traveling companion that reserves nodes 190-199... Oh well. I'll make it work. Thanks for reminders too, Dinti!
  10. Hello all, I come to you with another rather simple question, but to which I can't seem to find the answer. Is there a limit to the amount of dialog nodes you can have in a dialog script? And if so, what is that limit? Thanks, Thralni
  11. Groups

    Thanks for the prompt response, Kel!
  12. Groups

    Hey all, Another question. I recently rediscovered the idea of groups. I'd never used them before, because I'd never really need them, I guess, but now I find myself looking for shortcuts, and certain function that may only be reliable if using groups. My question is whether groups can only be created from a script, or whether I can assign creatures to a group also within the editor? It doesn't seem to be the case, but I thought I'd ask. Thanks!
  13. About checking the current tick

    Hey all, thanks for the replies! So, "%" is what I needed... I knew from the start there was a simple, one-symbol way of doing this, but I've forgotten so much of my BoA scripting days (and some of the maths involved) that I couldn't for the life of me remember. Nikki, that code looks awesome! I'll repurpose it a little bit for use in my scenario, but otherwise it's perfect. Kelandon, I might just re-test this, as you suggest, to make sure, though it looks like if Nik's code works fine we should have the answer Thanks again all! One more question. I've implemented the code, but was wondering about something. the call "tick_difference" allows to find the difference between two time points, and the manual specifies that there is an order in which you have to supply the call the two time points, namely the earliest first, and then the later one. Does that mean that, if you give, say, tick_difference(3000,1000), it will return 4000? In other words, is it going to wrap around the day? I can test this myself of course, but given my lack of time currently, if anybody has an off-hand answer, that'd be much appreciated!
  14. Hey all, I've been a little confused about the passage of time in BoA. Ina thread in the forum, Ephesos posted the following schedule for the passage of time: 0 - Dawn 250 - Full Light 3750 - Dusk 4000 - Night 4250 - Twilight 4750 - Daybreak But, then the manual says: There are 5000 ticks in a day. The first eighth and last eighth of every 5000 tick period are nighttime. ...which suggested that ticks 625 through 4375 are day, the rest is night, which is different form what Ephesos posted And further: short get_current_tick() - Gets the number of ticks (i.e. turns/combat rounds) that have elapsed since the scenario began. This will be a number from 0 to 29999, and wraps around to 0 when past 29999. So here's my question: how does all this really work, and how can I reliably check for whether it's day or night? I'm attempting for a mission to only start if it's night, but if the amount of ticks can go beyond 5000, and it's unclear when the night starts and ends, I'm a little stuck. Any suggestion would be much appreciated!
  15. I feel your pain I felt much the same when going through WtRM, after seeing Chessrook's vids. Some parts are not just silly, they are outright dumb. I guess this should make you feel good, no? Means you matured That's, at least, how I chose to deal with the swamp that is WtRM... But then I also decided to give it a huge overhaul which is in full swing now. I'll release some more info when doing so becomes relevant. And, perhaps, you wish to do the same to yours?
×