Jump to content
  • 0

Old Blue Box variation


Crysillion

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  02/17/16
  • Last Seen:  

According to Google, the question of "How can I make my own Old Blue Box, like an Old White Box, or Old Black Box, etc.?" has been asked and answered several times. Even so, I seem to be having trouble with it.

Essentially, I'm trying to create an Old White Box. It's just a variation to the other Old Boxes, but whenever I use the Old White Box, nothing happens. The Old White Box is consumed but I do not receive an item.

Here's what I've put in item_db2:

getrandgroupitem(IG_WhiteBox),1;  

Inside db/pre-re/ (we are using pre-re), I have an item_whitebox.txt, inside is the following:

// Old Violet Box Obtainable Items Database
//
// Structure of Database:
// GroupID,ItemID,Rate

IG_WhiteBox,2202,1    // Red Potion
IG_WhiteBox,501,14    // Red Potion
IG_WhiteBox,501,14    // Red Potion
IG_WhiteBox,502,14    // Orange Potion


Just for testing purposes.

 

The item is set as a consumable in the item_db2, that part works fine - it is definitely a consumable in-game. The issue is like I said - the item is consumed and nothing happens. I do not receive any items.

Finally, in db/const.txt there is a lot of entries, but towards the bottom of the first list, I have it like this:

 

IG_Blessing_Midgard_Lucky_Egg    448
IG_Chronosian_Lucky_Egg    449
IG_Sanctuary_Lucky_Egg    450
IG_Cyborg_Lucky_Egg    451
IG_Undine_Lucky_Egg    452
IG_WhiteBox    453

 

As you can see, IG_WhiteBox sits at the end of the IG_ list.

 

What am I doing incorrectly?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  520
  • Reputation:   64
  • Joined:  11/19/11
  • Last Seen:  

Similar to this.

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   16
  • Joined:  09/26/16
  • Last Seen:  

edit itemdb.c

under:

function itemdb_read
add

sv_readdb(dbsubpath1, "item_whitebox.txt",    ',', 2, 10, -1, &itemdb_read_group, i);



OR

instead of making another .txt file, add them inside your item_misc.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  71
  • Reputation:   25
  • Joined:  11/23/11
  • Last Seen:  

If you don't want to edit source just add it at the end of item_bluebox.txt

 

If it doesn't work edit MAX_ITEMGROUP_RANDGROUP in src/map/itemdb.h and recompile.

 

Damn, tried to post this like 5 times... had to delete the itemdb.c code part.

Edited by Omnipotent
What's up with this editor?! It deleted 50% of the post.
Link to comment
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
Answer this question...

×   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.

×
×
  • Create New...