Thursday, June 30, 2005

Pants

Ok- good news & bad news. I've gotten a half proper particle system working in the game (with bad textures & all!) and I even have a gravity system working on it (just to see if it does actually work) annnd the short answer is that yes it works but the long answer is, no it doesn’t.



The stupid thing works fine indoors but if you go outdoors ( to a game exterior cell) the stupid thing starts firing particles everywhere... i.e., the gravity system seems to go kaput... will have to check the forums for this one.

Wednesday, June 29, 2005

Fingers in many pies... and one in the eye

Today:

I went to a Spring-Alpha exhibition which was mostly about open source methodologies being applied to their areas- it was quite interesting & I got lot of useful background into about open source thinking which should be useful for the essay’s we have to do.

I tried using a piezo speaker as a microphone in BS2... I made a very simple stupid circuit which I wasn’t expecting to work and, sure enough, it didn’t... I reckon this could be a sticky point for the project- getting sound into the BS2 stamp… I’ll work on it anyway.

I did more research in using particles in Morrowind- I found some quite useful info about setting stuff up properly and trouble shooting & limitations and even a few more surprises about what Morrowind can understand from 3DSMax- apparently it understands gravity warps & whot not (see here & here)

Tuesday, June 28, 2005

Woo Hoo restored!!!

You're down and then you're right back up again! Good lord this projects is a bit of a roller coaster. Well, long story short- remember option number 1 from the previous post? Well turns out that it works a treat! Check it out!:



Yeah I know it's a bit of a grey mess but that's cause I haven't got the hang of texturing the particles yet!... baby steps people! Anyway, you can see the white collar around the neck of my trusty assistant, Gal, and it's what's emitting those particles- constantly on the fly... wuunderbar!!!

It's absolutely perfect as it means that I can add about 4 or 5 emitters to a body mesh and give the effects of fire or steam or light balls or whatever I want! I'm sorted!!! Basically, as I've said before, the better bodies system places clothes/armour over the base body mesh instead of replacing sections of the base mesh (such as torso, arms etc) so that’s what’s allowing the particle emissions to work- the Morrowind game engine hasn’t got a clue what's going on so let's just keep it that way.

I'd just like to say- serious respect & fairplay to the Morrowind modding community- particularly the Better Bodies people. I wouldn't be able to do this without their ingenious system and they really deserve an award or something... tell ya what- if I get this thing finished with a day to spare I'll whip up a flaming suit of armour or the like & I'll probably release the particle effects suits back into the community as a token of my gratitude- I haven’t seem any about yet sooo hopefully they'll go down well.

Anyway- must concentrate and hurry the hell up and get this effects stuff finished up ASAP.

Monday, June 27, 2005

Not so woohoo...

Well, it was bound to happen at some stage so I shouldn’t be too pissed off... but still... ARRRRRGH!!!!

I’ve spent most of the day trying desperately to get a goddammed flaming arm mesh going but the game is having none of it.... I suspect that the programmers rigged it so that particle effects couldn’t be emitted from bodies- only weapons... i.e., stuff that a character holds, not directly from them... how do I know this? Check out the screen shot:



Notice the character holding a flaming sword, notice it being on fire and having particle effects- now look at his arm... yes, well done, you were right to notice something a bit off- he's got a sword where his forearm should be. This is in fact the EXACT same mesh as is used in the flaming sword- I've just told the game to use that flaming sword mesh for the arm model instead of a cylinder of skin.... you will notice it NOT being on fire.

So, I can only conclude from that situation that particle effects are not allowed on body parts... there's no other explanation really

Grrrr... am quite peeved indeed.... that's about half a week wasted...

However, I'm not down & out just yet- I have two sources of hope:

1) The Better Bodies mesh system that I downloaded may provide an alternative to this situation. It uses a completely different system to the game's original system (especially for clothes generation- you literally put them on over the body mesh instead of replacing the parts in question... i.e., torso of whatever) SO!!! I'll have a quick go at adding some particle effects to standard better bodies clothes to see if they can get around the problem.

2) If all else fails, I can still have a standard game particle effect placed at the centre of the players body so it'll at least look at though the player’s torso is engulfed in flames or steam, of whatever... it's not great but it'll have to do and at least I know I can do that if all else fails. Also, I can use a few simple animated textures like clothes made out of flames which can glow... there won’t be particles emitted from every point on the surface but it'll do

I dunno- maybe I'm being too hard on myself here and trying to do too much- the second option there would pretty much get across the goal of the project and is acceptable for a prototype but I just really think that I need those extra effects- it brings the whole thing together!

Anyway- I'm giving this one more day- no more wasting time... GRRRRR!!!!!!! after the flame torch working perfectly last night and everything... I shouldn’t have gotten my hopes up

Sunday, June 26, 2005

GAAAARGH!!!! Typical!!!

Man, I've GOT to stop doing this! I'm turning into my own worst enemy! Remember the texturing issues that I was having with the particles? Well I was searching on the net for help or examples of how the blazes you get particle stuff to translate from 3DSMax to Morrowind correctly... I found lots of good particle stuff:

Lady Eternity's Mod Resource

ANNND even links and tutorials for how to do BB clothing:

Better Bodies Official Clothing Tutorials
Useful Forum Post on BB Clothing
Another Useful Forum Post on BB Clothing

which will come in very handy.

As good as all that was though, I was still having difficulty getting the dammed particle effects to work properly when brought into the game. SO!!!, there I am filing away the days research when I notice, sitting quitely in my Morrowind research folder, a wonderful little inconspicuous file that I've labelled "light torch Max template"....



