Jump to content


Photo

Crossing the Great Divide


71 replies to this topic

#61 Miloch

Miloch

    Barbarian

  • Modders
  • 4750 posts
  • Gender:Male
  • Location:At Large

Posted 20 March 2012 - 09:58 PM

The areas are the only ones that really significantly differ between BGT, Tutu and BG1. The list in my signature or in the IESDP (or jastey's libraries) has these. I started using a slightly new method in my latest tri-platform mod. Since the last two digits of area names are *usually* the same between platforms, I just have a fairly small list of variables for the area prefix (either AR or FW) and the first two digits. Other than that, Tutu usually adds an underscore to references. If the reference was already 8-characters, it deletes the first character to add the underscore. And as jastey says, BGT adds BG to some resources to avoid conflict with BG2 resources. There's a fairly small list of these and it's in the Developer Documentation (under resource renaming) in BGT. Variables can account for all these things fairly easily. I also have some functions that convert resources from Tutu to BGT/BG1 on the fly when installing the mod. If you want, I can add you to the workroom or send you a link to the beta to look at the code.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett

#62 Echon

Echon

    Planewanker

  • Members
  • 306 posts
  • Gender:Male
  • Location:Denmark

Posted 21 March 2012 - 12:53 AM

I also have some functions that convert resources from Tutu to BGT/BG1 on the fly when installing the mod. If you want, I can add you to the workroom or send you a link to the beta to look at the code.


Maybe I am missing something but would that not only be useful if you already have a mod that is compatible with Tutu?

Anyway, thanks for the clarification. I just need to solve that function issue and then I am ready to get started.

#63 Miloch

Miloch

    Barbarian

  • Modders
  • 4750 posts
  • Gender:Male
  • Location:At Large

Posted 21 March 2012 - 08:19 PM

Maybe I am missing something but would that not only be useful if you already have a mod that is compatible with Tutu?

Yeah, but it could be reverse-engineered fairly easily. The main reason I did from Tutu to BG1 is that you have to strip out a lot of stuff (opcodes over a certain number etc.) for the BG1 engine, which is a lot easier than adding stuff in when going from BG1 to Tutu. Also, all weapon proficiencies need to be set at zero in BG1 (or will crash the game); Tutu/BGT use BG2 proficiencies which isn't always self-evident (you may have one "large sword" that's a scimitar, another that's a bastard sword, etc.).
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett

#64 Echon

Echon

    Planewanker

  • Members
  • 306 posts
  • Gender:Male
  • Location:Denmark

Posted 21 March 2012 - 10:45 PM

Also, all weapon proficiencies need to be set at zero in BG1 (or will crash the game); Tutu/BGT use BG2 proficiencies which isn't always self-evident (you may have one "large sword" that's a scimitar, another that's a bastard sword, etc.).


This is one of the issues I am aware of. Another is EFF v1 vs v2. Do you know how Tutu and BGT update the weapon proficiencies? For FotD I have been thinking about a REGEXP that looks at all the old ones, notes the number of proficiencies and assigns the equivalent new ones, so 3 slots in Large Swords will become 3 slots in every weapon that Large Sword includes, plus any new ones.

#65 Miloch

Miloch

    Barbarian

  • Modders
  • 4750 posts
  • Gender:Male
  • Location:At Large

Posted 22 March 2012 - 08:35 PM

Do you know how Tutu and BGT update the weapon proficiencies? For FotD I have been thinking about a REGEXP that looks at all the old ones, notes the number of proficiencies and assigns the equivalent new ones, so 3 slots in Large Swords will become 3 slots in every weapon that Large Sword includes, plus any new ones.

The BG2 engine recognises BG1 proficiencies as coded on the CRE files without EFFs. So you don't really need to worry about this unless you have joinable NPCs. For those, Tutu and BGT assigned seemingly-random proficiencies, which in some case didn't make any sense at all. BGT later fixed this; Tutu did not. It should've looked at whatever weapons the original characters had and assigned the relevant BG2 proficiencies. Unless the character did not have the strength requirement to wield the weapon (this was unenforced in BG1, but e.g. Quayle hasn't the strength to wield his flail in the BG2 engine) in which case an alternate determined. Some allowances would be made for weapon styles (i.e. two weapon fighting, sword and shield). This is possibly the only thing you should consider, and only then if you have CREs where it would make sense to give them weapon style proficiencies.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett

