OBoE under VS2005 + minor fixes

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: OBoE under VS2005 + minor fixes
Apprentice
Member # 9038
Profile Homepage #0
In case anyone's interested:
1) I've ported Ormus' dev-cpp code to Visual Studio 2005, if anyone is doing development in this environment, I'd be happy to help.
2) There's a bug in the Windows version causing BoE not to read scenario lists properly - the ListBox LD_DIR message reads files starting from the current directory, not from the starting directory. Simple fix, in FILEIO.CPP starting from line 2034 add:

char directory[256];
GetModuleFileName(store_hInstance, directory, 255);
PathRemoveFileSpec(directory);
SetCurrentDirectory(directory);
(this one requires the include of shlwapi.h and requires linking with the shlwapi library, since the library is just needed for the PathRemoveFileSpec, you can probably rewrite it without it, but I'm lazy :P )

Also, I've seen some requests for fixing petrification touch, so here it is.

In COMBAT.CPP, around line 2388, add:

if ((attacker->m_d.spec_skill == 30) && (get_ran(1,0,2) < 2))
{
add_string_to_buf(" Petrifies! ");
print_buf();
petrify_pc(target,attacker->m_d.level * 5);
}
(you also have to remove the "|| ... skill == 30" from the disease case).

In PARTY.CPP, add the following:
void petrify_pc(short which_pc,short how_much)
{
short r1; // resistance value
if (adven[which_pc].isAlive() == false)
return;
if (pc_has_abil_equip(which_pc,49) < 24)
{
sprintf ((char *) c_line, " %s is immune to petrification.",(char *) adven[which_pc].name);
add_string_to_buf((char *) c_line);
return;
}
r1 = get_ran(1,0,100);
r1 += adven[which_pc].level * 4;

if (r1 > how_much)
{
sprintf((char *)c_line, " %s resists petrification.", (char *)adven[which_pc].name);
add_string_to_buf((char *)c_line);
return;
}
else
{
sprintf((char *)c_line, " %s is turned to stone.", (char *)adven[which_pc].name);
add_string_to_buf((char *)c_line);
kill_pc(which_pc,4);
one_sound(90);
put_pc_screen();
}
}
Also, add a relevant declaration to PARTY.H.
Posts: 6 | Registered: Friday, June 22 2007 07:00
The Establishment
Member # 6
Profile #1
The petrification touch fix is already implemented in OBoE. There should be a thread detailing it.

--------------------
Your flower power is no match for my glower power!
Posts: 3726 | Registered: Tuesday, September 18 2001 07:00
Apprentice
Member # 9038
Profile Homepage #2
Okay. I've also added a dialog box for "Quit game" in place of the "Unused" slot in the main menu. Any need for a small tutorial on adding new dialog boxes to BoE?
Posts: 6 | Registered: Friday, June 22 2007 07:00
The Establishment
Member # 6
Profile #3
Adding new dialog boxes as in? I think I might know what you are saying, but could you please be more specific. Just remember, there are differences between the Mac and PC versions when modifying certain things.

EDIT: I think I know what you mean more now. Before making changes permanent, we should look to the usefulness of various fields. This is best gagued by community reaction. If something can be done another way and is only a convenience thing, then perhaps it is best left open for a more "useful" idea.

[ Friday, June 22, 2007 16:42: Message edited by: *i ]

--------------------
Your flower power is no match for my glower power!
Posts: 3726 | Registered: Tuesday, September 18 2001 07:00
Apprentice
Member # 8990
Profile #4
Yes, a good idea Stareye...
And about that change idea of yours, Ilintar, I doubt that we really need such a node. There's already the End Scenario - Node and that's as far as anyone should go in designing.
Closing the program is normally not needed, just end the scenario, closing Exile fully could anger players and I see no reason why to risk this...
Posts: 37 | Registered: Saturday, June 16 2007 07:00
Apprentice
Member # 9038
Profile Homepage #5
quote:
Originally written by Crynsos:

Yes, a good idea Stareye...
And about that change idea of yours, Ilintar, I doubt that we really need such a node. There's already the End Scenario - Node and that's as far as anyone should go in designing.
Closing the program is normally not needed, just end the scenario, closing Exile fully could anger players and I see no reason why to risk this...

It's not that. I didn't add a new node, I just filled in the < Unused > area (where "How to order" used to be) in the main menu with "Quit game". However, in the meantime I had to also figure out how to add a new dialog box to the resources (because of the custom dialog graphics, it's not as simple as adding and programming a standard dialog box). So, if anyone's programming under Windows and feels a need to know how to add new dialog boxes to BoE, I can give some assistance.
Posts: 6 | Registered: Friday, June 22 2007 07:00
The Establishment
Member # 6
Profile #6
Yeah, definitely post how you did it because how it is theoretically possible on Windows is important.

--------------------
Your flower power is no match for my glower power!
Posts: 3726 | Registered: Tuesday, September 18 2001 07:00
Shaper
Member # 73
Profile #7
As I said elsewhere on this forum (Ormus agreed) it might be more useful to have that button bring up the license the code is released under instead of having it close BoE. There's already the little X button in the upper right corner of the window for closing the program anyway.

As for the Start Scenario and Custom Scenario buttons, I think we could hypothetically get rid of the Start Scenario button since it only displays VoDT, ASR (with a typo in the title, no less), and ZKR, regardless of whether they're actually in the folder, while Custom Scenario displays a list of all scenarios in the folder (up to the hard-coded limit anyway), including those three if they're in the folder. Then we could put something else there. I don't know what should go there though.

--------------------
My Myspace, with some of my audial and visual art
The Lyceum - The Headquarters of the Blades designing community
The Louvre - The Blades of Avernum graphics database
Alexandria - The Blades of Exile Scenario database
BoE Webring - Self explanatory
Polaris - Free porn here
Odd Todd - Fun for the unemployed (and everyone else too)
They Might Be Giants - Four websites for one of the greatest bands in existance
--------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Posts: 2957 | Registered: Thursday, October 4 2001 07:00
Triad Mage
Member # 7
Profile Homepage #8
Also, you should be careful that your code would affect all monsters, not just the party - monsters should be able to petrify/paralyze/disease each other as well.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
The Establishment
Member # 6
Profile #9
The code is in place in the OS X version of OBoE to petrify monsters as well. Certain things were never implemented by Jeff, sadly. I could go back and try to add them.

--------------------
Your flower power is no match for my glower power!
Posts: 3726 | Registered: Tuesday, September 18 2001 07:00