Jump to content

Newbie Alert!!!


Recommended Posts

Apologies if this has been answered already, I did some searching and came up empty.

 

What gives with the call prefixs (void, short)? I don't see them used in scripts, but nothing is mentioned in the docs.

 

Thanks.

 

Edit - I'm using the BoA docs, plus Westra's Cookbook, is there anything else I should waste paper on?

Link to comment
Share on other sites

Grrr.

 

Once again, I feel like I've searched everywhere. So I relent and ask. Books. I need a darn book. I can't see that it is an item, but I could be blind. I searched corescendata and the cookbook and even looked how hlpm did books. I guess I don't even need a book item, just a book graphic. I can make the item a scroll with unlimited charges, but the book graphic would be essential. Ok rambled real good. Thanks for any help offered. smile

Link to comment
Share on other sites

Try this, modified from the books in Valley of Dying Things:

 

Code:
begindefineitem 450;	clear;	it_name = "Book";	it_variety = 21;	it_floor_which_sheet = 1026;	it_floor_which_icon = 1;	it_inventory_icon = 1;	it_value = 1;	it_weight = 10;	it_identified = 1;
Link to comment
Share on other sites

Hopefully this is a more advanced question, because this is driving me nuts. I am doing some dialogue and I expect (and deserve) to see the name of the person (rather than NPC type) at the head of each dialog box on the screen. I'm disappointed every time. I compared code with other scenarios and it appears the same, but perhaps I'm missing something. Anyways, here is some code.

Code:
 begintalknode 13;	state = -1;	personality = 1;	nextstate = 11;	question = "Arista";	text1 = "A lovely woman with delicate features sits behind the counter. She is gluing bright blue feathers on the shafts of iron-tipped arrows.";	text2 = "_I am known as Arista the Archer.  Best shot and best merchandise in town.  Welcome to my shop._";	text5 = "Welcome back to my shop, I always like to see repeat customers.";	action = INTRO;begintalknode 14; 
I included the next node start to reference the end of the node I'm having an issue with. Actually, all of the dialogues are headlined with NPC type rather than NPC name. As always, any and all help is much appreciated.

 

confused

Link to comment
Share on other sites

Yeah, the thing about the question field that you're supposed to put the creature's name in is that it's actually ignored by BoA, despite what the documentation says. What you have to do is give the creature a name in the town script's INIT_STATE, using the set_name call. Look at the script of pretty much every friendly town in the pre-packaged scenarios for examples of how it's done.

Link to comment
Share on other sites

Well, that certainly is refreshing news. Luckily I've read the CoC, so there aren't any *'s covering up my choicer descriptive words for how I feel about the "documentation."

 

Thanks Thuryl, again.

 

Edit - New question...

 

Is it possible to have a container type terrain with items on it, but not contained within it?

Link to comment
Share on other sites

The obvious way -- using Edit Placed Object and clicking Contained, in much the way that you'd switch an object's not-property status -- doesn't seem to work. Don't know if this is an editor bug or not. Both the standard editor and the 3D editor exhibit this behaviour -- you might want to ask the 3D editor development team if they could look into it.

Link to comment
Share on other sites

This is another one of those confusing parts of the editor. Based on the code, clicking on the "Contained"/"Not Contained" text does change whether the object is contained. Afterwards the editor goes into the check_selected_item_number() function, which accroding to the commenting is called to ensure there are no errors in the selected item/creature/etc. This in turn calls a function (set_all_items_containment) that goes through each and every item in the current town, and checks whether the item is in the same spot with a container or not. If it is it's automatically set to contained, and if it's not, it's automatically set to "not contained".

 

I don't believe its a bug, but rather a forced limitation. It all depends on how an item would look when its Not Contained, yet on the same spot as a container.

 

Either way the new editor will have, what I hope, is an easier way to edit details such as that.

Link to comment
Share on other sites

Sorry, I didn't follow that. Does editing the Contained/Not Contained thing change whether the item is contained or not? If there are specific situations when it doesn't, what are those situations?

 

EDIT: It sounds like what you're saying is that it has no effect, but the first thing that you said is that it has some effect.

Link to comment
Share on other sites