Queue much smacking of head off of desk, monitor & anything else that seemed hard enough. Basically it was EXACTLY what I was looking for most of the day on the net and apparently I already had it... I just didn’t realise! I had it lumped in with some armour & weapon 3DSMax examples... blooming typical!

Anyway! It's all good and it works and, as far as I can see- the file came straight from the developers!!! I'll try and track down exactly where I got it from but it's blooming perfect! It should let me use the fire effect exactly as it's used in the game which is what I wanted to do all along sooo.... wunderbar! Things are going my way!

Hopefully I'll have some pretty picture of my first PROPER flaming armour bit tomorrow.

Saturday, June 25, 2005

Plastic surgery for Morrowind

Ok, to quote Cartman from South Park-

"Ohmygod, you guys, you guys- you're never going to believe this!"

Ahem, today has been yet another big day on the project front- sorting out the armour problem definitely set things going in the right direction annnnd it let very handily led onto more Morrowind research (just to double check that I had the technique correct).

Anyway, searching for that armour stuff led me onto an alternative way of making armour in the game called “Better Bodies”. This is basically a marvellous plugin that's been made by yet more genius modders and it replaces the original body meshes that come with the game for much much MUCH better ones that have bend/blend points etc. The main page of the mod is here anyway.

The difference between the two mesh sets is unbelievable in terms of functionality & poly count. Anyway, its main purpose may be for a visual tweak so why would this be of any relevance to my project I hear you ask? Well, one of the goals of BB's creators was to change the way that clothing was created in Morrowind.

Basically, using the old system, characters on screen are just a collection of disjointed limb parts... as in a leg consists of a foot with is attached to a ball (ankle) which is attached to a shin which is attached to another ball for the knee and so on. This system makes creating armour very difficult as it's really hard to maintain coherency between all of the different bits and it's also really hard trying to put everything together in the editor (for example- if you want to make a single armoured leg you'd have to make individual armour parts for all of the limb parts & interconnecting spheres etc., define the parts as body parts AND define them as armour parts AND assemble them... basically a hell of alot of work). You can see the old disjointed meshes (the ones on the top) compared to the new seamless meshes (the ones on the bottom) in this pic:



The new BB system is absolutely brilliant in that it lets you construct clothes in their proper form- i.e., as garments that you drape over a base model... this appeals to me very much. Basically, instead of me having to make about 10 completely seperate meshes with individual particle emitters and trying to link them together, I can work on a single, coherent mesh (which can be literally as thin a a sheet of material) that will sit on the surface of the entire player mesh... basically there's ALOT less work and the whole thing is alot more likely to succeed... in my humble opinion. Besides- the results of this system are blooming amazing!:





... schhhtunning! :-)

SO!!! I'm gonna give it a try... or at least some investigation- stay tuned!!!

Oh- in other news (with such great & typical timing of course) I did manage to get my first armour piece (the one that uses the original Morrowind mesh system) working... well, it kinda works anyway- the texturing on the particles is having some "issues"- no worries though, I'm gonna search the net to find some way of bashing it into submission.

Friday, June 24, 2005

Eureka!!!

Excellent- after much searching on the web (I must say that google is getting REALLY crap these days) I eventually found what the problem was with my armour texture. Apparently I had set up the mesh that I’d made to be used as the model for the item when it’s on the ground (hence it working semi properly when it was dropped) BUT!!! If I want the mesh to be displayed on the player, then I have to also define the mesh as a new body part in the editor first, THEN ALSO as an armour part and then it should work… excellent! See here and here for details

Stay tuned for the results...

Thursday, June 23, 2005

Grrrrr…

All in all, quite a frustrating day- spent most of it trying to get my blog diary things in order

To top it off, in the evening (and long into the night) I tried making my first ever armour component with an emitter (to try and make it look as if it was on fire). It went pretty much ok (pretty hair tearing out in places) but I eventually got the whole thing ready & imported into the editor…. Unfortunately though, the stupid editor wouldn’t recognise the damm part properly!!!!