#66 Echon

Echon

    Planewanker

  • Members
  • 306 posts
  • Gender:Male
  • Location:Denmark

Posted 23 March 2012 - 01:05 AM

So the old proficiencies work in BG2. Good. I am not sure what you mean by 'without EFFs', though.

I guess I will just have to fix the NPC proficiencies for Tutu then. :)

#67 Miloch

Miloch

    Barbarian

  • Modders
  • 4750 posts
  • Gender:Male
  • Location:At Large

Posted 23 March 2012 - 01:40 AM

I mean BG1-style proficiencies are just byte offsets in the CRE files (from 0x6e to 0x75). BG2-style proficiencies require attached EFF structures. You do, however, want to run your BG1 CREs through the FJ_CRE_EFF_V2 function when you copy them on Tutu/BGT just in case you or someone else does add EFFs to them for something (so they use BG2 v2 EFFs instead of the BG1 v1 EFF structure). Nowadays, whatever code that does that will usually invoke FJ_CRE_EFF_V2 anyway, but might as well be safe.

Re: NPC proficiencies, I hammered that out with Asc64 a while back - might as well just use that for Tutu too.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett

#68 Echon

Echon

    Planewanker

  • Members
  • 306 posts
  • Gender:Male
  • Location:Denmark

Posted 23 March 2012 - 02:11 AM

Heh, I had no idea BG2 proficiencies were stored as EFFs. And yes, I do want to use FJ_CRE_EFF_V2, as well as that spreadsheet of yours.

#69 Miloch

Miloch

    Barbarian

  • Modders
  • 4750 posts
  • Gender:Male
  • Location:At Large

Posted 23 March 2012 - 03:19 AM

Just FYI, if you do end up doing anything with proficiencies, SET_BG2_PROFICIENCY is slightly easier to use than ADD_CRE_EFFECT.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett

#70 CanWakhan

CanWakhan
  • Members
  • 3 posts

Posted 27 February 2014 - 06:17 PM

Hello. Is there anyone who could explain to me how properly use chapter numbers, by any chance? I was trying to figure out how it works, after showed up that I couldn't make it work properly at first place, but after multiple try I feel like helping hand is what I need most. I now how to go around it, but I would prefer to know how to use this one.

For examlpe I have had something similiar to this one, tried with different chapter number and also with GlobalGT/LT:

IF
%BGT_VAR%
AreaCheck("%Candlekeep_Inn_L1%")
Global("Chapter","GLOBAL",%tutu_chapter_1%)
Global("CW_SaelDoubleExists","GLOBAL",0)
THEN
RESPONSE #100
CreateCreature("CW_SaelD",[169.451],10)
SetGlobal("CW_SaelDoubleExists","GLOBAL",1)
Continue()
END


It spawns a creature only if I remove that stance. So I assume that I'm doing something wrong, but I have no idea what(Probably it is small and silly :) )

I would be glad if someone elucidate it for me.

#71 jastey

jastey
  • Gibberlings
  • 5468 posts
  • Gender:Female

Posted 28 February 2014 - 01:24 AM

Have a look at cmorgan's example code in this post: http://forums.gibber...indpost&p=95109

Maybe it answers your overall question.

To your script block: Keep in mind that Candlekeep is Prologue, not Chapter One.

#72 CanWakhan

CanWakhan
  • Members
  • 3 posts

Posted 03 March 2014 - 06:17 AM

Thank you jastey. I've had to missed those few posts earlier, somehow. Very helpful. And I finally understand whole idea.

About script: Thank you for pointing that - not because I am using that script, but I was convinced that it should be "0" when refering to prolouge. Now everything works.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users