NationStates Jolt Archive


Scripts for NationStates?

Unibot
19-12-2008, 03:18
I've been paticularly intrested lately in setting up a script to display a counter at the top of my region's forum (http://s4.invisionfree.com/The_Eastern_Islands)

Using the XML feed from here (http://nseconomy.thirdgeek.com/nseconomy.php?region=The_Eastern_Islands_of_Dharma&xml=1)

I was hoping to display a little counter that would say something like,

The Eastern Islands of Dharma has <numnations> nations, and is home to (<regionpopulation> x 1000000) citzens.

Really any knowledge on Scripts for NationStates would be helpful because I'm looking to work on calculators, and NSII-like GDP graphs in the future if I can get this down. :)
Bazalonia
19-12-2008, 04:02
Checkout

http://NSEconomy.thirdgeek.com

Use that to get the links to the Regional XML Feeds, though please note, if you in a large region one of the feeders (such as the east pacific ( http://www.nationstates.net/cgi-bin/regiondata.cgi/region=The_east_pacific ))

You won't be able to do anything with regional population, though number of nations is still available.
Unibot
19-12-2008, 04:35
Yeah, I know about the feeds.
Its the script that is proving difficult. Its got all my programming friends stumped (one stares at me funny every time I mention XML), and seeing as how I can't find a thread that talks about how people have made these scripts. I would love some discussion.

Thanks anyway.
Bazalonia
19-12-2008, 23:13
The script would be totally depend on the type of board. Each type of forum would have it's own Modding community.

if worse comes to worse you should be able to do a hatchet parsing job on the XML to get the info you need.
Unibot
20-12-2008, 05:24
Well JavaScript will work, and PHP would.
Bazalonia
20-12-2008, 07:43
http://www.php.net/manual/en/refs.xml.php

or...

www.php.net/xml

Hope those help