It’d only use the proper model that I’d made when you drop the damm thing on the ground!... and to add insult to injury, the script that I’d been working on to get a static fire effect attaches to the mesh also decided to work then when the item was on the ground… stupid thing :-(



Anyway- at least I know that my script would have worked if the game engine allowed you to get the position of objects when they’re equipped on the player… not just when they’re sitting on the ground.

Must figure out how to get armour meshes to work properly though…

Wednesday, June 22, 2005

You take the high road and I'll take the one with many sharp, pointy rocks...

Ah well, I've always been someone who's had to learn things the hard way- I've just spent the entire day trying to attach an in game particle effect (a simple fire) onto the arm of a character... the idea was that if I could do it for an arm, then I could do it for any body part... it'd prove that the concept was sound type of thing.

Why did I want to use the in game particle effect? Well because it looked right pretty in my humble opinion and I'd wonder if I could get something looking as good.

Anyway- I had numerous problems... long story short, the problems were caused by variable settings but I managed to sort most of them out with global scoping & scripting. In the end it'd seem that you just cannot do it as the game's not really set up for sticking anything onto appendages (you can’t reference parts of the player’s body directly- only the player’s position)... ah well- at least I tried!

It wasn’t a complete loss though- I got quite alot of experience in Morrowind scripting and editing for the game so I should be able to fly through editing & scripting stuff in future

SO!!! now what? Well, I guess I'll just have to do things the hard way- through 3DS Max. I'll have to make my own custom armour/clothing parts, do more work on animated textures than I was hoping to and more work on particle stuff... aswell as textures... yeah I know it's not that much of a big deal but when you consider that this stuff technically is not really the focus of the project yet it's still going eat up quite a bit of time, it does become a pisser...

Anyway- onward and upward

Tuesday, June 21, 2005

I want sparkly bits here, here and here

Ok, next hard bit/hurdle- I have to make my own script to make effects.

I’m thinking of making my own custom armour (that will look like ordinary clothes) for each element (as in fire/ice etc.). Each element armour will have a script/texture attached that will make it's surface shimmer with the element BUT I also want particle effects coming off of the armour... here's where the scripting comes in. I have to use some of the game’s static effects (which are generally supposed to stay in the same place... hence the STATIC part of their classification) and I have to somehow figure out the 3D position of each of the body parts (or at least the body, head & arms if I want it to look right) to attach particle emitters/statics to... all NOT done in the game... great

Monday, June 20, 2005

The night of many happenings continues...

Yup- we have official confirmation, I've been playing around with the binary read/write Python programs that I whipped up and yes indeedie- it writes the bytes backwards to the file but it also reads them backwards so all's good I suppose- I don’t have to fix anything... horray!

Oh yeah, I realise that when everything seems to be "backwards" then its most likely me who's actually backwards/wrong and the binary files are correct? Well, just for the record, I've been using my trusty ol calculator from my engineering days to do the decimal to hex conversions and the little trooper has never let me down (got me through all of my engineering years & exams!) sooo I'm taking its word on in!... if the calculator says the worlds backwards then so be it!

Anyway- I just have to say, bloddy hell! I've never made so much progress on a project in a single day. To think that this time yesterday I was freaking out about having to hex edit compiled scripts just to get my data into the game and now I almost have the entire data input system from the hardware part to the game nailed... bloody amazing- internet rules and yet again, MW modding community are bloody brilliant.

Anyway, as chuffed as I am with today’s progress, I'm now mightily tired so must sleep.

And this headline just in...

Ok, tonight is turning out to be a live breaking news story or the like... all very exciting… well, kinda. I've started to move onto the next part of the problem of getting physical data into the game which is getting it out of the device (assuming it ever gets built)

Sooooo... the options are Python, Processing or C++... ok, I'll cut straight to the chase here- as loath as I am to choose it (seriously... I cannot emphasise my contempt for the dammed thing), Python will do for now as all I need is something quick & nasty to rip the data out and fire it into a binary file... seeing as I've pretty much gotten the hang of getting Python to communicate with stuff through serial connections from the last project I may as well stick with it for the time being.

I swear to god though- if I've spare time (even a day) I will be doing my best to figure out how to do the connecting & file creation in C++ and I'll be making a nice little self contained exe without bloody Python. I don’t think I'll go with Processing for this thing as it’s really not what it's designed for (it’s more of a graphics thing... not a file manager & serial communicator!)

Ahem, anyway- I ploughed ahead into Python with the binary stuff. I was a bit rusty at first but soon got the hang of file I/O and needless to say it became quickly apparent that I needed to download yet another blooming library (thankfully no dependent libraries though) to do the simple binary stuff I wanted to do.

The base version of Python can read bytes from binary files BUT it instantly converts them to strings which is a bit of a pisser. Anyway, one download of NumPY later and I got the hang of some of the module functions and now, long story short, I have Python merrily reading and writing binary files.

Here's where things get interesting though... when Python reads in the same binary file as the game was reading in, it also seems to be reading in the bytes in backwards order... what the hell is with computer people!!! Why can’t ye makes things bloody straight forward!!! You know!! Some of us are still human and not computers!!!...

Anyway- I suppose I should be happy as it means everything is consistent and that the machines are happy at any rate- who cares if humans can’t read the files, the computer is all that matters... grumble grumble

Moral of the story- humans shouldn’t edit binary files, we're backwards to computers apparently

Additional

Well, I've just figured out why the hell the game was reading in too much stuff (two bytes of info each time even though I asked it to read in only one byte). I quote from the MW extended scripting manual:

Reads the number of SHORTS (2 bytes) requested from the file

Duh me- the game was reading two bytes (not one) cause it's the shortest amount of info that the ReadFile function can read in...

Also seem to have noticed a backwards pattern in the way numbers are read in... if you have "1a 2b" in the hex file, it'll end up in the game as "2b 1a"... hoping this will not be a problem- the number in the binary file would have been 6699 (1a 2b) whereas the game would read it in as 11034 (2b 1a)... may just have to reverse the bytes as soon as they're read in

Huzzah!!!!

Woo hoo!! I know it's not very impressive but it you examine the screenshot, down at the very end you'll see a little box saying "info read was 31744"... guess where that came from!... yup- my first ever script!!! And it read from a file on the disc!



**Jumps about the place**

Ahem- well it's a giant leap for me anyway as it means I can get data into the game and that the game can use AND most importantly, understand it.

However, having said all of that there are of course some... issues. First off I'm sure you're wondering why the hell the info read was 31744. Well, I had a sample binary data file and it's first few bytes were:

00 7c 3a

Now I'm a smidgen confused at the mo as to how exactly the game reads in info and I'm sure its going to take some tweaking & trial & error BUT I do know that 7C 00 is 31744 in hex. I've also tried changing the start of the file to 00 1a 3a and I got 6656 which again is consistent (6656 = 1a 00 hex) SO!! even though I asked it to just read in one byte it seem to be adding another 00 byte to the info.

I'm not really worried yet as it could be that the 00 if for end of file stuff OR it could be that the variable I used in the script must be 2 bytes long minimum so the game is automatically filling in the missing bit (or byte... HAHAHA!)

Of slightly more concern however, is that I tried to edit the binary file while the game was still running and I got some "file in use" type errors sooo I dunno if permission is going to be a problem. It's not a big problem as I was never intending on constantly having the game update/read the info from the file as it was running (just once when it starts up) but still... would be nice to edit it whenever I want! It may not be a problem for my external program though (assuming I get round to making one!)... Windows may just be being too polite about it... my external program may not be as civilised… I’ll program it to say: “Gimmie that file or I'll break your face!!!”

Oh- and if you haven’t guessed yet, the game will only read in hexadecimal data from binary files... so much for nice simple text i/o... now it's hex & binary i/o... ah well, can't have everything!

Sunday, June 19, 2005

Bloody hellfire!

It is absolutely amazing how one little search can open up one great huuuuge whopping door that changes your project (and possibly the next few months of your life)... the ol saying "looking for one thing may lead you to another” is quite appropriate here methinks.

Ok, basically last night, having gone through the entire Morrowind mod maker's bible AND the customisation guide AND scripting for dummies (some 1000+ pages of reading between the lot of em), I finally got round to facing up to my fear about compiled scripts & whether Morrowind needed them or not.

My plan all along has been to use an external program (Python, C++ exe whatever) to edit a plug in ESP file that Morrowind would load up. The external program would edit particular parts of the esp plug in file to reflect whatever data was gathered by the badge part of this project. In particular, it was most likely that the external program would have to edit some of the scripts contained in the esp file (as in change variables that are used in scripts that are embedded in the Morrowind program- these scripts would be launched internally in the game and would change the players stats or whatever in game )... it'd work like this:

1) Data from hardware is read into external program
2) External program makes decisions based on data
3) External program edits a plug in esp file (most likely through hex)
4) The parts of the esp file that are edited are internal Morrowind game scripts (the external program changes some of the values of the variables used in the scripts)
5) The game launches, opens the esp file, runs the scripts contained in the esp file and the now altered variables get fed into the game engine

