Magnificent Ornk Swimmin' Salmon Posted May 22, 2005 Share Posted May 22, 2005 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 More sharing options...
Kyshakk Koan PoD person Posted May 22, 2005 Share Posted May 22, 2005 The prefix lets you know whether the function returns a number or not. If it's preceded by short, then the function will return a number that you can use in the script. If it's preceded by void, then it'll do something in the game, but won't return a number. Link to comment Share on other sites More sharing options...
Magnificent Ornk Donald Hebb Posted May 22, 2005 Share Posted May 22, 2005 And some "short" calls will actually have a result in the game- remove_char_from_party();, for instance. Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 22, 2005 Author Share Posted May 22, 2005 Thank you both. No more void or short in my scripts. Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 23, 2005 Author Share Posted May 23, 2005 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. Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted May 23, 2005 Share Posted May 23, 2005 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 More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 23, 2005 Author Share Posted May 23, 2005 Perfect Thuryl, thank you. Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 30, 2005 Author Share Posted May 30, 2005 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. Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted May 30, 2005 Share Posted May 30, 2005 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 More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 30, 2005 Author Share Posted May 30, 2005 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 More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 31, 2005 Author Share Posted May 31, 2005 New question. The docs mention that an item placed on a container terrain can be 'uncontained, although it is not recommended.' I would like to put a pen and ink on a desk, rather than in it. How on earth can I make that happen while allowing other things to be in the desk? Thanks. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted May 31, 2005 Share Posted May 31, 2005 Place that item and then click that thing right next to "Property" or "Not Property" that says "Contained." Make sure that the other items are contained and the one you want on top of the desk is not. Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted May 31, 2005 Share Posted May 31, 2005 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 More sharing options...
Kyshakk Koan KernelKnowledge12 Posted May 31, 2005 Share Posted May 31, 2005 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 More sharing options...
Magnificent Ornk Kelandon Posted May 31, 2005 Share Posted May 31, 2005 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 More sharing options...
Kyshakk Koan KernelKnowledge12 Posted May 31, 2005 Share Posted May 31, 2005 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 More sharing options...
Magnificent Ornk Kelandon Posted May 31, 2005 Share Posted May 31, 2005 So in other words there's no way in the editor to place an item on a container and have it be NC in the game. Link to comment Share on other sites More sharing options...
Kyshakk Koan KernelKnowledge12 Posted May 31, 2005 Share Posted May 31, 2005 Not in the current editor. You'd have to go in and change the editor's code, and I'd rather not create another release for something this small. Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 31, 2005 Author Share Posted May 31, 2005 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?? Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted May 31, 2005 Share Posted May 31, 2005 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 More sharing options...
Kyshakk Koan KernelKnowledge12 Posted May 31, 2005 Share Posted May 31, 2005 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 More sharing options...
Magnificent Ornk Drakefyre Posted May 31, 2005 Share Posted May 31, 2005 Or you could make a custom graphic of a desk with a pen and ink on it, and not bother with items at all. Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 31, 2005 Author Share Posted May 31, 2005 Common sense like that would typically get me in trouble, yet you pull it off with such ease. Was that you volunteering to make such a graphic? Link to comment Share on other sites More sharing options...
Understated Ur-Drakon The Almighty Doer of Stuff Posted May 31, 2005 Share Posted May 31, 2005 Are you seriously saying you don't know how to use the Copy and Paste functions? Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted May 31, 2005 Author Share Posted May 31, 2005 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. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted June 1, 2005 Share Posted June 1, 2005 I was absolutely not volunteering. I know my limits. Link to comment Share on other sites More sharing options...
Garrulous Glaahk -silver- Posted June 1, 2005 Share Posted June 1, 2005 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 More sharing options...
Magnificent Ornk Swimmin' Salmon Posted June 1, 2005 Author Share Posted June 1, 2005 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... 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... Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted June 1, 2005 Share Posted June 1, 2005 You don't need a custom graphic. Just place the custom terrain and put the item on top of it. Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted June 1, 2005 Author Share Posted June 1, 2005 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? Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted June 1, 2005 Share Posted June 1, 2005 But there still won't be an item on top — it'll just look like it. This would bother me more, as a player, than if there were nothing on top at all. Link to comment Share on other sites More sharing options...
Garrulous Glaahk -silver- Posted June 1, 2005 Share Posted June 1, 2005 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 More sharing options...
Magnificent Ornk Kelandon Posted June 1, 2005 Share Posted June 1, 2005 That's funny — I misremembered that call. I thought that it said the opposite thing. This clearly means that BoA doesn't do an internal check within the app, so a change to the editor is entirely feasible and should be implemented in whatever the next release is. Link to comment Share on other sites More sharing options...
Recommended Posts