Jump to content


Photo

Increasing existing affects in characters


  • Please log in to reply
143 replies to this topic

#121 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 12 November 2011 - 08:58 AM

There should be a bit of info over at G3, as there some post preview in google state.ids duplicate entry, but that's from 2007.

and with G3 down it's kinda hard to check it out. :(

RR, atweaks and SCS/SCS II add the same value - 0x00400010 - as STATE_NOT_TARGETABLE without checking if 0x00400010 is already present in STATE.IDS.

they probably don't check for it since if they did and the STATE_NOT_VISIBLE version were present it would crap out the compiling of their scripts since their label STATE_NOT_TARGETABLE wouldn't be present.

I could be mistaken but I think that if both labels were present, it would compile fine since the label is looked for in the IDS and then replaced with the numerical value. However on decompile the last label in the file gets used since the entire file is put into memory...

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#122 10th

10th
  • Member
  • 621 posts

Posted 12 November 2011 - 09:25 AM

I could be mistaken but I think that if both labels were present, it would compile fine since the label is looked for in the IDS and then replaced with the numerical value. However on decompile the last label in the file gets used since the entire file is put into memory...


As I've got a custom megamod-installation with all those mods, save BP's AI component, I checked with NI:

0x00400010 STATE_NOT_VISIBLE got added first, due to the install order, 0x00400010 STATE_NOT_TARGETABLE is the last entry in STATE.IDS.

Decompiled code shows STATE_NOT_VISIBLE in ddguard.bcs (modified by TDD) and rr#mlig.bcs (from Rogue Rebalancing), which indicates that it checks from top to bottom and takes whatever the topmost entry is, if it's 0x00400010. Placing STATE_NOT_TARGETABLE above STATE_NOT_VISIBLE results in STATE_NOT_TARGETABLE in decompiled code.

10th

Edited by 10th, 12 November 2011 - 09:29 AM.

Avast! You cannot defeat our titan-mounted submarine staffed by cannibal vikings! - Nodwick

"I grab his deceased spirit and piledrive it back into his body, duplicating raise dead." - Psyren Oots board

#123 i30817

i30817
  • Member
  • 611 posts

Posted 12 November 2011 - 11:17 AM

There are some buff spells that affect more than the caster when casted on themselves, like CLERIC_BLESS and such that i'd like to check against not being already active in my buff script.

Any idea how to do it?

Btw, the dialog compiled. It's a abomination -
GT#BOOK.dlg : 392.8 KB

next step is assign the dialog to a item and test it ingame. Then creating the 8*5 effects i need ... still don't know how that is done, and drop the item somewhere, maybe do a little mini-quest or trick to get it.

And fix the inevitable bugs.

If tobex had a "disable level up button" effect maybe adding the effect that changes the class on equip would work to get those class specific quests.

Edited by i30817, 12 November 2011 - 11:23 AM.


#124 i30817

i30817
  • Member
  • 611 posts

Posted 12 November 2011 - 02:53 PM

What does soundoff.2da do?

#125 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 12 November 2011 - 03:17 PM

What does soundoff.2da do?

there is no soundoff.2da....

soundoff.ids corresponds to SOME of the sounds found on a given creature file.
sndslot.ids corresponds to all those in soundoff.ids and then some.

.ids files typically have no use in game, they are there to convert numerical values to readable text when decompiling scripts & dialogs. It's possible that Bioware's programming methods made use of .ids files that for us appear to have no use when compiling/decompiling scripts & dialogs.

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#126 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 12 November 2011 - 03:20 PM

There are some buff spells that affect more than the caster when casted on themselves, like CLERIC_BLESS and such that i'd like to check against not being already active in my buff script.

Any idea how to do it?

I believe for the Cleric Bless spell you check for 0x00800000 STATE_BLESS
I believe that other such spells have similar states which could be checked. It is possible that some don't. You'll have to go case by case and look. The mod detectable spells might make even more spells be detectable via script i don't know for sure tho since i never used it...

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#127 i30817

i30817
  • Member
  • 611 posts

Posted 12 November 2011 - 04:25 PM

And now, i've tested. It almost-but-oh-so-frustratingly-not-quite works, in a particular:

IF ~~ 0 SAY ~~
IF ~~ GOTO 6
END


Is there any way that i can make the state enter immediately without having to click the dialog "click to continue" bar?

I tried the empty SAY, i've tried removing the SAY entirely (didn't work, part of the parser i guess).

Edited by i30817, 12 November 2011 - 04:26 PM.


#128 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 12 November 2011 - 06:01 PM

And now, i've tested. It almost-but-oh-so-frustratingly-not-quite works, in a particular:


IF ~~ 0 SAY ~~
IF ~~ GOTO 6
END


Is there any way that i can make the state enter immediately without having to click the dialog "click to continue" bar?

I tried the empty SAY, i've tried removing the SAY entirely (didn't work, part of the parser i guess).

*points to response at PPG

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#129 i30817

i30817
  • Member
  • 611 posts

Posted 12 November 2011 - 07:12 PM

You've given me hope, thanks a lot.

Let's see if i can make it work (they actually have to pingpong the states because it's not just one transition).

#130 i30817

i30817
  • Member
  • 611 posts

Posted 12 November 2011 - 08:24 PM

I tested this, and it seems it doesn't work for itm dlg? I'm still not sure.

#131 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 12 November 2011 - 08:55 PM

doesn't work as in?
still has you press continue button?
or doesn't go back and forth?