It's kinda like using the embedded scripts in the esp files as a Trojan horse to get the external data directly into the game.... the game doesn’t allow reading of external files from game scripts sooo there's no other choice really!!!

Anyway, the main concern with this approach was the way that the esp files stored their internal game scripts. They seemed to store them twice- as in, if the esp file contained a single script, it was stored in the esp file once, in plain English that a person can read, BUT!!! more importantly, it also stores a compiled version of the script which is written in computer language...

SO!! The problem- if the game script in the esp file needed to be edited, exactly which one in the esp file needs to be edited? As in do you edit the plain English version or edit the compiled version.

Well, last night, after a little bit of investigation, my hopes were completely crushed when I found out that the game only cared about the compiled (computer language) version of the script- you could edit the English version of the script contained in the esp file to your heart’s content but, when the game reads in the esp file, it will completely ignore the English version and go straight to the compiled version.... see here for details.

In plain English: If I wanted my external program to edit a script contained in an esp file, I would have to edit it's compiled version in the esp file... through hex....

Just to get this across: Here's a sample Morrowind game script that would be contained in an esp file:




Here's it compiled in hex




Needless to say I retired to bed at that point and had a big cry at the thought of the bashing that my brain was going to get trying to mess with compiled scripts through hex.

ANYWAY!!!! Today I decided to check up on this stuff and, thank the gods, there are plenty of genius' out there who have been messing with .esp files for ages (such as the almighty Dave Humphrey) who have painstakingly put together a list of compiled script functions... i.e., a way of translating compiled script to english and visa versa... which takes about 1 years work off the project. (See the end of this page for details)

