#M&M Archtypes XML files

1 messages ยท Page 1 of 1 (latest)

fast cairn
#

@mental geyser Had a really good idea of gathering just the archetypes for folks into a handy file. These are just the archetypes and I stripped out the art so as not to conflict with copyright issues and presented in a .ZIP file for folks. You can import these directly into the Foundry VTT Mutants & Masterminds system character sheet. There are 86 total .XML files but I know there are a few buplicates so my apologies. If you have any problems with the files, let me know and I will see what I an do. I should specify that these are PL10 archetypes. It would be helpful in the future to haver PL8 variants and such.

#

M&M Archtypes XML files

fast cairn
winter nova
#

Importing these one by one was killing me, so i wrote a macro to automate as much as I could before javascript security got in my way, still less clicks with this macro

const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))
let actor = await Actor.create({
name: "New Imported Actor",
type: "personnage",
img: "icons/svg/mystery-man.svg"
});

await actor.sheet.render(true);
await sleep(1000);
await actor.sheet.form.children[2].children[4].children[0].children[1].click()

fast cairn
#

@winter nova Holy crap! Thank you for the sharing of the macro! Once in am finished with all of the .xml files and getting them transferred into Foundry, I will make a compendium. I would scream "Glory Hallelujah!" If you can figure out a way to import a .stock file so multiples can be brought in all at one time. Amazing work, Jeff! ๐Ÿ™‚

winter nova
#

Ya that is going to be harder lol

fast cairn
#

Thank you!

winter nova
#

you are more than welcome,

#

for the stock file, I need to look at the XML parsing code; or change theM and M importer code to read a zip file

fast cairn
#
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))
let actor = await Actor.create({
  name: "New Imported Actor",
  type: "personnage",
  img: "icons/svg/mystery-man.svg"
});

await actor.sheet.render(true);
await sleep(1000);
await actor.sheet.form.children[2].children[4].children[0].children[1].click()
#

I have a gaggle of DC characters in a stock file I want to move over.

winter nova
#

I am going to take a look because getting all those DC characters in would be great; I can imagine there are a ton of.stock files kicking around as wekk

#

Ya I saw those

#

I have all the villains and arch types loaded using the above macro

#

But looking at DC; that is alot of character lol

fast cairn
#

If you don't have the stock file, I can get it to you. Hoe do you use the macro?

winter nova
#

just click on it

#

I have the DC files, saw it on one of your threads

fast cairn
#

Cool. Just click it? How does it know where the Xml files are?

winter nova
#

it doesnt - all this does is automate creating an actor; clicking import and then opening the file picker

#

you then have to click the xml you want - still this sped things up for me

#

javascript wont let me manipulate the file picker

#

I think I need to change the form code to use the foundry file picker instead

fast cairn
#

Oh, if you can make it do it to all in one folder, I would do back flips.... well, spiritually anyway.

winter nova
#

I am going to take a look at the actual actor sheet and see what surgery I can perform - this was just a quick and dirty macro

#

Ya to do the entire folder I need to get at the actor sheet

fast cairn
#

I like quick and dirty. ๐Ÿ™‚

winter nova
#

๐Ÿ™‚

fast cairn
#

Whoa! Cool. So it will import statblocks and then... the Marvel Universe will be ours to command!

#

cackles like Dr Doom

#

One thing that may be problematic is Zakarik is French and much of the code is in French for the system but I can get you translations.

winter nova
#

Looks like if we convert the stock file to XML in hero lab then we just need to right a wrapper that breaks the XML into smaller fragments then run this code

fast cairn
#

Fantastic! You are obviously far more knowledgeable than I. I defer to your genius! I look forward to anything you can figure out!

winter nova
#

A first MVP (minimum viable product) would be to just input a string and test it ou

#

Ya - this doesnt look to bad; my complete noobness with Foundry API and it has been a decade or so since i have done any javascript will slow me down but this should be more than doable, I love coding so this looks like a fun project

fast cairn
#

I was told once a stock file is just a series of the xml files with a divider but I never investigated that.

#

Wonderful! If you can help overall with coding that would be phenomenal.

winter nova
#

Chat gpt showed where and how to make the updates - this should be relatively easy

#

I think I am going to build a foundry dev chat bot. Feed it all the foundry module git hub files and train it so it becomes a foundry dev expert.

fast cairn
#

Cool. I use it myself. I know little of coding but don't dare say the dirty "ChatGPT" word around coders. They still badmouth me for using it. chuckle

#

The macro polo channel is still very helpful, though.

winter nova
#

Really ? every developer I know is using code pilot or chatgpt, its a huge accelerator

#

speaking of...

#

Here are two files that will allow you to import a portfolio level xml file...

#
  1. replace <foundry data>\systems\mutants-and-masterminds-3e\module\sheets\personnage-actor-sheet.mjs with the attached personnage-actor-sheet.mjs

  2. replace <foundry data>\systems\mutants-and-masterminds-3e\templates\parts\importations.html with the atached importations.html

#

when importing open up a character sheet; click the second import button , point to a stock file that has already been exported as XML in herodesigner and ...

#

Please have a look and let me know if it works for you. I'll go figure how to get this change into @bitter musk git repo - I cant rememer how to do that lol