Dune 2d20 #2
  1. #1

    Automating NPC creation with ChatGPT

    Here's a guide on how to create an XML file to create as many random NPCs with ChatGPT as you want you can easily import into FG. This will create random stats, and you can even tell it to customize it so that there's

    Original idea from TheZerotje's video: https://www.youtube.com/watch?v=gTfV5ql6DsA

    NPC description from "The 3 Line NPC Method" here: https://www.roleplayingtips.com/rptn...ull-npcs-fast/

    Often the output is cut off, perhaps the bot is overwhelmed. Sometimes I get weird results, especially for the skill list, as the bot calls them "proficiencies" instead. I haven't been able to get the weapon-list to work, which is the most painful part of creating an NPC. If you have any improvement ideas, let me know!

    Steps:
    1. Get the code with the prompt below
    2. Copy-paste the code into a file "NPC.xml"
    3. Click on the up-arrow at the bottom corner of the NPCs window within FG. This will give a file popup. Select NPC.xml, and it will import it.


    This same method should work with any ruleset which allows the import of NPCs.

    Here is the prompt you enter into ChatGPT. Edit the first section of the prompt to your liking. For example, you could create an army officer with an INT and CON with 3d6+3 and skill in persuade of more than 60%, with a background in Brazil.

    Code:
    I've provided an XML template at the bottom of this message to create an NPC for Call of Cthulhu 7th Edition using Fantasy Grounds. Can you create a new random NPC using the template, please?
    
    Each of the abilities should be a random number using a die roll 3d6, multiplied by five, rounding up.
    
    For the name can you come up with a pompous British name for a man born in the late 1890s.
    
    For tag "skills" can you give him a five to ten skills appropriate for an archeology professor, who also likes the occult. Skill list should include Spot Hidden and Listen. They should be a list and follow the format: "Bargain 65%, Climb 55%, Credit Rating 35%, Dodge 36%" Each skill should have a percentage value randomly chosen between 20% and 60%. Skills appropriate for the occupation of the NPC should be between 45% and 80%.
    
    For weapons can you add Brawl (he's an amateur boxer), and shotgun (he does hunting with dogs with his academic buddies). A third random weapon. And appropriate skills for each.
    
    All of the above should follow Call of Cthulhu 7th Edition rules.
    
    For tag "notes" add a two or three sentences of background information matching the above occupation.
    
    For tag "text" add three lines of text, one or two sentences each:
    
    	What the players can see. NPC appearance and what the NPC is doing at the moment they meet.
    
    	What to portray. What the NPC does for a living and personality.
    
    	How to progress the story. Adventure or encounter hook.
    
    dbdesc and build are taken by adding up strength and size, and referring to the following list: if total combined strength and size is 64 or less, Damage Bonus is -2, Build -2. If the total is 65-84 DB is -1, Build -1. 85-124 0, 0. 125-164 +1d4, 1. 165-204 +1d6, 2. 205-284 +2d6, 3. 285-364 +3d6, 4. 365-444 +4d6, 5. 445-524 +5d6, 6. Add an additional 1d6 to DB and +1 to Build for each additional 80 points thereof.
    
    Hit Points (hp) are constitution + size, dividing by ten, rounding up.
    
    move is 7 if both dexterity and strength are each less than size. 8 if either strength or dexterity is equal to or greater than size, or if all three are equal. 9 if both strength and dexterity are each greater than size. If age is in the 40s deduct 1 from move, if age is in the 50s deduct 2, 60s deduct 3, 70s deduct 4, 80s or older deduct 5 from move.
    
    dodge is half dexterity, rounded up.
    
    weaponlist lists the weapons mentioned earlier. Each should include number "attack" (a random number between 5 and 45), string "name" (name of the weapon or attack), string "damage" (damage from Call of Cthulhu 7th Edition rules for that weapon or attack).
    
    
    
    <?xml version="1.0" encoding="utf-8"?>
    
    <root version="4.3" dataversion="20220901" release="2|CoreRPG:6">
    
    	<npc>
    
    		<abilities>
    
    			<appearance type="number">55</appearance>
    
    			<constitution type="number">75</constitution>
    
    			<dexterity type="number">55</dexterity>
    
    			<education type="number">80</education>
    
    			<intelligence type="number">75</intelligence>
    
    			<luck type="number">0</luck>
    
    			<power type="number">70</power>
    
    			<sanity type="number">58</sanity>
    
    			<size type="number">75</size>
    
    			<strength type="number">70</strength>
    
    		</abilities>
    
    		<dbdesc type="string">+1D4</dbdesc>
    
    		<derived>
    
    			<build type="number">0</build>
    
    			<dodge type="number">36</dodge>
    
    			<pulp_dodge type="number">0</pulp_dodge>
    
    		</derived>
    
    		<hp type="number">15</hp>
    
    		<ismook type="number">0</ismook>
    
    		<istemplate type="number">0</istemplate>
    
    		<listlink type="windowreference">
    
    			<class>npc</class>
    
    			<recordname>..</recordname>
    
    		</listlink>
    
    		<locked type="number">1</locked>
    
    		<move type="string">6</move>
    
    		<mp type="number">0</mp>
    
    		<name type="string">Name of the NPC goes here</name>
    
    		<notes type="string">Description of the NPC  goes here</notes>
    
    		<picture type="token"></picture>
    
    		<pulpweaponlist />
    
    		<skills type="string">Bargain 65%, Climb 55%, Credit Rating 35%,Dodge 36%</skills>
    
    		<text type="formattedtext"></text>
    
    		<token type="token"></token>
    
    		<type type="string">NPC</type>
    
    		<vehicle_record>
    
    			<mov type="number">0</mov>
    
    		</vehicle_record>
    
    		<vehiclearmor type="number">0</vehiclearmor>
    
    		<version type="string">7</version>
    
    		<weaponlist>
    
    			<id-00001>
    
    				<attack type="number">25</attack>
    
    				<name type="string">Brawl</name>
    
    			</id-00001>
    
    			<id-00002>
    
    				<attack type="number">38</attack>
    
    				<damage type="string">1D6+db</damage>
    
    				<name type="string">Nightstick</name>
    
    			</id-00002>
    
    			<id-00003>
    
    				<attack type="number">70</attack>
    
    				<damage type="string">1D10</damage>
    
    				<name type="string">.38 Revolver</name>
    
    				<weapontype type="number">1</weapontype>
    
    			</id-00003>
    
    		</weaponlist>
    
    	</npc>
    
    </root>
    Last edited by Magnimost; January 2nd, 2023 at 21:11.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in