SOO!! chancing my arm, I checked to see whether there were any MW script compiler programs available that could take care of the whole compiling thing for me... there doesn’t seem to be any available BUT!!! the search led me to a marvellous new set of Morrowind modding pages that were created by the real hardcore modders ANNNND!!!, them happening to be computer programming genius' an all, they got bored of being restricted by the original Morrowind scripting functions. So what do they do? They go and create their own set of functions that supplement the original game... they've made their own kinda "additional" exe that has a talk with the original Morrowind game exe and informs it that it WILL understand and use these new functions that these guys created (or else it's gonna get really hurt) so it's kinda like a patch for the game that adds on butt loads of scripting power (less restrictions on what the game scripts can do)... and this was all unofficially made for free... my hat is seriously off to these guys- respect! **bo**

Anyway- what can some of these extra functions do and how do they relate to my compiling worries? Well, one of the extra functions that the additional exe allows is... READING AND WRITING FROM THE DISC!!!!

**Hallelujah chorus, fireworks etc.**

SO!! this marvellous little thing should allow me to completely bypass having to hack into and edit the esp files as I can just get the game scripts contained in the esp to read directly from the disc! As in, I'll still have to get the external program to read the hardware data but instead of overwriting the scripts in the esp files, the external program will just have to create a text files or the like that the game script will read in on it's own... no overwriting of compiled scripts in hex needed!!!

WOO HOO!!!

Ahem- needless to say I'm just a smidgen on the relieved side... I just hope that I'm not jumping the gun here- I've just been reading through the readme files quite quickly while giggling nervously so I'm ASSUMING that the extra functions can read from text files & whot not... fingers crossed!!!

Anyway, the main links to this marvellous stuff are:

Cdcooley's Page
and
Morrowind Online (amazing mod if it works- adds online multiplayer stuff to Morrowind!)

God bless the Morrowind modding community anyway- bloody genius' the lot of em!!!

Saturday, June 18, 2005

The war on many fronts

Today-

I spent most of the day trying to get the nif importers/exporters that I found during my research working which involved trying to track down a working installation of 3DS Max 4.... it took half the day but eventually I found one in the computer & engineering dept.

On the up side though- while I was waiting for that all important info, I found an alternative way of doing it through milkshape (see here for the importer & exporter) sooo see the screenshots dammit!!!!



Basically, I can now REALLY start doing my own stuff (not necessarily mesh stuff BUT!!! attaching lighting & particle effect to existing stuff)

I’ve also been doing a lot of reading as per usual (I’ve been powering through all of the MW docs that I got!) and I've finally stopped going "oooh!!!" and "ahhh!!!" when I read an interesting bit.. I am now no longer surprised at what the game can do- excellent!

On the automatic editing of files front there may be a new option on the cards- apparently an esp file can use a bsa file which is like an archive of files that the esp pulls stuff out of, sooo I may be able to mod the bsa file instead of the esp file itself... there could end up not being much difference between the processes though... will have to determine which is the lesser of two evils
On a bit of a major down side (it's not confirmed yet!) the main thing that I wanted to do (editing scripts that were contained in esp files) may proove to be nigh on impossible. You can edit the script text via hex with a bit of doing BUT!! the major problem is that there's also a goddammed compiled version of the script contained in the esp file which may also have to be changed... do ye have any idea what a compiled script looks like? Try a bunch of completely meaningless numbers & symbols... apparently there's a code in there somewhere but it'd be a right pain to code. For the time being I'll have to hope that by just changing the script text the compiled version gets ignored... doubtful though :-(

Another possibility could be to edit the save files... it could be alot easier but you'd have to use the same process (hex editing)... changing individual parameters in the game this way may be easier though...

GIVE ME STRENGTH!!!!

Friday, June 17, 2005

Hex... HEX!!!.... HEX HEX HEX!!!!!!!!!!!!!!!!

Urrrgh- I’ve just finished going through the hex in the esp file in great detail and it hurts... seriously. I think I've got the hang of the stuff though , as in how the game expects to read the info and what the protocols are for putting stuff into the file so I SHOULD (SHOULD!!!) be able to hack the bloody thing without messing it up completely... at the very least I should be able to swap items/armour/textures on the fly through an automatic (program exe of my creation) process.

Thursday, June 16, 2005

I'm on fire baby!

Woo hoo!!! Another minor breakthrough- I’ve just made up my own custom piece of clothing... nothing special really but I've found that by messing around with the "enchantment" setting (fire/ice etc) you get nice glowy effects on them which I could use straight off to show alignments... nice to know it's a backup option.

Also on the breakthrough front- I opened up a .esp (Morrowind mod file) in Visual Studio and it recognised it straight off as a hex file! I was kinda expecting this (apparently the nif files are hex format aswell) so it's all good- it means I can make a program to mess with the hex and that I can search through it myself to understand what’s going on and what bits I have to mess with (i.e., swapping meshes or textures automatically)

Wednesday, June 15, 2005

Caveman...

Ok, today was a very good day and very bad day.... very good from the point of view that I finally got round to reading enough of the Morrowind research that I finally felt confident enough to start modding the game... AND IT WORKS!!!

Yup- I'm astounded and amazed... I have my very first mod (Ross' cave).. yeah yeah, not very exciting I know but it works and everything’ll be grand if I take it in baby steps... little baby steps.





As per usual there were initial teething issues... such as accidentally putting the exit to my cave underwater, about 150m away from where you entered so that you ended up exiting the bloody thing about 100m below the surface of the sea... much drowning ensued before the eureka moment oh "oh that's what the pink arrow is for!!!"



There were also some issues with NPC's (non player characters) in that when I placed them into my cave they seemed to instantly die... it wasn’t my fault I swear!!! I think that there was some strange computer game quantum physics law going on where only 1 instance of the NPC was supposed to exist at any one time... they found out about each other and promptly died cause of the laws of physics... or it could have been that they died from a 1ft fall to the ground cause I accidentally put them a little bit off the ground.



Anyway!!! Whatever it was, it was soon fixed by using an NPC that had armour on... reckon it must have cushioned the fall or something :-)





Things are going great on that end but on the hardcore customisation end of things, there are a few problems. I have to work with NIF files to make custom textures & particle effects (not really present in the game) and the rumour was that you could do all of these in 3DS Max... great- until I find out that the game is so old that it uses either 3DS Max 3 or 4... which aren't easy to come by these days! Also, it turns out that the sample blank NIF files that I got during my research (armour templates & whot not) are 3DS Max 5 or 6 compatible only so if I save them back then I loose their textures or the like... great.

I'll work around it anyway or find a way of beating the damm thing into submission.

Oh, and I finally got Visual Studio (C++ compiler & dev environment) installed & working… turns out that the missing ingredient was patience and not love- I wasn’t giving the stupid installer enough time to search the hard drive for installed components… well excuse me for thinking that the damm thing had crashed when it just sits there for 10 mins seemingly doing nothing!!!

Tuesday, June 14, 2005

Crashings of the non-car variety

Righty- I spent most of today running around and getting nothing done in general- after the recent success on the game front of finding all that info on modding Morrowind, I thought I’d best try and catch up the morphing world front by getting Visual C++ 6 installed and working on my uni comp for Virtools.

