Articulate Vlish Couch Posted April 25, 2004 Share Posted April 25, 2004 Here's the problem: the BoA Editor won't recognise my custom item and its graphic. Did I do something wrong? Here's the code, saved in the proper scenario folder and named handgun.txt: beginscendatascript begindefineitem 445; item_name = Handgun; item_full_name = Handgun; it_variety = 6; it_damage_per_level = 8; it_weapon_skill_used = 10; it_encumbrance = 0; it_floor_which_sheet = 502; it_inventory_icon = 502; it_value = 300; it_weight = 3; it_identified = 1; it_missile_anim_type = 11; Link to comment Share on other sites More sharing options...
Kyshakk Koan Boots Posted April 25, 2004 Share Posted April 25, 2004 To begin with, you probably need some quotation marks around the item's names. Beyond that, what exact error message do you mean by "won't recognize"? Some, such as that odd "out of memory" message, are easily fixed by quitting and restarting the Editor. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Gah! Quote marks? I didn't know I was supposed to put in those. As for the editor not recognising the handgun, the weapon doesn't show up in the items menu. Item # 445 is blank. I'll try the quote marks and get back to ya' on that... ...Added quotation marks to the name, didnt work. Item 445 is still blank. Maybe there's a problem with the graphics sheets? Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 One sec, does anybody have a custom items script I could look at? (preferably one that works) Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 25, 2004 Share Posted April 25, 2004 it_inventory_icon should be a number between 0 and 9, indicating the position within the sheet of the icon to use (each sheet contains 10 icons). Link to comment Share on other sites More sharing options...
Kyshakk Koan Boots Posted April 25, 2004 Share Posted April 25, 2004 . . . . and a good place to find custom item scripts: look at the scenario data scripts for the prepackaged scenarios (i.e. valleydydata.txt). EDIT: By the way, spyderbytes, since you use the editor far more than I do: I've been assuming that I get the "out of memory" error because I'm doing sloppy and stupid swapping back and forth between BoA and the Editor (since quitting either usually eliminates the error), and not because there's an actual bug in the Editor. Have you run into the error? (If it happens, it does so the first time the Editor tries to load a new graphic.) Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 25, 2004 Share Posted April 25, 2004 No, I can't say I've seen that error... but then, I don't leave the game running (I've almost always got the editor running in the background when the game's going; but I quit out of the game before making changes in the editor). Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Thanks for your help guys. I'll give it a shot. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Regarding the last post: no pun intended. BTW, Boots, if you're dealing with the out of memory BS, try increasing the recommended memory for the editor in its Info page. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Aah, shnizzberries! Still ain't workin'. I'll check out some of those sheets now. Link to comment Share on other sites More sharing options...
Kyshakk Koan Boots Posted April 25, 2004 Share Posted April 25, 2004 Already have, doesn't do much. The problem seems pretty clearly the result of operator negligence. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 How many K did you bring it up to? I usually try to overkill and do about 7-8000K. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Crap.. I can't find any custom item scripts in BoA. Unless they're contained somewhere besides the scenario folders. Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 25, 2004 Share Posted April 25, 2004 Custom items are defined in the INIT_STATE of the main scenario script. They don't have their own separate scripts. Even if they have scripted behavior (i.e., abilities 207 or 208), it's just handled from a state in the scenario script. Actually, I suppose the main reason I might not have the memory problems is that I'm on OS X (which allocates memory much differently) and have a boatload of physical RAM. If the editor needs more, it just asks the OS and gets it dynamically. EDIT: My original answer was just plain wrong. Look in the data script (scenario_namedata.txt) for definitions of custom items. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Scenario_namedata.txt? I only see hellholeravine.txt in the scenarios folder, and scen.txt in the BOA files folder. I used sherlock and it didn't come up with anything. So I am to assume that you mean something else that relates to Scenario_namedata.txt. Oh well, I'll check out scen.txt now. Hellholeravine.txt yielded nothing except for shop stuff. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Ohhh, I see now... ¬_¬ you mean corescendata.txt. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 25, 2004 Author Share Posted April 25, 2004 Yarr, all the core characteristics sheets! Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Namothil Posted April 25, 2004 Share Posted April 25, 2004 You may have figured this out by now, but the problem is in your script name. All custom items must be in a script named in this format: scen_namedata.txt (Where scen_name is, of course, the name of your scenario file.) Trying to place a custom item in any other script won't work - the editor won't look for them anywhere else. Problem clearly given here: Quote: Here's the code, saved in the proper scenario folder and named handgun.txt Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 Jeez.. BoA editor isn't as user-friendly as I thought. Oh well, I'm getting the hang of it. Thanks for everything guys! Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 Crap. This just in, I created a proper freakin' data file, now the stupid editor is b*tching about an invalid symbol in line one... Here's the current code: // Hellhole Ravine Custom Object Types beginscendatascript; // ITEM TYPES begindefineitem 450; clear; it_full_name = "Handgun"; it_variety = 6; it_damage_per_level = 4; it_bonus = 3; it_weapon_skill_used = 10; it_floor_which_sheet = 502; it_floor_which_icon = 1; it_inventory_icon = 0; it_value = 300; it_weight = 30; it_identified = 1; it_missile_anim_type = 11; begindefineitem 451; clear; it_full_name = "bullets"; it_variety = 23; it_bonus = 1; it_charges = 12; it_floor_which_sheet = 502; it_floor_which_icon = 2; it_inventory_icon = 2; it_value = 20; it_weight = 10; it_cursed = 0; Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 26, 2004 Share Posted April 26, 2004 Hmm... not a clue. I copied and pasted those lines from your post into my own scenario data file, and it worked just fine (except for the obvious problem of not having graphics with the numbers you gave yours). Does it give you a line number where it says it's going haywire? Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted April 26, 2004 Share Posted April 26, 2004 Line one, he said. Maybe it doesn't like having a comment before the beginning of the script. Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 26, 2004 Share Posted April 26, 2004 Hehe... I'm a dyslexic reader I guess. I read that as "in one line" instead of "in line one". Yeah, I didn't copy that part, so I imagine you nailed it: scenario data files probably can't have comments before the beginscendatascript; line (mine doesn't, anyway). Try removing that and see what happens. Link to comment Share on other sites More sharing options...
Kyshakk Koan Boots Posted April 26, 2004 Share Posted April 26, 2004 Comments before beginscendatascript work fine for me and are in the prepackaged scenarios' scripts. Nor could I reproduce the error by pasting the entire snippet into a new file -- which might then be the solution, if no help for an explanation (what app are you using to write your scripts?). Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 For this? I'm using OS X Textedit. There isn't anything wrong with the filename.. it's in the proper format (hellholeravinedata.txt). I'll try it without the comments and see if that works. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 Wait, do I need those clear commands? That might be what's screwing it up. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 Wait, it says Hellholeravine SCRIPT failiure, not custom data script faliure. I'll have a look at the script again, I might have accidentally left some kind of residue there. Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 26, 2004 Share Posted April 26, 2004 The docs say script names can only be a maximum of 13 characters (not counting the .txt) long. 'hellholeravinedata' is 18 characters. 'hellholeravine' is 14. And yes, I realize the editor says your scenario filename can be up to 20 characters, in the dialog when you first create it, but I'd bet that your filenames are just too long. Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Namothil Posted April 26, 2004 Share Posted April 26, 2004 Is the screenshot in the docs in error, then? It shows that the scenario name can be up to 30 characters, but the FILENAME is limited to 8 characters. Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 26, 2004 Share Posted April 26, 2004 Apparently so. When I start a new scenario (in Editor 1.0.1), it says 49 and 20, respectively, for the scenario name and filename lengths. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 That might be doing it. Lemme check. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 I changed the filename to hellholedata.txt, but now I'm facing other problems... The editor is again refusing to recognise these custom items because of the changed filename. I might have to create a new scenario with a shorter name (luckily I haven't bothered with outdoor terrain yet, so all I have to do is import the town of Weaselden). D'you think that would work? Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 Okay, I remade the scenario (now called Middle of Nowhere, the filename will be nowheredata.txt Link to comment Share on other sites More sharing options...
Garrulous Glaahk spyderbytes Posted April 26, 2004 Share Posted April 26, 2004 Try just changing the scenario name to hellhole.bas and the main scenario script to hellhole.txt. I think that should do it. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 Wait.. WTF? How would changing the .bas file to a .txt file do that? Oh well, it's worth a shot. Link to comment Share on other sites More sharing options...
Articulate Vlish Couch Posted April 26, 2004 Author Share Posted April 26, 2004 Jeez, I so didn't read that right. X my last post. Link to comment Share on other sites More sharing options...
Recommended Posts