Heroscapers
Go Back   Heroscapers > Custom HeroScape Creations > Software
Software Software created for enhancing HeroScape


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 13th, 2007, 01:02 AM
kenjib's Avatar
kenjib kenjib is offline
Hotdoghead-Molesterface
 
Join Date: August 21, 2006
Location: CA - Pasadena
Posts: 3,069
kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby!
A common xml data format for unit data

I wanted to write an army-builder type of program in some ways similar to Logrey's army builder. My first step was to define my data format for the units using XML. While writing up the document type definition, I realized that it might be of some benefit to the software community to come up with a standardized data model for heroscape units so that all of our programs can be easily compatible. The idea would be that there would be a master data file for the official units that we could all share, and someone would be in charge of keeping it updated. Then people could create additional data files for other libraries of units. For example, the master file might be officialhsunits.xml. Then someone could create netherspiritcustoms.xml that includes all of nether's custom units. Since it would be a shared data format, anyone could download this file and drop it into the data directory of any app that supports the format and all of the units will show up. We could even define shared locations for these files under various OSes so that all programs will point to the same files and prevent divergence of the data set.

Anyways, this is what I've got so far for the XML DTD. Here's a quick DTD tutorial if anyone wants to learn about the format. There's also an example of Sgt. Drake's entry afterward:


XML DTD
filename: hsunits.dtd