I had little success unfortunately... the stupid thing kept on crashing. Still though, I'm hopeful that that it'll let me go down the whole making my own BB route successfully ANNND it’ll also mean that the wonderful pre-made C++ samples & example projects that come with Virtools can be used... excellent!

Monday, June 13, 2005

The world is mine! Mu hu HAHAHA!!!

Ok- one of my recent concerns was that I wouldn't be able to do all that I wanted to do in a hacked/modded game- that the game engine wouldn’t have everything that I needed. Well, yet another turn up thanks to yesterdays research was a scripting bible for the game (thank the gods to GhanBuriGhan & his friends for making it as the help files for scripting that come with the editor are pants to say the least!). Anyway, that scripting stuff combined with a few other alternative editor programs that I found (MWEdit & The Enchanted Editor) which are supposedly more powerful than the official one... and a tad on the dangerous side (if you don’t know what you're doing!) should remedy that situation.

Turns out that I also got several guides for creating your own custom content for the game (completely from scratch) in yesterdays research haul (Morrowind Mod Makers Manual, Mod Makers Bible, 3DSMax Modelling for Morrowind) and while it didn’t come as any surprise that you can export/import game models through 3dsmax, what was surprising was the amount of features in 3DS Max can be transported over into the game. Stuff like transparent textures, alpha maps, glowing stuff, animated textures, particles & wot not can be added onto pretty much anything in the game (aswell as using/creating custom meshes) soooo I've godda say, it looks like, using that stuff, I can pretty much do all that I want to! Day/night control aswell as weather systems are also in the game and apparently they’re controllable through script sooo... woo hoo!!!

Annnnd if all else fails (as in I can’t get the game engine to do what I want) then the 3DS Max stuff (importer here, exporter here) means that I may be able to export what I need from the game (characters, animations etc.) and import into a fresh, fully controllable (possibly Virtools) environment.

Concerns solved!

Sunday, June 12, 2005

I'm emmigrating to Morrowind!

Ok, absolutely oodles of research done today- all into the apparently amazing phenomenon that is Morrowind- I'd no idea the game had such a reputation! Apparently it's THE daddy of customisable gaming SO!!! thankfully, there's lots of support out there for completely hacking it to bits… also the fact that it’s been out since 2002 kinda helps!

Anyway- I'm only mentioning what's relevant cause, to be quite honest, I went a bit nuts during the research... yup- I got completely carried away and I was downloading things left, right & centre... twas great! It's so nice actually finding stuff!!! Have a look at theses pages and you’ll get an idea of the sheer volume of stuff that’s available:

Thanos Tower
Empirical Morrowind
Ronin49's Mod Lists n'Links
Big list O Morrowind links
Another huge list O links
The Unofficial Elder Scrolls Pages
Morrowind Summit

Anyway- points of note- my main concern about using the program was that I couldn’t automate the process (i.e., use a bat file to automatically open the editor, change some stuff, generate a game plug in file, close the editor, open the game etc.). SO! after a little bit of research & hands on messing about with the game files I found that a potential way around this predicament. Apparently the game files (.eps) are pretty much text files at heart (or possibly hex or ASCII… a smidgen garbled in places anyway) which is a massive bit of good news as it means it'd be possible to rename a game file (using a bat file/command line instruction), open it using whatever program (most likely Python... NOOOOOO!!!!), edit the relevant bits (most likely a list of numbers that stays in the same place in the file) and then close up (operation style) & rename the file back etc. Techie details about the file format can be found here and here anyway.

SO!!! Very good news that this option is possible ANNND asides from all of that useful file format stuff (what's going on with the hexy bits etc.) I also found a .esp to xml converter here soooo it's looking good! :-)

There are also a few simple programs (e.g. MWRandItem and TesFaith) that can edit/generate .esp’s but they're quite specific (can only generate random interiors/items or move existing game cells etc.) so they don’t seem to be of much use to me unfortunately.

HOWEVER! of great use is the Morrowind ESM/ESP Loading Source by Dave Humphrey- this guy is an absolute genius and seems to have pretty much single handedly decoded the .esp file format in minute detail and then gone one further and created tons of C++ programs that can directly (as in low level) edit the .esp files. The chap is so damm good that he’s even released the C++ source that he used to make his programs so I am completely gobsmacked & over the moon at his achievements it must be said! It’s great to have that file format info available and to know that there’s a possible backup plan of building a program using some of his source files as a foundation. The source is here anyway.

Righty- I'm off to examine my new found goodies :-)

Saturday, June 11, 2005

Whaddya mean "I can't play God"?!

Righty- conveniently enough, it turns out that Jay has a copy of the Morrowind construction kit which makes investigation a hell of alot easier! After installing the editor part of the game and having a good perusal around, it's seem that yes indeedie, everything can be customised and it would be the ideal prototype to use for the game part of the project... BUT!!!, there’s a big problem- it'd seem that you can only create your customised stuff through the editor only.

As in, you must manually, through the editor program, alter all of the stuff- there's no way of using command lines or the like to automate the process. The closest you can get to automation is to use Tab delaminated files to import customisation info BUT, again, you can only use these manually.

So, the point is- it would be the ultimate program to use but at the mo it just doesn’t seem feasible- if I could rig it to read in customisation info from text files then I may have a chance but it looks pretty slim. I'm going to research it anyway and see if I can come up with any alternative customisation methods for the program and if not, then I'll see if there are any suitable substitute games...

