MCPcopy Create free account
hub / github.com/PCGen/pcgen / createPCGString

Method createPCGString

code/src/java/pcgen/io/PCGVer2Creator.java:155–486  ·  view source on GitHub ↗

create PCG string for a given PlayerCharacter author: Thomas Behr 19-03-02 @return a String in PCG format, containing all information PCGen associates with a given PlayerCharacter

()

Source from the content-addressed store, hash-verified

153 * PCGen associates with a given PlayerCharacter
154 */
155 public String createPCGString()
156 {
157 // Guess that this should be about 1000
158 StringBuilder buffer = new StringBuilder(1000);
159
160 appendPCGVersionLine(buffer);
161
162 /*
163 * #System Information
164 * CAMPAIGNS:>:-delimited list<
165 * VERSION:x.x.x
166 * ROLLMETHOD:xxx
167 * PURCHASEPOINTS:Y or N|TYPE:>living City, Living greyhawk, etc<
168 * UNLIMITEDPOOLCHECKED:Y or N
169 * POOLPOINTS:>numeric value 0-?<
170 * GAMEMODE:DnD
171 * AUTOSPELLS:Y or N
172 * AUTOCOMPANIONS:Y or N
173 *
174 * hmmm, better have
175 * CAMPAIGNS:>campaign_name<|CAMPAIGNS:>campaign_name<|...
176 */
177 appendNewline(buffer);
178 appendComment("System Information", buffer); //$NON-NLS-1$
179
180 //appendCampaignLineOldFormat(buffer);
181 appendCampaignLine(buffer);
182 appendVersionLine(buffer);
183 appendRollMethodLine(buffer);
184 appendPurchasePointsLine(buffer);
185 appendCharacterTypeLine(buffer);
186 appendPreviewSheetLine(buffer);
187
188 //appendUnlimitedPoolCheckedLine(buffer);
189 appendPoolPointsLine(buffer);
190 appendGameModeLine(buffer);
191 appendAutoSpellsLine(buffer);
192 appendUseHigherSpellSlotsLines(buffer);
193 appendLoadCompanionLine(buffer);
194 appendUseTempModsLine(buffer);
195 appendOutputSheetsLines(buffer);
196 appendAutoSortLines(buffer);
197 appendSkillFilterLine(buffer);
198 appendGearCostSizeLines(buffer);
199
200 /*
201 * #Character Bio
202 * CHARACTERNAME:Code Monkey
203 * TABNAME:Code Monkey the Best Ever No Really!
204 * PLAYERNAME:Jason Monkey
205 * HEIGHT:75
206 * WEIGHT:198
207 * AGE:17
208 * GENDER:text
209 * HANDED:text
210 * SKIN:text
211 * EYECOLOR:text
212 * HAIRCOLOR:text

Callers 3

writeMethod · 0.80
runWriteReadMethod · 0.80
dumpPCMethod · 0.80

Calls 15

appendPCGVersionLineMethod · 0.95
appendNewlineMethod · 0.95
appendCommentMethod · 0.95
appendCampaignLineMethod · 0.95
appendVersionLineMethod · 0.95
appendRollMethodLineMethod · 0.95
appendPoolPointsLineMethod · 0.95
appendGameModeLineMethod · 0.95
appendAutoSpellsLineMethod · 0.95

Tested by 2

runWriteReadMethod · 0.64
dumpPCMethod · 0.64