I need the reference_ID of each image I include as a Figure in Inform 7.
I’m assuming there is a way to wrap an I6 function with I7 for this, but am not sure how to do it.
This is for Zifmia. When an author uploads their BLORB file, the Zifmia server will unpack all the parts and store them in their proper places. The ULX file will be added to the database as a game and the image and sound files will be copied to an HTML sub-folder for relative reference by the game play web page.
The author would include their spot art as Figures and then reference them in text with some markup such as [show Figure 1 on the left].
So the entire code might look like this:
The Figure of the Barren Valley is the file “barrenvalley.png”.
The Barren Valley is a room. “[Show Figure of the Barren Valley on the left]You are in a barren valley, dust packed hillocks pock either side with a muddy trail leading north.”
This would be printed as markup that Zifmia will translate to HTML.
So the actual output will be:
[image 3 png left ‘Barren Valley’]You are in a barren valley, dust packed hillocks pock either side with a muddy trail leading north.
And Zifmia will look for the [image tag and translate it so the text becomes:
The author can place spot art on the left side of a paragraph (wrapped), right side of a paragraph (wrapped), left of the main column but aligned with the top of the paragrah, right of themain column but aligned with the top of the paragraph, or as a modal popup CSS window. These translate roughly as:
[show the figure of the barren valley embedded on the left]
[show the figure of the barren valley embedded on the right]
[show the figure of the barren valley separate on the left]
[show the figure of the barren valley separate on the right]
[show the figure of the barren valley popup]
Sounds will be handled differently since they’re not localized to any particular piece of text.
If someone could help with the reference_ID printing and the show printing action, I would appreciate it.