Neverwinter nights seems to be a bit of a no-no for what I want to do- it’s a hell of a lot less customisable than Morrowind soooo it has all of the concerns listed above PLUS many many more… and therefore I’m officially dropping it as an option.

I've godda say- even if I do find a game that I can hack, it's unlikely that I can do all that I want to do in it... i.e., it may be inevitable that I have to use Virtools for the game part as it's the only way that I could do EVERYTHING that I want to do and is the only program that would give me control over absolutely everything... groan.

Friday, June 10, 2005

Short cut anyone?

Righty- for the sake of saving me alot of hassle down the road (and rendering most of the work I've done so far completely useless) I'm going to have a quick look at using/hacking/altering existing RPG style games. Basically I reckon it could save myself alot of time by having all of the ground work laid… y’know, like all of the little niggling details that noone ever notices but take WEEKS to get right like basic terrain, characters, collisions, gravity etc.

It’d take me yonks to do these in Virtools but I can guarantee you that they wouldn’t be noticed/appreciated and they sure as hell aren’t part of the goals of the project. They have to be done somehow though soooo it would be nice if I could find a pre-existing program.... I suppose you could also say that I'd get to concentrate on the innovative features of the idea rather than wasting time on what's already been done.

Anyway- after some internet research it'd seem that the best options are Morrowind or the long fabled "RPG construction kit"... I call it fabled cause it's existence seems to be in question on the net... apparently it was released for a few months, was quite successful and then promptly disappeared... spooky. Some of the options are listed here anyway.

The one that I could find the most info on was Morrowind and it seems to be the daddy of this sort of thing (moddable games) as it's the third in a series and is well established, proven etc. ANNND it also come with its own editor in which you can alter ABSOLUTELY EVERYTHING in the game (apparently)... further investigation awaits.

Neverwinter Nights also seems to be quite promising but I have doubts as to the extent of its modability and it also operates from a zoomed out 3rd person perspective which I’m not gone on I have to say… I’ll investigate it anyway.

Thursday, June 09, 2005

**Clap**...... **clap**...... **clap**......

Tried things the easy way today in Virtools- instead of making my own BB I tried out the Array Load BB with its associated stuff. Little bit of teething trouble initially but twas grand really! I now have Virtools reading in variables from a text file which it can reference & use to do stuff... horray! It's all a bit boring but at least I know that the option of getting to read from the stamp & create a text file is available.



Wednesday, June 08, 2005

Oh for feck sake!!!

I don’t know what I feel like doing at the mo- slapping myself upside the head or kicking Virtools for its crap help files!!! I've just come across, by chance, a marvellous little building block called “array load”... guess what it does... yup- exactly what I've been trying to do through all of this stupid bloody C++.

You see??!! This is what happens when you've badly put together help files!!!!!! I searched numerous times in the files for read/load/save/write etc. and I got nothing! BUT!!! Try 'array load' and suddenly it pop's up!!! There's also been a general theme of “you can only use what's in your project file” and that loading fro the disc is not possible etc. so I dunno- tis a bit of a pisser to say the least...

On the upside I suppose I've learned alot about C++ stuff (DLL's & wot not) ANNND I suppose I will eventually need to build my own BB (for serial things) sooo it's not a complete loss... just a real pissed that's all

Tuesday, June 07, 2005

Take it out back & shoot it...

Ok- that's it, I'm screwed. I've just tried getting the VS toolkit compiler to compile the building block DLL and there's definitely no joy... the compiler gave up after 100 errors. The good news is that the errors had nothing to do with me- they were all syntax errors with the Virtools SDK .h include files sooo I honestly dunno what the problem is really.

I'll have to assume that the coders at Virtools knew what they were doing and that they didn’t fill their code with errors soooo the only other potential problem source is the absence of the MFC & ATL libraries from the toolkit

So where does that leave me? Well screwed is the obvious but I'm throwing myself upon the mercy of the internet (or more accurately the Virtools swap meet forums) sooo I'll see what the geniuses at the forums there have to say.

Monday, June 06, 2005

Duh

It's just occurred to me- why the hell am I going to all of this trouble??!!! All I have to do is ask the technicians to install Visual studio .net or Visual Studio on my uni machine and I'd have this thing done in 5 mins tops!!!!...

I really wonder about myself sometimes… anyway, for the time being I'll have to assume that I'm trying all of this cause I'm an impatient git and I suppose that I must have picked up some of this free open source mentality from Python so I want to do the thing for free and more easily than the help files indicate.

And finally, I suppose I need a challenge don’t I?... silly me

Sunday, June 05, 2005

D'OH!

Remember ages ago in one of my entries when I said that I thought I read somewhere in the Virtools help files that you couldn’t read/write from the disk? Well, I was investigating trying to use Virtools Scripting Language (VSL) instead of C++ DLL’s but it proved to be a very short investigation- I quote from the help files:

- no writing to or reading from the disk with VSL

On the upside, at least I know that my memory in good working order! It’s case close & buried for using VSL though I’m afraid.

Saturday, June 04, 2005

Rocket science for 3-year olds

Righty- I've installed the Visual C++ toolkit and it works!... well kinda, it’s not exactly on the user friendly side- it's just a command line promt thing but apparently it's a powerful little sucker.

I've send the last few hours trawling through the web (here and here) and my research material trying to get an ideas as to how exactly you go about making a DLL in the thing & what files are needed etc. I'm getting a better understanding of DLL stuff (exporting defined functions in a def file for the DLL and so on) so I think I may be able to get this thing working after all.

