Jump to content


Photo

Converting uScript for EasyTutu


  • Please log in to reply
13 replies to this topic

#1 Downs Duck

Downs Duck
  • Member
  • 7 posts

Posted 28 January 2007 - 11:44 AM

Wondered if anyone (Yovaneth) would like to take a look at the old uScript for BG2 and make them Tutu Compatible?

A monumental task, no doubt, but I thought I'd ask at least.

As discussed in this forum on G3: http://forums.gibber...s...9277&st=135

The uScript can be downloaded here: http://www.gibberlin...rek/uscript.php

We would then be able to add the uScript for the Tutu Compatibility list: http://forums.gibber...?showtopic=8122

:)

Edited by Downs Duck, 28 February 2007 - 12:38 AM.


#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 28 January 2007 - 06:00 PM

Wondered if anyone (Yovaneth) would like to take a look at the old uScript for BG2 and make them Tutu Compatible?

Actually I thought you were asking if Yovaneth could enable certain features you'd like to see in his sgSeries, rather than convert the whole obsolete uScripts (though I haven't looked at those so I don't know how tough that'd be). In any case, I don't think we have the author's approval for that (since he's no longer around it seems). But I thought you observed that the sgSeries is supposed to use certain items in Tutu, but doesn't, possibly because Tutu uses an underscore before resource names and BG2 doesn't. So hopefully that's something at least Yovaneth could check into. :)

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
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 Downs Duck

Downs Duck
  • Member
  • 7 posts

Posted 28 January 2007 - 09:33 PM

Okay, sorry about that.

What I would really like to see though, is that things put in your quickslots (wands, potions and the like, get used). If its in the inventory, let it lie.

My point is, if the items in the quickslots are used by default, one could prepare oneself better before a battle, putting potions one doesn't need in the inventory slots, and potions one WOULD need in the quickslots.

EDIT:
1.
I am also experiencing that often, when I click on loot, the character will go to the loot, the bottom-loot-inventory screen will show 1/10 of a second, then returning to formation/quickslots.
I know this is happening when there are enemies nearby, the AI would prefer to slay foes instead of standing still over the loot heap, which makes perfect sense, and I have seen it happen.

But the problem is that this is happening also when there are no enemies around (slain persons loot in empty houses f.ex., not just forests where I could have been mistaken).
I believe it to be a bug(?) right after a battle has happened maybe? Characters still have AI scripts going strong?

Solution as for now:
I will have to place myself right beside the loot and click the loot again.
Often.
Most of the time.
Extremely annoying.

2.
Also, the same shit applies to the thief, hiding when I tell the whole party to go somewhere on the map, doesn't have to be far either. The thief will hide/try to hide(?), and will stop. The party is going to their locators feedback markers (the green flashing ones), where they are supposed to, the thiefs locator marker disappears when he stops.

Edited by Downs Duck, 28 January 2007 - 10:48 PM.


#4 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 17 February 2007 - 02:58 AM

EDIT: Nevermind Yovaneth, I'll look into it myself :)

Argh! - typical. You disappear out of the country for a couple of weeks and someone posts just when you can't answer.... sorry :(

As Miloch says, Rich Martel (the uScript author) has disappeared off the BG scene, so I really wouldn't like to publicly tread on his copyright without his permission. That said....

I believe the looting problem is down to CombatCounter() not yet having reached zero i.e. the game thinks combat is still going on even if you've stopped. The sgSeries do this occasionally too; I haven't been able to pin down exactly what the problem is but with the sgSeries, it's so rare that it's livable with.

The uScript thief problem is, I would bet, down to a missing Continue() statement. Find the hide'n'detect statements (search on 'hide') and check to see if there is a Continue() at the end of the blocks.

@Miloch: do you have a list of TuTu-specific spells?

-Y-

#5 Downs Duck

Downs Duck
  • Member
  • 7 posts

Posted 17 February 2007 - 05:39 AM

No problem Yovaneth.

I'll check for the Continue() issue of the thief script, and you are right about being able to live with the CombatCounter() issue.

Thanks for your answer, keep up your wonderful work, please
:)

#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 17 February 2007 - 06:35 AM

@Miloch: do you have a list of TuTu-specific spells?

