Meep007 173 Posted January 20, 2016 (edited) Does anyone know if there's a script out there where you can change the description of an item in-game, like after a quest? That's what I want to use it for. I want to update an item after a quest is completed. I'm sure this has probably been asked before. Is it even possible? Thanks in advance Edited January 20, 2016 by Meep007 Share this post Link to post Share on other sites
Shiggy 630 Posted January 20, 2016 (edited) I think you may be able to use this command $data_items[id].description = "new description" Edit: I tested it doesn't work,I will lookf for something else Edit 2 : It works,I messed up my testing setup Edited January 21, 2016 by Shiggy Share this post Link to post Share on other sites
Meep007 173 Posted January 21, 2016 (edited) Hmm, it's a little weird but I got it to kind of work. It counts every line written in the script as a line in the description. For example, since I can't fit much on one line: $data_items[23].description = "This strangegem was given to me by my father when I wasyoung." This cuts off the "young" since the description box in-game fits only 2 lines. "This strange" is also the only thing that shows on the first line. It looks really weird. Writing it like this however: $data_items[23].description ="This strange gem was given to me by my father when I was young." Sort of fixes it, but now there's a huge blank space in the description. Let me know if you find out something else. If not, I guess I'll have to live with it. Thanks, Shiggy. EDIT: Well now you said you got it to work, so I don't know...I guess I'll live with it. Edited January 21, 2016 by Meep007 1 Share this post Link to post Share on other sites
Shiggy 630 Posted January 21, 2016 Use this script module NewDescriptions String1 = " This strange gem was given to me by my father when I was young. " end and use this command $data_items[23].description = NewDescriptions::String1 2 Share this post Link to post Share on other sites
Meep007 173 Posted January 21, 2016 Thanks, Shiggy This spaces everything out a lot better. This topic can close now. Share this post Link to post Share on other sites
Rikifive 3,411 Posted January 21, 2016 This thread is closed, due to being solved. If for some reason you would like to re-open this thread, just send me a PM. (= Share this post Link to post Share on other sites
Rikifive 3,411 Posted January 22, 2016 This thread is reopened, because it seems, that other member has something important to add. (= Share this post Link to post Share on other sites
kurashi 12 Posted January 22, 2016 I've already told the OP through pm, but figure I'd say this here as well for anyone who may find this thread. Using this method will change the description for sure, however, that description will remain until the game is closed. This means that even if you load up a new game after just having the description change in a save file the change will remain even on the brand new game. Since this will reset when the game is closed it isn't viable for long periods of use where you don't know if the player will be on the whole time. 1 Share this post Link to post Share on other sites
Shiggy 630 Posted January 22, 2016 (edited) I wrote a script that check the value a game variable when loading the game to update the item description if necessary module DataManager class << self alias description_load_game_without_rescue load_game_without_rescue def load_game_without_rescue(index) description_load_game_without_rescue(index) if $game_variables[99] == 0 #change the conditions here $data_items[23].description = NewDescriptions::String1 end # add conditions for more items here end end end Edited January 22, 2016 by Shiggy Share this post Link to post Share on other sites
Meep007 173 Posted January 22, 2016 Okay, I tried this new script and it didn't fix this new issue when loading a new game. Also, when I tried to load a game I saved for testing this, one before the description change occurred, the screen froze and I had to restart the game. The only thing that didn't freeze was the music in the background. Maybe I'm not using it right, possibly, I don't know. Any further advice/instructions would be appreciated. Thanks Share this post Link to post Share on other sites
Shiggy 630 Posted January 22, 2016 module DataManager class << self alias description_load_game load_game def load_game(index) if $game_variables[0] == 1 $data_items[23].description = NewDescriptions::String1 end description_load_game(index) end end end Try this script instead and don't forget to set up the game variable when you change the description 1 Share this post Link to post Share on other sites
Meep007 173 Posted January 22, 2016 Try this script instead and don't forget to set up the game variable when you change the description I set up the variable, but maybe I did something wrong? I can now load the games without any freezing though, so at least something changed. (I tested it a few times last time, and it happened each time) Unfortunately, the description change is still permanent even if I load an earlier save, or start a new game. Share this post Link to post Share on other sites
Shiggy 630 Posted January 23, 2016 Ok I took my timeto make sure everything is fine. This should do it now: module DataManager class << self def reload_items $data_items = load_data("Data/Items.rvdata2") end alias description_setup_new_game setup_new_game def setup_new_game reload_items description_setup_new_game end end end class Scene_Load < Scene_File alias description_on_load_success on_load_success def on_load_success DataManager.reload_items if $game_variables[0] == 1 $data_items[23].description = NewDescriptions::String1 end description_on_load_success end end 1 Share this post Link to post Share on other sites
Meep007 173 Posted January 23, 2016 (edited) Got an error when adding item to inventory, so I can't test if it worked or not. Script 'Game_Party' line 251: ArgumentError occured comparison of NilClass with 1 failed I'm just going to like your comments from now on because I don't get notifications of comments to my topics and I don't know if it's the same for you. Edited January 23, 2016 by Meep007 1 Share this post Link to post Share on other sites
Shiggy 630 Posted January 23, 2016 (edited) I have no idea how the script I gave you is affecting this + I was ableto test it myself and had no issue Edit : Also check the settings for your notifications options . I don't care because I look what's new on the main page very often Edited January 23, 2016 by Shiggy 1 Share this post Link to post Share on other sites
Meep007 173 Posted January 23, 2016 Yeah, I have no idea either. The game just won't let me have the item anymore. I tried to get it from a store instead and it gave me an error to this: #-------------------------------------------------------------------------- # * Determine if Maximum Number of Items Are Possessed #-------------------------------------------------------------------------- def item_max?(item) item_number(item) >= max_item_number(item) end It won't even let me have any other items...what the flip? May have to call it quits on this because it doesn't seem that I'll ever get it to work. Share this post Link to post Share on other sites
Shiggy 630 Posted January 23, 2016 Have you tried in a fresh project ? Can you try to use this scrpt command somewheremsgbox_p($game_items[23])and tell me what you get Share this post Link to post Share on other sites
Meep007 173 Posted January 23, 2016 (edited) It prints exactly that in the game text box. When I start a new game I don't have this problem. Maybe some weird script conflict? O_o I also noticed that if I restart the game all changes are reverted back again in any saves. Edited January 23, 2016 by Meep007 1 Share this post Link to post Share on other sites
Shiggy 630 Posted January 23, 2016 (edited) Sry it's $data_items not $game_items I also noticed that if I restart the game all changes are reverted back again in any saves. It works perfectly work for me Edit: Can you send me screenshot of all your events ? Do you have other scripts installed? Edited January 23, 2016 by Shiggy 1 Share this post Link to post Share on other sites
Meep007 173 Posted January 23, 2016 (edited) It already had $data_items. If I changed it to $game_items, the item crashing problem stopped, but now the changes revert when loading a save and not just restarting the engine. Help, Shiggy...my brain hurts PS: I don't want to keep you awake so EDIT: Yes I have others. This might take a bit, so we can continue this tomorrow if you want. Edited January 23, 2016 by Meep007 Share this post Link to post Share on other sites
Shiggy 630 Posted January 23, 2016 If it's a compatibility issue I would need you to send me the whole project ,send me a PM when you have time 1 Share this post Link to post Share on other sites
Meep007 173 Posted January 23, 2016 (edited) I checked for any that I could think would effect this and it ended up being this one: Yanfly Engine Ace - Adjust Limits v1.00 Kinda makes a little sense to me since since it sent me here. #-------------------------------------------------------------------------- # * Determine if Maximum Number of Items Are Possessed #-------------------------------------------------------------------------- def item_max?(item) item_number(item) >= max_item_number(item) end But that's just a hunch, I'm not a scripter so... Limits Script.txt Edited January 23, 2016 by Meep007 1 Share this post Link to post Share on other sites
Shiggy 630 Posted January 23, 2016 I know where the issue is,turn this line into a comment def max_item_number(item); return item.max_limit; end in the limits script I will look for a fix tomorrow 1 Share this post Link to post Share on other sites
Meep007 173 Posted January 23, 2016 Alright. Thanks, Shiggy. Share this post Link to post Share on other sites
Shiggy 630 Posted January 23, 2016 Replace the reload_items method in the script I gave you with this def reload_items $data_items = load_data("Data/Items.rvdata2") for obj in $data_items next if obj.nil? obj.load_notetags_al end end Share this post Link to post Share on other sites