4
Fork 0

Added select fallbacks to all inputs except gambling

development
Eddoursul 2 months ago
parent 10af737904
commit d9476ac786
  1. BIN
      Text input fallback.esp
  2. BIN
      scripts/_00e_a0_banksystemquest.pex
  3. BIN
      scripts/_00e_fs_nq02_functions.pex
  4. BIN
      scripts/_00e_game_playerhouse_boardsc.pex
  5. BIN
      scripts/_00e_game_playerhouse_documentsc.pex
  6. BIN
      scripts/_00e_nq06_functions.pex
  7. BIN
      scripts/enderalfunctions.pex
  8. 60
      source/scripts/_00e_a0_banksystemquest.psc
  9. 49
      source/scripts/_00e_fs_nq02_functions.psc
  10. 4
      source/scripts/_00e_game_playerhouse_boardsc.psc
  11. 2
      source/scripts/_00e_game_playerhouse_documentsc.psc
  12. 10
      source/scripts/_00e_nq06_functions.psc
  13. 1
      source/scripts/_00e_playerhousing_cellnamesc.psc
  14. 9
      source/scripts/enderalfunctions.psc

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -91,10 +91,61 @@ function Transfer(string TransferRate, string TransferAction)
if TransferRate == "start"
if TransferAction == "Deposit"
iMaxAmount = GetPlayer().GetItemCount(Gold)
CashFlow = (((Self as QUEST) as FORM) as UILIB_1).ShowTextInput(_00E_BankSystem_Deposit_Comfy .GetName()+iMaxAmount+")", iMaxAmount) as Int
if EnderalFunctions.TextInputEnabled()
CashFlow = (((Self as QUEST) as FORM) as UILIB_1).ShowTextInput(_00E_BankSystem_Deposit_Comfy.GetName() + iMaxAmount + ")", iMaxAmount) as Int
else
int iFallback = _00E_BankSystem_Deposit_FallbackSelect.Show(Deposited)
if iFallback == 0
CashFlow = 100
elseif iFallback == 1
CashFlow = 250
elseif iFallback == 2
CashFlow = 500
elseif iFallback == 3
CashFlow = 1000
elseif iFallback == 4
CashFlow = 1500
elseif iFallback == 5
CashFlow = 2000
else
bTransferInAction = False
return
endif
endif
else
iMaxAmount = REFdepositBox.GetItemCount(Gold)
CashFlow = (((Self as QUEST) as FORM) as UILIB_1).ShowTextInput(_00E_BankSystem_Withdraw_Comfy .GetName()+iMaxAmount+")", iMaxAmount) as Int
if EnderalFunctions.TextInputEnabled()
CashFlow = (((Self as QUEST) as FORM) as UILIB_1).ShowTextInput(_00E_BankSystem_Withdraw_Comfy.GetName() + iMaxAmount + ")", iMaxAmount) as Int
else
int iFallback = _00E_BankSystem_Withdraw_FallbackSelect.Show(iMaxAmount)
if iFallback == 0
CashFlow = 100
elseif iFallback == 1
CashFlow = 250
elseif iFallback == 2
CashFlow = 500
elseif iFallback == 3
CashFlow = 1000
elseif iFallback == 4
CashFlow = 1500
elseif iFallback == 5
CashFlow = 2000
elseif iFallback == 6
CashFlow = iMaxAmount
else
bTransferInAction = False
return
endif
endif
endif
if CashFlow <= 0
bTransferInAction = False
return
endif
if CashFlow > iMaxAmount
@ -227,6 +278,8 @@ Message Property _00E_Bank_NotEnoughMoneyWithdraw Auto
Message Property _00E_Bank_NotEnoughMoneyDeposit Auto
Message Property _00E_BankSystem_Deposit_Comfy Auto
Message Property _00E_BankSystem_Deposit_FallbackSelect Auto
Message Property _00E_BankSystem_Withdraw_FallbackSelect Auto
Message Property _00E_BankSystem_Withdraw_Comfy Auto
Message Property _00E_BankSystem_Root Auto
@ -248,4 +301,5 @@ Topic Property BankSystem_D0_PlayerWithdrawTopic Auto
float property Zins auto hidden
float property ZinsPercent auto hidden
float property Deposited auto hidden
float property Deposited auto hidden

