Jump to content


Photo

IWD1 to BG2 - TUTU Style


  • Please log in to reply
75 replies to this topic

#61 -domi_ash-

-domi_ash-
  • Guest

Posted 05 May 2006 - 08:55 AM

I have no idea about bit-coding, but what Death Variable is (later it was renaimed script name) in BG1/2 a unique identifier of an actor in the game. It is the one that the scripts and dialogues reffer to when they want a particular actor to do something, or check for his/her presence in the party etc. It can be the same or different from the file name for each actor's CRE file; it is a part of that CRE file, and allows to have similar creature build with different death variable, so if you say have five ACTOR.CRE present in the game, but each of them has a unique DV, say actor1, actor2, etc, you can give a command to just one of them. In IWD1 at least, as documented here, some CRE has more than one death variable: http://forums.gibber...?showtopic=5346 which can potentially cause a problem when converting the CREs from IWD1 template of the CRE file to BG2 one. At least this is my understanding, and if I am wrong, I am sure that more experienced coders can correct me.

#62 Vlad

Vlad
  • Member
  • 577 posts

Posted 05 May 2006 - 05:57 PM

Domi, there is a different scripting system in IWD. It is based on bit operations. Also there are different triggers and actions which have or have not analogy in BG series. It's needless to say that other resources such as spells have different structures. It's impossible to convert IWD to BG2 one to one in a way BG1 was converted to BG2 using OCAML. What I did in NeJ2 was just re-writing many scripts just from scratch and replacing other resources with their analogues. To make some kind of IWD to BG2 conversion program requires a LOT much work and expertise in programming languages and data structures of both games than it was required to convert similiar resources of BG1 to BG2. I do not believe that there is a single experienced modder knowing programming as well who would carry such a project from the beginning till the end. It's just *blah-blah-blah* once again at the SHS forum boards initiated by non-modders audience.

[EDIT] Oh, I forgot about area INI files. I have no idea how they could be converted to BG2. I've just left them untouched.

Edited by Vlad, 05 May 2006 - 06:06 PM.


#63 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 05 May 2006 - 06:16 PM

Once again Vlad demonstrates his internationally renowned modding expertise.
Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#64 Sir-Kill

Sir-Kill
  • Member
  • 906 posts

Posted 06 May 2006 - 08:34 PM

any moddar that is talking about copyright have they ever 'borrowed' a bam, item, script, area, portrait, or other is also an infringment of the copyright as well.
Live Free Or Die

#65 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 07 May 2006 - 02:05 AM

any moddar that is talking about copyright have they ever 'borrowed' a bam, item, script, area, portrait, or other is also an infringment of the copyright as well.


Yes this is true but the scale is remarkably different, like the difference between stealing a mars bar and holding up the entire cornershop.
"You alone can make my song take flight..."

#66 Sir-Kill

Sir-Kill
  • Member
  • 906 posts

Posted 07 May 2006 - 04:21 AM

hehe that is the argument the scale?? you could have said it is ok to murder one person but 100 people is wrong. stealing is stealing. :)

Now I can see the whole loaf of bread/starving family thing. so this whole thing should be a bit moot

Edited by Sir-Kill, 07 May 2006 - 04:31 AM.

Live Free Or Die

#67 grogerson

grogerson
  • Member
  • 90 posts

Posted 08 May 2006 - 03:56 AM

Hey, Vlad, thanks for the info. It's what I started this thread for.

And Sim, give the man some credit. He's been working with the game. He's probably got more knowledge of the structure than anyone else making a port of IWD.

Doesn't mean it can't be done, though. With the creativity on these foru, and the inventiveness of the human mind, anything is possible. Just not easy. :whistling:

#68 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 08 May 2006 - 04:32 AM

Sim was pointing out, rightfully so, that such an IWD-to-BG2-via-OCaml conversion has already been done. Some rough edges needed to be knocked off (officially we dubbed it a beta, though that may have been a bit ambitious); the problem is OCaml. Of the three folks who know it, japheth has disappeared, Wes is working on Broken Hourglass, and bigg has far too many other projects to be roped into something of this scale. So, a beta it will remain.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#69 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 08 May 2006 - 05:09 AM

Sim was pointing out, rightfully so, that such an IWD-to-BG2-via-OCaml conversion has already been done. Some rough edges needed to be knocked off (officially we dubbed it a beta, though that may have been a bit ambitious); the problem is OCaml. Of the three folks who know it, japheth has disappeared, Wes is working on Broken Hourglass, and bigg has far too many other projects to be roped into something of this scale. So, a beta it will remain.


Though Fred is getting there with the OCaml for IWD1tutu. That boy is our last hope...
"You alone can make my song take flight..."

#70 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 08 May 2006 - 05:36 AM


Sim was pointing out, rightfully so, that such an IWD-to-BG2-via-OCaml conversion has already been done. Some rough edges needed to be knocked off (officially we dubbed it a beta, though that may have been a bit ambitious); the problem is OCaml. Of the three folks who know it, japheth has disappeared, Wes is working on Broken Hourglass, and bigg has far too many other projects to be roped into something of this scale. So, a beta it will remain.


Though Fred is getting there with the OCaml for IWD1tutu. That boy is our last hope...

No, there is another...

