I'm back and I've ported Character Editor for Win32

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).
AuthorTopic: I'm back and I've ported Character Editor for Win32
Apprentice
Member # 8738
Profile Homepage #0
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! :-)

[ Sunday, May 11, 2008 03:51: Message edited by: Ormus ]

--------------------
Blades of Exile for Win32
Posts: 14 | Registered: Wednesday, May 16 2007 07:00
Shock Trooper
Member # 7662
Profile #1
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.

[ Sunday, May 11, 2008 04:11: Message edited by: Ishad Nha ]
Posts: 292 | Registered: Monday, November 13 2006 08:00
Shock Trooper
Member # 10488
Profile #2
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?
Posts: 334 | Registered: Friday, September 14 2007 07:00
Apprentice
Member # 8738
Profile Homepage #3
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. ;-)

--------------------
Blades of Exile for Win32
Posts: 14 | Registered: Wednesday, May 16 2007 07:00
Infiltrator
Member # 5576
Profile Homepage #4
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.

[ Sunday, May 11, 2008 06:59: Message edited by: Niemand ]

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
"Verbs for the weak!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Shock Trooper
Member # 10488
Profile #5
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").
Posts: 334 | Registered: Friday, September 14 2007 07:00
Infiltrator
Member # 5576
Profile Homepage #6
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.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
"Verbs for the weak!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Shock Trooper
Member # 7662
Profile #7
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.
Posts: 292 | Registered: Monday, November 13 2006 08:00
Shock Trooper
Member # 10488
Profile #8
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.

[ Sunday, May 11, 2008 18:31: Message edited by: Celtic Minstrel ]
Posts: 334 | Registered: Friday, September 14 2007 07:00
Lifecrafter
Member # 6193
Profile Homepage #9
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.

--------------------
"NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki

Tales From the Tabard Inn: Now if only there was a 3600 Hour Contest.....
Posts: 900 | Registered: Monday, August 8 2005 07:00
Shock Trooper
Member # 7662
Profile #10
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.)

[ Sunday, May 11, 2008 23:00: Message edited by: Ishad Nha ]
Posts: 292 | Registered: Monday, November 13 2006 08:00
Apprentice
Member # 8738
Profile Homepage #11
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.

--------------------
Blades of Exile for Win32
Posts: 14 | Registered: Wednesday, May 16 2007 07:00
Shock Trooper
Member # 7662
Profile #12
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.

[ Monday, May 12, 2008 01:49: Message edited by: Ishad Nha ]
Posts: 292 | Registered: Monday, November 13 2006 08:00
Shock Trooper
Member # 10488
Profile #13
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.
Posts: 334 | Registered: Friday, September 14 2007 07:00
Apprentice
Member # 9013
Profile #14
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:

IMAGE(http://img129.imageshack.us/img129/9836/screenshotbladesofexileto4.th.png)

IMAGE(http://img297.imageshack.us/img297/1965/screenshotbladesofexilewx3.th.png)

IMAGE(http://img297.imageshack.us/img297/5583/screenshotboeforwin32scfm5.th.png)

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?
Posts: 43 | Registered: Tuesday, June 19 2007 07:00
Apprentice
Member # 9013
Profile #15
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. ;) )

[ Monday, May 12, 2008 11:51: Message edited by: Miramor ]
Posts: 43 | Registered: Tuesday, June 19 2007 07:00
Shock Trooper
Member # 7662
Profile #16
Caps Lock + (key): It does work in practice and it is a handy thing. Though in BoE there are only two such keys.
Posts: 292 | Registered: Monday, November 13 2006 08:00
Apprentice
Member # 9013
Profile #17
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.)
Posts: 43 | Registered: Tuesday, June 19 2007 07:00