might be cause all the instances I've seen it in take place in cutscenes were where the UI was disabled... not sure tho if you want to go that far to make it work without clicking the continue button....




EDITED: for grammar mistakes... :(

Edited by Sasha Al'Therin, 12 November 2011 - 08:57 PM.

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#132 i30817

i30817
  • Member
  • 611 posts

Posted 12 November 2011 - 09:45 PM

You still have to click the button and if the creature that is talking tries to talk back with EXTERN, it fails (prob because the string - the dialog name - i put there is not a creature)

I tried some other things:
A empty

REPLY ~~ GOTO number
Does get rid of the button. But it doesn't advance. That's because the text is still there, just not visible (press 1 and the option is selected)
Doing that AND setting the pause flags on didn't either.

Edited by i30817, 12 November 2011 - 09:56 PM.


#133 i30817

i30817
  • Member
  • 611 posts

Posted 12 November 2011 - 10:18 PM

Edit:

How does one get
293 StartDialogOverride(S:DialogFile*,O:Target*,I:Unused,I:Unused,I:ConverseAsItem)

To work? I added that line to action.ids, and although that makes the warning go way, it still doesn't display the item name.
Do i need to add to object.ids too (and how can i know the itm number...)

Edited by i30817, 12 November 2011 - 10:40 PM.


#134 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 13 November 2011 - 05:25 AM

Edit:

How does one get
293 StartDialogOverride(S:DialogFile*,O:Target*,I:Unused,I:Unused,I:ConverseAsItem)

To work? I added that line to action.ids, and although that makes the warning go way, it still doesn't display the item name.
Do i need to add to object.ids too (and how can i know the itm number...)

never used that action. BG1 has been my main modding game. Only dabbled in the BG2 stuff cause of Easytutu. Sorry you'll have to ask that probably in a new thread to hopefully get specific help :(

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#135 i30817

i30817
  • Member
  • 611 posts

Posted 13 November 2011 - 08:27 AM

No i don't think it matters.

I can't use the dialogs as a state machine - the pauses it inserts unconditionally don't allow it to be automated - although it is perfect in the other ways (since it's the only thing with a GOTO like construct.

creature scripts would take forever - they don't have goto, so no binary search.

#136 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 13 November 2011 - 09:03 AM

creature scripts would take forever - they don't have goto, so no binary search.

well they do in a way... ChangeAIScript as you are familiar with, but that probably would require a lot of thought on how and when to switch scripts and as well as how to get back to a 'normal' state if the player chooses not to continue after trying it out

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#137 10th

10th
  • Member
  • 621 posts

Posted 13 November 2011 - 09:25 AM

Edit:

How does one get
293 StartDialogOverride(S:DialogFile*,O:Target*,I:Unused,I:Unused,I:ConverseAsItem)

To work? I added that line to action.ids, and although that makes the warning go way, it still doesn't display the item name.
Do i need to add to object.ids too (and how can i know the itm number...)


Erm, that should be
293 StartDialogOverride(S:DialogFile*,O:Target*)
and it's already in a vanilla version of action.ids.

There are several ways to integrate that dialog file into the game:
- do it like the deck of many things (deck.itm) // magical item ability summons deck.cre with domt.dlg with an eff file
- do it like "Gain stats as you level up" from tb#tweaks // extends dplayer2.bcs and dplayer3.bcs

10th
Avast! You cannot defeat our titan-mounted submarine staffed by cannibal vikings! - Nodwick

"I grab his deceased spirit and piledrive it back into his body, duplicating raise dead." - Psyren Oots board

#138 i30817

i30817
  • Member
  • 611 posts

Posted 13 November 2011 - 10:36 AM

It would be great to get the increases as you level up, but i checked the source of tb#tweaks and it appears he is using baldur.bcs and a Chapter variable.

It's a nice idea though, and i'll see if i can steal it (by putting it in the thief abilities script a check for the level).

I'm going to wait for if Ascension64 can find a way to put Stats into Globals.

The way it currently has to be done is madness.

Instead of a simple:
SetGlobal("LEVEL", "GLOBALS", LEVEL)
GlobalsGT("LEVEL", "my_stupid_level")

I need to make a huge state machine.

Add a SetGlobal(S:GLOBAL*,S:Area*,I:Stat*)
and/or
GlobalGTStat(S:GLOBAL*,S:Area*,I:Stat*) //stat index not value

and a
MultiplyGlobals(S:GLOBAL, S:GLOBAL)

And 98% of problems disappear.

Edited by i30817, 13 November 2011 - 11:40 AM.


#139 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 13 November 2011 - 01:53 PM

had a thought...
since you are basically making a thief of any job...

Why not use the xplevel.2da as a guide and do CheckStat for the specific xp needed for thieves at each level? that way you could have a script force dialog about leveling up the thief skills or something... just an idea. You'd probably still need tons of stuff for each stat, but it would give you a way to get the users attention about leveling....

My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altheri...s.com/index.htm


#140 i30817

i30817
  • Member
  • 611 posts

Posted 13 November 2011 - 02:10 PM

It's the same deal as levels, but slightly more complex. To compare the xp values i would need to duplicate the possible states into a state machine since there is no XPGT(S:Global).

A global would the only place i could put the values of the table if i didn't want duplication (& slowness that would bring for 50, 256 values).

Can still try your idea about Script changing + binary search (need to find a way to create script names that makes sense though). But not on the main script, just on a dialog that changes the script temporarily.

Edited by i30817, 13 November 2011 - 02:20 PM.