Jump to content

Niemand

Moderator
  • Posts

    2,138
  • Joined

  • Last visited

Everything posted by Niemand

  1. Now I'm the one mislead by a thread title. I was seriously hoping for art inspired by the bound state and scattering wavefunctions of various potentials.
  2. Quote: Is there a way to shove the get_text_response() into a proper string without doing thousands of loops? The documentation failed me there. I have thought of fancy ways to count the length of a string and even break it into individual letters, but without a way to easily get a string it’s pretty useless. There is no way to do this officially provided. There are ways involving dark magics. Specifically there is a way, which works very nicely for this purpose. I have not quite completed the research necessary to make this generally applicable, and using the aforementioned dark magics heightens the fragility of the scenario in which they are applied, in that they could in future cease to work.
  3. Atoms are tiny, brutal societies. The leptons are oppressed by the hadrons and forced to live in the far reaches of the atom, but not allowed to leave. Occasionally one is mercilessly devoured in electron capture. Within the nucleus the hadrons struggle for dominance; sometimes cliques (alpha particles) are forced out entirely. Gamma rays are emitted by the violence of their confrontations.
  4. Okay granted, there are probably far worse out there, which I've never sought out. Suffice it to say that I've found that I'm not overly fond of Salavtore.
  5. Quote: DO NOT LUMP SCIFI AND FANTASY TOGETHER. EVER. You confuse a genre that was specifically designed to pose societal questions in a format where they can be considered without the bias of the current day present with a genre designed purely to entertain, with little to no substance. It is a terrible, terrible crime. This strikes me as fairly silly. Even regardless of what you might call original purposes, there are so many authors who are now or have in the past used these genres for whatever they felt like this is incredibly blurred. For instance, within Science Fiction I personally greatly enjoy the works of Verne, "Doc" Smith, Azimov, and Clement. Azimov really did write a lot of things that tended toward your claim of 'posing societal questions', while Smith's books are more action thrillers that read almost like comic books. Then you have Clement and Verne who wrote a good deal of what I consider science fiction in the strictest sense: fiction about science, like a trip to the moon, extrapolated from the technology of the late 1800's, or planets with very alien chemistry. There's so much variety from those four authors alone to make your claim of a clearly focused genre absurd. Glancing at my 'fantasy' book collection, I see a lot more things that I would consider more superficial, but there's still a tremendous range: We have Salvatore whose specialty is gory fight scenes (and whose new books I've stopped even bothering to look at), but also things like Pullman's Dark Materials, which he at least uses as a platform to express some views, and Adams's "Watership Down", which does spend time posing societal questions, happening to phrase them in terms of thinking rabbits. I don't see why you bother making a distinction.
  6. Have you looked in ~/Library/Preferences/? ('~' means your home directory, in case you're not familiar with unix pathnames.) The file should be named 'Avernum 6 Prefs'.
  7. Although I don't know if Jeff ever mentions it in the manual, the language is totally case-insensitive. Code: // Goes through text and eliminates all commented text and makes all text not in quotes// lowercasevoid text_block_type::preprocess_text(){ if (block_length <= 0) return; Boolean in_comments = FALSE; for (long i = 0; i < block_length; i++) if (text_block[i] == 10) text_block[i] = 13; for (long i = 0; i < block_length; i++) { if ((i < block_length - 1) && (text_block[i] == '/') && (text_block[i + 1] == '/')) in_comments = TRUE; else if (text_block[i] == 13) in_comments = FALSE; if (in_comments == TRUE) text_block[i] = ' '; } Boolean in_quotes = FALSE; for (long i = 0; i < block_length; i++) { if (text_block[i] == '"') in_quotes = !(in_quotes); if ((in_quotes == FALSE) && (text_block[i] >= 65) && (text_block[i] <= 90)) text_block[i] = text_block[i] - 'A' + 'a'; }}
  8. Testing on my Mac, I get the same result that the final string has 255 characters. I was also able to run it without the final clear_buffer() with no apparent ill effect; this may just be another case in which the Windows version of the game is a bit more fragile.
  9. Quote: Niemand is a genius. I doubt I deserve such praise, but thanks. Quote: does Avernumscript allow typecasting? No. It's kind of moot since there are only three datatypes, one of which has two interchangeable names (int|short), one of which cannot be manipulated directly in any way (string), and one of which is a useless vestige of a feature that never came to be (location).
  10. Quote: For example, you can call a town state in the middle of a terrain script and resume executing it after the town state is done. Does that reset the count of the terrain script? What about the count of the town script? It looks like in this case the game keeps a separate count for each script, but running the town script does not make it forget the count for the terrain script. I probably shouldn't have used the word 'reset', above, and should have phrased it in terms of separate counts. A piece of good new is that the count for the town script is forgotten in between invocations of run_town_script(). So, given a town script state like this: Code: beginstate 11; print_str("Town::11"); x=10665; while(x>0){ x = x - 1; }break; I was able to get away with doing this: Code: beginstate SEARCH_STATE; print_str("SEARCH_STATE before"); run_town_script(11); print_str("SEARCH_STATE between"); run_town_script(11); print_str("SEARCH_STATE after");break; This is much better than the overly paranoid way I was doing things before, and means that the upper limit on the amount of computation that can be done in a single round is not (maximum number of terrain scripts)*32000 nodes=3.2 million nodes, but more like a billion(!) nodes per terrain script, making the upper limit (ignoring use of creature scripts) 100 billion nodes. So, there's no need to worry over much about the upper ceiling as long as all computation can be broken into 32000 node chunks. (Of course, nobody wants to spend a week waiting while your scenario sits there thinking, and it might also be hard to actually reach the billion nodes per script limit due to other problems like restrictions on the sizes of scripts.)
  11. The limit is 32000 'nodes', where a 'node' is roughly equivalent to a statement, see this post for more details. Unfortunately, there's not much you can do to fool the interpreter due to its very simplistic nature; when it begins executing a script it starts counting, and since things like switching states are just jumps around its byte code stream, it just keeps on counting. The only way that really works to trick it is to rely on the fact that it resets its count when executing a different script. So, if you can split the work across many scripts, it doesn't notice. One way to implement this, which I've used, is to have a bunch of dummy terrain scripts which exist solely to make calls to the town script. The town script has the code broken into blocks, and keeps track of which block it needs to do next so that the order in which the terrain scripts run is irrelevant. The net effect is that the town script runs a lot, but the 'cost' is divided among the many dummy scripts. One thing to keep in mind is that, given the slowness of the interpreter, you really don't want to be doing something like this dodge to run lots of code every tick, as the game will run like molasses.
  12. Yes, Archaon, you can make this method work, it's the same one that I use in Magic Lab: Code: get_text_response(prompt);what_num = -17000;x = -255;while(x<256){ clear_buffer(); append_number(x); get_buffer_text(num_buf); check_text_response_match(num_buf); if (got_text_match()){ what_num = x; x = 1000; } x = x + 1;} I specialized my code to numbers in the range [-255,255] so that it would stay well within the 'node' limit, and because that was all I needed. I suspect that the range could still be expanded a good deal, likely up to and including what you've shown, but I'd have to have to take a few minutes to calculate the 'node' usage. Thuryl, I'm not sure you actual read what he's doing. The basic idea is sound. EDIT: Looking more closely myself, maybe you were thrown off by his forgetting the parentheses needed by got_text_match, making it look like a variable.
  13. Well purple dye is supposed to have traditionally been one of the most difficult ones to make. In the real world it comes from Phoenicia, of course. My high-school history classes were quite clear on this point.
  14. What animal has a bright purple skin like that*? Or was that another graphic that got ruined changed in A4 and later? * An Ice Lizard, possibly, although those are a bit paler, at least when alive.
  15. In order to place an entrance from the outdoors into a town, use the 'Create Town Entrance' tool while editing the relevant outdoor section. It's icon looks like a pair of arrows pointing to the right to a crenelated wall. Follow the instructions given by the tool, and designate a rectangular area which functions as the town entrance. When the party walks into that rectangle, they will be put inside the town. In order to let the party move between towns, put the call to move_to_new_town() in a state in the town's script. Then, in the editor, use the 'Create Special Encounter' tool (whose Icon is a heavy, black dot) to define a rectangle. When prompted, enter the number of the state that you wrote in your script. Now, when the party steps into the blue (in the editor, invisible in-game) special encounter rectangle, the game will execute the script state and move the party to the other town. You can put such encounter rectangles anywhere you want, as appropriate for your scenario. Common cases are on staircases, on ladders or trapdoors, or around portals. Obviously in many cases you'll want to script two such encounters, one in each town, so that the party will be able to travel back down the flight of stairs they just came up, and so on.
  16. Silverlocke, A1. She also feeds the party unsweetened mushroom cookies. Also in A2, where it is identified as 'fungus tea'.
  17. Not quite, the call you want is Code: void alter_stat(short which_char_or_group,short which_stat,short how_much) with the character number for which_char_or_group, 11 (which corresponds to Mage Spells skill) for which_stat, and the amount of skill to give for how_much. Then, you would want to use Code: void change_spell_level(short which_char,short mage_or_priest,short which_spell,short amt_to_change) to teach the creature actual spells, now that it has some Mage skill; the arguments would be the character number for which_char, 0 (for mage spells) for mage_or_priest, and then spell numbers chosen from the Mage Spells table in the documentation appendices for which_spell along with the spell level you want to confer for amt_to_change. Assuming that we wanted creature 6 to be able to cast Bolt of Fire and Lightning Spray, the code would go like this: Code: //give creature 6 8 units of Mage Spells skillalter_stat(6,11,8);//teach it Bolt of Fire level 2change_spell_level(6,0,0,2);//teach it Lightning Spray level 1change_spell_level(6,0,10,1);
  18. What exactly do you mean? If you mean painting different floors over different part of the town (grass outside, wood floor inside buildings, and so on) all you have to do is use the pencil, paintbrush, or spray can tools in the editor, while picking floors from the palette above the tool buttons. If you me creating new floors with your own definitions, you'll have to write the definitions into the data script for your scenario. This is covered in sections 2.2 and 2.4 of the editor documentation. If you mean putting more than one floor type on a single location, this is impossible due to the construction of the game engine. You can have (and always will have) both a terrain and a floor at each location, so there are lots of ways to accomplish most things which you might want to do.
  19. It's the 11th forum down from this one; the Blades of Avernum Editor Forum. EDIT: While I'm at it, I ought to answer the original question: You want the end_scenario() call, placed in an appropriate place in a script. You can find it described in detail on page 22 of the editor documentation appendices.
  20. I recently came across this advice. I've never used Bootcamp, so I've no idea how much help it may be, but hopefully it's some.
  21. Averaging should produce only one output, but indeed it wouldn't be suitable, at it would necessarily fall somewhere between the two inputs in terms of whatever quality parameter you're measuring. What you refer to sounds more like heterodyning the two images somehow.
  22. If you post here the text shown to you from choosing 'À propos de ce Mac' ('About This Mac') from the apple menu, in the top left of the screen, we will hopefully be able to tell whether or not your computer can run the game. It may also help to run theInformations Système (System Profiler) and posting the information shown under the 'Cartes vidéo / moniteurs' ('Graphics/Displays') heading. (I'm working with the assumption that your system is set to use French as the system language, so I've given the above suggestions using the french labelings.)
  23. Niemand

    MBTI

    I also come out INTJ: Introverted: 56 Intuitive: 25 Thinking: 38 Judging:33
  24. As ES points out, leaving it within Program Files is quite possibly why it was having trouble writing a file, until you did it with administrator privileges. However, if you've found a system that works for you, feel free to continue.
  25. I enjoyed Tailchaser's Song fairly well, although it got pretty weird toward the end. (Or perhaps it only took until part way in to get pretty weird, it's been a while since I've read it.) I have begun work on Terry Pratchett's newest book, but I haven't finished yet, so i'll withhold judgment. I also re-read The Soul of a New Machine a bit earlier and forgot to mention it in my last post. It was shorter than I'd recalled, which enhances the strangeness of the idea of a team designing and programming an entire computer with a new architecture in somewhat over a year. (If I remember the timeframe rightly. Apparently I'm not so good at remembering what I read a week ago, either.)
×
×
  • Create New...