Cydh

Official Item Package

Recommended Posts

Official Item Package

 

commit: 51074a0

 

First, I don't understand why these package aren't implemented although rA has item group for long time (and beat me, no one mention about this?)

Finally after doing 'stupid' manual parsing from Aegis ItemPackage database, I make other 'stupid' things:

  1. New script command: getgroupitem <itemgroup_id>;
  2. Modified IG_ structure for item_group database files: GroupID,ItemID,Rate{,Amount,Random,isAnnounced,Duration,isNamed,isBound}
  3. Added db file: db/re/item_package_db.txt
  4. Added doc file of explanation of how to use getgroupitem script and Item group database files: doc/item_group.txt
  5. Modified 2 script commands, see the explanation later.

Basically, some item on IG group doesn't need to give player random and 'must' item, which can be done by getitem or rentitem script. Like or not, some items must has the player's name when it comes out from the box! Actually it can be done if I modify the getitem and rentitem, add an optional param as 'flag' for some items. But, the first optional param for getitem and rentitem is being used for 'char_id'. So I skip this idea and use getgroupitem script although the item that player will get only 1.

 

Also, you will notice that some IG_ aren't used for certain items, I put comment /*getitemgroup();*/ getitem/rentitem ...;

I made some as comment, because maybe one day user needs to add some random item from those IGs instead by using getitem/rentitem script.

 

Then, what are the purpose new params for item group?

Actually you can read some, here doc/item_group.txt

I keep the IG format, to make the previous and new item group database (on db/re/item_package.txt) can be used by getrandgroupitem and getgroupitem script.

 

Example, for IG_BlueBox although it doesn't have Amount, Random, isAnnounced, Duration, isNamed, isBound values, you still can use it by getgroupitem(IG_BlueBox); The item amount is adjusted to 1 (by default, not defined or 0 will be 1). But when you give the value for those IG data, maybe you can make player get 5 Oridecon from Old Blue Box, 10 Red Potion, etc.

 

And for IGs from db/re/item_package.txt, you can use it by getrandgroupitem <group>,<quantity>{,sub_group}; too.

Example,

  1. getrandgroupitem IG_Special_Box,1; Doesn't matter the amount that written at item_package.txt, player only will get 1 random item from random group 1.
  2. If you make it as getrandgroupitem IG_Special_Box,0; The amount is based on the 'amount' field.

But those above, (I make) the getrandgroupitem ignores the rest fields (isAnnounced, Duration, isNamed, isBound), just like it used to be.

 

Hmm.... So, it doesn't ignore the 'random' field? yes! Because with that commit, I modified 2 scripts:

  1. groupranditem group_num; to groupranditem <group_num>{,<sub_group>};
  2. getrandgroupitem <group_id>,<quantity> to getrandgroupitem <group_id>,<quantity>{,<sub_group>}

If you try to use getrandgroupitem for new item group structure which has 'Random' group field (the value between 0~5), without you give the 'sub_group' param, it always gives player the item with 'Random' group 1 (default). So you can decide which random group you want to pick.

Example, look at IG_Low_Coin_Pocket, it has 4 random groups

IG_Low_Coin_Pocket,Malang_Sp_Can,600,1,1,0,0,0
IG_Low_Coin_Pocket,Sapa_Feat_Cert,300,1,1,0,0,0
IG_Low_Coin_Pocket,Cgrade_Coin,100,1,1,0,0,0
IG_Low_Coin_Pocket,Malang_Sp_Can,600,1,2,0,0,0
IG_Low_Coin_Pocket,Mora_Coin,200,1,2,0,0,0
IG_Low_Coin_Pocket,Dgrade_Coin,200,1,2,0,0,0
IG_Low_Coin_Pocket,Malang_Sp_Can,500,1,3,0,0,0
IG_Low_Coin_Pocket,Manuk_Coin,300,1,3,0,0,0
IG_Low_Coin_Pocket,Egrade_Coin,200,1,3,0,0,0
IG_Low_Coin_Pocket,Malang_Sp_Can,500,1,4,0,0,0
IG_Low_Coin_Pocket,Splendide_Coin,300,1,4,0,0,0
IG_Low_Coin_Pocket,Egrade_Coin,200,1,4,0,0,0

If you use getrandgroupitem IG_Low_Coin_Pocket,x; the item that will appears only: Malang_Sp_CanSapa_Feat_Cert, or Cgrade_Coin.

 

And if any item with group 0, it will be put into random group 1 (beside it has 'must' item) if you put the 'Rate' is more than 0. Like at this invalid bug report bugreport:8385, the player always get 2 items instead 1, why?

He modified the original to

IG_Pet_Egg_Scroll_Box1,Pet_Egg_Scroll1,100,1,0,0,0,1

Which makes the must item Pet_Egg_Scroll1 also as random item (random item with 100 probabilities without other rival, always be obtained). The players always get 2 items.

 

Well, I think this is enough, I hope you all confuse! /gg

Thank you all

  • Upvote 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...