My main concern at the mo is MS' MFC library- I don’t have this (it only comes with the full version of Visual C++ so it’s obviously not included with the toolkit) sooo I'm still not sure whether the Virtools DLL will need/use it. I'm thinking and hoping that it doesn’t cause the DLL is supposed to use Virtools headers from its SDK etc. and the DLL has nothing to do with Windows or MS whatsoever. All of the Virtools SDK help files and Halfdan’s web page seem to start with a MFC DLL but I'll see if I can get away without it

Again, if I manage to get this thing done I am SO putting together a tutorial for how to do it- it seems to be one o those things that's quite easy to do once you know how…

On another note I'd just like to say how nuts I think this whole thing is- I've started with my initial idea of pervasive gaming & moved to Virtools & all I want to do is basically get Virtools to read in a text file... and here I am trawling through heavy coding principles as a result- it's nuts!!!! It's like having to learn advanced calculus just to add 2+2 together!!!

Friday, June 03, 2005

Learn to speak english proper-like

Ok, something that's been pissing me off no end since I started all this research- the goddameed programmer TLA's (three letter acronyms). SO!! For all of us non- programmers out there, here's the most common ones that I've encountered and finally decoded:

DLL- dynamic link library
MFC- Microsoft Foundation Class
PCH- precompiled header file

Thank the gods- I've been trawling through MSDN (here) and found lots of stuff on DLL's- what they do, what's in them and so on... dear lord, I may actually have a chance of understanding what's going on with this whole Virtools making a DLL thing...

Thursday, June 02, 2005

Yoink!

Right- I’ve searched and I’ve searched for free compilers- this page was of great help and I WAS going to try to download & use the Borland free compiler with drVoodo's stuff BUT unfortunately, the Borland site seems to suck a bit and the damm thing wouldn’t download!

Deterred none the less!!! I searched the web again and it turns out that Microsoft have released certain core components of their all hallowed (by Virtools at least) Visual C++ package as a toolkit... sooo one trip to the toolkit homepage (here) and I have the toolkit and a little bit more optimism on the compiling front- hopefully, this will allow me to use Visual C++ without actually having it!

By the way- I do hereby solemnly swear that if I get this thing working- I'll make a full, comprehensive tutorial on how to make Virtools BB's from scratch that's written STEP BY STEP IN CLEAR, PLAIN, NON-PROGRAMMER English...

Fingers crossed that that'll tempt the fates enough to make this thing work :-)

Wednesday, June 01, 2005

Compile damm you!!!

Ok, more of the same today- very hard going. I tried to make my own building block using Bloodshed Dev C++ (instead of Visual C++ as I’m broke and can’t afford it!)... slight problem was that EVERYONE (Virtools and everyone on the net) says that it's only possible to make a functioning Virtools DLL using Visual C++ ONLY (custom made Virtools building blocks are contained in DLL’s)... sooo I've been trying to prove them all wrong... with little success I might add...

As far as I can see- what the hell should you need to use Visual C++? I mean I know it's made for windows applications but Virtools couldn’t care less about that stuff so I don't see why Bloodshed's Dev-C shouldn’t be able to do the job!... and it'd be one in the eye for MS & Virtools :-)

SO! The other problem is that it is VERY hard to find help for making your own building block using the Virtools SDK & C++. The consensus on the web agrees with this SOOO all I have to go on are the help files from Virtools (complete with missing bits, mistranslations & typos... see the last blog entry for some of those) OR this sole webpage here made by genius extraordinaire, Halfdan. (fairplay to ya!!).

It's a challenge to say the least- the webpage assumes you have Visual C++ .net (like everyone else) so I'm trying to adapt the process to work with DEV-C or any other free C++ compiler/dev environment... it’s tricky to say the least.

Anyway, no luck so far- I've tried following the instructions from the webpage, trying to compensate as necessary for the Visual/Dev-C differences (project file differences- include directories, library includes- adding components as necessary- def files etc.) but alas the damm thing just wouldn’t compile... apparently it had a problem with some of the Virtools SDK files that had to be included in the DLL.

SOOO queue many hours of tweaking & checking but no luck- I only got the compiling errors down from 76 to 45 and they were firmly with the Virtools SDK include files which I'm ASSUMING are completely cosher sooo I think that the problem is with DEV-C.

I did a little bit of checking on the web and apparently DEV-C’s compiler can be a bit on the crap side SOOO that could be one cause (and is good news really as it might mean that it's still possible to do this thing without Visual C++)

I also tried taking some of the SDK BB samples that came with Virtools and investigated getting them to work in DEV-C but I only had limited success... they imported ok but I got similar compiler errors which is worrying to be quite honest as all of the necessary files were definitely there and you KNOW that they're correct (as these source files were used to create some of the plug ins used in Virtools) sooo it's bad news for DEV-C I'm afraid as it's the only thing that could be wrong in the whole equation... perhaps everyone was right about the Visual C++ requirements after all...

However! If Python thought me anything, it's to never to give up trying to bash stupid computer programs & code into submission... SO!!! I'll have to assume that the complier of DEV-C is indeed crap and that I should try another compiler before giving up and retiring to my room to cry.

So, what I'm going to do- find a new compiler and check that it works with the SDK BB examples.

If it does then I'm going to try following the instructions from the webpage again (compensating as necessary) annnd assuming all that works- make my own custom code... and there's also the option of generating my own code from scratch from the Virtools helps files... onward and downward