1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 |
-- Common Data for CharacterCreate
CHARACTER_CREATE_SLIDER_TYPE_SLIDER = "slider"
CHARACTER_CREATE_SLIDER_TYPE_ICON = "icon"
CHARACTER_CREATE_SLIDER_TYPE_COLOR = "color"
CHARACTER_CREATE_SLIDER_TYPE_NAMED = "named"
CHARACTER_CREATE_SLIDER_TYPE_GENDER = "gender"
CREATE_BUCKET_RACE = 1
CREATE_BUCKET_CLASS = 2
CREATE_BUCKET_BODY = 3
CREATE_BUCKET_HEAD_TYPE = 4
CREATE_BUCKET_FEATURES = 5
CREATE_BUCKET_BODY_SHAPE = 6
CREATE_BUCKET_FACE = 7
CREATE_BUCKET_EYES = 8
CREATE_BUCKET_EARS = 9
CREATE_BUCKET_NOSE = 10
CREATE_BUCKET_MOUTH = 11
NUM_CREATE_BUCKETS = 11
CHARACTER_CREATE_MODE_CREATE = "create"
CHARACTER_CREATE_MODE_EDIT_RACE = "raceChange"
CHARACTER_CREATE_MODE_EDIT_APPEARANCE = "appearanceChange"
CHARACTER_CREATE_MODE_EDIT_ALLIANCE = "allianceChange"
CHARACTER_CREATE_SELECTOR_RACE = "race"
CHARACTER_CREATE_SELECTOR_CLASS = "class"
CHARACTER_CREATE_SELECTOR_ALLIANCE = "alliance"
CHARACTER_CREATE_SELECTOR_GENDER = "gender"
CHARACTER_CREATE_MAX_SUPPORTED_CLASSES = 9
--[[ Character Create Manager]] --
ZO_CHARACTER_CREATE_SYSTEM_NAME = "CHARACTER_CREATE"
self . shouldPromptForTutorialSkip = true -- this in addition to the account flag means we should prompt
end
end
end
ZO_Dialogs_ShowPlatformDialog ( "CHARACTER_CREATE_SAVE_SUCCESS" , { characterId = characterId , pendingAllianceChange = pendingAllianceChange } )
end
local dialogParams =
{
}
end
local characterCreateGamepad
local characterCreateKeyboard
end
end
-- Nightmare load-ordering dependency...there are probably other ways around this, and they're probably just as bad.
-- Once game data is loaded, generate a random character for character create just to advance the
-- load state. It won't necessarily do any extra work creating an actual character, since we're going
-- to drop back into the current state, but we need to tell the system to load something
-- in order to load correctly we need to be put into CHARACTER_MODE_CREATION first
-- now reset character create to generate a random character
if characterCreateGamepad then
end
if characterCreateKeyboard then
end
end
end
end
-- match the conditional in AttemptToFireCharacterConstructionReady which fires the "OnCharacterConstructionReady" callback
-- if we don't check that the character list has been received we can attempt to generate a random character
-- before the pregame cahracter manager is ready
end
end
EVENT_MANAGER : RegisterForEvent ( "ZO_CharacterCreate_Gamepad" , EVENT_LOGOUT_SUCCESSFUL , OnLogoutSuccessful )
EVENT_MANAGER : RegisterForEvent ( "ZO_CharacterCreate_Gamepad" , EVENT_CHARACTER_CREATED , OnCharacterCreated )
EVENT_MANAGER : RegisterForEvent ( "ZO_CharacterCreate_Gamepad" , EVENT_CHARACTER_CREATE_FAILED , OnCharacterCreateFailed )
EVENT_MANAGER : RegisterForEvent ( "ZO_CharacterCreate_Gamepad" , EVENT_CHARACTER_EDIT_SUCCEEDED , OnCharacterEditSucceeded )
EVENT_MANAGER : RegisterForEvent ( "ZO_CharacterCreate_Gamepad" , EVENT_CHARACTER_EDIT_FAILED , OnCharacterEditFailed )
EVENT_MANAGER : RegisterForEvent ( "ZO_CharacterCreate_Gamepad" , EVENT_ENTITLEMENT_STATE_CHANGED , OnChapterUpgraded )
end
end
end
end
end
end
end
end
end
end
end
end
{
locked = locked ,
}
end
return
end
return self . characterUnsavedSettings [ name ] [ type ] . value , self . characterUnsavedSettings [ name ] [ type ] . locked
end
end
function ZO_CharacterCreate_Manager : InitializeForCharacterEditMode ( characterData , characterCreateMode )
-- match the appearance set here to the default apperance set in PregameCharacterManager to avoid reloading the character
-- Blow away any unsaved settings because we're about to initialize all the settings to match the given characterData
end
end
end
end
end
function ZO_CharacterCreate_Manager . GetOptionRestrictionString ( restrictionReason , restrictingCollectible )
if restrictionReason ~= CHARACTER_CREATE_OPTION_RESTRICTION_REASON_NONE then
if restrictingCollectible ~= 0 then
restrictionString = zo_strformat ( restrictionString , GetCollectibleName ( restrictingCollectible ) , GetCollectibleCategoryNameByCollectibleId ( restrictingCollectible ) )
else
end
return restrictionString
end
return ""
end
--[[ Character Create Base ]] --
end
end
end
if characterCreateMode == CHARACTER_CREATE_MODE_EDIT_APPEARANCE then
return SERVICE_TOKEN_APPEARANCE_CHANGE
elseif characterCreateMode == CHARACTER_CREATE_MODE_EDIT_RACE then
return SERVICE_TOKEN_RACE_CHANGE
elseif characterCreateMode == CHARACTER_CREATE_MODE_EDIT_ALLIANCE then
return SERVICE_TOKEN_ALLIANCE_CHANGE
else
return SERVICE_TOKEN_NONE
end
end
end
end
-- Any functions that end up changing sliders need to be wrapped like this
if race == currentRace then
return
end
-- When picking a race, unless the player is entitled to playing any race as any alliance or if the newly selected race
-- has no alliance, we need to choose a new alliance for the player. This is currently done as picking an alliance that matches
-- the newly selected race
local chooseNewAlliance = true
chooseNewAlliance = false
end
if currentRaceData . alliance == ALLIANCE_NONE then
chooseNewAlliance = false
end
if chooseNewAlliance then
if allianceData . alliance == currentRaceData . alliance then
end
end
end
end
if allianceDef == currentAlliance then
return
end
-- When picking an alliance, unless the player is entitled to playing any race as any alliance or if the current race
-- has no alliance, we need to choose a new race for the player. This is currently done as picking a race in the new
-- alliance column that shares the row with the previous race. If that race isn't selectable, then a random race in the
-- new alliance will be selected.
return
end
if currentRaceData . alliance == ALLIANCE_NONE then
return
end
-- Looking for the race on the same row as this one in the column under the appropriate alliance
local racePos = currentRaceData . position - 1
local allianceCol = currentAllianceData . position - 1
local desiredRacePos = ( raceRow * 3 ) + allianceCol + 1
if raceData . position == desiredRacePos then
end
end
end
if gender == currentGender then
return
end
end
if class == currentClass then
return
end
end
end
end
end
end
if alliance then
end
return "" , "" , ""
end
return
end
end
allianceButton . defId = allianceData . alliance
end
buttonControl . defId = raceData . race
buttonControl . alliance = raceData . alliance
end
if not ZO_CHARACTERCREATE_MANAGER : HasRandomCharacterGenerated ( ) and self . characterData : GetRaceInfo ( ) ~= nil then
return true
end
return false
end
local requestSkipTutorial = createOption == CHARACTER_CREATE_SKIP_TUTORIAL
end
end
local enabled = raceData . isSelectable -- Only if the user is able to play the race in the first place do we even consider enabling it...
local templateRace = templateData . race
-- check if the template has a race it forces the player to
if templateRace ~= 0 then
-- if this isn't the race specified by the template, disable it
if templateRace ~= raceData . race then
end
else
-- check to see if the selected race is allowed based on the template alliance
local templateAlliance = templateData . alliance
if templateAlliance ~= ALLIANCE_NONE then
end
end
-- Exceptions to the rule, some races may still be enabled (Imperials is the only case now...)
if raceData . alliance == ALLIANCE_NONE then
end
end
end
end
return classData . isSelectable and ( templateData . class == 0 or templateData . class == classData . class )
end
return allianceData . isSelectable and ( templateData . alliance == ALLIANCE_NONE or templateData . alliance == allianceData . alliance )
end
function ZO_CharacterCreate_Base : UpdateSelectorsForTemplate ( isEnabledCallback , characterDataTable , templateData , radioGroup , optionalValidIndexTable )
end
end
end
local NUM_FLASHES_BEFORE_SOLID = 7
end
ZO_CHARACTERCREATE_MANAGER : SetRandomCharacterGenerated ( false ) -- the next time we enter character create, we want to generate a random character again.
end
local tokenType
if createMode == CHARACTER_CREATE_MODE_EDIT_APPEARANCE then
tokenType = SERVICE_TOKEN_APPEARANCE_CHANGE
elseif createMode == CHARACTER_CREATE_MODE_EDIT_RACE then
tokenType = SERVICE_TOKEN_RACE_CHANGE
elseif createMode == CHARACTER_CREATE_MODE_EDIT_ALLIANCE then
tokenType = SERVICE_TOKEN_ALLIANCE_CHANGE
end
ZO_Dialogs_ShowPlatformDialog ( "CHARACTER_CREATE_CONFIRM_SAVE_CHANGES" , { tokenType = tokenType } , { mainTextParams = { tokenString } } )
else
ZO_Dialogs_ShowPlatformDialog ( "CHARACTER_CREATE_NO_CHANGES_MADE" , { tokenType = tokenType , newState = "CharacterSelect_FromIngame" } , { mainTextParams = { tokenString } } )
end
end
if createMode == CHARACTER_CREATE_MODE_CREATE then
else
local tokenType
if createMode == CHARACTER_CREATE_MODE_EDIT_APPEARANCE then
tokenType = SERVICE_TOKEN_APPEARANCE_CHANGE
elseif createMode == CHARACTER_CREATE_MODE_EDIT_RACE then
tokenType = SERVICE_TOKEN_RACE_CHANGE
elseif createMode == CHARACTER_CREATE_MODE_EDIT_ALLIANCE then
tokenType = SERVICE_TOKEN_ALLIANCE_CHANGE
end
ZO_Dialogs_ShowPlatformDialog ( "CHARACTER_CREATE_CONFIRM_REVERT_CHANGES" , { newState = stateName } , { mainTextParams = { tokenString } } )
else
ZO_Dialogs_ShowPlatformDialog ( "CHARACTER_CREATE_NO_CHANGES_MADE" , { tokenType = tokenType , newState = stateName } , { mainTextParams = { tokenString } } )
end
end
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Should be overridden
end
-- Optional override
end
--[[ Character Create Global functions ]] --
end
local screen
screen = ZO_CharacterCreate_Gamepad
else
screen = ZO_CharacterCreate
end
end
end
end
end
if ZO_RZCHROMA_EFFECTS then
end
end |