Author Topic: Issues in preset functions and array  (Read 1007 times)

Offline c4_angel

  • Planewalker
  • *****
  • Posts: 30
Issues in preset functions and array
« on: March 16, 2017, 07:25:34 PM »
Hi, there are 3 issues make me troubled.

1. Functions: ALTER_EFFECT and CLONE_EFFECT cannot support a 4-bit value in “parameter1”

2. Functions: ADD_CRE_EFFECT, ADD_ITEM_EQEFFECT and ADD_SPELL_CFEFFECT always adds a effect to the top of the effects list, no matter the parameter "insert_point" exists or not.

3. In BGEE, the effects part in .cre files uses only 0x30-bit long, just like effects in .itm or .spl files, so that the pre-difined set of values “CRE_V10_EFFECTS” cannot use in BGEE. Seems "GET_OFFSET_ARRAY string 0x2c4 4 0x2c8 4 0 0 0x30" in BGEE works?
« Last Edit: March 16, 2017, 07:27:47 PM by c4_angel »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Issues in preset functions and array
« Reply #1 on: March 17, 2017, 01:25:20 PM »
1. Functions: ALTER_EFFECT and CLONE_EFFECT cannot support a 4-bit value in “parameter1”
If you mean they don't take negative values, that is  correct. I'll refer you to this topic for more info. TL;DR: won't be fixed.

Quote
2. Functions: ADD_CRE_EFFECT [...] always adds a effect to the top of the effects list, no matter the parameter "insert_point" exists or not.
Can't reproduce and the code looks right. ADD_CRE_EFFECT adds things at index 0 by default, but setting "insert_point" to -1 correctly makes the insertion happen at the end. A valid, non-zero index also works.

Quote
ADD_ITEM_EQEFFECT and ADD_SPELL_CFEFFECT always adds a effect to the top of the effects list, no matter the parameter "insert_point" exists or not.
These two functions do not implement insert_point. I can add it. Edit: I see the documentation incorrectly states that insert_point is implemented.

Quote
3. In BGEE, the effects part in .cre files uses only 0x30-bit long, just like effects in .itm or .spl files, so that the pre-difined set of values “CRE_V10_EFFECTS” cannot use in BGEE. Seems "GET_OFFSET_ARRAY string 0x2c4 4 0x2c8 4 0 0 0x30" in BGEE works?
BGEE is inconsistent. CREs imported from BG1 generally use EFF V1 but new resources use EFF V2. Your raw offsets will work, yes. If you want to use CRE_V10_EFFECTS, FJ_CRE_REINDEX or FJ_CRE_VALIDITY will reindex the effects to be EFF V2.
« Last Edit: March 17, 2017, 01:51:03 PM by Wisp »

Offline c4_angel

  • Planewalker
  • *****
  • Posts: 30
Re: Issues in preset functions and array
« Reply #2 on: March 18, 2017, 08:08:38 AM »
Acknowledged. Thank you, that's helpful.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: