Jump to content

Anyone around?


Lazzamore
 Share

Recommended Posts

Hello, I'm Lazzamore. I'd like to get back into Blades of Avernum, but first I want to know if their any chance at all someone other then me would be playing/making the scenarios? I know BoA is mostly dead, and had a rough go at being alive to start with, but I still have fond memories of my first playthrough. While their are some i haven't played, I think it would get a bit dull playing just the same scenarios again, and even worse spending time and effort designing my own if no one's ever gonna try them!

 

So, would anybody here like to form a new BoA group with me?

Link to comment
Share on other sites

Same as Tyranicus and Kelandon. I don't regularly play or design scenarios, but I'll play whatever new stuff comes out. The same will be true of maybe a dozen other regulars on this forum.

 

However, it's really hard to say how many people who aren't regular contributing members of this forum still play BoA whenever something new comes out.

Link to comment
Share on other sites

I think it can be done. I will need to create some programs to detect customized terrain, items and monsters...

 

Code done for program, now I need to write a suitable spreadsheet for doing the actual comparisons.

 

 

 

#include <iostream>

using namespace std;

 

#include <stdio.h>

#include <stdlib.h>

 

//cd C:\

 

int main(void)

{

unsigned long buffer[81200]; /* initialized to zeroes */

unsigned long i,j,k;

FILE *fp = fopen("myfile", "rb");

 

if (fp == NULL) {

perror("Failed to open file \"myfile\"");

return EXIT_FAILURE;

}

 

for (i = 0; i < 81200; i++) {

unsigned long rc = getc(fp);

if (rc == EOF) {

fputs("An error occurred while reading the file.\n", stderr);

return EXIT_FAILURE;

}

buffer = rc;

}

 

fclose(fp);

 

 

char *scen_letters[127] = {

"*"," "," "," "," "," "," "," "," "," ",

" "," "," "," "," "," "," "," "," "," ",

" "," "," "," "," "," "," "," "," "," ",

"",""," ","!","\"","#","$","%","&","'",

"(",")","*","+",";","-",".","/","0","1",

"2","3","4","5","6","7","8","9",":",";",

"<","=",">","?","@","A","B","C","D","E",

"F","G","H","I","J","K","L","M","N","O",

"P","Q","R","S","T","U","V","W","X","Y",

"Z","[","]","]","^","_","`","a","b","c",

"d","e","f","g","h","i","j","k","l","m",

"n","o","p","q","r","s","t","u","v","w",

"x","y","z","{","|","}","~",

};

 

printf("\nThis program prints out a few features of the Blades of Exile scenario file.\n It is only concerned with detecting customization of monsters, items and");

printf("\nterrain types. It does this by printing out data for the current Exs file.\n Said data is then compared with the data from Bladbase.exs\n");

 

printf("\n\nScenario Flag\n0,,,"); // Scenario Flag

printf("%d,%d,%d,%d",buffer[0],buffer[1],buffer[2],buffer[3]);

 

printf("\n\n\nOffsets 3134:30781 Scenario Monsters [256][108]\n");

 

for (i = 3134; i < 30782; i++) { // Scenario Monsters [256][108]

if (i % 108 == 2)

printf("%d,%d,,",i,(i - 3134)/108);

printf("%d,",buffer);

 

if (i % 108 == 1)

printf("\n");

if (i == 30781)

printf("\n\n\nOffsets 31384:35479 Terrain Types [256][16]\n");

}

 

for (i = 31384; i < 35480; i++) { // Scenario Terrains [256][16]

if (i % 16 == 8)

printf("%d,%d,,",i,(i - 31384)/16);

printf("%d,",buffer);

 

if (i % 16 == 7)

printf("\n");

if (i == 35479)

printf("\n\n\nOffsets 41942:68341 Item Types [400][66]\n");

}

 

for (i = 41942; i < 68342; i++) { // Item Types [400][66]

if (i % 66 == 32)

printf("%d,%d,,",i,(i - 41942)/66);

printf("%d,",buffer);

 

if (i % 66 == 31)

printf("\n");

if (i == 68341)

printf("\n\n\nOffsets 68342:73461 Monster Names [256][20]\n");

}

 

// 22:46 Full, Identified Item Name

 

 

for (i = 68342; i < 73462; i++) { // Monster Names [256][20]

if (i % 20 == 2) {

printf("%d,%d,",i,(i - 68342)/20);

for (j = 0; j < 20; j++) {

printf("%s",scen_letters[buffer[i + j]]);

if (buffer[i + j + 1] == 0)

break;

}

printf(",");

}

 

printf("%d,",buffer);

 

if (i % 20 == 1)

printf("\n");

if (i == 73461)

printf("\n\n\nOffsets 73462:81141 Terrain Names [256][30]\n");

}

 

 

for (i = 73462; i < 81142; i++) { // Terrain Names [256][30]

if (i % 30 == 22) {

printf("%d,%d,",i,(i - 73462)/30);

for (j = 0; j < 30; j++) {

printf("%s",scen_letters[buffer[i + j]]);

if (buffer[i + j + 1] == 0)

break;

}

printf(",");

}

 

printf("%d,",buffer);

 

if (i % 30 == 21)

printf("\n");

if (i == 81141)

printf("\n\n\nStarting at Offset 81142 Scenario Name\n");

}

 

k = 81142 + buffer[41636];

for (i = 81142; i < k; i++) { // Scenario Name

printf("%s",scen_letters[buffer]);

}

 

printf("\n\n");

 

return EXIT_SUCCESS;

}

 

 

Link to comment
Share on other sites

Ishad Nha: First of all, your buffer is not initialized to zeroes (only variables declared outside a function get that treatment); instead, it's not initialized at all and thus starts out as garbage data. (Also, why are you including <iostream> when you don't even use it?)

 

Secondly, I wonder if it might be more convenient for you to parse the XML format that the latest Blades of Exile releases can produce? You'd just have to resave it as a .boes in the new scenario editor, change the file extension to .tgz (or .tar.gz), and unpack it with 7zip (which would produce a folder called "scenario" - not the scenario's name, just "scenario"). Just a thought. (It's also somewhat human-readable.) Barring one or two issues I fixed recently (like changing "One-Time Do Nothing" nodes to "One-Time And Set"), the conversion seems to be pretty accurate now. (And I'd love to have someone point out any places where it's not accurate.)

Link to comment
Share on other sites

I am not a serious coder/programmer! Program prints out okay...

Program prints out data, which is put into a spreadsheet for analysis. To detect customization, data from the relevant scenario is compared with data from Bladbase.exs. Idea is go through each object (monster, item or terrain type) and see how it differs from the default values found in Bladbase.exs.

 

XML I will need to look into at some point...

Edited by Ishad Nha
Link to comment
Share on other sites

I was mainly objecting to your inaccurate comment (it might not have been important for it to be initialized to zeros).

 

One nice thing about XML is that it can be compared with normal diffing tools. No idea where you'd find such a thing for Windows though (UNIXes generally come with it preinstalled).

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...