XML tutorial

PureSim Baseball is the ultimate baseball fan's toy, with support for both casual and hardcore baseball fans.

Moderator: puresimmer

Post Reply
biggerboat
Posts: 22
Joined: Sat Jul 01, 2006 8:59 pm

XML tutorial

Post by biggerboat »

Does anyone know if something like this exsists. A step by step explanation and general how to. Would love to get in there and make some tweaks but have no idea.
Thanks
sposfan
Posts: 212
Joined: Tue Apr 12, 2005 10:47 pm

RE: XML tutorial

Post by sposfan »

This is from an older version of puresim, but most if not all of it should still apply
 
http://p089.ezboard.com/fpuresimbaseballfrm21.showMessage?topicID=558.topic
biggerboat
Posts: 22
Joined: Sat Jul 01, 2006 8:59 pm

RE: XML tutorial

Post by biggerboat »

cool, thanks sposfan...will give it a shot
User avatar
Deltadog
Posts: 389
Joined: Mon Feb 27, 2006 4:05 pm

RE: XML tutorial

Post by Deltadog »

The text below was copied from the ezboard link provided above.  Can anyone explain exactly what this means.
 
1.  Chances for pich hitters per inning -  Are these percentages,  ? in 100 or exactly what.
2.  How is the manager type determined?  I know you can set this in mgr/GM TENDANCES, but is has been extablished that the CPU will change these settings as the season goes.  Is there a setting in the xml file that will govern how these changes are made?
 
Basically I want to stop the CPU mangers from Pinch hitting every other hitter as the game progresses.  The Deadball xml has not made much differance.  Any ideas?
 
 
Manager AI
Managerial tendencies are rated 1-7 in various categories - they map to the attributes of the team's manager profile.

<BASE_PINCH_HIT_CHANCE_BY_INNING v1="0" v2="0" v3="0" v4="0" v5="5" v6="5" v7="15" v8="45" v9="65"/>
Chances for pinch hitters by inning.
<MIN_PINCH_HIT_INNING v0="8" v1="7" v2="7" v3="6" v4="6" v5="5" v6="5"/>
By manager type, what is the earliest inning they will pinch hit. The 0-6 refer to the managerial preferences that are set (Very Rarely..Average.. etc)
<BASE_PINCH_HIT_CHANCE v0="-30" v1="-15" v2="-5" v3="0" v4="5" v5="15" v6="20"/>
By manager type what is the increase/decrease to the base chance they will pinch hit - adjusts the first value in this section.
<CANCEL_PINCH_HIT_IF_AHEAD_BY v0="2" v1="2" v2="3" v3="3" v4="3" v5="4" v6="5"/>
Won't pinch hit when up by this many runs, but manager type.
Deltadog
biggerboat
Posts: 22
Joined: Sat Jul 01, 2006 8:59 pm

RE: XML tutorial

Post by biggerboat »

I have similiar questions...there needs to be a XML For Dummies...I can't seem to make any edits...I make a copy, attempt to open it, and get an error message
henry296
Posts: 418
Joined: Fri May 12, 2006 12:23 am

RE: XML tutorial

Post by henry296 »

To edit the XML you shoud open it Notepad.&nbsp; If you double click the file it will open in a browser window and is not editable.
biggerboat
Posts: 22
Joined: Sat Jul 01, 2006 8:59 pm

RE: XML tutorial

Post by biggerboat »

that did the trick...thanks henry
SittingDuck
Posts: 1189
Joined: Sat Aug 31, 2002 9:08 pm

RE: XML tutorial

Post by SittingDuck »

Here are a few tips:

1) Take the default XML and archive it (RAR is my choice)
2) Copy the XML file to the desktop or whatever and change the extension to TXT
3) Open in Notepad (I use Notepad++, a freeware program that rocks) and tweak away
4) After changes, then just save it as the original XML file - Save As> puresim.xml - in the original XML subdirectory
5) Open the XML file just to make sure it hasn't got errors (must load fully).

Now you always have that puresim.txt file to make changes on, and then just save it as the XML file and load away.

When you have a file that you really enjoy, make an archive of that so you don't lose your precious work and always have a reference to work with in the future.

I keep IE6 as the default program for XML files; I don't change the default opening program to Notepad because I want to crank on the XML file with IE just to make sure it is kosher. If you change it to Notepad as default, it will take more steps to open the XML with IE.
Post Reply

Return to “PureSim Baseball”