<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Faldon Forums - Add a method to get named object names]]></title>
	<link rel="self" href="https://www.faldon.org/feed/atom/topic/7634/"/>
	<updated>2024-10-14T18:45:37Z</updated>
	<generator>PunBB</generator>
	<id>https://www.faldon.org/topic/7634/</id>
		<entry>
			<title type="html"><![CDATA[Re: Add a method to get named object names]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73474/#p73474"/>
			<content type="html"><![CDATA[<p>I have 2 use cases that I&#039;d like to have covered. </p><p>There&#039;s the NPC Rick, buys items from players and offers them for sale again, kind of like a pawn shop. The script also saves any custom name configured on an item, so when a players buys the item item it&#039;ll still have the custom name. Currently there is no way to retrieve the custom name so the item is just marked with * to indicate that has a name.</p><p>The other use case is rewards distributed with the NGP-system. These rewards can include named objects (such as elven gold nuggets). Players get to pick which bits of loot they want so it would be helpful if I could display &#039;# elven gold nuggets&#039; instead of # gold ore*&#039;.</p><p>Both scripts would also benefit from having prefix and suffix names available, currently those are hardcoded.</p><p>I guess all of this could be done with flags, but seeing as it is now possible to add new gsFunctions we could also go that route.<br /></p><div class="codebox"><pre><code>gsFormatObjectText(strslot, itemid, prefix, suffix, mindura = 0, maxdura = 0, amount = 0, name = 0)</code></pre></div><p>This would then have the server format a string with all those properties present.</p><p>For completion we should also include enchanting information, but there&#039;s no way to deal with that through scripts as far as I know.</p>]]></content>
			<author>
				<name><![CDATA[Mr Spy]]></name>
				<uri>https://www.faldon.org/user/431/</uri>
			</author>
			<updated>2024-10-14T18:45:37Z</updated>
			<id>https://www.faldon.org/post/73474/#p73474</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Add a method to get named object names]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73473/#p73473"/>
			<content type="html"><![CDATA[<p>Just to get an idea of how to put in such a feature properly, what&#039;s the intended use case for retrieving the custom names? Thanks!</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://www.faldon.org/user/2/</uri>
			</author>
			<updated>2024-10-14T18:30:06Z</updated>
			<id>https://www.faldon.org/post/73473/#p73473</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Add a method to get named object names]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/73469/#p73469"/>
			<content type="html"><![CDATA[<p>Some game content accepts and hands out custom named objects. They are now generally marked with a * because there&#039;s no way to retrieve the name through script.</p><p>It should be helpful if a string flag was added to retrieve the custom names. Something like <strong>customname###</strong>.</p><p>While on the topic, it would also be helpful to have flags to retrieve prefix and suffix names, and spell names. These are now hardcoded in various NPCs.</p>]]></content>
			<author>
				<name><![CDATA[Mr Spy]]></name>
				<uri>https://www.faldon.org/user/431/</uri>
			</author>
			<updated>2024-10-13T14:56:44Z</updated>
			<id>https://www.faldon.org/post/73469/#p73469</id>
		</entry>
</feed>
