Seasoned Roamer Ormus Posted May 11, 2008 Share Posted May 11, 2008 Hello. :-) I disappeared a year ago from this forum because of some personal problems but now I'm back. I suppose a lot of things happened on this forum but now please take a look there: http://info.wsisiz.edu.pl/~kowalsg0/ . Half year ago I recieved an email reporting that there is a major bug in my ported code that causes map loss and scrambling of item locations. I have NOT checked it because of lack of time, sorry. :-/ So, could someone tell me shortly what was going on here when I was gone? EDIT: BoE for Win32 is now released under GNU GPL 2! :-) Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted May 11, 2008 Share Posted May 11, 2008 Firstly, we thought you had disappeared on a one-way trip down a black hole. Second, many of us had come to the conclusion that password-protection on scenarios was a great big hassle. Third, I came to the conclusion that the Character Editor needed the ability to customize the items used, many scenarios have custom items. The official Editor uses the default list of items, unlike the BoA Editor which uses the current scenario's list of items. Examining the source code lead me to the conclusion that the Editor stores item data in the "short item record type" while the Scenario Editor and the save game files use the "item record type". Consequently I drew up an Excel spreadsheet that converts item record type to the variety used by the Character Editor. To fix this, you would need to rewrite the Editor so it will open the scenario file and access the item data it contains. A quick fix is to rewrite the source to remove all references to short item record type. Then itemdata.h must be rewritten with data from "bladbase.exs". Finally the number of item records must be increased from 370 to 400. If you do this you will be able to create a PC Editor with the list of items for one scenario at a time, just copy the data from the scenario file and paste it into the editor. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted May 11, 2008 Share Posted May 11, 2008 Quote: Originally written by Ishad Nha:A quick fix is to rewrite the source to remove all references to short item record type. Then itemdata.h must be rewritten with data from "bladbase.exs". Finally the number of item records must be increased from 370 to 400. If you do this you will be able to create a PC Editor with the list of items for one scenario at a time, just copy the data from the scenario file and paste it into the editor. If the data is from bladbase.exs, why not just have it read from bladbase.exs at runtime? Quote Link to comment Share on other sites More sharing options...
Seasoned Roamer Ormus Posted May 11, 2008 Author Share Posted May 11, 2008 Quote: Firstly, we thought you had disappeared on a one-way trip down a black hole. Fortunately, I didn't. :-) But still I don't have much free time to work on BoE. :-/ Quote: Second, many of us had come to the conclusion that password-protection on scenarios was a great big hassle. So why not to remove it? Quote: Third, I came to the conclusion that the Character Editor needed the ability to customize the items used, many scenarios have custom items. Now that's an interesting idea! I'll think about it. CharEd source code is really ugly for me. I've spent last year working on projects in object-oriented programming languages and when I look into sources of BoE I feel confused. I hope it will pass. ;-) Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted May 11, 2008 Share Posted May 11, 2008 Ishad Nha: It looks like fixing the list of items used by the editor won't be too hard. However, there are two possibilities and I'm not quite sure which is needed: the easy one is to dump the item data out of bladbase.exs and hard code it into the editor. The harder way is to try to figure out what scenario the party is in (if any) and load data from it at runtime. Is the second needed, or will the first suffice? It seems that the second is required for customized items in third party scenarios to present in the editor. Secondly, I've been reading through the material you've compiled on the scenario format, with an eye to solving the aforementioned problem, and I wanted to make a suggestion: It would be far more useful for rapid reference to display the locations of data within the file as absolute offsets in bytes. Since you gave the column width you were using it should be possible to reconstruct actual offsets from your numbers, but when I've tried the results have always been a little off. I suggest this because every hex editor I've used uses offsets not line numbers, and an offset is what will be required for the editor to read the file and skip the right amount of data to find the item definitions. BTW, switching the data structure used by the editor for items will be easy, the short_item_record_type is only used for the item list and the first thing the editor does when an item is added is use convert_item() to convert it to a proper item_record_type. So, just change the type, size, and contents of item_list and then eliminate convert_item(). EDIT: Found it for myself. Item records always begin at offset 41942 within the exs file, each record is 66 bytes long and there are indeed 400 of them. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted May 11, 2008 Share Posted May 11, 2008 Quote: Originally written by Niemand:However, there are two possibilities and I'm not quite sure which is needed: the easy one is to dump the item data out of bladbase.exs and hard code it into the editor. The harder way is to try to figure out what scenario the party is in (if any) and load data from it at runtime. Is the second needed, or will the first suffice? I recommend the second, since as you say it allows the player to get the custom items of the scenario. And if the party is not in a scenario, it should do the same thing, but with bladbase.exs (that is, "Blades of Exile Base"). Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted May 11, 2008 Share Posted May 11, 2008 Already done for the Mac version. Turned out to be pretty easy after all. It falls back on bladbase if the party isn't in a scenario or if it can't find the scenario that the party is in. It also warns the player if it couldn't load the scenario specific data. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted May 11, 2008 Share Posted May 11, 2008 Re Ormus's post: why not remove it? I can barely read code, let alone program. There seem to be two programmers in this forum, namely Ormus and Niemand. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted May 12, 2008 Share Posted May 12, 2008 Well, I know programming, but am unfamiliar with the Carbon libraries. I did manage to raise the number of scenarios that can be displayed in the list and also cause the default scenarios to not be displayed in the list (since that's redundant). Stareye is also a programer, but he hasn't been seen in this forum for awhile. Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted May 12, 2008 Share Posted May 12, 2008 Two bugs to report about the current windows BoE. One is that when you enter towns, sometimes random items are strewn about it for no apparent reason (I think you referred to this in your first post.) Second is that when the party dies, the game instantly ends. Apparently this isn't how it works in old BoE, and some designers used this fact to kill the party and resurrect them in the same node. I ran into the problem in Spears, and I imagine it'd show up in any other scenario that uses this trick. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted May 12, 2008 Share Posted May 12, 2008 Another example is in Shadow of the Stranger where the party is killed in one of the towns, the chief enemy gives them a display of his power. (Edit it was in town 27.) Quote Link to comment Share on other sites More sharing options...
Seasoned Roamer Ormus Posted May 12, 2008 Author Share Posted May 12, 2008 Quote: Ishad Nha:Re Ormus's post: why not remove it? I can barely read code, let alone program. Then I will remove password checking. Quote: Lazarus.:Two bugs to report about the current windows BoE. One is that when you enter towns, sometimes random items are strewn about it for no apparent reason (I think you referred to this in your first post.) Second is that when the party dies, the game instantly ends. First bug is hard to find in the code. :-/ Second should be easy. Quote: Ishad Nha:There seem to be two programmers in this forum, namely Ormus and Niemand. We need more programmers as I don't have much time to mess with BoE. I'm busy with writing code for 8051 processors and other strange machines. :-/ I think that more people would try to edit source code of BoE if the sources were documented in some way. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted May 12, 2008 Share Posted May 12, 2008 Another good idea is to find ways to customize the assignments for the Scenario Editor hot keys. Not many are used here and now: I R . / , ` 1 2 3 4 5 6 and 0. You could record them in Blades.ini. Shift + (key) arrangements are good because you can leave the Caps Lock key on. Thus you can use the mouse with one hand and activate the keyboard shortcut with the other hand. In the main Blades of Exile game I was able to do this by hex-editing, I found the table "char button_def_key[150]" on line 138 of dlogtool.cpp. Then I found the corresponding compiled version at decimal place 603,456 in the program itself. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted May 12, 2008 Share Posted May 12, 2008 Quote: Originally written by Ishad Nha:Another good idea is to find ways to customize the assignments for the Scenario Editor hot keys. Not many are used here and now: I R . / , ` 1 2 3 4 5 6 and 0. You could record them in Blades.ini. That is, I believe, in the suggestions list. Quote: Originally written by Ishad Nha:Shift + (key) arrangements are good because you can leave the Caps Lock key on. Thus you can use the mouse with one hand and activate the keyboard shortcut with the other hand. Actually, Caps Lock is a separate key from Shift and has a different effect. So if the key shortcuts are Shift + (key) then Caps Lock + (key) should not work. Of course, if it's checking for text input rather than keypresses, then that would work. Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Prince of Kitties Posted May 12, 2008 Share Posted May 12, 2008 Very nice of you, Ormus... Unfortunately there are still some graphics problems. Check out these screenshots of the game, the PC editor, and the scenario editor, respectively: As you can see... There isn't really a lot to see. I am using Wine to run it though, so this could just be Wine being crap. Is anyone else getting this at high resolutions, or just getting it for unknown reasons? Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Prince of Kitties Posted May 12, 2008 Share Posted May 12, 2008 N/M, that seems to be the result of running things with wine directly instead of using the prescribed .desktop file. Edit: Alright, *here* is an actual bug: damage numbers don't show up in visual damage splashes, only in the message window. Not show-stopping but kind of annoying. (Other than that, though, this is great... It feels faster than the old BoE too. Although, I'm still kind of waiting for it to crash unexpectedly on me. ) Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted May 12, 2008 Share Posted May 12, 2008 Caps Lock + (key): It does work in practice and it is a handy thing. Though in BoE there are only two such keys. Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Prince of Kitties Posted May 13, 2008 Share Posted May 13, 2008 And another, more serious bug: killing the party triggers the quit/restart/restore dialog every time - preventing a scenario from killing and resurrecting PCs. (Try, for instance, The Shadow of the Stranger. When the Stranger "kills" you, getting rid of all your items, the party dies and the death-of-party dialog is triggered.) Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Prince of Kitties Posted May 25, 2008 Share Posted May 25, 2008 Hmm. I'm noticing that a lot of objects - usually stuff early in the list like gold, books, candles, etc. - are appearing randomly in rooms and sometimes in walls, occasionally in stacks. I wonder if this is related to the bug with storage rectangles not working... Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted May 25, 2008 Share Posted May 25, 2008 Is it occurring only in towns where there is supposed to be a saved item rectangle? You can use the Scenario Editor to get a review of what items are meant to be in a town by pressing Shift + I. This should list all preset items. Quote Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody Prince of Kitties Posted May 25, 2008 Share Posted May 25, 2008 I already know they're not preset... If I exit the town and come back, the random objects will be different, e.g. a room with a book in one corner might now have a candle in the middle, or something like that. One time I found gold on the floor in Fort Lemmix (in AtG) - definitely not preset. And the random items do seem to appear wherever items are supposed to be saved... In Redemption, for instance, the portal room and the room with McNemier's and Rayne's bodies have them cropping up all the time. Quote Link to comment Share on other sites More sharing options...
Seasoned Roamer Ormus Posted May 26, 2008 Author Share Posted May 26, 2008 I need some help to trace this bug with random items. Could someone send me TWO savegames (form the same town): one in which items are on right place and one in which strange things happen. I would also need instruction what to do in the first savegame to get the results recorded in the second one. I have very little time to work with BOE source code, so I need your help and hopefully someday bugs will be fixed. My email: Grzegorz.Kowalski@wit.edu.pl (alias: kowalsg0@wit.edu.pl) EDIT: I've just uploaded modified exec and source files. Please check if this bug still exists. Please, enter new scenario or restart the one you're in as your savegame may be corrupted. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted February 26, 2009 Share Posted February 26, 2009 Compiling the Character Editor is possible, all it needs is the following collection of resources: sword.cur bladexil.ico snd0.wav snd1.wav snd3.wav snd34.wav snd37.wav They can be found in the official Spiderweb BoE source code. During compiling they must be put in a sub-directory called Resources. I edited the program to handle the usual BoE item record types, but now it no longer gives any items. There is a strange 600 number near the records do I need to alter this? The altered itemdata.h file is included with my Scenario Editor upload, found at: http://www.freewebs.com/ishadnha/2009ScenarioEditor.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.