scrivener07 / fo4_games Goto Github PK
View Code? Open in Web Editor NEWPlay classic games in Fallout 4.
License: MIT License
Play classic games in Fallout 4.
License: MIT License
The vanilla HUDMenu has masked, drawable regions which add difficulty to adding UI elements. If your custom UI element is not correctly configured for these special "visibility" regions they will cause your UI elements to become invisible or partially visible.
You play 52 card pickup. A deck of 52 cards is flung around an area. The player must race the clock to pick up all the cards.
This game is certainly a classic!
Tested by E
And now I just got busted out without my card being shown to me, I have 5, 4, 3 on the table, drew another card, told I was busted but no fourth card is shown
There is a log of it...
https://pastebin.com/4V9MeVPj
^ truncated
Now after that hand it's not dealing cards
Log section when dealing next hand after aboves missing fourth card:
https://pastebin.com/dTfhaGc9
(No cards actually dealt, no player controls, no exit from blackjack, had to exit the game)
Compete against the dealer and opponent players in blackjack.
At this point the competitor AI is fully functional. The issue is that for every game the maximum amount of competitors will be allocated for each game. Instead the amount of competitors should be variable. The amount of competitors should be determined by how many NPC actors are seated around the in world table before a game starts. I was thinking I could make a custom stool to place around tables and the game will allocate a competitor for each chair that has an NPC sitting in it.
We need a fully featured interface that does not rely on F4SE. With HUD Framework, we can still add hud widgets without any dependency to F4SE which would allow us to support Xbox. These hud widgets do have some limitations, in particular, the widgets cannot send data back to papyrus but we can send data from papyrus to the hud widgets. To summarize that, hud widgets can only receive data without F4SE.
Something that the vanilla messagebox does is return a user selected option from a pre-made messagebox menu. Messageboxes are a bit clunkly but in the vanilla interface system for blackjack we will still need a messagebox at times we need to process input from the player within papyrus.
Even though we cant completely get rid of the messageboxes for an Xbox version we can still do quite a bit to still make it look great.
turn
is a play action (hit, stand, double, split).turn
is a play action (hit, stand, double, split).turn
is a play action (hit, stand, double, split).This is how it looked in Fallout New Vegas. Looks like a good design to start with.
While the console menu is open the script should stop receiving key presses. This is because if the player opens the console they may accidently hit one of the menu prompt keys.
The card textures are 1K which is overkill for the distance they are viewed.
Use a 64x64 texture instead. I did a quick search and found the texture optimization project. I dont know much about art stuff, and even less about fallout 4 art stuff, so there are some things here for one of us to figure out. Even if we are reducing the texture size we should maintain a version of the highest quality we have available.
Lets try to make a healthy case for and against each of these. Please add your thoughts or concerns and feel free to edit this post with more details as we discuss each of them.
Only one game table exists in an inaccessible cell. When entering game mode, the player is teleported to this games location. The players controls will be limited and the camera directed by relevant game actions, most likely a top down view of the game.
Summation Bound offers a satisfactory gambling experience for a reasonable development cost.
Positives
Negatives
Multiple hand placed game tables exist in the world. The player enters game mode by activating the game like you would furniture. The player is free to look around and interact with objects and competitors as the game carries onward.
Summation Unbound offers an unparalleled immersive gambling experience at a substantial development cost.
Positives
Negatives
As shown in this video, a black jack game does not clean up and deallocate itself properly after a previous game has been completed.
Each blackjack game has a basic strategy, which is playing a hand of any total value against any dealer's up-card, which loses the least money to the house in the long term.
https://en.wikipedia.org/wiki/Blackjack#Basic_strategy
https://wizardofodds.com/games/blackjack/strategy/4-decks/
A second reference to go by depending on the rules.
A screenshot of the issue is included below. This happened immediately after the loading screen was finished. The wager message paused the game in this camera position which appears to be from the player still havok settling after loading into the level. Right after closing the wager message the camera corrected itself almost immediately.
Exiting via settlement object needs to be moved to next to the table instead of on top of, ideally we should add some sort of visual reference on the table to indicate where the player spawns after they play so they know how to position the table.
After playing blackjack for some time I get two errors in the papyrus log. The papyrus errors are Stack too deep
and Assigning None to a non-object variable
. When these errors occur the buttonhint script will still respond to registered key press events but the buttonhint UI HUD element will no longer be visible.
Papyrus Error - Stack Too Deep
"Stack too deep (infinite recursion likely) - aborting call and returning None"
Too many functions have been called without first returning from them. This usually happens due to infinite recursion in a script, but could also appear in highly complicated scripts that have lots of deep function calls. Try simplifying the script, removing the recursion, and making sure that any recursion has a termination condition.
[01/12/2018 - 02:03:45AM] error: Stack too deep (infinite recursion likely) - aborting call and returning None
stack:
[Games_Script_Blackjack_PlayerHuman (08002761)].games:shared:ui:buttonhint.GetMember() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\Display.psc" Line 51
<unknown self>.games:shared:ui:framework.DisplaySetVisible() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\Framework.psc" Line 165
[Games_Script_Blackjack_PlayerHuman (08002761)].games:shared:ui:buttonhint.Visible() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\Display.psc" Line 113
[Games_Script_Blackjack_PlayerHuman (08002761)].games:shared:ui:buttonhint.Shown.OnBeginState() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\ButtonHint.psc" Line 181
<truncated stack>
[01/12/2018 - 02:03:45AM] warning: Assigning None to a non-object variable named "::temp9"
stack:
[Games_Script_Blackjack_PlayerHuman (08002761)].games:shared:ui:buttonhint.GetMember() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\Display.psc" Line 51
<unknown self>.games:shared:ui:framework.DisplaySetVisible() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\Framework.psc" Line 165
[Games_Script_Blackjack_PlayerHuman (08002761)].games:shared:ui:buttonhint.Visible() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\Display.psc" Line 113
[Games_Script_Blackjack_PlayerHuman (08002761)].games:shared:ui:buttonhint.Shown.OnBeginState() - "D:\Games\Steam\SteamApps\common\Fallout 4\Data\Scripts\Source\FO4_Games\Games\Shared\UI\ButtonHint.psc" Line 181
<truncated stack>
This problem applies to at least commit at https://github.com/Scrivener07/FO4_Games/tree/8784776a121c8c23106cef57153b2a570d55ee51
A temporary fix in the form of an F4SE plugin is available in the repository. Neanka has graciously provided this fix, thanks!
The player can wager a 0
bet and still be allowed to play the game at this point. Bug or feature?
This wont make the playable milestone for now. We can get started on writing the tutorial text when we have time for this.
An idea to track the humans best stats and scores. A stat I had in mind was the highest amount of winnings you have won in a single session. A session starts the moment you sit down to play, and ends when you get up from the table. Another stat that would be cool to track is the amount of blackjack games that have been played. As always, your comments are appreciated.
Here is a list of stats.
Currently a message box appears offering 5 static amounts to wager or a cancel option before a game starts. Even when an option is selected, no wager is actually placed at the start of the game or awarded when the game is over.
The options are as follows.
Before moving forward with completing this game element lets consider our options.
On discord, we have previously discussed a barter themed approach to wagering a bet. Let me try to make a case for this idea. Fallouts world is a post apocalypse setting and also to some degree post society. I think one could also make the case that the world would also be post currency even though fallout lore uses caps as a primary currency. Even though caps are a part of lore I feel like they really dont make a good case for themselves to realistically work.
Im not proposing to do away with caps or anything like that as we would still need a way to summarize what something is worth in numerical terms anyway. I mean to suggest we supplement the wagering process with a more realistic barter approach. I had the idea of not only being able to wager say 100 caps but also wager goods like ammo, food, water, weapons, and other valuables. I imagine that could work something like when its time to make your wager an inventory/container menu opens before the player and thats where they place items for their bets, including caps. This can be done because I can get the value of item with papyrus.
Even if this is a good idea lets also consider the goals for our first milestone. If I had to estimate, I would say the development cost for something like a wagering system supplemented with bartering would be very low. On the other hand the full cost wont be fully realized until an attempt is made and we start to run into additional special edge cases for things we didnt consider up front. The benefit of going with a set of static options is that the development cost would be next to zero with no known special cases to consider.
Let me have it!
This is on my honeydew list. The material swaps in the CK have auto-assigned numbers for EditorIDs. They should have names as suggested by Sarina.
Its not a bug, or feature, or enhancement or related to anything in particular that matters.
In vanilla Fo4, when you first start the game and are leaving Vault 111, items you pick up are automatically hotkeyed for you.... So, what about giving the player aid items when they are transported to the gambling cell, and assigning them to specific favorite item hotkeys, then using scripts attached to those aid items so that when the player presses the button, input is taken via that aid item press? For example: 1 = Hit, 2 = Stay, 3 = Increase Bet, 4 = Decrease Bet, etc.
How about we create an SS addon plot for playing classic games like blackjack.
Places to add gambling NPC's (feel free to add more to this list if you want):
Commonwealth Locations:
-Dugout Inn [x] "coc DmndDugoutInn01"
-Colonial Taphouse [x] "coc DmndStandsTaphouse01"
-Third Rail [x] "coc GoodneighborTheThirdRail"
-Vault 81 [x] "coc Vault81"
-Prydwen [x] "coc PrydwenHull01"
-Railroad HQ[x] "coc RailroadHQ01"
Far harbor Locations:
-Acadia[x] "coc DLC03Acadia"
-Church of Children of Atom (The Nucleus) [x] "coc DLC03Nucleus"
-Far Harbor Town Bar [x] "coc DLC03FarHarborLastPlank"
Nuka World Locations:
-The Pack HQ[x] "coc DLC04HubPackLair"
-The Operators HQ[x] "coc DLC04HubOperatorLair01"
-The Disciples HQ[x] "coc DLC04HubFizztopMountainInterior01"
-Market in Nuka World[x] "coc NukaTownMarket01"
OnInit only occurs once ever during the entire lifetime of a script. The problem is likely the function OnInit
on the Games:Shared:UI:Display. Maybe F4SE/Scaleform does not persist injected UI elements across game reloads? I will try to use the OnPlayerLoadGame - Actor event to reload the UI display onto the target menu.
Papyrus
Event OnInit()
If (Data())
Load()
EndIf
EndEvent
Messageboxes are okay but they are not perfect. When information is shown to the user, they can only see it while the message is open. After they close the message they either have to remember that information for the duration of the game or have the same information restated in every following message.
We can supplement messages with new user interface HUD elements that only appear while playing the game. Below is some awful art I slapped together to show the kinds of info we might display on the HUD.
An introductory quest that imposes a requirement in order to gain entrance to the casino.
The rendering layer added by HUD framework is required for injected F4SE HUD elements to be visible on some areas of HUDMenu. That is also the reason why at least one hudwidget needs to be loaded in order to kickstart HUD Framework.
The ace is returning its "soft" score.
After the player first activates the table and is presented with the yes or no option, if they select No, the table cannot be re-activated to bring up the message box again.
A new casino location to showcase various games of chance added by this mod. What are some of the finer details for this goal?
Casino Details
We need basic wagering for a complete and playable game of blackjack.
Currently a message box appears offering 5 static amounts to wager or a cancel option before a game starts. Even when an option is selected, no wager is actually placed at the start of the game or awarded when the game is over.
The options are as follows.
As a result of the conversation on issue #5, a bound style presentation and perspective need to be created.
A top down camera view of the gambling table seems like the best choice. For now I need to explore best implementation before I know what the exact presentation may look like.
If you activate the table with your weapon drawn, it will be visible when you play the game.
Values are not resetting correctly after a match.
In this screenshot the BET is stuck on 50 and cannot be changed except for setting MINIMUM to 5. On the last hand a bet of 50 was valid because there was sufficient CAPS. When a new match starts I need to check the players CAPS and reduce the last bet if they don't have the CAPS.
Its completely stuck here. I should also check that the player can at least afford the minimum bet. For example if the minimum bet is 5 caps and the player has 4 caps.
Should we place tables around the world or an NPC to start the blackjack game? My personal vote is NPC for the following reasons:
There might be more pros and there might be cons I am not considering but I really think this is a great option, please feel free to disagree and challenge me on it, but I want feedback before we start working on adding the game to worldspaces.
I like the idea of perks that can be earned by completing challenges related to gambling. An idea for one of these perks went something like this.
Perk Luck of the Draw
Description You always keep a trick up your sleeve.
When you accept this perk, choose a card. You hide this card in your boot. During a card game you may either choose to draw your next card or play the card in your boot.
An example of a gambling challenge to complete in order to earn a perk might go something like this.
Challenge: Score a black jack three times in a row to earn Luck of the Draw.
Exiting via dialogue when cancelling or simply quitting does not work at all and leaves the player stranded in the GamblingCell
.
I have been discussing with Shadow from the Cascadia team about general ways to implement a Luck based effect on the "randomness" of dealing cards to the player. I.E. at higher luck levels you will get dealt better cards. I will copy over his suggestions, I am thinking that certain degrees of combinations of his suggestions might work best in order to achieve a more RPG feel to gambling.
The black jack Cards do not handle the roation of a target table marker.
This issue thread should be used for suggesting and discussing mod titles. Current suggestions:
Gambling
Fallout 4 Gambling
Commonwealth Gambling
Gambling of the Commonwealth
Gambling in the Commonwealth
Barstool Games
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.