Initial commit
This commit is contained in:
58
data/magic-xml.mse-export-template/export-template
Normal file
58
data/magic-xml.mse-export-template/export-template
Normal file
@@ -0,0 +1,58 @@
|
||||
mse version: 0.3.8
|
||||
short name: XML
|
||||
full name: Formatted data
|
||||
position hint: 004
|
||||
icon: icon.png
|
||||
version: 2009-06-29
|
||||
installer group: magic/Export/xml
|
||||
|
||||
depends on: magic.mse-game 2008-08-08
|
||||
|
||||
game: magic
|
||||
create directory: false
|
||||
file type: *.xml|*.xml|*.*|*.*
|
||||
|
||||
# By Seeonee
|
||||
# Based on code by Idle Muse
|
||||
# Enhanced by Pichoro
|
||||
#
|
||||
# Changes Made:
|
||||
# New and Correct Version Number
|
||||
# MSE Version 0.3.8
|
||||
# New Installer Group
|
||||
# Spaces to Tabs
|
||||
# New Icon
|
||||
# Redid tabbing for clarity
|
||||
# Changed "<" to "" (that's not a space)
|
||||
|
||||
option field:
|
||||
type: choice
|
||||
name: output
|
||||
description: What data should be output?
|
||||
choice: all card attributes
|
||||
choice: card names
|
||||
|
||||
script:
|
||||
MSEcard := {" card>\n"
|
||||
+" name>"+to_text(card.name)+"/name>\n"
|
||||
+" cost>"+to_text(card.casting_cost)+"/cost>\n"
|
||||
+" type>\n"
|
||||
+" supertype>"+to_text(card.super_type)+"/supertype>\n"
|
||||
+" subtype>"+to_text(card.sub_type)+"/subtype>\n"
|
||||
+" /type>\n"
|
||||
+" rarity>"+substring(to_upper(to_text(card.rarity)),end:1)+"/rarity>\n"
|
||||
+" rules>"+to_text(card.rule_text)+"/rules>\n"
|
||||
+" flavor>"+to_text(card.flavor_text)+"/flavor>\n"
|
||||
+" stats>\n"
|
||||
+" power>"+to_text(card.power)+"/power>\n"
|
||||
+" toughness>"+to_text(card.toughness)+"/toughness>\n"
|
||||
+" /stats>\n"
|
||||
+" illustrator>"+to_text(card.illustrator)+"/illustrator>\n"
|
||||
+" number>"+to_text(card.card_number)+"/number>\n"
|
||||
+" /card>\n"
|
||||
}
|
||||
write_card := { if options.output == "card names" then to_text( "card>\nname>" + card.name + "/name>\n/card>\n" )
|
||||
else MSEcard()
|
||||
}
|
||||
write_cards := "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<spoiler set=\"" + to_text(set.title) + "\">\n" + to_text( for each card in sort_list( cards, order_by: {input.card_number} ) do write_card() ) + "</spoiler>\n"
|
||||
to_string(write_cards)
|
||||
Reference in New Issue
Block a user