Jeebus I hate dealing with custom items.

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: Jeebus I hate dealing with custom items.
Apprentice
Member # 4292
Profile #0
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;

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Shock Trooper
Member # 455
Profile #1
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.

--------------------
Forgive them, for they are young and rich and white.
Posts: 265 | Registered: Saturday, December 29 2001 08:00
Apprentice
Member # 4292
Profile #2
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?

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Apprentice
Member # 4292
Profile #3
One sec, does anybody have a custom items script I could look at? (preferably one that works)

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Shock Trooper
Member # 4180
Profile #4
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).

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Shock Trooper
Member # 455
Profile #5
. . . . 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.)

[ Sunday, April 25, 2004 14:24: Message edited by: Boots ]

--------------------
Forgive them, for they are young and rich and white.
Posts: 265 | Registered: Saturday, December 29 2001 08:00
Shock Trooper
Member # 4180
Profile #6
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).

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Apprentice
Member # 4292
Profile #7
Thanks for your help guys. I'll give it a shot.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Apprentice
Member # 4292
Profile #8
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.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Apprentice
Member # 4292
Profile #9
Aah, shnizzberries! Still ain't workin'. I'll check out some of those sheets now.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Shock Trooper
Member # 455
Profile #10
Already have, doesn't do much. The problem seems pretty clearly the result of operator negligence.

--------------------
Forgive them, for they are young and rich and white.
Posts: 265 | Registered: Saturday, December 29 2001 08:00
Apprentice
Member # 4292
Profile #11
How many K did you bring it up to? I usually try to overkill and do about 7-8000K.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Apprentice
Member # 4292
Profile #12
Crap.. I can't find any custom item scripts in BoA. Unless they're contained somewhere besides the scenario folders.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Shock Trooper
Member # 4180
Profile #13
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.

[ Sunday, April 25, 2004 15:49: Message edited by: spyderbytes ]

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Apprentice
Member # 4292
Profile #14
Scenario_namedata.txt? I only see hellholeravine.txt in the scenarios folder, and scen.txt in the BOA files folder. :confused:
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.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Apprentice
Member # 4292
Profile #15
Ohhh, I see now... ¬_¬ you mean corescendata.txt.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Apprentice
Member # 4292
Profile #16
Yarr, all the core characteristics sheets! :D

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Infiltrator
Member # 169
Profile #17
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


[ Sunday, April 25, 2004 16:22: Message edited by: Namothil ]
Posts: 422 | Registered: Tuesday, October 16 2001 07:00
Apprentice
Member # 4292
Profile #18
Jeez.. BoA editor isn't as user-friendly as I thought. Oh well, I'm getting the hang of it. Thanks for everything guys!

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Apprentice
Member # 4292
Profile #19
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;
:confused:

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00
Shock Trooper
Member # 4180
Profile #20
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?

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
...b10010b...
Member # 869
Profile Homepage #21
Line one, he said. Maybe it doesn't like having a comment before the beginning of the script.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Shock Trooper
Member # 4180
Profile #22
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.

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Shock Trooper
Member # 455
Profile #23
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?).

--------------------
Forgive them, for they are young and rich and white.
Posts: 265 | Registered: Saturday, December 29 2001 08:00
Apprentice
Member # 4292
Profile #24
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.

--------------------
Where's my uzi?
-Couch
Posts: 32 | Registered: Thursday, April 22 2004 07:00

Pages