/end obligatory Star Wars

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#71 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 08 May 2006 - 06:44 AM

And Sim, give the man some credit. He's been working with the game. He's probably got more knowledge of the structure than anyone else making a port of IWD.

Ahahahaha.

Though Fred is getting there with the OCaml for IWD1tutu. That boy is our last hope...

Weingine scripting is derived from OCaml.
Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#72 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 15 May 2006 - 12:28 PM


Sim was pointing out, rightfully so, that such an IWD-to-BG2-via-OCaml conversion has already been done. Some rough edges needed to be knocked off (officially we dubbed it a beta, though that may have been a bit ambitious); the problem is OCaml. Of the three folks who know it, japheth has disappeared, Wes is working on Broken Hourglass, and bigg has far too many other projects to be roped into something of this scale. So, a beta it will remain.


Though Fred is getting there with the OCaml for IWD1tutu. That boy is our last hope...

Well, don't put too much hope in me. I'm moving quite slowly on my iwd1->iwd2 conversion and that's (relatively speaking) a cakewalk compared to iwd1->bg2.

The other problem is that I don't really understand bg2 modding while I have dug pretty deep into iwd1/2 modding (I'm probably missing the big picture though). The support code for dream sequences, banter and such is beyond me.

Vlad is probably right. If you really wanted to do this, you would have to be willing to do a lot of coding outside of Ocaml. This isn't impossible, but it means taking a different approach (less conversion and more hard-coding).
I gotta get rid of this friggin idiotic signature...

#73 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 15 May 2006 - 12:51 PM

Sim was pointing out, rightfully so, that such an IWD-to-BG2-via-OCaml conversion has already been done. Some rough edges needed to be knocked off (officially we dubbed it a beta, though that may have been a bit ambitious); the problem is OCaml. Of the three folks who know it, japheth has disappeared, Wes is working on Broken Hourglass, and bigg has far too many other projects to be roped into something of this scale. So, a beta it will remain.

Most importantly, I don't have IWD1. OCaml ain't difficult as a language - while I haven't been able to find a tutorial for programming illiterates / tp2 coders, but anything from C (or any other non-scripting structured language) experience is enough to pick it up. Also, setting up the programs needed to succesfully compile OCaml programs on Windows is difficult the first time.

You can try to pick up OCaml from tp2, but it's a bit steep learning curve IMVHO.

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#74 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 15 May 2006 - 02:55 PM

The support code for dream sequences, banter and such is beyond me.


The thing is you don't have to do any of that as its IWD to BG2, as opposed to the other way around.
"You alone can make my song take flight..."

#75 FredSRichardson

FredSRichardson

    WeiDU Meddler

  • Member
  • 258 posts

Posted 17 May 2006 - 02:38 PM

The support code for dream sequences, banter and such is beyond me.


The thing is you don't have to do any of that as its IWD to BG2, as opposed to the other way around.

I'll try to help out if I can. The trouble is that I'm focusing on IWD1 -> IWD2, so I tend to ignore the similarities between the two and instead focus on the differences (which is natural I guess). I'm unclear on the general mechanics of BG2, so I may be of limited help in providing useful insight there.

(forgive me, I'm a wind-bag today...)

Having said all that, however, I think it's worth pointing out that the conversions projects that have so far been based on weimorph follow the general phiosophy of converting resources algorithmically from one game to another avoiding hard-coded special case conversions as much as possible. There's no question that this is the right way to go when there's a good chance the conversion algorithms will succeed (and when the game is too large for a hand-coded approach). The algorithmic approach also tends to be more robust with respect to things like pre-installed mods that might break hand-coded special-cases. But I think with IWD1 (let's say without HoW or ToTLM for the moment), you can afford to do more hand-coding and rely less on conversion algorithms.

As an example, while working on the IWD1 -> IWD2 conversion, I really started to see the algorithmic approach break down. The algorithm for converting IWD1 AD&D 2E based CRE to IWD2 3E based CRE's that Wes' wrote is impressive, but exceedingly complex. The existing algorithm leads to very over-powered NPC's/monsters. I found it difficult to come up with a general formula that was any better, so instead I opted for a "map or clone and modify" approach (map resources that are nearly identical in both games, clone and modify resources that are nearly identical with a few minor modifications). So far this approach appears to be the way to go.

I realize the problem for converting IWD1 -> BG2 is very different. Most of the resources types are similar or the same and both use the 2E rules. The only difference I know anything about is the missing bit-variable stuff. I think it might be possible to figure out how these bit-fields are being used and specify a set of special case script transformations to deal with them. I don't know enough to think of anything more specific than that, but I know that most of the bit fields appear to be used to check TEAM membership (when one team member goes hostile, the whole team does). It seems like regular expressions could be a way to deal with this, but I don't know.

I'm sure I'm leaving out a whole lot of stuff, and I'm certainly not saying this is an easy project to take on.

-Fred
I gotta get rid of this friggin idiotic signature...

#76 grogerson

grogerson
  • Member
  • 90 posts

Posted 04 April 2008 - 06:26 PM

I'm reviving this to let those who care know that CamDawg has started work on a conversion at G3.

He has a basic converter but has a lot of tweaking to do, and is looking for programmers and modders to help.

Check this thread if you're interested:

Masochists sought for IWD-BG2 project