@ -872,13 +872,6 @@ Weapon Property _01E_07_SteelDagger Auto
Function PrepareCardgame()
If PlayerRef.GetItemCount(Gold001)<20; Failsafe, falls Player kein Gold hat
PlayerRef.AddItem(Gold001, 20, true)
EndIf
If _00E_FS_NQ02_EsmeREF.GetItemCount(Gold001)<20 ; Failsafe, falls Esme kein Gold hat
_00E_FS_NQ02_EsmeREF.AddItem(Gold001, 20, true)
EndIf
OpenCardInterface()
;CardgameVar1 = 1 -> Spiel 1 gewonnen
;CardgameVar1 = 2 -> Spiel 1 verloren
@ -915,15 +908,40 @@ Function PlayCards()
EndFunction
int Function Step01() ; place your bet
If PlayerRef.GetItemCount(Gold001) < 20; Failsafe, falls Player kein Gold hat
PlayerRef.AddItem(Gold001, 20, true)
EndIf
If _00E_FS_NQ02_EsmeREF.GetItemCount(Gold001) < 160 ; Failsafe, falls Esme kein Gold hat
_00E_FS_NQ02_EsmeREF.AddItem(Gold001, 160, true)
EndIf
; need to calculate the max bet first
If _00E_FS_NQ02_EsmeREF.GetItemCount(Gold001) > PlayerRef.GetItemCount(Gold001)
MaxBet = (PlayerRef.GetItemCount(Gold001))/2
MaxBet = PlayerRef.GetItemCount(Gold001) / 2
ElseIf _00E_FS_NQ02_EsmeREF.GetItemCount(Gold001) < PlayerRef.GetItemCount(Gold001)
MaxBet = (_00E_FS_NQ02_EsmeREF.GetItemCount(Gold001))/2
MaxBet = _00E_FS_NQ02_EsmeREF.GetItemCount(Gold001) / 2
Else
MaxBet = (PlayerRef.GetItemCount(Gold001))/2
MaxBet = PlayerRef.GetItemCount(Gold001) / 2
EndIf
PlayerBet = (((self as QUEST) as FORM) as UILIB_1).ShowTextInput(PlaceYourBet .GetName()+MaxBet, MaxBet) as int
if EnderalFunctions.TextInputEnabled()
PlayerBet = (((self as QUEST) as FORM) as UILIB_1).ShowTextInput(PlaceYourBet.GetName()+MaxBet, MaxBet) as int
else
int iFallbackBet = _SAG_PlaceYourBet_FallbackMessageEsme.Show()
if iFallbackBet == 3
PlayerBet = 80
elseif iFallbackBet == 2
PlayerBet = 50
elseif iFallbackBet == 1
PlayerBet = 20
else
PlayerBet = 10
endif
endif
If PlayerBet > MaxBet || PlayerBet == 0
Step01()
RETURN 0
@ -936,7 +954,7 @@ int Function Step01() ; place your bet
GlobalBet = OpponentBet + PlayerBet
_00E_FS_NQ02_PC_BetMessage.Show(PlayerBet, OpponentBet, GlobalBet)
EnemyPurse.EnableNoWait(true)
RegisterForKey(14)
RegisterForKey(14) ; not doing anything?
RegisterForKey(271)
Step02()
Return PlayerBet
@ -1089,7 +1107,9 @@ Function FinishGameAndClearUp()
PlayerREF.MoveTo(_00E_FS_NQ02_PlayerChairREF)
EnablePlayerControls()
SetGameSettingString("sCharGenControlsDisabled", s_chargeninitialtext)
if SKSE.GetVersion()
SetGameSettingString("sCharGenControlsDisabled", s_chargeninitialtext)
endif
SetInChargen(abDisableSaving = false, abDisableWaiting = true, abShowControlsDisabledMessage = false)
EndFunction
@ -1131,6 +1151,7 @@ Spell Property dunReanimateSelf Auto
Actor Property Commentator Auto
Message Property PlaceYourBet Auto
Message Property _SAG_PlaceYourBet_FallbackMessageEsme Auto
GlobalVariable Property ExAequo Auto
GlobalVariable Property WonGames Auto
@ -1185,4 +1206,4 @@ Sound Property _00E_TavernGames_DiceRollM Auto
Sound Property _00E_MAGFXFireOilIgniteLow Auto
Sound Property _00E_FS_Phasmalist_EnterWorld_Male Auto
MiscObject Property Gold001 Auto
MiscObject Property Gold001 Auto