Actually, Tutu uses the same spells as BG2 so that shouldn't be a problem. I just looked at your sgSeries source code, and it seems the scripts would have the same Tutu issues as eSeries, in that it doesn't use an underscore for items. So for example, around line 652 in sgFtrMge there's HasItem("POTN20",Myself). You could have a ton of antidotes in Tutu but it's not going to find them, because it's _POTN20. There's a fairly simple way to fix this as I've been doing for the mods I'm working on for both Tutu and BGT/BG2, where you add some variables up front:
ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.ARE~ THEN BEGIN //Tutu
 OUTER_SPRINT ~tsu~ ~_~ //assigns Tutu underscore
END ELSE BEGIN
 OUTER_SPRINT ~tsu~ ~~ //no underscore otherwise
END
Then in all your scripts, insert a %tsu% in front of any item names. Though I'm not that familiar with scripting so I don't know if you have to do something special to evaluate the variables. But it beats maintaining two or more copies of the same mod.

Edit: *quack* @DownsDuck. I thought you disappeared or something. :ph34r:

Edited by Miloch, 17 February 2007 - 06:38 AM.

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
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#7 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 19 February 2007 - 04:30 AM

Actually, Tutu uses the same spells as BG2 so that shouldn't be a problem.

Ah, right - it's just items then. I should have a full item list somewhere; if I can find it then it will be fairly easy to write a hack program that will check >200 code snippets and replace any item name with its underscored counterpart. Actually, it would probably be more accurate to extract the underscored item names from my TuTu installation and use that as a hack-list.... don't you just love dirty programming!! :P

-Y-

Edited by Yovaneth, 19 February 2007 - 04:30 AM.


#8 Downs Duck

Downs Duck
  • Member
  • 7 posts

Posted 26 February 2007 - 10:56 AM

Edit: *quack* @DownsDuck. I thought you disappeared or something. :ph34r:


Still lurking, although I am restraining myself, not to litter SHS and G3 forums with my ravings respectively.
:)

#9 Downs Duck

Downs Duck
  • Member
  • 7 posts

Posted 26 February 2007 - 12:16 PM


Actually, Tutu uses the same spells as BG2 so that shouldn't be a problem.

Ah, right - it's just items then. I should have a full item list somewhere; if I can find it then it will be fairly easy to write a hack program that will check >200 code snippets and replace any item name with its underscored counterpart. Actually, it would probably be more accurate to extract the underscored item names from my TuTu installation and use that as a hack-list.... don't you just love dirty programming!! :P

-Y-


Sounds great, I am currently working my ass off on another project at my UNI, but I'll check back later again :)

#10 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 27 February 2007 - 02:11 PM

Then in all your scripts, insert a %tsu% in front of any item names. Though I'm not that familiar with scripting so I don't know if you have to do something special to evaluate the variables. But it beats maintaining two or more copies of the same mod.

Actually, I've been doing some work of this sort in other mods. Instead of having two script versions, you can just have one and go through the scripts and REPLACE_TEXTUALLY the resource values in the TP2 based on which platforms it detects. Pretty easy, actually.

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
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#11 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 27 February 2007 - 03:42 PM

Instead of having two script versions, you can just have one and go through the scripts and REPLACE_TEXTUALLY the resource values in the TP2 based on which platforms it detects. Pretty easy, actually.

Problem is, I'm WeiDU-lousy :). I've already written and tested the hack-code and from my point-of-view, it's more useful because what I've written can be used for more than just bashing items into and out of TuTu Party AI scripts as it'll handle any object that can be scripted. I guess I should compile the results and pass them across to my wife for testing; she is currently stomping her way up the Coast Way, killing everything and anything that gets in her way. The Irish do so love a fight.... :lol:

-Y-

#12 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 05 March 2007 - 03:56 AM

Just an update: BGTuTu-specific scripts are currently being playtested.

-Y-

#13 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 07 March 2007 - 06:07 AM

Just an update: BGTuTu-specific scripts are currently being playtested.

Great. Well, keep us posted.

Don't suppose you want to revise cirerrek's eSeries while you're at it? :D Sounds like he's looking for a script modder to pick them up. It'd be great to have a best-of-all-worlds optimised script mod, but perhaps that's a pipe dream. :huh:

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
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#14 --Downs Duck--

--Downs Duck--
  • Guest

Posted 07 March 2007 - 07:31 AM

Nice to hear, Yovaneth, thanks for all your effort on this :)