Jump to content

Rp Stats


Recommended Posts

No sweat. I'm still working on a way to import the userstats from the NationStates XML feed. I asked for assistance on the InvisionFree Support forum, but received no comment yet. You must understand that this is not easy for me, as I only have knowledge of normal HTML and CSS. This PHP and especially the XML stuff is completely new to me, so I'm learning it as I go. That's why, for the moment, the RP stats are calculated using the poststats. This means you should not take them serious, but see them as a sign of things to come. If and when I fail to import the NationStates XML, I will remove the info, as it is non-representative from the actualy NationStates data.

 

Here are the calculations as they stand for the moment:

      var citizens = parseInt(posts / 5)

      spans.innerHTML = spans.innerHTML + "<br>" + "<br>" + "Population: " + citizens + " million"

      var economy = parseInt(posts / 33)

      spans.innerHTML = spans.innerHTML + "<br>" + "Economy: ?" + economy + " trillion (GDP)"

      var culture = parseInt(posts / 40)

      spans.innerHTML = spans.innerHTML + "<br>" + "Culture: " + culture + " Nobel prizes"

      var military = parseInt(posts / 3)

      spans.innerHTML = spans.innerHTML + "<br>" + "Military: " + military + "000 soldiers"

      var age = parseInt(posts * 1.5)     

      spans.innerHTML = spans.innerHTML + "<br>" + "History: " + age + " years"

Please, if I may ask, is there anyone with some experience in PHP and/or XML? Cooperation would be helpful, and would probably get this show on the road faster/
Link to comment
Share on other sites

Perhaps I better remove the numbers until they actually work. I have some test forums where I could work on them. I guess the general NationStates role-players would be very glad with such a hack. wink.gif Haha, fame forever. Not! sweatdrop.gif

Link to comment
Share on other sites

Thank you, it's nice to hear that from time to time.

 

I'm going to take that little hack down anyway. For the moment it will only quasi confussion. Hopefully you will see it again soon.. (I leave you now to mourn to apparent loss of any and all Nobel prizes.)

Link to comment
Share on other sites

Ahh. that explains it.

 

I just spent the last hour looking around trying to figure out where those stats that tell my population and number of troops went. I was trying to develop some more background for my nation. Thanks for removing them. I don't to write up something vastly incorrect, like that I have 220 troops to guard a population of 2 million or something.

 

Thanks for working on the RP stats in the first place. I think they would make everything very easy to do so we can check things at a glance. I wish I could help, but I only know "old - 1990s" html and some MUD code.

 

2-thumbup.gif @ Orioni

Link to comment
Share on other sites

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...