Page 1 of 1

structs question

Posted: Thu Jun 15, 2017 3:55 am
by Ememjr
in the following struct( the ---xx are just numberss i added here to reference the line


Code: Select all

<Data ElementName="set_name" Type="EQ2_8Bit_String" Size="1" /> ---1
<Data ElementName="set_bonus_list_count" Type="int8" IfVariableSet="footer_set_name_0" />---2
<Data ElementName="set_bonus_list_array" Type="Array" ArraySizeVariable="set_bonus_list_count">---3
  <Data ElementName="set_bonus_items_needed" Type="int8" Size="1" />---4
  <Data ElementName="set_bonus_stats_count" Type="int8" />---5
  <Data ElementName="set_bonus_stats_array" Type="Array" ArraySizeVariable="set_bonus_stats_count">---6
    <Data ElementName="set_stat_type" Type="int16" OversizedValue="127" OversizedByte="127" Size="1" />---7
    <Data ElementName="set_stat_subtype" Type="int16" OversizedValue="127" OversizedByte="127" IfVariableNotEquals="set_stat_type_%i" Size="1" />---8
    <Data ElementName="set_value" Type="float" Type2="sint32" Type2Criteria="set_stat_type!=6"  />---9
    <Data ElementName="set_stat_name" Type="EQ2_8Bit_String" Size="1" />---10
	<Data ElementName="set_stat_unknown" Type="int8" Size="6" />---11
  </Data>---12
  <Data ElementName="set_bonus_effects_count" Type="int8" />---13
  <Data ElementName="set_bonus_effects_array" Type="Array" ArraySizeVariable="set_bonus_effects_count">---14
    <Data ElementName="set_bonus_effect_subbulletflag" Type="int8" Size = "1" />---15
    <Data ElementName="set_bonus_effect_text" Type="EQ2_16Bit_String" Size="1" />---16
    <Data ElementName="set_bonus_effect_percentage" Type="int8" Size = "1" />---17
  </Data>---18
</Data>---19
as you will see in the analizer the set_bonus_stats count(line 5) above has a 1, 1, 0 in the array which i take to mean in th first there is 1 stat to display, the scend 1 stat to display and in the third 0 stats to display(second attachment,, i would expect line 6 the bonus_stats_array to only be used when line 5 is not 0, is that correct see first atttachemnt pic, i would have expected the third element since it had a count of 0 circleed in blue to not be used in bunos_stat_array but for the 02 to be the bonus_effect_count

Re: structs question

Posted: Thu Jun 15, 2017 7:54 am
by Zcoretri
:mrgreen:

Re: structs question

Posted: Thu Jun 15, 2017 9:23 am
by Ememjr
?? is it just broke in the analizer lol

Re: structs question

Posted: Thu Jun 15, 2017 10:17 am
by Zcoretri
No, I think it's just a matter of figuring out the struct. I have been going through the section you have displayed here, but something is off and I am trying to figure it out why there is two extra 0's in between the subtype and the beginning of the next array item.

Re: structs question

Posted: Thu Jun 15, 2017 10:41 am
by Ememjr
if we looking at same spot look at value it looks to me they may have changed to int32 on the set_value was type=unint16 i changed to type2 uint32

that will make A8 61 to a8 61 00 00 instead

here is

Re: structs question

Posted: Thu Jun 15, 2017 10:41 am
by Ememjr
are you in IRC or dicord wher we can chat easier

Re: structs question

Posted: Thu Jun 15, 2017 1:03 pm
by Zcoretri
Ememjr wrote: Thu Jun 15, 2017 10:41 am are you in IRC or dicord wher we can chat easier
I am at my office and can't use those :(
I think you may be right in that it might be a int32 now. But i would look at all the different kinds of items to confirm that.

Re: structs question

Posted: Thu Jun 15, 2017 6:18 pm
by Jabantiz
The edit struct windows is experimental at best and while it has mostly worked, in this case it looks to be off, you are right the third array should not be there as the size is 0, the portion highlighted looks to be the next array, the effects array. Highlighting like this can happen at time when multiple elements share the same name, by chance did the array names match and you changed them? If so then the edit struct window may not have updated when it was reloaded.

Re: structs question

Posted: Fri Jun 16, 2017 3:28 am
by Ememjr
i will look using the regular window, i typically use the edit structs windows becuase its easier on the eyes for some reasons, but i never modfy using that window, i will always make a change in the itemsstruct and reload it