Re: A question about coding

#2
I remember when I faced this problem making the language mod (discontinued). I didn't touch the item names, instead I used a script that changed the name displayed in the inventory.

Add the following code at the end of the Main.bb file (this is the safest way to know it will work):

Code: Select all

Function InvName$(inputStr$)

;The "Case" string is the original item's name
;The "Return" is the changed name

Select inputStr$
	Case "Something"
		Return "Whatever you want to call it"
	Default
		Return inputStr
End Select

End Function
You need to copy the "Case" and "Return" before the "Default" as many times you need. You don't need to add the names you won't be changing (in fact, you shouldn't do that)

Then, find this in the Main.bb file:

Code: Select all

Text(x + width / 2, y + height + spacing - 15, Inventory(n)\itemtemplate\name, True)
And change it to:

Code: Select all

Text(x + width / 2, y + height + spacing - 15, InvName(Inventory(n)\itemtemplate\name), True)
This should run the script, changing the name you see in the inventory.