Sorry if I confused you. Essentially clicking on the aforementioned phrase, does change the contained/not contained (hereafter referred to as C/NC) status of an item, but quickly after this, the contained status is changed back. I'll now try to explain why this is not exactly a bug.

 

An item can either be on the same space as a container or not. By default an item that is on the same space as a container has the status of "contained". An item that isn't on the same space as a container has the status of "not contained."

 

Now while an item that isn't with a container can't logically be contained in anything, an item that is on the same space as a container does not neccessarily have to be contained within it, hence the reason for the existence of the C/NC property. Or at least what I infer to be the reason.

 

When you click to change this property, what the editor does is first change it, then check to see if the said change is valid, in that the change does not defy logic. This check, however, does not take into account that an item in the same space as a container does not have to be contained. Whether this is intended or not I cannot say.

 

Now as to why the item's C/NC status is always changed back to its original status. When an item is created, its C/NC status is set to the aforementioned "default". When you try and change this, the check notices that its changed away from the "default" and changes it back.

 

Hope this clears things up.

Link to comment
Share on other sites

Typical. Now it becomes obvious why the docs say that trying to NC an item that should be contained is 'not recommended.' It would definitely drive a person nuts. I'll have to use a table instead of a desk, but here is another thought.

 

I suck at graphics, but wouldn't it be possible to create a custom terrain (say a desk) that was modified to not act like a container? Yikes, then that would just be a pretty red table. Never mind. Maybe Jeff will come up with a valid reason for the C/NC coding and possibly even adjust the engine??

 

smile

Link to comment
Share on other sites

From what KernelKnowledge is saying, this is not hard to fix, and it can be done solely by changing the editor, but it's not going to get done for little while at least.

 

Yes, it would not be hard to make a custom terrain that looked like one of the container terrains but is not a container. Import the original terrain and change its te_special_property to 0.

Link to comment
Share on other sites

Easy to change is somewhat of an understatement; I could change it in less than a minute, but for a change so small, I'd rather not make another release. I could, however, apply changes to the code and load it up to the CVS server if its really neccessary. Anyone who'd want to use the fix would have to build the application themselves (I'd include a Bakefile to make this as simple as possible).

 

Just so you know, the game itself might work differently than the editor. It might do the check itself, or it might just crash instead of displaying the item outside of the container, so it would probably be better to do what Kel said.

Link to comment
Share on other sites

Just pretend for a brief second that not all is said in utter sincerity. Follow that with a grin, cuz the newbie is razzing #7, who is apparently a fairly important functionary in these forums. And then relax, knowing that you will probably know more about computers by the time you hit 20 than I have learned in the past 25 years. You lucky SOB.

smile

Link to comment
Share on other sites

Quote:
Originally written by Thurylandon:
Yes, it would not be hard to make a custom terrain that looked like one of the container terrains but is not a container. Import the original terrain and change its te_special_property to 0.
in deference to Salmon's newbishness, this is a desk that doesn't contain things:

Code:
begindefineterrain 500; // change to actual least number in your data file    import = 229;    te_special_property = 0;begindefineterrain 501;    import = 230;    te_special_property = 0;
No need for custom graphics or changes to the edtior code.
Link to comment
Share on other sites

Thanks Silver, that looks perfect, but where are you loading the special graphic of the desk with pen/ink? Drakey has begged off, and unless ADoS steps up to the plate...

 

:p

What is the simplest program for graphic manipulation that is already on my PC? I may have to do this myself, even though I'm kinda dumb and will probably hurt myself... wink

Link to comment
Share on other sites

But but but then I am back where we started, with terrain that can be only container or non-container, with all items contained or non-contained. I wanted some of each, but somewhere settled on someones half-baked idea of overlaying candle/pen-ink graphics on the desks and making new terrains.

That's what I get for wanting to eat the damn cake. So, anyone out there still using Win2000 or familiar with what progrs come on it?

 

smile

Link to comment
Share on other sites

perhaps Salmon could use this in the init state of the town script:

 

Quote:

void put_item_on_spot(short loc_x, short loc_y, short what_item) - Places an item of type what_item on town space {loc_x,loc_y}. If that spot is a container, the item won’t be contained inside it.

though I haven't tested this application (*) of that method and sometimes the docs are... um, less than entirely correct.

 

(*) by which I mean the "containment" clause

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...