Jump to content


Photo

Patching State.IDS?


19 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 6968 posts
  • Gender:Female

Posted 01 November 2017 - 02:32 AM

Patching ids files is something I'm never sure I do it right. I have BGII-ToB from GOG and if I install my mod the installer says
 

 

[StateCheck] argument [STATE_REALLY_DEAD] not found in [State.IDS]

 

I am sure it's an easy patch, but how exactly do I do that in a compatible way? Is there a mod that does all this that I can use as reference? Because, taking the Fixpack code might use to incompatibilities if used by a later-to-install mod.



#2 Roxanne

Roxanne

    Modder

  • Modders
  • 1673 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 01 November 2017 - 02:49 AM

0x00000FC0 STATE_REALLY_DEAD

 

And it exists in both my EET as well as my old BGT install. But maybe it was added to the classic game already by a mod.

 

I would use in tp2

APPEND ~state.ids~ ~0x00000FC0 STATE_REALLY_DEAD~ UNLESS ~STATE_REALLY_DEAD~


Edited by Roxanne, 01 November 2017 - 02:51 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#3 Gwendolyne

Gwendolyne
  • Members
  • 157 posts
  • Gender:Male
  • Location:France

Posted 01 November 2017 - 03:34 AM

As far as I can remember, STATE_REALLY_DEAD is not a vanilla state; but many mods add it. The way Roxanne wrote it. ;)


Edited by Gwendolyne, 01 November 2017 - 04:07 AM.

CARPE DIEM...



In progress : Menace sur le Royaume de Diamant Éternel

#4 jastey

jastey
  • Gibberlings
  • 6968 posts
  • Gender:Female

Posted 01 November 2017 - 03:57 AM

Thank you!



#5 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2558 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 01 November 2017 - 05:25 AM

Also you don't really need to add it to ids, ~StateCheck(Player2,0xfc0)~ works just as fine. STATE_REALLY_DEAD is just a conveniently named label to group all possible death states.


"Uguu~ Boku Ayu."

Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?

#6 jastey

jastey
  • Gibberlings
  • 6968 posts
  • Gender:Female

Posted 01 November 2017 - 06:25 AM

That's good to know. Thanks!

#7 CamDawg

CamDawg

    Dreaming of a red Xmas

  • Gibberling Poobah
  • 9303 posts
  • Gender:Not Telling

Posted 01 November 2017 - 07:56 AM

STATE_REALLY_DEAD was originally introduced to Fixpack (I think it was from the Ding0) to fix the exact issue that jastey mentioned in the previous thread. The game had a ton of places where it was trying to use Dead() checks with objects which we had to change to the aforementioned StateChecks instead. It has since migrated its way into a lot of places (like EE), the same way that CD_STATE_NOTVALID has. :)


I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.


#8 jastey

jastey
  • Gibberlings
  • 6968 posts
  • Gender:Female

Posted 01 November 2017 - 01:53 PM

And righfully so! :)

Very cool statechecks.



#9 Roxanne

Roxanne

    Modder

  • Modders
  • 1673 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 01 November 2017 - 01:59 PM

And righfully so! :)

Very cool statechecks.

I just recently found an older mod (I think it was Amber NPC I was updating and expanding for EE) that still had the six or seven state checks which were summarised later as CD_STATE_NOTVALID. Just an anecdote off topic...


Edited by Roxanne, 01 November 2017 - 02:13 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#10 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6308 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 01 November 2017 - 10:23 PM

And righfully so! :)

Very cool statechecks.

I just recently found an older mod (I think it was Amber NPC I was updating and expanding for EE) that still had the six or seven state checks which were summarised later as CD_STATE_NOTVALID. Just an anecdote off topic...

Yeah, and the difference is nothing, as you are still checking for the exact same stuff. In case you didn't notice.

 

Aka, this:

!StateCheck(Player2,0xf00)

Is the same exact thing as:

OR(4)
!StateCheck(Player2,0x100)
!StateCheck(Player2,0x200)
!StateCheck(Player2,0x400)
!StateCheck(Player2,0x800)

The only benefit is that it might be a little more clear to the eye of the beholder... the computer does the exact same checks in BOTH cases.


Edited by Jarno Mikkola, 01 November 2017 - 10:32 PM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#11 Angel

Angel
  • Members
  • 117 posts
  • Gender:Not Telling
  • Location:Netherlands

Posted 03 November 2017 - 04:43 AM

Aka, this:

!StateCheck(Player2,0xf00)
Is the same exact thing as:
OR(4)
!StateCheck(Player2,0x100)
!StateCheck(Player2,0x200)
!StateCheck(Player2,0x400)
!StateCheck(Player2,0x800)
The only benefit is that it might be a little more clear to the eye of the beholder... the computer does the exact same checks in BOTH cases.

 

There actually is one advantage: the former will work with older versions of IE that do not implement OR(), like the original BG1 and PST.  (IWD1 does have it.)



#12 Avenger

Avenger
  • Modders
  • 3731 posts
  • Gender:Male
  • Location:Hungary

Posted 03 November 2017 - 05:42 AM

Less number of triggers also mean less CPU cycle requirements. Your laptop or tablet will spare more battery, and you can't fry eggs on your PC ...



#13 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6308 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 03 November 2017 - 06:09 AM

Less number of triggers also mean less CPU cycle requirements. Your laptop or tablet will spare more battery, and you can't fry eggs on your PC ...

Are you sure that's the case, withing the game's processes ?

Cause the f = 8 + 4 + 2 + 1, aka the exact same thing.


Edited by Jarno Mikkola, 03 November 2017 - 06:11 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#14 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2558 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 03 November 2017 - 08:12 PM

Calling the trigger once and performing one bitwise operation vs doing both things multiple times.


"Uguu~ Boku Ayu."

Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?

#15 Avenger

Avenger
  • Modders
  • 3731 posts
  • Gender:Male
  • Location:Hungary

Posted 04 November 2017 - 10:22 AM

 

Less number of triggers also mean less CPU cycle requirements. Your laptop or tablet will spare more battery, and you can't fry eggs on your PC ...

Are you sure that's the case, withing the game's processes ?

Cause the f = 8 + 4 + 2 + 1, aka the exact same thing.

 

 

Yeah, as Ardanis said above. Processing a trigger takes a lot of operations. The engine is quite complex inside. And, these triggers are evaluated frequently.

Jarno: evaluating those triggers takes about 5x the time than evaluating the combined trigger.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users