Jump to content

dracomancer

Member
  • Posts

    11
  • Joined

  • Last visited

dracomancer's Achievements

Tenderfoot Thahd

Tenderfoot Thahd (2/17)

  1. I installed the windows version of alint, ran it, and a box popped up just long enough for me to see that it had, then was gone. Nothing else. I'll check out the windows alint compendium soon. Between my last post and now, I made a script that does what I want by copying, renaming, and editing the doors script heavily. Still, the working version had bugs, and some fat to trim leftover from the old doors script. I attempted to clean it up a little, and came up with this: // coppice.txt - This script powers magic trees. // If you place a magic tree, this script is automatically attached to it. beginterrainscript; variables; short i_am_open = 0; short cur_terrain; short door_opened; body; beginstate INIT_STATE; cur_terrain = terrain_in_this_spot(); if (cur_terrain = 425) i_am_open = 1; else i_am_open = 0; break; beginstate START_STATE; break; beginstate SEARCH_STATE; if (i_am_open == 1) { print_str_color("The tree regrows beneath your hands.",2); flip_terrain(my_loc_x(),my_loc_y()); i_am_open = 0; play_sound(-163); } break; beginstate BLOCK_MOVE_STATE; if (i_am_open == 0) { block_entry(1); door_opened = 1; if (door_opened) { print_str("You cut back the tree."); i_am_open = 1; play_sound(-72); } } break; This does not function anymore, I get an error message for bad expression in line 29 The script that worked, but had bugs and (supposedly) unneeded lines was this: // coppice.txt - This script powers magic trees. // If you place a magic tree, this script is automatically attached to it. beginterrainscript; variables; short i_am_open = 0; short cur_terrain; short door_opened; body; beginstate INIT_STATE; cur_terrain = terrain_in_this_spot(); if (((cur_terrain >= 14) && (cur_terrain <= 17)) || ((cur_terrain >= 50) && (cur_terrain <= 53))) i_am_open = 1; else i_am_open = 0; break; beginstate START_STATE; break; beginstate SEARCH_STATE; if (i_am_open == 1) { print_str_color("The tree regrows beneath your hands.",2); flip_terrain(my_loc_x(),my_loc_y()); i_am_open = 0; play_sound(-163); } break; beginstate BLOCK_MOVE_STATE; if (i_am_open == 0) { block_entry(1); door_opened = 1; if (door_opened) { print_str("You cut back the tree."); if ((get_memory_cell(2) > 0) || (get_memory_cell(3) > 0)) set_flag(get_memory_cell(2),get_memory_cell(3),1); flip_terrain(my_loc_x(),my_loc_y()); i_am_open = 1; play_sound(-72); } } break; The two terrains i'm switching between are 424 and 425. I've wracked my brain on whats wrong with the broken one, and what error is in line 29, but my understanding is just not good enough to find it apparently.
  2. That solved that problem. For some reason I thought if i didn't put them in, they'd be at some default setting. Did some more designing, then ran into a snag again: Magic trees. When you search the tree, it turns into a stump. When you search the stump, it turns into a tree. Not completely unlike doors, you can walk over the stump but not the tree. I guess that part isn't essential, both could be blocked. I've tried making a custom door terrain but the scripts on how doors work are eluding me. I'm completely lost on this one. Any tips?
  3. So far, I've got custom terrain/floors/etc down, and custom graphics down. But I'm pretty sure I butchered the script for this state. begintownscript; variables; body; beginstate 5; move_to_new_town(1,24,6) break; Looking into it on my own, I tried to use the town details so that leaving the northern town by heading south would trigger state 5, and send the party to the southern town. No dice. "Error State not found -0" So I tried the box along the bottom, same script. Also no dice. Where did I go wrong?
  4. I'm pretty new to scenario building in avernum. I've done plenty in other games, but little that needed scripting. The place I'm designing is a farm/forest owned by a hermit/woodsman. It's based off an actual property that's 8 acres total. As it turns out, if you estimate a square is 5 feet by 5 feet, the usable 42 by 42 grid of a 48 by 48 town adds up to almost exactly one acre. Perfect. Trouble is, I want to make it so if they, say, head north and exit one "town" section, they end up automatically in the town section to the north and vise verse. I'd rather they didn't go back into outside view during the transition. Any tips?
  5. No luck, I fixed the B to no avail. Still says the problem is an invalid identifier in line 21 "g501" I've tried calling it "g501", "G501" and "G501.BMP"
  6. Haha, glad to know I'm not the only one. The puddle worked out just fine once i edited the scripts. I've got a new problem now, I'm trying custom terrain graphics. I copied bitmap G783, renamed my copy G501, edited within the lines of the original graphics, and saved it as a 256 color bitmap with 72dpi. I put a copy of G501 in my Yggdrasil folder, and put this in my yggdrasildata.txt: beginscendatascript; begindefineterrain 422; import = 285; te_full_move_block = 0; begindefineterrain 423; import = 322; te_full_move_block = 0; Begindefinefloor 131; import = 77; fl_which_sheet = G501; fl_which_icon = 9; fl_name = nscreek; fl_special_property = 0; fl_special_strength = 0; The intention was to make a floor that functionally sounded like swamp, could be walked over like swamp, but didn't damage you. Visually it's a narrow creek running north to south, the rest of G501 is more creek graphics running different directions. When I tried to run the editor and load Yggdrasil, I got this error message: yggdrasil script failure: Invalid identifier g501 in line 21. [ok] Major Error 9. There was an error when loading your scenario's custom data script. You won't be able to edit this scenario until the problems in the scripts are corrected. [ok] What am I doing wrong?
  7. Thank you! That's very helpful. That's basically what i'd written, but rather than te_full_move_block I had misread what to change begindefinescript; begindefineterrain 427; import = 285; te_move_block_n = 0; te_move_block_w = 0; te_move_block_s = 0; te_move_block_e = 0; Glad to know i was in the ballpark. Thanks for the help
  8. Hey all, I've only just started working with scripts here. I had very remedial experience with Qbasic some years ago and that about sums up my current code experience. I want to make a custom terrain that's identical to the "pool" (number 285), but can be walked on/through. A puddle, essentially. I have read the how to document on this, up to and through the part about creating custom terrains. Still, I'm having trouble. The script I wrote does nothing, and I'm not even certain I've named/placed the file correctly. Could someone show me what the script for this would look like? Assuming there's no other scripting in the data.txt file, just the one custom terrain. Also, my scenario is called Yggdrasil. Should I name text file yggdrasildata or yggdrasildata.txt?
×
×
  • Create New...