@ -93,7 +93,7 @@ function OnActivate(ObjectReference akActionRef)
elseif iButton == 5
if SKSE.GetVersion()
if EnderalFunctions.TextInputEnabled()
Cell cCurrentCell = Self.GetParentCell()
String sHouseName = NQ24.ChooseHouseName()
cCurrentCell.SetName(sHouseName)
@ -104,7 +104,7 @@ function OnActivate(ObjectReference akActionRef)
Player.sHouseNobleQuarterName = sHouseName
EndIf
else
Debug.Notification("Renaming requires SKSE")
Debug.Notification("Renaming requires SKSE and keyboard")
endif
elseif iButton == 6

@ -16,7 +16,7 @@ Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldCo
cHouseCell.SetActorOwner(PlayerREF.GetActorBase())
HouseBoardREF.Enable()
if SKSE.GetVersion()
if EnderalFunctions.TextInputEnabled()
sHouseName = NQ24.ChooseHouseName()
If sHouseName == ""
sHouseName = DefaultHouseName.GetName()

@ -8,7 +8,7 @@ Function SetHorseName()
_00E_HorseOwned.SetValueInt(1)
if ! SKSE.GetVersion()
if ! EnderalFunctions.TextInputEnabled()
return
endif
@ -29,7 +29,7 @@ Function SetMuleName()
_00E_MuleOwned.SetValueInt(1)
if ! SKSE.GetVersion()
if ! EnderalFunctions.TextInputEnabled()
return
endif
@ -50,7 +50,7 @@ Function SetFatherShadowName()
_00E_FathersShadowOwned.SetValueInt(1)
if ! SKSE.GetVersion()
if ! EnderalFunctions.TextInputEnabled()
return
endif
@ -75,7 +75,7 @@ EndFunction
Function RenameMount(bool _bReturnToSelection)
if SKSE.GetVersion()
if EnderalFunctions.TextInputEnabled()
int iRenameSelection = _00E_NQ06_RenameMountSelection.Show()
If iRenameSelection == 0
SetMuleName()
@ -87,7 +87,7 @@ Function RenameMount(bool _bReturnToSelection)
ReturnToSelection(_bReturnToSelection)
else
Debug.Notification("Renaming requires SKSE")
Debug.Notification("Renaming requires SKSE and keyboard")
endif
EndFunction

@ -6,6 +6,7 @@ Scriptname _00E_PlayerHousing_CellNameSC extends ReferenceAlias
;=====================================================================================
Event OnPlayerLoadGame()
; Not calling TextInputEnabled() in case renames were made with keyboard earlier
if ! SKSE.GetVersion()
return
endif

@ -31,3 +31,12 @@ String Function GetPlayerClassNameGlobal() global
Quest AffinityQuest = Game.GetFormFromFile(0x1597B, "Enderal - Forgotten Stories.esm") as Quest
return (AffinityQuest.GetAlias(0) as _00E_AffinityControl).GetPlayerClassName()
endfunction
bool function IsVR() global
; Current VR build 2.0.12 (game version 1.4.15)
return SKSE.GetVersionRelease() == 60
endfunction
bool function TextInputEnabled() global
return SKSE.GetVersion() && ! Game.UsingGamepad() && ! IsVR()
endfunction

Loading…
Cancel
Save