Skip to content

[QUESTION] Weidu SAY 0xDE

GreenerGreener Member Posts: 430
Good evening,

I'm trying to create an item (tome) that when read will grant the reader 25,000 experience points. I have modelled it after the tome of leadership and influence replacing the charisma bonus with an XP bonus. I'm struggling to edit the effect Display String (139), I would like it to say '<CHARNAME> has gained 25,000 Experience.' Currently it returns 'no such index' I have attached the files for review, any assistance would be appreciated.
BEGIN ~Tome~

ACTION_IF GAME_IS ~bgee~ THEN BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~enginest.2da~ BEGIN

////////////////////////////////////// ITEMS ///////////////////////////////////////

COPY ~Tome/Items/WA3BOOK.ITM~ ~override~
SAY NAME1 ~Book~
SAY NAME2 ~Tome of Experience~ 
SAY DESC ~Studying this tome teaches the reader skills and techniques never imagined possible. As if this isn't enough, the reader also gains 25,000 experience points. Unfortunately, the tome is consumed after a single use.

STATISTICS:

Experience: Raised by 25,000 points permanently
Special: The book is consumed upon use
Usage: Place into quick item slot

Weight: 5~
SAY 0xDE ~<CHARNAME> has gained 25,000 Experience.~
END
END

Comments

  • AquadrizztAquadrizzt Member Posts: 1,069
    edited December 2022
    BACKUP ~Tome/Backup~
    AUTHOR ~Greener~
    VERSION ~1.0~
    
    ////////////////////////////////////// BGEE ////////////////////////////////////////
    
    BEGIN ~Tome~
    
    ACTION_IF GAME_IS ~bgee~ THEN BEGIN
    	ACTION_IF FILE_EXISTS_IN_GAME ~enginest.2da~ BEGIN
    
    		////////////////////////////////////// ITEMS ///////////////////////////////////////
    
    		COPY ~Tome/Items/WA3BOOK.ITM~ ~override~
    			SAY NAME1 ~Book~
    			SAY NAME2 ~Tome of Experience~ 
    			SAY DESC ~Studying this tome teaches the reader skills and techniques never imagined possible. As if this isn't enough, the reader also gains 25,000 experience points. Unfortunately, the tome is consumed after a single use.
    
    			STATISTICS:
    
    			Experience: Raised by 25,000 points permanently
    			Special: The book is consumed upon use
    			Usage: Place into quick item slot
    
    			Weight: 5~
    			LPF ALTER_ITEM_EFFECT 
    				INT_VAR 
    					check_headers = 1 
    					match_opcode = 139
    					parameter1 = RESOLVE_STR_REF(~<CHARNAME> has gained 25,000 Experience.~)
    			END 
    	END
    END
    

    This item also doesn't have an unidentified description but that's a much easier thing to fix.

    Let me know if you have any questions about the code.
Sign In or Register to comment.