Code:
<!ELEMENT units (unit*)>
	<!ELEMENT unit (name,homeworld?,general?,basicMove?,basicRange?,basicAttack?,basicDefense?,
		set?,collectorNumber?,life,move,range,attack,defense,points,species,type,class,
		personality,size,height,specialPower*,hitZone?,bio?,hsstrategy?,synergy*,
		counter*,spfactor?,spdescription?,tag*)>
		<!ELEMENT name			(#PCDATA)>
		<!ELEMENT homeworld		(#PCDATA)>
		<!ELEMENT general			(#PCDATA)>
		<!ELEMENT basicMove		(#PCDATA)>
		<!ELEMENT basicRange		(#PCDATA)>
		<!ELEMENT basicAttack		(#PCDATA)>
		<!ELEMENT basicDefense		(#PCDATA)>
		<!ELEMENT set			(#PCDATA)>
		<!ELEMENT collectorNumber	(#PCDATA)>
		<!ELEMENT life			(#PCDATA)>
		<!ELEMENT move			(#PCDATA)>
		<!ELEMENT range			(#PCDATA)>
		<!ELEMENT attack			(#PCDATA)>
		<!ELEMENT defense			(#PCDATA)>
		<!ELEMENT points			(#PCDATA)>
		<!ELEMENT species			(#PCDATA)>
		<!ELEMENT uniqueOrCommon	(#PCDATA)>
		<!ELEMENT HeroOrSquad		(#PCDATA)>
		<!ELEMENT class			(#PCDATA)>
		<!ELEMENT personality		(#PCDATA)>
		<!ELEMENT size			(#PCDATA)>
		<!ELEMENT height			(#PCDATA)>
		<!ELEMENT specialPower		(powerName,powerDescription)>
			<!ELEMENT powerName		(#PCDATA)>
			<!ELEMENT powerDescription	(#PCDATA)>
		<!ELEMENT hitZone			(#PCDATA)>
		<!ELEMENT bio			(#PCDATA)>
		<!ELEMENT hsstrategy		(#PCDATA)>
		<!ELEMENT synergy			(synergyType,synergyRequirement*,synergyRestriction*,synergySpecialPower?,synergyNotes)>
			<!ELEMENT synergyType		(#PCDATA)>
			<!ELEMENT synergyRequirement	(synergyRequirementType,synergyRequirementDescription)>
				<!ELEMENT synergyRequirementType		(#PCDATA)>
				<!ELEMENT synergyRequirementDescription	(#PCDATA)>
			<!ELEMENT synergyRestriction	(synergyRestrictionType,synergyRestrictionDescription)>
				<!ELEMENT synergyRestrictionType		(#PCDATA)>
				<!ELEMENT synergyRestrictionDescription	(#PCDATA)>
			<!ELEMENT synergyNotes		(#PCDATA)>
		<!ELEMENT counter			(counterType,counterRequirement*,counterRestriction*,counterSpecialPower?,counterNotes?)>
			<!ELEMENT counterType		(#PCDATA)>
			<!ELEMENT counterRequirement	(counterRequirementType,counterRequirementDescription)>
				<!ELEMENT counterRequirementType		(#PCDATA)>
				<!ELEMENT counterRequirementDescription	(#PCDATA)>
			<!ELEMENT counterRestriction	(counterRestrictionType,counterRestrictionDescription)>
				<!ELEMENT counterRestrictionType		(#PCDATA)>
				<!ELEMENT counterRestrictionDescription	(#PCDATA)>
			<!ELEMENT counterNotes		(#PCDATA)>
		<!ELEMENT spfactor		(#PCDATA)>
		<!ELEMENT spdescription		(#PCDATA)>
		<!ELEMENT tag			(#PCDATA)>

Sgt. Drake

Code:
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE units SYSTEM "hsunits.dtd">

<units>

	<unit>
		<name>Sgt. Drake Alexander</name>
		<homeworld>Earth</homeworld>
		<general>Jandar</general>
		<basicMove>6</basicMove>
		<basicRange>1</basicRange>
		<basicAttack>6</basicAttack>
		<basicDefense>7</basicDefense>
		<set>Rise of the Valkyrie</set>
		<collectorNumber>25/30</collectorNumber>
		<life>5</life>
		<move>5</move>
		<range>1</range>
		<attack>6</attack>
		<defense>3</defense>
		<points>110</points>
		<species>human</species>
		<uniqueOrCommon>unique</uniqueOrCommon>
		<heroOrSquad>hero</heroOrSquad>
		<class>soldier</class>
		<personality>valiant</personality>
		<size>medium</size>
		<height>5</height>
		<specialPower>
			<powerName>ThorianSpeed</powerName>
			<powerDescription>Opponents' figures must be adjacent to Sgt. Drake Alexander to attack him with a normal attack.</powerDescription>
		</specialPower>
		<specialPower>
			<powerName>Grapple Gun 25</powerName>
			<powerDescription>Instead of Sgt. Drake Alexander's normal move, he may move only one space. This space may be up to 25 levels higher. When using the Grapple Gun, all engagement rules still apply.</powerDescription>
		</specialPower>
		<bio>Though he is incredibly agile and strong in hand-to-hand combat, Sergeant Alexander was injured and weaponless after being whisked away to Valhalla by Jandar. Healed by the Valkyrie Kelda, he was then given two powerful weapons by Jandar: The Katana of Thorian, and Bleakwood's Grapple Gun. He learned to use them quickly, for Jandar's forces were already under attack.

The Katana, an enchanted sword that channels the powers of the great warrior Thorian, obscures Alexander's image from afar, making him almost impossible to strike. With his magical sword, his laser-guided Grapple Gun and his steely will to conquer evil Sgt. Alexander has become one of Jandar's best soldiers.</bio>
		<hsstrategy>While Drake doesn't have the greatest defense in the game, he more than makes up for it with his Thorian Speed and Grapple Gun 25 Special Powers. Enemies must be adjacent to hit him with anything except Special Attacks. Once they get near him, he can attack with 6 attack dice (More if he is strategically placed on height)!</hsstrategy>
		<synergy>
			<synergyType>Tips &amp; Tricks</synergyType>
			<synergyRequirement>
				<synergyRequirementType>name</synergyRequirementType>
				<synergyRequirementDescription>Marcus Decimus Gallus</synergyRequirementDescription>
			</synergyRequirement>
			<synergyNotes>Marcus Decimus Gallus is well suited for working with Drake because of his Soldier Leadership and Soldier Attack Enhancement. Both affect Drake and make him even more dangerous on the field of battle.</synergyNotes>
		</synergy>
		<synergy>
			<synergyType>Tips &amp; Tricks</synergyType>
			<synergyRequirement>
				<synergyRequirementType>name</synergyRequirementType>
				<synergyRequirementDescription>Raelin the Kyrie Warrior</synergyRequirementDescription>
			</synergyRequirement>
			<synergyNotes>Drafting Raelin can help Drake's one flaw; his defense. As long as you can keep her safely behind him, she makes Drake a very dangerous enemy for anyone delusional enough to engage him.</synergyNotes>
		</synergy>
		<counter>
			<counterType>Tips &amp; Tricks</counterType>
			<counterRequirement>
				<counterRequirementType>name</counterRequirementType>
				<counterRequirementDescription>Krav Maga Agents</counterRequirementDescription>
			</counterRequirement>
			<counterNotes>The Krav Maga cannot hit Drake from a distance and when the Sgt. finally closes one the agents he should quickly destroy them, one by one.</counterNotes>
		</counter>
		<counter>
			<counterType>Tips &amp; Tricks</counterType>
			<counterRequirement>
				<counterRequirementType>name</counterRequirementType>
				<counterRequirementDescription>Taelord the Kyrie Warrior</counterRequirementDescription>
			</counterRequirement>
			<counterNotes>If Taelord is on the battlefield, he should be your first objective. He only has a defense of 3, but his wings can be used to shield him from ranged attacks. If you run up to him with Drake, you can normally take him down before Drake is destroyed.</counterNotes>
		</counter>
		<counter>
			<counterType>Tips &amp; Tricks</counterType>
			<counterRequirement>
				<counterRequirementType>name</counterRequirementType>
				<counterRequirementDescription>Charos</counterRequirementDescription>
			</counterRequirement>
			<counterNotes>Charos is a dangerous foe because of his Counter Strike ability. The only way to take him out besides hitting him with ranged figures is to run up and engage him with a strong Hero. Drake works well against him because of his 6 attack dice. However, he won't last too long against Charos with his 3 defense dice, so only use him for final attacks when Charos is wounded.</counterNotes>
		</counter>
		<counter>
			<counterType>Tips &amp; Tricks</counterType>
			<counterRequirement>
				<counterRequirementType>name</counterRequirementType>
				<counterRequirementDescription>Brunak</counterRequirementDescription>
			</counterRequirement>
			<counterNotes>Brunak's high defense makes him a tough target to take down. Use Drake to run up and engage him so he cannot Carry anyone across the battlefield, and as long as Drake is still alive, he cannot use his Blood Hungry Special Attack. Brunak has a relatively low attack at 4, so Drake should be able to spar with him for multiple rounds. Eventually, Drake's 6 attack dice will break through, and with only 3 life, Brunak won't last long.</counterNotes>
		</counter>
		<counter>
			<counterType>Special Power</counterType>
			<counterRequirement>
				<counterRequirementType>tag</counterRequirementType>
				<counterRequirementDescription>ranged</counterRequirementDescription>
			</counterRequirement>
			<counterRestriction>
				<counterRestrictionType>tag</counterRestrictionType>
				<counterRestrictionDescription>ranged special attack</counterRestrictionDescription>
			</counterRestriction>
			<counterSpecialPower>Thorian Speed</counterSpecialPower>
		</counter>
		<spfactor>B-</spfactor>
		<spdescription>With more and more special attacks releasing, Drake's value keeps going down. Once a safe bet, Drake's Thorian Speed isn't always fast enough nowadays.</spdescription>
		<tag>melee</tag>
		<tag>ranged attack immunity</tag>
		<tag>special ranged attack vulnerability</tag>
		<tag>enhanced mobility</tag>
	</unit>

</units>
One of the reasons I'm posting this is that I want to see if anyone else is interested, and if so, what changes and additional features would they need to support the kind of applications that they are working on. Also feel free to ask about how any of the various elements, such as synergies and counters, are intended to work as I've designed these elements with certain types of functionality/capabilities in mind.
Reply With Quote
  #2  
Old April 26th, 2007, 02:58 PM
kenjib's Avatar
kenjib kenjib is offline
Hotdoghead-Molesterface
 
Join Date: August 21, 2006
Location: CA - Pasadena
Posts: 3,069
kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby!
Alright, I guess I'll just work on it for my own app. If anyone is ever interested let me know.
Reply With Quote
  #3  
Old April 26th, 2007, 05:10 PM
ninthdoc's Avatar
ninthdoc ninthdoc is offline
ATF Agent
 
Join Date: May 8, 2006
Location: TX - Denton
Posts: 4,878
Blog Entries: 5
ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby!
kenjib,

Please don't stop posting here. I'm trying to learn XML, but I know very little about it. Honestly, I was hoping to glean information from your posts.

I've always been crazy, but it's kept me from going insane.
Reply With Quote
  #4  
Old April 26th, 2007, 05:53 PM
kenjib's Avatar
kenjib kenjib is offline
Hotdoghead-Molesterface
 
Join Date: August 21, 2006
Location: CA - Pasadena
Posts: 3,069
kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby! kenjib rolls all skulls baby!
Sure, no problem Ninthdoc. I'll post some more about it when I get the time. As I get the app running I'll explain what I'm doing with the data too.
Reply With Quote
  #5  
Old April 26th, 2007, 05:55 PM
ninthdoc's Avatar
ninthdoc ninthdoc is offline
ATF Agent
 
Join Date: May 8, 2006
Location: TX - Denton
Posts: 4,878
Blog Entries: 5
ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby! ninthdoc rolls all skulls baby!
Quote:
Originally Posted by kenjib
Sure, no problem Ninthdoc. I'll post some more about it when I get the time. As I get the app running I'll explain what I'm doing with the data too.

I've always been crazy, but it's kept me from going insane.
Reply With Quote
  #6  
Old April 26th, 2007, 05:58 PM
yagyuninja's Avatar
yagyuninja yagyuninja is offline
 
Join Date: May 9, 2006
Location: OR - Eugene
Posts: 2,579
Images: 5
yagyuninja rolls all skulls baby! yagyuninja rolls all skulls baby! yagyuninja rolls all skulls baby! yagyuninja rolls all skulls baby!
This is a great idea, and I can't wait to see what you have in store for us Kenjib.
Reply With Quote
  #7  
Old April 27th, 2007, 03:45 PM
Zzzzz Zzzzz is offline
 
Join Date: July 2, 2006
Location: * France - Paris (near)
Posts: 566
Zzzzz wears ripped pants of awesomeness Zzzzz wears ripped pants of awesomeness Zzzzz wears ripped pants of awesomeness Zzzzz wears ripped pants of awesomeness Zzzzz wears ripped pants of awesomeness Zzzzz wears ripped pants of awesomeness Zzzzz wears ripped pants of awesomeness
Hi Kenjib,

I think this is a great idea to use a common format. I have no time now for that (because I'm working on the online game version of VirtualScape (and today can be my first connection with betatester)) but I think that I will use your format in virtualscape if this become a common format.
I give you all my "encouragements"
Reply With Quote
  #8  
Old April 27th, 2007, 04:17 PM
markwars's Avatar
markwars markwars is offline
Mintiest of the Minty
 
Join Date: May 10, 2006
Location: TX - Dallas (Denton)
Posts: 8,925
Images: 9
Blog Entries: 14
markwars wears ripped pants of awesomeness markwars wears ripped pants of awesomeness markwars wears ripped pants of awesomeness markwars wears ripped pants of awesomeness markwars wears ripped pants of awesomeness markwars wears ripped pants of awesomeness
Props to you Kenjib. I am eagerly awaiting your magic.
Reply With Quote
  #9  
Old April 30th, 2007, 10:15 PM
UranusPChicago's Avatar
UranusPChicago UranusPChicago is offline
BoV Judge Emeritus
 
Join Date: May 9, 2006
Location: TX - Garland
Posts: 1,017
Images: 8
Blog Entries: 5
UranusPChicago knows what's in an order marker UranusPChicago knows what's in an order marker UranusPChicago knows what's in an order marker
Kenjib, if you are interested, I already have a fully normallized SQL Server database of Heroscape data. Not sure if it would help you at all. SQL 2005 Express is a free download.

UPC's Heroscape Strategy Blog (and whatever else the Muse sends my way...)

Reply With Quote
  #10  
Old May 1st, 2007, 01:19 AM
GaryLASQ's Avatar
GaryLASQ GaryLASQ is offline
Spin Master
 
Join Date: May 9, 2006
Location: IL (Chicago) Bartlett
Posts: 3,108
Images: 5
GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun GaryLASQ is a penguin with a machine gun
guess i'll chime in here as well. my website is XML driven (transformed into HTML and SVG via XSLT). already have all units, terrain, sets, battlefields, scenarios loaded into an XML database. http://heroscape.glasq.com

if you do the full download of my site (there's a link to the download on the home page) all the "code" i use is in it. although the XML Scheme (an XML version of a DTD) is a mess at the moment because i've been fiddling with XML for battlefields and scenarios lately. i haven't validated the data with the schema in weeks and i'm sure it would fail at the moment -- schema needs updating.

kenjib, what you've got looks good. i haven't gotten around to putting in bios in my own XML yet. i probably won't bother with strategy and counters. i see you have "power ranking". i'm tempted to add this to my data as well and display it in my Character table, even though it is data that comes from this site and not Hasbro. although the power rankings are constantly changing so i would have to keep checking Spider's thread and updating my own copy of the info (bit of a pain and error-prone).

a standardized data model for HS data would be great. although i'm a bit jaded when it comes to standards. *standards, compliance, uphill battle, grumble, grumble*

Quote:
Originally Posted by ninthdoc
Please don't stop posting here. I'm trying to learn XML, but I know very little about it. Honestly, I was hoping to glean information from your posts.
XML is pretty simple really. i like to think of it as "SGML for Dummies".

ninthdoc, get a copy of the Wrox book "Beginning XML". http://www.wrox.com/WileyCDA/WroxTit...470114878.html (looks like a 4th edition is just about to be released)

i bought the 3rd edition about 7 months ago and i'm still learning from it. it's been a big help for me with working on my HS website.
Reply With Quote
Reply

Go Back   Heroscapers > Custom HeroScape Creations > Software



All times are GMT -4. The time now is 09:17 PM.

Heroscape background footer

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.